From 193c4d799409884cc029362e276a02acdb1d0334 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 16:47:28 -0400 Subject: [PATCH 0001/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 868f2de5..c8bb5d36 100644 --- a/README.md +++ b/README.md @@ -590,7 +590,7 @@ ________________________________________________________________________________

n8n LXC

-[n8n](https://n8n.io/) is a workflow automation platform that doesn't box you in, that you never outgrow +[n8n](https://n8n.io/) is an extendable workflow automation tool which enables you to connect anything to everything. To create a new Proxmox n8n LXC, run the following in the Proxmox Shell. From b28f966c2c2782a4dae6e6cd4c2fe1805547eb47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Jul 2022 19:33:29 -0400 Subject: [PATCH 0002/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8bb5d36..b0fdf495 100644 --- a/README.md +++ b/README.md @@ -586,7 +586,7 @@ ________________________________________________________________________________
🔸n8n LXC -

+

n8n LXC

From ebea0be21de42b9c8828368638e672d2e1f12694 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Jul 2022 08:42:45 -0400 Subject: [PATCH 0003/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0fdf495..469afdb3 100644 --- a/README.md +++ b/README.md @@ -1957,7 +1957,7 @@ ________________________________________________________________________________
- 🔸Vaultwarden LXC + Vaultwarden LXC

From ba2e96b7baa5f9be6096edf1e25539b0b3a91157 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Jul 2022 09:31:40 -0400 Subject: [PATCH 0004/3335] Update haos-vm-v3.sh --- vm/haos-vm-v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 105aad6d..7e666b1b 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -336,7 +336,7 @@ pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ - -scsi0 ${DISK1_REF},size=32G >/dev/null + -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS From f6bfbf03fa22944298024f8fcdc862467937dc03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Jul 2022 09:57:25 -0400 Subject: [PATCH 0005/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index e6005cd1..dbc9ee06 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,15 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-07-24 + +### Changed + +- **Home Assistant OS VM** + - Present the drive to the guest as a solid-state drive rather than a rotational hard disk. There is no requirement that the underlying storage actually be backed by SSD's. + - When the VM’s filesystem marks blocks as unused after deleting files, the SCSI controller will relay this information to the storage, which will then shrink the disk image accordingly. + + ## 2022-07-22 ### Changed From e89b63b06c40db0ccd42ed37c49b2378357616cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Jul 2022 09:57:56 -0400 Subject: [PATCH 0006/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 469afdb3..6a4d031b 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ________________________________________________________________________________
- Home Assistant OS VM + 🔸Home Assistant OS VM

From 76837433f98fbf8d3fd01f76e5f63a9b1fe2c01b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Jul 2022 21:35:21 -0400 Subject: [PATCH 0007/3335] Update magicmirror-install.sh --- setup/magicmirror-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 3513f225..880f959a 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -66,7 +66,7 @@ apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null +curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 5c6c92136753ed607826744a44e2e04cf10c9db7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Jul 2022 18:10:50 -0400 Subject: [PATCH 0008/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index dbc9ee06..7874d87f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,9 +7,10 @@ All notable changes to this project will be documented in this file. ### Changed -- **Home Assistant OS VM** +- **Home Assistant OS VM** - Present the drive to the guest as a solid-state drive rather than a rotational hard disk. There is no requirement that the underlying storage actually be backed by SSD's. - When the VM’s filesystem marks blocks as unused after deleting files, the SCSI controller will relay this information to the storage, which will then shrink the disk image accordingly. + - 👉 [more info](https://github.com/tteck/Proxmox/discussions/378) ## 2022-07-22 From 1738b956be749f042f86990d1e60ebce7e98aebd Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Jul 2022 17:08:44 -0400 Subject: [PATCH 0009/3335] Update haos-vm-v3.sh --- vm/haos-vm-v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 7e666b1b..6e92ae82 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -330,7 +330,7 @@ done msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ +qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null From 687b0ba2946755d97393624e04cc93a7d9452bd8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Jul 2022 17:31:03 -0400 Subject: [PATCH 0010/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7874d87f..6956b22e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,14 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-07-26 + +### Changed + +- **Home Assistant OS VM** + - Set the real time clock (RTC) to local time. + - Disable the USB tablet device (save resources / not needed). + ## 2022-07-24 ### Changed @@ -12,7 +20,6 @@ All notable changes to this project will be documented in this file. - When the VM’s filesystem marks blocks as unused after deleting files, the SCSI controller will relay this information to the storage, which will then shrink the disk image accordingly. - 👉 [more info](https://github.com/tteck/Proxmox/discussions/378) - ## 2022-07-22 ### Changed From fa8ff8d2171ae5ed0220c350cd4a28d1260fd469 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Jul 2022 01:47:51 -0400 Subject: [PATCH 0011/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a4d031b..5b6ee203 100644 --- a/README.md +++ b/README.md @@ -1543,7 +1543,7 @@ ________________________________________________________________________________
- 🔸grocy LXC + grocy LXC

From 3fb7dbd51cd5e97e84c2a3f0a904b48062d6be23 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Jul 2022 06:27:53 -0400 Subject: [PATCH 0012/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b6ee203..12ce908e 100644 --- a/README.md +++ b/README.md @@ -584,7 +584,7 @@ ________________________________________________________________________________
- 🔸n8n LXC + n8n LXC

From 3f84f9b2878833e06127e94281a6032e07bb0d87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Jul 2022 11:03:45 -0400 Subject: [PATCH 0013/3335] Update post-install-v3.sh --- misc/post-install-v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-install-v3.sh b/misc/post-install-v3.sh index effa399d..747c2128 100644 --- a/misc/post-install-v3.sh +++ b/misc/post-install-v3.sh @@ -110,7 +110,7 @@ then msg_info "Updating Proxmox VE 7" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null -msg_ok "Updated Proxmox VE 7" +msg_ok "Updated Proxmox VE 7 (Reboot Recommended)" fi sleep 2 From abee6b784af62d8e9fd39b10e82bf8a9fa435a84 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Jul 2022 17:51:48 -0400 Subject: [PATCH 0014/3335] test --- vm/haos_vm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 1153be37..42f3dd29 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -3,7 +3,7 @@ echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') -STABLE="8.1" +STABLE="8.2" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -332,10 +332,10 @@ msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 128 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ + -efidisk0 ${DISK0_REF},size=128k \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From ab4ab4d8c5e04081e9d1d9a438559ebb0af06ac2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Jul 2022 18:04:22 -0400 Subject: [PATCH 0015/3335] Update haos_vm.sh --- vm/haos_vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 42f3dd29..dc81e84d 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -335,7 +335,7 @@ qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $ pvesm alloc $STORAGE $VMID $DISK0 128 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},size=128k \ + -efidisk0 ${DISK0_REF},size=128K \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From a4d6fee95fc169e43d36c2afc1f808abb517dd60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Jul 2022 22:08:13 -0400 Subject: [PATCH 0016/3335] add PVE check --- vm/haos-vm-v3.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh index 6e92ae82..4dbb9499 100644 --- a/vm/haos-vm-v3.sh +++ b/vm/haos-vm-v3.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash echo -e "Loading..." +PVE=$(pveversion | grep "pve-manager/7" | wc -l) GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') @@ -49,6 +50,13 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null + +if [[ "$PVE" != "1" ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi while true; do clear From fe47b3d90f6fa9cc77e5318f3d58e8b9f59d1f2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Jul 2022 00:54:02 -0400 Subject: [PATCH 0017/3335] Update haos_vm.sh works with PVE6 --- vm/haos_vm.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index dc81e84d..89ec3614 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash echo -e "Loading..." +PVE=$(pveversion | grep "pve-manager/7" | wc -l) GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') -STABLE="8.2" +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -49,6 +50,12 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null + +if [[ "$PVE" == "1" ]]; then + echo -e "${YW}This script is for Proxmox Virtual Environment 6${CL}" + echo -e "Continuing..." + sleep 5 +fi while true; do clear @@ -260,7 +267,7 @@ fi } function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " + echo -e "${YW}Type Advanced (Latest ${RELEASE}), or Press [ENTER] for Default Settings (Stable ${STABLE}) " read SETTINGS if [ -z $SETTINGS ]; then default_settings; else @@ -312,15 +319,6 @@ case $STORAGE_TYPE in DISK_EXT=".qcow2" DISK_REF="$VMID/" DISK_IMPORT="-format qcow2" - ;; - - btrfs) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_FORMAT="subvol" - DISK_IMPORT="-format raw" - ;; - esac for i in {0,1}; do disk="DISK$i" @@ -341,7 +339,6 @@ qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS ### https://github.com/tteck/Proxmox" >/dev/null - msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" if [ "$START_VM" == "yes" ]; then From 5429e11bf54d1d0ea8273c7236f9e4e2a434c687 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 16:22:50 -0400 Subject: [PATCH 0018/3335] Create ubuntu-v4.sh an early look at the v4 script --- ct/ubuntu-v4.sh | 311 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 ct/ubuntu-v4.sh diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh new file mode 100644 index 00000000..dec5b882 --- /dev/null +++ b/ct/ubuntu-v4.sh @@ -0,0 +1,311 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Ubuntu" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="ubuntu" +var_version="22.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + __ ____ __ + / / / / /_v4__ ______ / /___ __ + / / / / __ \/ / / / __ \/ __/ / / / +/ /_/ / /_/ / /_/ / / / / /_/ /_/ / +\____/_.___/\__,_/_/ /_/\__/\__,_/ +${CL}" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + #var_version="22.04" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function advanced_settings() { +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +"18.04" "18.04" OFF \ +"20.04" "20.04" OFF \ +"21.10" "21.10" OFF \ +"22.04" "22.04" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi + +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi + +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi + +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + echo "Going Back to Advanced Settings" + advanced_settings +fi +} + +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script + +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null + +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" + +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit + +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') + +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/" + +msg_ok "Completed Successfully!\n" From d0090a8cd0bb00fe7860d6a622615689d111dd8e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 17:35:14 -0400 Subject: [PATCH 0019/3335] Update update-lxcs.sh --- misc/update-lxcs.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index d179b866..369631f4 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -35,14 +35,7 @@ function update_container() { clear header_info echo -e "${BL}[Info]${GN} Updating${BL} $container ${CL} \n" - pct config $container > temp - os=`awk '/^ostype/' temp | cut -d' ' -f2` - if [ "$os" == "alpine" ] - then - pct exec $container -- ash -c "apk update && apk upgrade" - else - pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y" - fi + pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y" } read -p "Skip stopped containers? " -n 1 -r echo @@ -76,5 +69,4 @@ do fi done; wait -rm temp echo -e "${GN} Finished, All Containers Updated. ${CL} \n" From 78fa9a70f74b8c2d94c3fd9f0c2aec835445270c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 20:13:34 -0400 Subject: [PATCH 0020/3335] Update ubuntu-v4.sh --- ct/ubuntu-v4.sh | 68 ++++++++----------------------------------------- 1 file changed, 10 insertions(+), 58 deletions(-) diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index dec5b882..4337d157 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -27,7 +27,6 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR - function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -36,7 +35,6 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then echo "User selected Yes" else @@ -53,28 +51,23 @@ echo -e "${YW} \____/_.___/\__,_/_/ /_/\__/\__,_/ ${CL}" } - function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } - function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } - function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi } - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" #var_version="22.04" @@ -104,23 +97,19 @@ function default_settings() { VLAN="" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } - function advanced_settings() { var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -"18.04" "18.04" OFF \ -"20.04" "20.04" OFF \ -"21.10" "21.10" OFF \ -"22.04" "22.04" ON \ +"18.04" "Bionic" OFF \ +"20.04" "Focal" OFF \ +"21.10" "Impish" OFF \ +"22.04" "Jammy" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -129,11 +118,8 @@ exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -144,78 +130,56 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi - CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' ') echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" else - clear - echo -e "⚠ User exited script \n" exit fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -226,7 +190,6 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -237,7 +200,6 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -248,7 +210,6 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -257,7 +218,6 @@ else advanced_settings fi } - function start_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then header_info @@ -271,16 +231,13 @@ fi } clear start_script - if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else FEATURES="nesting=1" fi - TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version @@ -296,16 +253,11 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" - lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/" - msg_ok "Completed Successfully!\n" From 90cbdb05efb6ec8bbf59bea03254fed0e9943689 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 20:16:41 -0400 Subject: [PATCH 0021/3335] Create debian-v4.sh --- ct/debian-v4.sh | 261 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 ct/debian-v4.sh diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh new file mode 100644 index 00000000..7fe07b7b --- /dev/null +++ b/ct/debian-v4.sh @@ -0,0 +1,261 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Debian" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + _____ _ _ + | __ \ | | (_) + | | | | ___| |__ _ __ _ _ __ + | | | |/ _ \ _ \| |/ _ | _ \ + | |__| | __/ |_) | | (_| | | | | + |_${YW}v4${RD}__/ \___|_.__/|_|\__,_|_| |_| +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + echo "Going Back to Advanced Settings" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" From e07ae08b0e18ab2017016075d8bf5ff399fb9841 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 20:17:26 -0400 Subject: [PATCH 0022/3335] Update ubuntu-v4.sh --- ct/ubuntu-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 4337d157..e7d0178d 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -70,7 +70,7 @@ fi } function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - #var_version="22.04" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" From 5b0f8710ee60eb3a95e1ab1e412f773955b8658e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 20:23:52 -0400 Subject: [PATCH 0023/3335] Create wireguard-v4.sh --- ct/wireguard-v4.sh | 264 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 ct/wireguard-v4.sh diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh new file mode 100644 index 00000000..fddf43bf --- /dev/null +++ b/ct/wireguard-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Wireguaed" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + __ ___ _____ _ + \ \ / (_) / ____| | | + \ \ /\ / / _ _ __ ___| | __ _ _ __ _ _ __ __| | + \ \/ \/ / | | __/ _ \ | |_ | | | |/ _ | __/ _ | + \ /\ / | | | | __/ |__| | |_| | (_| | | | (_| | + \/ \/ v4|_|_| \___|\_____|\__,_|\__,_|_| \__,_| + ${YW}With WGDashboard +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + echo "Going Back to Advanced Settings" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "WGDashboard should be reachable by going to the following URL. + ${BL}http://${IP}:10086${CL} \n" From 36c1dc455eb4e063611ef3324deac38d6ba357d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 21:30:19 -0400 Subject: [PATCH 0024/3335] Update debian-v4.sh --- ct/debian-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 7fe07b7b..5f99592f 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -128,7 +128,7 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" From e40781bb857be06e487f2cb26cd76b9abfba81f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 22:57:00 -0400 Subject: [PATCH 0025/3335] Create haos-vm-v4.sh --- vm/haos-vm-v4.sh | 292 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) create mode 100644 vm/haos-vm-v4.sh diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh new file mode 100644 index 00000000..1fa3e5eb --- /dev/null +++ b/vm/haos-vm-v4.sh @@ -0,0 +1,292 @@ +#!/usr/bin/env bash +echo -e "Loading..." +PVE=$(pveversion | grep "pve-manager/7" | wc -l) +GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +NEXTID=$(pvesh get /cluster/nextid) +RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + [ ! -z ${VMID-} ] && cleanup_vmid + exit $EXIT +} + +function cleanup_vmid() { + if $(qm status $VMID &>/dev/null); then + if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then + qm stop $VMID + fi + qm destroy $VMID + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null + +if [[ "$PVE" != "1" ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi + +if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + _ _ ____ _____ + | | | | /\ / __ \ / ____| + | |__| | / \ | | | | (___ + | __ | / /\ \| | | |\___ \ + | | | |/ ____ \ |__| |____) | + |_| |_/_/ ${CL}${YW}v4${CL}${BL} \_\____/|_____/ +${CL}" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function default_settings() { + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + VM_NAME=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}NONE${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" + START_VM="yes" + +} +function advanced_settings() { +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 2 \ +"$STABLE" "Stable" ON \ +"$RELEASE" "Latest" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" +else + exit +fi + +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" +else + exit +fi + +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${STABLE} --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi + +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi + +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi + +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi + +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + exit +fi + +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi + +if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Starting VM when completed${CL}" + START_VM="yes" +else + echo -e "${DGN}Do not start VM when completed${CL}" + START_VM="no" +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then + echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" +else + clear + echo "Going Back to Advanced Settings" + advanced_settings +fi +} + +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} + +start_script + +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) +done < <(pvesm status -content images | awk 'NR>1') +if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then + echo -e "'Disk image' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." +elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the HAOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" +msg_info "Extracting KVM Disk Image" +unxz $FILE +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in + nfs|dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; + + btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_FORMAT="subvol" + DISK_IMPORT="-format raw" + ;; + +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done +msg_ok "Extracted KVM Disk Image" + +msg_info "Creating HAOS VM" +qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ + -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ + -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null +qm set $VMID \ + -boot order=scsi0 >/dev/null +qm set $VMID -description "# Home Assistant OS +### https://github.com/tteck/Proxmox" >/dev/null +msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" + +if [ "$START_VM" == "yes" ]; then +msg_info "Starting Home Assistant OS VM" +qm start $VMID +msg_ok "Started Home Assistant OS VM" +fi +msg_ok "Completed Successfully!\n" From 2b41ad24ea9be31e4f23521f131b9633926b5728 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 23:06:21 -0400 Subject: [PATCH 0026/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 1fa3e5eb..c2ff7a40 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -23,7 +23,6 @@ shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR trap cleanup EXIT - function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -33,7 +32,6 @@ function error_exit() { [ ! -z ${VMID-} ] && cleanup_vmid exit $EXIT } - function cleanup_vmid() { if $(qm status $VMID &>/dev/null); then if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then @@ -42,22 +40,18 @@ function cleanup_vmid() { qm destroy $VMID fi } - function cleanup() { popd >/dev/null rm -rf $TEMP_DIR } - TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - if [[ "$PVE" != "1" ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit fi - if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" else @@ -75,12 +69,10 @@ echo -e "${BL} |_| |_/_/ ${CL}${YW}v4${CL}${BL} \_\____/|_____/ ${CL}" } - function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } - function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" @@ -91,7 +83,7 @@ function default_settings() { echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" VMID=$NEXTID echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - VM_NAME=haos${STABLE} + HN=haos${STABLE} echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" CORE_COUNT="2" echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" @@ -104,7 +96,7 @@ function default_settings() { VLAN="" echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" START_VM="yes" - + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 2 \ @@ -117,7 +109,6 @@ if [ $exitstatus = 0 ]; then else exit fi - VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -125,7 +116,6 @@ if [ $exitstatus = 0 ]; then else exit fi - VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${STABLE} --title "HOSTNAME" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -134,7 +124,6 @@ if [ $exitstatus = 0 ]; then else exit fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -142,7 +131,6 @@ if [ $exitstatus = 0 ]; then else exit fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -150,7 +138,6 @@ if [ $exitstatus = 0 ]; then else exit fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -158,7 +145,6 @@ if [ $exitstatus = 0 ]; then else exit fi - MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -167,7 +153,6 @@ if [ $exitstatus = 0 ]; then else exit fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -178,7 +163,6 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi - if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Starting VM when completed${CL}" START_VM="yes" @@ -194,7 +178,6 @@ else advanced_settings fi } - function start_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then clear @@ -208,9 +191,7 @@ else advanced_settings fi } - start_script - while read -r line; do TAG=$(echo $line | awk '{print $1}') TYPE=$(echo $line | awk '{printf "%-10s", $2}') @@ -254,14 +235,12 @@ case $STORAGE_TYPE in DISK_REF="$VMID/" DISK_IMPORT="-format qcow2" ;; - btrfs) DISK_EXT=".raw" DISK_REF="$VMID/" DISK_FORMAT="subvol" DISK_IMPORT="-format raw" ;; - esac for i in {0,1}; do disk="DISK$i" @@ -269,7 +248,6 @@ for i in {0,1}; do eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} done msg_ok "Extracted KVM Disk Image" - msg_info "Creating HAOS VM" qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci @@ -283,7 +261,6 @@ qm set $VMID \ qm set $VMID -description "# Home Assistant OS ### https://github.com/tteck/Proxmox" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" - if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" qm start $VMID From 40fdd09c47adc767c93c6ec23b8186b7f4575db8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 23:12:29 -0400 Subject: [PATCH 0027/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index c2ff7a40..693400e9 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -260,7 +260,7 @@ qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS ### https://github.com/tteck/Proxmox" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" +msg_ok "Created HAOS VM ${CL}${BL}${HN}" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" qm start $VMID From f9a0540decea04913380ec0b3ee1c8dfbd087740 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Jul 2022 23:48:50 -0400 Subject: [PATCH 0028/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 693400e9..5739f28a 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -173,9 +173,10 @@ fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else - clear - echo "Going Back to Advanced Settings" - advanced_settings + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings fi } function start_script() { @@ -260,7 +261,7 @@ qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS ### https://github.com/tteck/Proxmox" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}${HN}" +msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" qm start $VMID From 1189beb7ae60bbb3774515e62c36d47adf3c8cbd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 05:46:27 -0400 Subject: [PATCH 0029/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 5739f28a..3b6641f1 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -3,7 +3,7 @@ echo -e "Loading..." PVE=$(pveversion | grep "pve-manager/7" | wc -l) GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) -RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') +LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` @@ -101,7 +101,7 @@ function default_settings() { function advanced_settings() { BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 2 \ "$STABLE" "Stable" ON \ -"$RELEASE" "Latest" OFF \ +"$LATEST" "Latest" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From 271e8422b9ff6709b9059a1b89fbefbf844bf513 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 06:10:41 -0400 Subject: [PATCH 0030/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 3b6641f1..c2980aeb 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -7,6 +7,7 @@ LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-sys STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` +HA=`echo "\033[1;34m"` RD=`echo "\033[01;31m"` BGN=`echo "\033[4;92m"` GN=`echo "\033[1;92m"` @@ -60,13 +61,13 @@ else exit fi function header_info { -echo -e "${BL} - _ _ ____ _____ - | | | | /\ / __ \ / ____| - | |__| | / \ | | | | (___ - | __ | / /\ \| | | |\___ \ - | | | |/ ____ \ |__| |____) | - |_| |_/_/ ${CL}${YW}v4${CL}${BL} \_\____/|_____/ +echo -e "${HA} + __ _____ ____ _____ + / / / / | / __ \/ ___/ + / /_/ / /| |/ / / /\__ \ + / __ / ___ / /_/ /___/ / +/_/ /_/_/v4|_\____//____/ + Home Assistant OS ${CL}" } function msg_info() { From c357e1f7d011c262f3ffeccf7469614aa90044a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 07:21:35 -0400 Subject: [PATCH 0031/3335] Delete pimox-haos.sh --- vm/pimox-haos.sh | 343 ----------------------------------------------- 1 file changed, 343 deletions(-) delete mode 100644 vm/pimox-haos.sh diff --git a/vm/pimox-haos.sh b/vm/pimox-haos.sh deleted file mode 100644 index 38b009ae..00000000 --- a/vm/pimox-haos.sh +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/env bash -GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') -NEXTID=$(pvesh get /cluster/nextid) -RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') -STABLE="8.2" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - [ ! -z ${VMID-} ] && cleanup_vmid - exit $EXIT -} - -function cleanup_vmid() { - if $(qm status $VMID &>/dev/null); then - if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then - qm stop $VMID - fi - qm destroy $VMID - fi -} - -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -while true; do - read -p "This will create a New PiMox Home Assistant OS VM. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear - -function header_info { -echo -e "${YW} - - _____ _ _ _ ____ _____ - | __ (_) | | | | /\ / __ \ / ____| - | |__) | ______| |__| | / \ | | | | (___ - | ___/ |__v3__| __ | / /\ \| | | |\___ \ - | | | | | | | |/ ____ \ |__| |____) | - |_| |_| |_| |_/_/ \_\____/|_____/ -${CL}" -} -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using Version ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using VM ID ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using VM Name ${BGN}pi-haos${STABLE}${CL}" - VM_NAME=pi-haos${STABLE} - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}4096${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" - START_VM="yes" - -} -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Latest for Version ${RELEASE}, or Press [ENTER] for Stable Version ${STABLE} " - read BRANCH - if [ -z $BRANCH ]; then BRANCH=$STABLE; - else - BRANCH=$RELEASE; fi; - echo -en "${DGN}Set Version To ${BL}$BRANCH${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${YW}Enter the VM ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read VMID - if [ -z $VMID ]; then VMID=$NEXTID; fi; - echo -en "${DGN}Set VM ID To ${BL}$VMID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${YW}Enter VM Name (no-spaces), or Press [ENTER] for Default: pi-haos${BRANCH} " - read VMNAME - if [ -z $VMNAME ]; then - VM_NAME=pi-haos${BRANCH} - else - VM_NAME=$(echo ${VMNAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$VM_NAME${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}${CORE_COUNT}${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 4096 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Valid MAC Address, or Press [ENTER] for Generated MAC: $GEN_MAC " - read MAC - if [ -z $MAC ]; then MAC=$GEN_MAC; fi; - echo -en "${DGN}Set MAC Address To ${BL}$MAC${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - echo -e "${YW}Start VM when completed, or Press [ENTER] for Default: yes " - read START_VM - if [ -z $START_VM ]; then START_VM="yes"; - else - START_VM="no"; fi; - echo -en "${DGN}Starting VM when completed ${BL}$START_VM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - echo -e "${DGN}Start VM when completed ${BGN}$START_VM${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content images | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - echo -e "'Disk image' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the Pi-HAOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" -URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_generic-aarch64-${BRANCH}.img.xz -sleep 2 -msg_ok "${CL}${BL}${URL}${CL}" -wget -q --show-progress $URL -echo -en "\e[1A\e[0K" -FILE=$(basename $URL) -msg_ok "Downloaded ${CL}${BL}haos_generic-aarch64-${BRANCH}.img.xz${CL}" -msg_info "Extracting Disk Image" -unxz $FILE -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - btrfs|nfs|dir) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_IMPORT="-format raw" -esac -for i in {0,1}; do - disk="DISK$i" - eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} - eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} -done -msg_ok "Extracted Disk Image" - -msg_info "Creating Pi-HAOS VM" -qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ - -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null -qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ - -scsi0 ${DISK1_REF},size=32G >/dev/null -qm set $VMID \ - -boot order=scsi0 >/dev/null -#qm resize $VMID scsi0 +26G >/dev/null -qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox" >/dev/null - -msg_ok "Created Pi-HAOS VM ${CL}${BL}${VM_NAME}" - -if [ "$START_VM" == "yes" ]; then -msg_info "Starting Home Assistant OS VM" -qm start $VMID -msg_ok "Started Home Assistant OS VM" -fi -msg_ok "Completed Successfully!\n" From e6b4af33ef663103852c9d81100d18fef0946901 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 07:27:26 -0400 Subject: [PATCH 0032/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index c2980aeb..59549df7 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -93,7 +93,7 @@ function default_settings() { BRG="vmbr0" echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}NONE${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" VLAN="" echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" START_VM="yes" From d7eafbed46084a73d09bf18da09c69e78f60b32e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 07:30:48 -0400 Subject: [PATCH 0033/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 59549df7..18ca623d 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -95,7 +95,7 @@ function default_settings() { MAC=$GEN_MAC echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } @@ -165,10 +165,10 @@ else fi fi if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then - echo -e "${DGN}Starting VM when completed${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" else - echo -e "${DGN}Do not start VM when completed${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then From a8f176742358c1cc6ac91f9a5e54d792b1565d67 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 07:37:55 -0400 Subject: [PATCH 0034/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12ce908e..13f6a5db 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ The script automates the manual process of finding, downloading and extracting t To create a new Proxmox Home Assistant OS VM, run the following in the Proxmox Shell ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v4.sh)" ```

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

From 4df37263d69972dff95573e06e701f4237285d02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 07:40:14 -0400 Subject: [PATCH 0035/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6956b22e..1f55fa41 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-01 + +### Changed + +- **Home Assistant OS VM** + - v4 Script - Whiptail menus + ## 2022-07-26 ### Changed From a9999766b81b05ae5eb02dfd18fc9228302a3e34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:12:28 -0400 Subject: [PATCH 0036/3335] Update debian-v4.sh --- ct/debian-v4.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 5f99592f..fae80a9f 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -44,12 +44,11 @@ else fi function header_info { echo -e "${RD} - _____ _ _ - | __ \ | | (_) - | | | | ___| |__ _ __ _ _ __ - | | | |/ _ \ _ \| |/ _ | _ \ - | |__| | __/ |_) | | (_| | | | | - |_${YW}v4${RD}__/ \___|_.__/|_|\__,_|_| |_| + ____ __________ _______ _ __ + / __ \/ ____/ __ )/ _/ | / | / / + / / / / __/ / __ |/ // /| | / |/ / + / /_/ / /_v4/ /_/ // // ___ |/ /| / +/_____/_____/_____/___/_/ |_/_/ |_/ ${CL}" } function msg_info() { @@ -72,7 +71,7 @@ fi function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" From 2fd2aa151bd9a8fcc6137db18e569f984c937f6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:19:27 -0400 Subject: [PATCH 0037/3335] Update README.md --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 13f6a5db..6982c1b7 100644 --- a/README.md +++ b/README.md @@ -1127,21 +1127,22 @@ ________________________________________________________________________________
- Debian 11 LXC + Debian LXC

Debian

-

Debian 11 LXC

+

Debian LXC

+

Option to define version 10 or 11

-To create a new Proxmox Debian 11 (curl. sudo) LXC, run the following in the Proxmox Shell. +To create a new Proxmox Debian (curl & sudo) LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/debian-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/debian-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

-⚙️ **To Update Debian 11** +⚙️ **To Update Debian** Run in the LXC console ```yaml @@ -1161,10 +1162,10 @@ ________________________________________________________________________________

Ubuntu LXC

Option to define version 18.04, 20.04, 21.10 or 22.04

-To create a new Proxmox Ubuntu (curl. sudo) LXC, run the following in the Proxmox Shell. +To create a new Proxmox Ubuntu (curl & sudo) LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU - 22.04 ⚡

From 4847f335c8dddbe3c5303fa093eb5c34b63e3586 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:20:47 -0400 Subject: [PATCH 0038/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6982c1b7..4cc27aef 100644 --- a/README.md +++ b/README.md @@ -1132,7 +1132,7 @@ ________________________________________________________________________________

Debian

Debian LXC

-

Option to define version 10 or 11

+

Option to select version 10 or 11

To create a new Proxmox Debian (curl & sudo) LXC, run the following in the Proxmox Shell. @@ -1160,7 +1160,7 @@ ________________________________________________________________________________

Ubuntu

Ubuntu LXC

-

Option to define version 18.04, 20.04, 21.10 or 22.04

+

Option to select version 18.04, 20.04, 21.10 or 22.04

To create a new Proxmox Ubuntu (curl & sudo) LXC, run the following in the Proxmox Shell. From 30d8ca1dcb90ff514669803e82bab5f37378a60d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:29:49 -0400 Subject: [PATCH 0039/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4cc27aef..89f7b3e1 100644 --- a/README.md +++ b/README.md @@ -1823,7 +1823,7 @@ ________________________________________________________________________________ To create a new Proxmox WireGuard LXC, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wireguard-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wireguard-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

From e00a57266cf1b4ed24dc37a10e44c2df85af7e4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:36:11 -0400 Subject: [PATCH 0040/3335] Update debian-v4.sh --- ct/debian-v4.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index fae80a9f..8e2cbcab 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -210,9 +210,10 @@ fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else - clear - echo "Going Back to Advanced Settings" - advanced_settings + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings fi } function start_script() { From e08d777900fd533906ac803902b0116978bdb7a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:36:49 -0400 Subject: [PATCH 0041/3335] Update ubuntu-v4.sh --- ct/ubuntu-v4.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index e7d0178d..fd4c3077 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -213,9 +213,10 @@ fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else - clear - echo "Going Back to Advanced Settings" - advanced_settings + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings fi } function start_script() { From bd0ab64b87366f764356ef341c82e2943e08bff6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 12:37:40 -0400 Subject: [PATCH 0042/3335] Update wireguard-v4.sh --- ct/wireguard-v4.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index fddf43bf..0574c2b3 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -212,9 +212,10 @@ fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else - clear - echo "Going Back to Advanced Settings" - advanced_settings + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings fi } function start_script() { From 156c1cf4fde2150ce118a082f9c54afdd945e846 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 14:05:33 -0400 Subject: [PATCH 0043/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 20fa12c9..a27e4973 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -129,6 +129,7 @@ msg_ok "Built PhotoPrism" env_path="/var/lib/photoprism/.env" echo " +PHOTOPRISM_AUTH_MODE='password' PHOTOPRISM_ADMIN_PASSWORD='admin' PHOTOPRISM_HTTP_HOST='0.0.0.0' PHOTOPRISM_HTTP_PORT=2342 From 1cd30fb5e9500501c5e8e5c323a87fd975895814 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 14:13:30 -0400 Subject: [PATCH 0044/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index a27e4973..dbbf1db5 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -130,7 +130,7 @@ msg_ok "Built PhotoPrism" env_path="/var/lib/photoprism/.env" echo " PHOTOPRISM_AUTH_MODE='password' -PHOTOPRISM_ADMIN_PASSWORD='admin' +PHOTOPRISM_ADMIN_PASSWORD='changeme' PHOTOPRISM_HTTP_HOST='0.0.0.0' PHOTOPRISM_HTTP_PORT=2342 PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' From 61c13b78d2aa1c401e555ef189d74e2729bdbc4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 14:14:28 -0400 Subject: [PATCH 0045/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89f7b3e1..56d1118e 100644 --- a/README.md +++ b/README.md @@ -1646,7 +1646,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v ``` **password** ```yaml - admin + changeme ``` [PhotoSync](https://www.photosync-app.com/home.html) From f9186adde51741b6c05a0059883d7ccc49027309 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 17:20:33 -0400 Subject: [PATCH 0046/3335] Create docker-v4.sh --- ct/docker-v4.sh | 266 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 ct/docker-v4.sh diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh new file mode 100644 index 00000000..50deaa4d --- /dev/null +++ b/ct/docker-v4.sh @@ -0,0 +1,266 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Docker" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + ____ __ + / __ \____ _____/ /_v4__ _____ + / / / / __ \/ ___/ //_/ _ \/ ___/ + / /_/ / /_/ / /__/ ,< / __/ / +/_____/\____/\___/_/|_|\___/_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" From 1b1f7c7b25290fd7e8d0a3dd3e9b3cb22c2ea03f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 17:22:30 -0400 Subject: [PATCH 0047/3335] Create zigbee2mqtt-v4.sh --- ct/zigbee2mqtt-v4.sh | 272 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 ct/zigbee2mqtt-v4.sh diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh new file mode 100644 index 00000000..25a20cab --- /dev/null +++ b/ct/zigbee2mqtt-v4.sh @@ -0,0 +1,272 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Zigbee2MQTT" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + _____ _ __ ___ __ _______ ____________ +/__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ + / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / + / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / +/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ + /____/ 🐝 v4 +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" From 6aab893485aeda7d35e4c7d841f2bdf209512453 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 17:43:11 -0400 Subject: [PATCH 0048/3335] Create plex-v4.sh --- ct/plex-v4.sh | 275 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 ct/plex-v4.sh diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh new file mode 100644 index 00000000..cde23da8 --- /dev/null +++ b/ct/plex-v4.sh @@ -0,0 +1,275 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Plex" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + ____ __ + / __ \/ /__ _ __ + / /_/ / / _ \| |/_/ + / ____/ / __/> < +/_/v4 /_/\___/_/|_| +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +"18.04" "Bionic" OFF \ +"20.04" "Focal" ON \ +"21.10" "Impish" OFF \ +"22.04" "Jammy" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:32400/web${CL}\n" From 6f2c9f6ab039e757a6c0941683b324f3cd96c872 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 17:47:47 -0400 Subject: [PATCH 0049/3335] Update omada-install.sh Update to v5.4.6 --- setup/omada-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 598dabde..ae50a452 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -70,8 +70,8 @@ sudo dpkg -i mongodb-org-server_3.6.23_amd64.deb &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Omada Controller" -wget -qL https://static.tp-link.com/upload/software/2022/202205/20220507/Omada_SDN_Controller_v5.3.1_Linux_x64.deb -sudo dpkg -i Omada_SDN_Controller_v5.3.1_Linux_x64.deb &>/dev/null +wget -qL https://static.tp-link.com/upload/software/2022/202207/20220729/Omada_SDN_Controller_v5.4.6_Linux_x64.deb +sudo dpkg -i Omada_SDN_Controller_v5.4.6_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" PASS=$(grep -w "root" /etc/shadow | cut -b6); From bc7017726415a4f35d1735652c0ccb2e16c355e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Aug 2022 18:19:00 -0400 Subject: [PATCH 0050/3335] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 56d1118e..ae63ae1b 100644 --- a/README.md +++ b/README.md @@ -816,7 +816,7 @@ ________________________________________________________________________________ To create a new Proxmox Zigbee2MQTT LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

@@ -1106,7 +1106,7 @@ ________________________________________________________________________________ To create a new Proxmox Docker LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 4GB Storage - 2vCPU ⚡

@@ -1284,7 +1284,7 @@ ________________________________________________________________________________ To create a new Proxmox Plex Media Server LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

From d1e11e04b473850774f9d7e6eed1fecf53298b7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Aug 2022 04:30:37 -0400 Subject: [PATCH 0051/3335] Update wireguard-v4.sh --- ct/wireguard-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 0574c2b3..f63f5202 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash echo -e "Loading..." -APP="Wireguaed" +APP="Wireguard" var_disk="2" var_cpu="1" var_ram="512" From 83185e903d23181c7ebbaca37ee03f7913d9eb93 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Aug 2022 08:34:00 -0400 Subject: [PATCH 0052/3335] V4 (#397) * Create adguard-v4.sh * Create homeassistant-v4.sh * Create daemonsync-v4.sh * Update wireguard-v4.sh * Create dashy-v4.sh * Create deconz-v4.sh * Create esphome-v4.sh * Create grafana-v4.sh * Create grocy-v4.sh * Create heimdalldashboard-v4.sh * Create homebridge-v4.sh * Create influxdb-v4.sh * Create iobroker-v4.sh * Create jellyfin-v4.sh * Create keycloak-v4.sh * Create magicmirror-v4.sh * Create mariadb-v4.sh * Create meshcentral-v4.sh * Create motioneye-v4.sh * Create mqtt-v4.sh * Create n8n-v4.sh * Create nginx-proxy-manager-v4.sh * Create nocodb-v4.sh * Create node-red-v4.sh * Create omada-v4.sh * Create openhab-v4.sh * Create pihole-v4.sh * Create podman-homeassistant-v4.sh * Create postgresql-v4.sh * Create prometheus-v4.sh * Create technitiumdns-v4.sh * Create unifi-v4.sh * Create uptimekuma-v4.sh * Create vaultwarden-v4.sh * Create whoogle-v4.sh * Create zwavejs2mqtt-v4.sh * Update README.md * Update node-red-v4.sh * Create photoprism-v4.sh * Update CHANGELOG.MD * Update README.md --- CHANGELOG.MD | 4 +- README.md | 74 ++++----- ct/adguard-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/daemonsync-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/dashy-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/deconz-v4.sh | 277 ++++++++++++++++++++++++++++++++++ ct/esphome-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/grafana-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/grocy-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/heimdalldashboard-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/homeassistant-v4.sh | 270 +++++++++++++++++++++++++++++++++ ct/homebridge-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/influxdb-v4.sh | 261 ++++++++++++++++++++++++++++++++ ct/iobroker-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/jellyfin-v4.sh | 275 +++++++++++++++++++++++++++++++++ ct/keycloak-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/magicmirror-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/mariadb-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/meshcentral-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/motioneye-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/mqtt-v4.sh | 261 ++++++++++++++++++++++++++++++++ ct/n8n-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/nginx-proxy-manager-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/nocodb-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/node-red-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/omada-v4.sh | 266 ++++++++++++++++++++++++++++++++ ct/openhab-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/photoprism-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/pihole-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/podman-homeassistant-v4.sh | 274 +++++++++++++++++++++++++++++++++ ct/postgresql-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/prometheus-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/technitiumdns-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/unifi-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/uptimekuma-v4.sh | 264 ++++++++++++++++++++++++++++++++ ct/vaultwarden-v4.sh | 267 ++++++++++++++++++++++++++++++++ ct/whoogle-v4.sh | 263 ++++++++++++++++++++++++++++++++ ct/zwavejs2mqtt-v4.sh | 275 +++++++++++++++++++++++++++++++++ 38 files changed, 9576 insertions(+), 39 deletions(-) create mode 100644 ct/adguard-v4.sh create mode 100644 ct/daemonsync-v4.sh create mode 100644 ct/dashy-v4.sh create mode 100644 ct/deconz-v4.sh create mode 100644 ct/esphome-v4.sh create mode 100644 ct/grafana-v4.sh create mode 100644 ct/grocy-v4.sh create mode 100644 ct/heimdalldashboard-v4.sh create mode 100644 ct/homeassistant-v4.sh create mode 100644 ct/homebridge-v4.sh create mode 100644 ct/influxdb-v4.sh create mode 100644 ct/iobroker-v4.sh create mode 100644 ct/jellyfin-v4.sh create mode 100644 ct/keycloak-v4.sh create mode 100644 ct/magicmirror-v4.sh create mode 100644 ct/mariadb-v4.sh create mode 100644 ct/meshcentral-v4.sh create mode 100644 ct/motioneye-v4.sh create mode 100644 ct/mqtt-v4.sh create mode 100644 ct/n8n-v4.sh create mode 100644 ct/nginx-proxy-manager-v4.sh create mode 100644 ct/nocodb-v4.sh create mode 100644 ct/node-red-v4.sh create mode 100644 ct/omada-v4.sh create mode 100644 ct/openhab-v4.sh create mode 100644 ct/photoprism-v4.sh create mode 100644 ct/pihole-v4.sh create mode 100644 ct/podman-homeassistant-v4.sh create mode 100644 ct/postgresql-v4.sh create mode 100644 ct/prometheus-v4.sh create mode 100644 ct/technitiumdns-v4.sh create mode 100644 ct/unifi-v4.sh create mode 100644 ct/uptimekuma-v4.sh create mode 100644 ct/vaultwarden-v4.sh create mode 100644 ct/whoogle-v4.sh create mode 100644 ct/zwavejs2mqtt-v4.sh diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1f55fa41..5531b83b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,11 +3,11 @@ # Change Log All notable changes to this project will be documented in this file. -## 2022-08-01 +## 2022-08-02 ### Changed -- **Home Assistant OS VM** +- **All LXC/VM** - v4 Script - Whiptail menus ## 2022-07-26 diff --git a/README.md b/README.md index ae63ae1b..51fbb20e 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ________________________________________________________________________________
- 🔸Home Assistant OS VM + Home Assistant OS VM

@@ -160,7 +160,7 @@ A standalone container-based installation of Home Assistant Core To create a new Proxmox Home Assistant Container LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

@@ -230,7 +230,7 @@ A standalone container-based installation of Home Assistant Core To create a new Proxmox Podman Home Assistant Container LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/podman-homeassistant-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/podman-homeassistant-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

@@ -300,7 +300,7 @@ ________________________________________________________________________________ To create a new Proxmox ioBroker LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/iobroker-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/iobroker-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -329,7 +329,7 @@ ________________________________________________________________________________ To create a new Proxmox openHAB LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/openhab-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/openhab-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -358,7 +358,7 @@ ________________________________________________________________________________ To create a new Proxmox Homebridge LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homebridge-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homebridge-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

@@ -415,7 +415,7 @@ Update from the Homebridge UI To create a new Proxmox ESPHome LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/esphome-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/esphome-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

@@ -448,7 +448,7 @@ ________________________________________________________________________________ To create a new Proxmox Nginx Proxy Manager LXC Container, run the following in the Proxmox Shell. ```yaml - bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nginx-proxy-manager-v3.sh)" + bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nginx-proxy-manager-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 3GB Storage - 1vCPU ⚡

@@ -499,7 +499,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/npm_update To create a new Proxmox MQTT LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mqtt-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mqtt-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -551,7 +551,7 @@ ________________________________________________________________________________ To create a new Proxmox Node-RED LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/node-red-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/node-red-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

@@ -595,7 +595,7 @@ ________________________________________________________________________________ To create a new Proxmox n8n LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/n8n-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/n8n-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

@@ -624,7 +624,7 @@ ________________________________________________________________________________ To create a new Proxmox Mariadb LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mariadb-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mariadb-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

@@ -741,7 +741,7 @@ ________________________________________________________________________________ To create a new Proxmox PostgreSQL LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/postgresql-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/postgresql-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

@@ -897,7 +897,7 @@ ________________________________________________________________________________ To create a new Proxmox deCONZ LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/deconz-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/deconz-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

@@ -926,7 +926,7 @@ ________________________________________________________________________________ To create a new Proxmox Zwavejs2MQTT LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwavejs2mqtt-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwavejs2mqtt-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

@@ -961,7 +961,7 @@ ________________________________________________________________________________ To create a new Proxmox NocoDB LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nocodb-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nocodb-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

@@ -991,7 +991,7 @@ ________________________________________________________________________________ To create a new Proxmox Prometheus LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/prometheus-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/prometheus-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 4GB Storage - 1vCPU ⚡

@@ -1022,7 +1022,7 @@ ________________________________________________________________________________ To create a new Proxmox InfluxDB LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/influxdb-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/influxdb-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -1064,7 +1064,7 @@ ________________________________________________________________________________ To create a new Proxmox Grafana LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grafana-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grafana-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1195,7 +1195,7 @@ An application designed to optimize UniFi home and business networks with ease. To create a new Proxmox UniFi Network Application LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/unifi-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/unifi-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -1224,7 +1224,7 @@ Omada Controller is software which is used to manage the EAP To create a new Proxmox Omada Controller LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -1258,7 +1258,7 @@ MeshCentral is a full computer management web site. With MeshCentral, you can ru To create a new Proxmox MeshCentral LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1317,7 +1317,7 @@ ________________________________________________________________________________ To create a new Proxmox Jellyfin Media Server LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/jellyfin-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/jellyfin-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -1347,7 +1347,7 @@ ________________________________________________________________________________ To create a new Proxmox Pi-hole LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1379,7 +1379,7 @@ An open source authoritative as well as recursive DNS server To create a new Proxmox Technitium DNS LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/technitiumdns-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/technitiumdns-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1406,7 +1406,7 @@ ________________________________________________________________________________ To create a new Proxmox AdGuard Home LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/adguard-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/adguard-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1436,7 +1436,7 @@ Uptime Kuma is a self-hosted, open source, fancy uptime monitoring and alerting To create a new Proxmox Uptime Kuma LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 2GB Storage - 1vCPU ⚡

@@ -1465,7 +1465,7 @@ Get Google search results, but without any ads, javascript, AMP links, cookies, To create a new Proxmox Whoogle LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/whoogle-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/whoogle-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1494,7 +1494,7 @@ ________________________________________________________________________________ To create a new Proxmox Heimdall Dashboard LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/heimdalldashboard-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/heimdalldashboard-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1524,7 +1524,7 @@ Dashy helps you organize your self-hosted services by making them accessible fro To create a new Proxmox Dashy LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/dashy-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/dashy-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

@@ -1555,7 +1555,7 @@ ________________________________________________________________________________ To create a new Proxmox grocy LXC, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grocy-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grocy-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

@@ -1595,7 +1595,7 @@ ________________________________________________________________________________ To create a new MagicMirror Server LXC, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 3GB Storage - 1vCPU ⚡

@@ -1631,7 +1631,7 @@ PhotoPrism® is an AI-powered app for browsing, organizing & sharing your photo To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -1674,7 +1674,7 @@ Sync files from app to server, share photos & videos, back up your data and stay To create a new Proxmox Daemon Sync Server LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/daemonsync-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/daemonsync-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 8GB Storage - 1vCPU ⚡

@@ -1697,7 +1697,7 @@ ________________________________________________________________________________ To create a new Proxmox MotionEye VMS LXC, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

@@ -1923,7 +1923,7 @@ ________________________________________________________________________________ To create a new Proxmox Keycloak LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak-v4.sh)" ``` [Keycloak](https://www.keycloak.org/) is an Open Source Identity and Access Management solution for modern Applications and Services. @@ -1969,7 +1969,7 @@ Alternative implementation of the Bitwarden server API written in Rust and compa To create a new Proxmox Vaultwarden LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden-v4.sh)" ``` ⚠️ Vaultwarden needs to be behind a proxy (Nginx Proxy Manager) to obtain HTTPS and to allow clients to connect. diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh new file mode 100644 index 00000000..ad961086 --- /dev/null +++ b/ct/adguard-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Adguard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${GN} + ___ __ __ + / | ____/ /___ ___ ______ __________/ / + / /| |/ __ / __ / / / / __ / ___/ __ / + / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / +/_/v4|_\__,_/\__, /\__,_/\__,_/_/ \__,_/ + /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh new file mode 100644 index 00000000..81a1548d --- /dev/null +++ b/ct/daemonsync-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Daemon Sync" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + ____ _____ + / __ \____ ____ ____ ___ ____ ____ / ___/__ ______ _____ + / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ + / /_/ / /_/ / __/ / / / / / /_/ / / / / ___/ / /_/ / / / / /__ +/_____/\__,_/\___/_/ /_/ /_/\____/_/ /_/ v4/____/\__, /_/ /_/\___/ + /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh new file mode 100644 index 00000000..903b605b --- /dev/null +++ b/ct/dashy-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Dashy" +var_disk="3" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ____ __ + / __ \____ ______/ /_ __ __ + / / / / __ / ___/ __ \/ / / / + / /_/ / /_/ (__ ) / / / /_/ / +/_____/\__,_/____/_/ /_/\__, / + v4 /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh new file mode 100644 index 00000000..388083aa --- /dev/null +++ b/ct/deconz-v4.sh @@ -0,0 +1,277 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="deCONZ" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + __ __________ _ _______ + ____/ /v4 / ____/ __ \/ | / /__ / + / __ / _ \/ / / / / / |/ / / / +/ /_/ / __/ /___/ /_/ / /| / / /__ +\__,_/\___/\____/\____/_/ |_/ /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +"18.04" "Bionic" OFF \ +"20.04" "Focal" ON \ +"21.10" "Impish" OFF \ +"22.04" "Jammy" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL}\n" diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh new file mode 100644 index 00000000..be9d9c6f --- /dev/null +++ b/ct/esphome-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="ESPHome" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${CL} + ___________ ____ __ ______ __ _________ + / ____/ ___// __ \/ / / / __ \/ |/ / ____/ + / __/ \__ \/ /_/ / /_/ / / / / /|_/ / __/ + / /___ ___/ / ____/ __ / /_/ / / / / /_v4 +/_____//____/_/ /_/ /_/\____/_/ /_/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh new file mode 100644 index 00000000..0b6a008b --- /dev/null +++ b/ct/grafana-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Grafana" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + ______ ____ + / ____/________ _/ __/___ _____ ____ _ + / / __/ ___/ __ / /_/ __ / __ \/ __ / +/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / +\____/_/ v4\__,_/_/ \__,_/_/ /_/\__,_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh new file mode 100644 index 00000000..d07e87fc --- /dev/null +++ b/ct/grocy-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="grocy" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + ____ __________ _______ __ + / __ / ___/ __ \/ ___/ / / / + / /_/ / / / /_/ / /__/ /_/ / + \__, /_/ \____/\___/\__, / +/____/ v4 /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh new file mode 100644 index 00000000..8ff8a16f --- /dev/null +++ b/ct/heimdalldashboard-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Heimdall Dashboard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ __ _ __ ____ ____ __ __ __ + / / / /__ (_)___ ___ ____/ /_v4 _/ / / / __ \____ ______/ /_ / /_ ____ ____ __________/ / + / /_/ / _ \/ / __ __ \/ __ / __ / / / / / / / __ / ___/ __ \/ __ \/ __ \/ __ / ___/ __ / + / __ / __/ / / / / / / /_/ / /_/ / / / / /_/ / /_/ (__ ) / / / /_/ / /_/ / /_/ / / / /_/ / +/_/ /_/\___/_/_/ /_/ /_/\__,_/\__,_/_/_/ /_____/\__,_/____/_/ /_/_.___/\____/\__,_/_/ \__,_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh new file mode 100644 index 00000000..9af2f420 --- /dev/null +++ b/ct/homeassistant-v4.sh @@ -0,0 +1,270 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Home Assistant" +var_disk="16" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ __ ___ _ __ __ + / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL} +Portainer should be reachable by going to the following URL. + ${BL}http://${IP}:9000${CL}\n" diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh new file mode 100644 index 00000000..21a66736 --- /dev/null +++ b/ct/homebridge-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Homebridge" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + __ ______ __ _____________ ____ ________ ____________ + / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ + / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ + / __ / /_/ / / / / /___/ /_/ / _, _// // /_/ / /_/ / /___ +/_/ /_/\____/_/v4/_/_____/_____/_/ |_/___/_____/\____/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh new file mode 100644 index 00000000..865c93cc --- /dev/null +++ b/ct/influxdb-v4.sh @@ -0,0 +1,261 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="InfluxDB" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + ____ ______ ____ ____ + / _/_v4 / __/ /_ ___ __/ __ \/ __ ) + / // __ \/ /_/ / / / / |/_/ / / / __ | + _/ // / / / __/ / /_/ /> &1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh new file mode 100644 index 00000000..92e0fca5 --- /dev/null +++ b/ct/iobroker-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="ioBroker" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + _ ____ __ + (_)___ / __ )_________ / /_____ _____ + / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ + / / /_/ / /_/ / / / /_/ / ,< / __/ / +/_/\____/_____/_/ v4\____/_/|_|\___/_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh new file mode 100644 index 00000000..bf6c0d7f --- /dev/null +++ b/ct/jellyfin-v4.sh @@ -0,0 +1,275 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Jellyfin" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${DGN} + __________ ____ _____________ __ + / / ____/ / / /\ \/ / ____/ _/ | / / + __ / / __/ / / / / \ / /_ / // |/ / +/ /_/ / /___/ /___/ /_v4/ / __/ _/ // /| / +\____/_____/_____/_____/_/_/ /___/_/ |_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +"18.04" "Bionic" OFF \ +"20.04" "Focal" ON \ +"21.10" "Impish" OFF \ +"22.04" "Jammy" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh new file mode 100644 index 00000000..ac0c7f90 --- /dev/null +++ b/ct/keycloak-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Keycloak" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + __ __ __ __ + / //_/__ __ _______/ /___ ____ _/ /__ + / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ + / /| / __/ /_/ / /__/ / /_/ / /_/ / ,< +/_/ |_\___/\__, /\___/_/\____/\__,_/_/|_| + v4 /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh new file mode 100644 index 00000000..ed2d9ca4 --- /dev/null +++ b/ct/magicmirror-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="MagicMirror" +var_disk="3" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ ___ _ __ ____ + / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ + / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ + / / / / /_/ / /_/ / / /__/ / / / / / / / / /_/ / / +/_/ /_/\__,_/\__, /_/\___/_/ /_/_/_/ /_/ \____/_/ + /____/ v4 +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh new file mode 100644 index 00000000..ceabd448 --- /dev/null +++ b/ct/mariadb-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="MariaDB" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ ___ _ ____ ____ + / |/ /___ ______(_)___ _/ __ \/ __ ) + / /|_/ / __ / ___/ / __ / / / / __ | + / / / / /_/ / / / / /_/ / /_/ / /_/ / +/_/ /_/\__,_/_/v4/_/\__,_/_____/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "Adminer should be reachable by going to the following URL. + ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh new file mode 100644 index 00000000..38a28870 --- /dev/null +++ b/ct/meshcentral-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="MeshCentral" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ ___ __ ______ __ __ + / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / + / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / + / / / / __(__ ) / / / /___/ __/ / / / /_/ / / /_/ / / +/_/ /_/\___/____/_/ /_/\____/\___/_/ /_/\__/_/ v4\__,_/_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh new file mode 100644 index 00000000..eb3b3735 --- /dev/null +++ b/ct/motioneye-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Motioneye" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ ___ __ _ ________ ________ + / |/ /___ / /_(_)___ ____ / ____/\ \/ / ____/ + / /|_/ / __ \/ __/ / __ \/ __ \/ __/ \ / __/ + / / / / /_/ / /_/ / /_/ / / / / /___v4 / / /___ +/_/ /_/\____/\__/_/\____/_/ /_/_____/ /_/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh new file mode 100644 index 00000000..624297b3 --- /dev/null +++ b/ct/mqtt-v4.sh @@ -0,0 +1,261 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="MQTT" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${GN} + __ _______ ____________ + / |/ / __ \/_ __/_ __/ + / /|_/ / / / / / / / / + / / / / /_/ / / / / / +/_/ /_/\___\_\/_/ v4/_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh new file mode 100644 index 00000000..3be8d9a8 --- /dev/null +++ b/ct/n8n-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="n8n" +var_disk="3" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ___ + / _ \ + _ __ | (_) |_v4_ + | _ \ > _ <| _ \ + | | | | (_) | | | | + |_| |_|\___/|_| |_| +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh new file mode 100644 index 00000000..7e134842 --- /dev/null +++ b/ct/nginx-proxy-manager-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Nginx Proxy Manager" +var_disk="3" +var_cpu="1" +var_ram="1048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + _ __ _ ____ __ ___ + / | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____ + / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ + / /| / /_/ / / / / /> < / ____/ / / /_/ /> &1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh new file mode 100644 index 00000000..8cd33a28 --- /dev/null +++ b/ct/nocodb-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="NocoDB" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + _ __ ____ ____ + / | / /___ ____v4___ / __ \/ __ ) + / |/ / __ \/ ___/ __ \/ / / / __ | + / /| / /_/ / /__/ /_/ / /_/ / /_/ / +/_/ |_/\____/\___/\____/_____/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8080/dashboard${CL} \n" diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh new file mode 100644 index 00000000..9d4ed931 --- /dev/null +++ b/ct/node-red-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Node-Red" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + _ __ __ ____ __ + / | / /___ ____/ /__ v4 / __ \___ ____/ / + / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / + / /| / /_/ / /_/ / __/ / _, _/ __/ /_/ / +/_/ |_/\____/\__,_/\___/ /_/ |_|\___/\__,_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh new file mode 100644 index 00000000..9c121060 --- /dev/null +++ b/ct/omada-v4.sh @@ -0,0 +1,266 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Omada" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + ____ __ + / __ \____ ___v4____ _____/ /___ _ + / / / / __ __ \/ __ / __ / __ / +/ /_/ / / / / / / /_/ / /_/ / /_/ / +\____/_/ /_/ /_/\__,_/\__,_/\__,_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +"18.04" "Bionic" OFF \ +"20.04" "Focal" ON \ +"21.10" "Impish" OFF \ +"22.04" "Jammy" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh new file mode 100644 index 00000000..d3301be6 --- /dev/null +++ b/ct/openhab-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="openHAB" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${YW} + __ _____ ____ + ____v4____ ___ ____ / / / / | / __ ) + / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | +/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / +\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/ + /_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh new file mode 100644 index 00000000..c8e2dc43 --- /dev/null +++ b/ct/photoprism-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="PhotoPrism" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ____ __ ______ __________ ____ ____ _________ __ ___ + / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / + / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / + / ____/ __ / /_/ / / / / /_/ / ____/ _, _// / v4_/ / / / / +/_/ /_/ /_/\____/ /_/ \____/_/ /_/ |_/___//____/_/ /_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh new file mode 100644 index 00000000..ed11c16e --- /dev/null +++ b/ct/pihole-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Pihole" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ____ ____ __ ______ __ ______ + / __ \/ _/ / / / / __ \/ / / ____/ + / /_/ // /___/ /_/ / / / / / / __/ + / ____// /___/ __ / /_/ / /v4_/ /___ +/_/ /___/ /_/ /_/\____/_____/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh new file mode 100644 index 00000000..79f851a6 --- /dev/null +++ b/ct/podman-homeassistant-v4.sh @@ -0,0 +1,274 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Podman-Home Assistant" +var_disk="16" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + ____ __ + / __ \____ ____/ /___ ___ ____ _____ + v4 / /_/ / __ \/ __ / __ __ \/ __ / __ \ + / ____/ /_/ / /_/ / / / / / / /_/ / / / / + __ __ /_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/__ __ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL} +Yacht should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL}\n" diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh new file mode 100644 index 00000000..33f06931 --- /dev/null +++ b/ct/postgresql-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="PostgreSQL" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + ____ __ _____ ____ __ + / __ \____ _____/ /_____ _________ / ___// __ \ / / + / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / + / ____/ /_/ (__ ) /_/ /_/ / / / __/__/ / /_/ / / /___ +/_/ \____/____/\__/\__, /_/v4 \___/____/\___\_\/_____/ + /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "Adminer should be reachable by going to the following URL. + ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh new file mode 100644 index 00000000..6f172c69 --- /dev/null +++ b/ct/prometheus-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Prometheus" +var_disk="4" +var_cpu="1" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ____ __ __ + / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ + / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ + / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ ) +/_/ v4/_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh new file mode 100644 index 00000000..a0cf9276 --- /dev/null +++ b/ct/technitiumdns-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Technitium DNS" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ______ __ _ __ _ ____ _ _______ + /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ v4 / __ \/ | / / ___/ + / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ + / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / +/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh new file mode 100644 index 00000000..f7cea5c7 --- /dev/null +++ b/ct/unifi-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Unifi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + __ __ _ _____ + / / / /_v4 (_) __(_) + / / / / __ \/ / /_/ / +/ /_/ / / / / / __/ / +\____/_/ /_/_/_/ /_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP}${CL} should be reachable by going to the following URL. + ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh new file mode 100644 index 00000000..c545e1c6 --- /dev/null +++ b/ct/uptimekuma-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Uptime Kuma" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${DGN} + __ __ __ _ __ __ + / / / /___ / /_(_)___ ___ ___ v4 / //_/_ ______ ___ ____ _ + / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / +/ /_/ / /_/ / /_/ / / / / / / __/ / /| / /_/ / / / / / / /_/ / +\____/ .___/\__/_/_/ /_/ /_/\___/ /_/ |_\__,_/_/ /_/ /_/\__,_/ + /_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3001${CL} \n" diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh new file mode 100644 index 00000000..7f6799bc --- /dev/null +++ b/ct/vaultwarden-v4.sh @@ -0,0 +1,267 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Vaultwarden" +var_disk="6" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${CL} + _ _____ __ ____ _______ _____ ____ ____ _______ __ +| | / / | / / / / / /_ __/ | / / | / __ \/ __ \/ ____/ | / / +| | / / /| |/ / / / / / / | | /| / / /| | / /_/ / / / / __/ / |/ / +| |/ / ___ / /_/ / /___/ / | |/ |/ / ___ |/ _, _/ /_/ / /___/ /| / +|___/_/ |_\____/_____/_/ v4 |__/|__/_/ |_/_/ |_/_____/_____/_/ |_/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 512 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh new file mode 100644 index 00000000..d2c463cd --- /dev/null +++ b/ct/whoogle-v4.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Whoogle" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${GN} + _ ____ ______ ____ ________ ______ +| | v4 / / / / / __ \/ __ \/ ____/ / / ____/ +| | /| / / /_/ / / / / / / / / __/ / / __/ +| |/ |/ / __ / /_/ / /_/ / /_/ / /___/ /___ +|__/|__/_/ /_/\____/\____/\____/_____/_____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/zwavejs2mqtt-v4.sh b/ct/zwavejs2mqtt-v4.sh new file mode 100644 index 00000000..5e52fc2b --- /dev/null +++ b/ct/zwavejs2mqtt-v4.sh @@ -0,0 +1,275 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Zwavejs2MQTT" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + _____ _ ___ __ _______ ____________ +/__ /_ ______ __ _____ (_)___|__ \ / |/ / __ \/_ __/_ __/ + / /| | /| / / __ / | / / _ \ / / ___/_/ // /|_/ / / / / / / / / + / /_| |/ |/ / /_/ /| |/ / __/ / (__ ) __// / / / /_/ / / / / / +/____/__/|__/\__,_/ |___/\___/_/ /____/____/_/ /_/\___\_\/_/ v4/_/ + /___/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8091${CL} \n" From ce9129475d35b90efa9dba28ab20a8b58807474c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Aug 2022 09:17:18 -0400 Subject: [PATCH 0053/3335] Update omada-install.sh --- setup/omada-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/omada-install.sh b/setup/omada-install.sh index ae50a452..c52bc085 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -69,7 +69,7 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv sudo dpkg -i mongodb-org-server_3.6.23_amd64.deb &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing Omada Controller" +msg_info "Installing Omada Controller v5.4.6" wget -qL https://static.tp-link.com/upload/software/2022/202207/20220729/Omada_SDN_Controller_v5.4.6_Linux_x64.deb sudo dpkg -i Omada_SDN_Controller_v5.4.6_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" From afd7f1affc3d2133523a7c8d74291e311d14bd44 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Aug 2022 11:36:33 -0400 Subject: [PATCH 0054/3335] Update README.md --- README.md | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/README.md b/README.md index 51fbb20e..10979c58 100644 --- a/README.md +++ b/README.md @@ -1614,50 +1614,6 @@ cd /opt/magicmirror && git pull && npm install --only=prod --omit=dev ``` -____________________________________________________________________________________________ - -
- - -
- PhotoPrism LXC - -

- -

PhotoPrism LXC

- -PhotoPrism® is an AI-powered app for browsing, organizing & sharing your photo collection. - -To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**PhotoPrism Interface - IP:2342** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - changeme - ``` -[PhotoSync](https://www.photosync-app.com/home.html) - -⚙️ **To Update PhotoPrism** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/photoprism-update.sh)" -``` - - ____________________________________________________________________________________________
From 05f7d144920c3a30d1102805aa3b15fe58ead75f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Aug 2022 21:04:31 -0400 Subject: [PATCH 0055/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5531b83b..74eb4deb 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **All LXC/VM** - - v4 Script - Whiptail menus + - v4 Script - Whiptail menu's ## 2022-07-26 From d0a56ffc44e69bbcdccb8d6ebf2a9033b71253e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Aug 2022 15:51:03 -0400 Subject: [PATCH 0056/3335] Update nginx-proxy-manager-v4.sh --- ct/nginx-proxy-manager-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 7e134842..ae4e9b7e 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -255,7 +255,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/nginx-proxy-manager-install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" From c24dec5b011a8f616b78fc739a312bef44643320 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 06:24:49 -0400 Subject: [PATCH 0057/3335] Update filebrowser-v3.sh don't show Docker IP --- misc/filebrowser-v3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/filebrowser-v3.sh b/misc/filebrowser-v3.sh index 78cf8ab2..e5cdfcf8 100644 --- a/misc/filebrowser-v3.sh +++ b/misc/filebrowser-v3.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +IP=$(hostname -I | awk '{print $1}') YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -86,4 +87,4 @@ msg_ok "Created Service" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://$(hostname -I):8080${CL} \n" + ${BL}http://$IP:8080${CL} \n" From 4542b2dd881fcda48330f1bcd3a8c65ac5640268 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 08:25:12 -0400 Subject: [PATCH 0058/3335] Update unifi-install.sh --- setup/unifi-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index f47cb3e3..fa9277e3 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -96,7 +96,7 @@ msg_ok "Customized Container" fi msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null +#apt-get autoremove >/dev/null +#apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" From d3ef2acb8c6fdff6aec5d532a41657b481bb7c4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 09:39:42 -0400 Subject: [PATCH 0059/3335] Update unifi-install.sh --- setup/unifi-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index fa9277e3..f47cb3e3 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -96,7 +96,7 @@ msg_ok "Customized Container" fi msg_info "Cleaning up" -#apt-get autoremove >/dev/null -#apt-get autoclean >/dev/null +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" From 69eeaaee2a9efd50741e60c987eb2f5281b1b603 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 13:14:04 -0400 Subject: [PATCH 0060/3335] maintenance (#403) --- ct/daemonsync-v4.sh | 2 +- ct/dashy-v4.sh | 2 +- ct/esphome-v4.sh | 2 +- ct/grafana-v4.sh | 2 +- ct/grocy-v4.sh | 2 +- ct/heimdalldashboard-v4.sh | 2 +- ct/homebridge-v4.sh | 2 +- ct/iobroker-v4.sh | 2 +- ct/keycloak-v4.sh | 2 +- ct/magicmirror-v4.sh | 2 +- ct/meshcentral-v4.sh | 2 +- ct/motioneye-v4.sh | 2 +- ct/n8n-v4.sh | 2 +- ct/nginx-proxy-manager-v4.sh | 2 +- ct/nocodb-v4.sh | 2 +- ct/node-red-v4.sh | 2 +- ct/openhab-v4.sh | 2 +- ct/photoprism-v4.sh | 2 +- ct/pihole-v4.sh | 2 +- ct/prometheus-v4.sh | 2 +- ct/technitiumdns-v4.sh | 2 +- ct/uptimekuma-v4.sh | 2 +- ct/vaultwarden-v4.sh | 2 +- ct/whoogle-v4.sh | 2 +- ct/zwavejs2mqtt-v4.sh | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 81a1548d..f805e6ac 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 903b605b..ab5bac02 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index be9d9c6f..a3409634 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 0b6a008b..9ec1d569 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index d07e87fc..172f92c0 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}${CL} \n" diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 8ff8a16f..6fecd9d9 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 21a66736..fc197eb6 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 92e0fca5..2cf95f20 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index ac0c7f90..739dc010 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index ed2d9ca4..237ff677 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 38a28870..fc66509e 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}${CL} \n" diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index eb3b3735..64d25618 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index 3be8d9a8..22863a44 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index ae4e9b7e..73ab124d 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 8cd33a28..6b3566f1 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080/dashboard${CL} \n" diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 9d4ed931..f79341df 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index d3301be6..ae186e7d 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index c8e2dc43..41ed38cb 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index ed11c16e..6fbfa78a 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 6f172c69..13ae0854 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index a0cf9276..061ef6b2 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index c545e1c6..8569b392 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -260,5 +260,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3001${CL} \n" diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index 7f6799bc..f82d066f 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -263,5 +263,5 @@ pct set $CTID -memory 512 pct set $CTID -cores 1 msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index d2c463cd..bf0f9b9e 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -259,5 +259,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/zwavejs2mqtt-v4.sh b/ct/zwavejs2mqtt-v4.sh index 5e52fc2b..9c732818 100644 --- a/ct/zwavejs2mqtt-v4.sh +++ b/ct/zwavejs2mqtt-v4.sh @@ -271,5 +271,5 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8091${CL} \n" From f7b3b1e8939e796067760461400d850db4edb682 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:20:52 -0400 Subject: [PATCH 0061/3335] Update filebrowser-v3.sh --- misc/filebrowser-v3.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/filebrowser-v3.sh b/misc/filebrowser-v3.sh index e5cdfcf8..81b6c515 100644 --- a/misc/filebrowser-v3.sh +++ b/misc/filebrowser-v3.sh @@ -11,6 +11,7 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" APP="FileBrowser" +hostname="$(hostname)" set -o errexit set -o errtrace set -o nounset @@ -29,7 +30,7 @@ function error_exit() { } while true; do - read -p "This will Install ${APP}. Proceed(y/n)?" yn + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -66,7 +67,7 @@ curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bas filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null -msg_ok "Installed ${APP}" +msg_ok "Installed ${APP} on $hostname" msg_info "Creating Service" service_path="/etc/systemd/system/filebrowser.service" From 231cad52d7f5e31ce784dc08f341704ff3033060 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:25:53 -0400 Subject: [PATCH 0062/3335] Update and rename filebrowser-v3.sh to filebrowser.sh --- misc/{filebrowser-v3.sh => filebrowser.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename misc/{filebrowser-v3.sh => filebrowser.sh} (97%) diff --git a/misc/filebrowser-v3.sh b/misc/filebrowser.sh similarity index 97% rename from misc/filebrowser-v3.sh rename to misc/filebrowser.sh index 81b6c515..6a11c514 100644 --- a/misc/filebrowser-v3.sh +++ b/misc/filebrowser.sh @@ -43,7 +43,7 @@ echo -e "${DGN} ______ _ _ ____ | ____(_) | | _ \ - | |__ _| | ___| |_) |_ __ _____ v3 _____ ___ _ __ + | |__ _| | ___| |_) |_ __ _____ _____ ___ _ __ | __| | | |/ _ \ _ <| __/ _ \ \ /\ / / __|/ _ \ __| | | | | | __/ |_) | | | (_) \ V V /\__ \ __/ | |_| |_|_|\___|____/|_| \___/ \_/\_/ |___/\___|_| From fd66a153c667a846ce73f5a0778c739931746859 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:28:23 -0400 Subject: [PATCH 0063/3335] Update and rename crowdsec-v3.sh to crowdsec.sh --- misc/{crowdsec-v3.sh => crowdsec.sh} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename misc/{crowdsec-v3.sh => crowdsec.sh} (90%) diff --git a/misc/crowdsec-v3.sh b/misc/crowdsec.sh similarity index 90% rename from misc/crowdsec-v3.sh rename to misc/crowdsec.sh index 0ab6d5c3..b250e765 100644 --- a/misc/crowdsec-v3.sh +++ b/misc/crowdsec.sh @@ -10,6 +10,7 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" APP="CrowdSec" +hostname="$(hostname)" set -o errexit set -o errtrace set -o nounset @@ -28,7 +29,7 @@ function error_exit() { } while true; do - read -p "This will Install ${APP}. Proceed(y/n)?" yn + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -41,7 +42,7 @@ echo -e "${BL} _____ _ _____ / ____| | |/ ____| | | _ __ _____ ____| | (___ ___ ___ - | | v3 | __/ _ \ \ /\ / / _ |\___ \ / _ \/ __| + | | | __/ _ \ \ /\ / / _ |\___ \ / _ \/ __| | |____| | | (_) \ V V / (_| |____) | __/ (__ \_____|_| \___/ \_/\_/ \__ _|_____/ \___|\___| ${CL}" @@ -68,7 +69,7 @@ msg_ok "Setup ${APP} Repository" msg_info "Installing ${APP}" apt-get update &>/dev/null apt-get install -y crowdsec &>/dev/null -msg_ok "Installed ${APP}" +msg_ok "Installed ${APP} on $hostname" msg_info "Installing ${APP} Common Bouncer" apt-get install -y crowdsec-firewall-bouncer-iptables &>/dev/null From 4e7496546176952ca4cdfbbcedfb280dfb5c210e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:30:51 -0400 Subject: [PATCH 0064/3335] Delete kernel-clean.sh --- misc/kernel-clean.sh | 100 ------------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 misc/kernel-clean.sh diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh deleted file mode 100644 index 9a883003..00000000 --- a/misc/kernel-clean.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -RD=$(tput setaf 1) -GN=$(tput setaf 2) -LYW=$(tput setaf 190) -WH=$(tput setaf 7) -BRT=$(tput bold) -CL=$(tput sgr0) -UL=$(tput smul) -current_kernel=$(uname -r) -pve=$(pveversion) - -while true; do - read -p "${WH}This will Clean unused Kernel images. Proceed(y/n)?${CL}" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo -e "${RD}Please answer y/n${CL}";; - esac -done -clear - -function check_root { - if [[ $EUID -ne 0 ]]; then - echo -e "${RD}Error: This script must be ran as the root user.\n${CL}" - exit 1 - fi -} - -function header_info { -echo -e "${RD} - _ __ _ _____ _ - | |/ / | | / ____| | - | / ___ _ __ _ __ ___| | | | | | ___ __ _ _ __ - | < / _ \ __| _ \ / _ \ | | | | |/ _ \/ _ | _ \ - | \ __/ | | | | | __/ | | |____| | __/ (_| | | | | - |_|\_\___|_| |_| |_|\___|_| \_____|_|\___|\__,_|_| |_| - -${CL}" -} - -function kernel_info() { - latest_kernel=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | tac | head -n 1) - echo -e "${LYW}PVE Version: ${UL}${WH}$pve\n${CL}" - if [[ "$current_kernel" == *"pve"* ]]; then - if [[ "$latest_kernel" != *"$current_kernel"* ]]; then - echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}" - fi - else - echo -e "\n${RD}ERROR: No PVE Kernel Found\n${CL}" - exit 1 - fi -} - -function kernel_clean() { - kernels=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | sort -V) - remove_kernels="" - for kernel in $kernels - do - if [ "$(echo $kernel | grep $current_kernel)" ]; then - break - else - echo -e "${RD}'$kernel' ${CL}${LYW}has been added to the remove Kernel list\n${CL}" - remove_kernels+=" $kernel" - fi - done -echo -e "${LYW}Kernel Search Complete!\n${CL}" - if [[ "$remove_kernels" != *"pve"* ]]; then - echo -e "${BRT}${GN}It appears there are no old Kernels on your system. \n${CL}" - else - read -p "${LYW}Would you like to remove the${RD} $(echo $remove_kernels | awk '{print NF}') ${CL}${LYW}selected Kernels listed above? [y/n]: ${CL}" -n 1 -r - fi - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo -e "${LYW}\nRemoving ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${LYW}old Kernels...${CL}" - /usr/bin/apt purge -y $remove_kernels > /dev/null 2>&1 - echo -e "${LYW}Finished!\n${CL}" - echo -e "${LYW}Updating GRUB... \n${CL}" - /usr/sbin/update-grub > /dev/null 2>&1 - echo -e "${LYW}Finished!\n${CL}" - else - echo -e "${LYW}Exiting...\n${CL}" - sleep 2 - fi -} - -function main() { - check_root - header_info - kernel_info -} - -while true; do - case "$1" in - * ) - main - kernel_clean - exit 1 - ;; - esac - shift -done From 9b990503398fc523ad4fc411051e0f6adf36639b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:31:04 -0400 Subject: [PATCH 0065/3335] Update and rename kernel-clean-v3.sh to kernel-clean.sh --- misc/{kernel-clean-v3.sh => kernel-clean.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename misc/{kernel-clean-v3.sh => kernel-clean.sh} (98%) diff --git a/misc/kernel-clean-v3.sh b/misc/kernel-clean.sh similarity index 98% rename from misc/kernel-clean-v3.sh rename to misc/kernel-clean.sh index c079d7ea..c804741a 100644 --- a/misc/kernel-clean-v3.sh +++ b/misc/kernel-clean.sh @@ -33,7 +33,7 @@ echo -e "${RD} | / ___ _ __ _ __ ___| | | | | | ___ __ _ _ __ | < / _ \ __| _ \ / _ \ | | | | |/ _ \/ _ | _ \ | \ __/ | | | | | __/ | | |____| | __/ (_| | | | | - |_|\_\___|_| |_| |_|\___|_|v3\_____|_|\___|\__,_|_| |_| + |_|\_\___|_| |_| |_|\___|_| \_____|_|\___|\__,_|_| |_| ${CL}" } From ba94d2ee8c19c1495992ff19e21f1c2c4bc0ef95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:33:04 -0400 Subject: [PATCH 0066/3335] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 10979c58..653fd82d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Cleaning unused kernel images is not only good because of a reduced grub menu, b Run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean.sh)" ``` ____________________________________________________________________________________________ @@ -1692,7 +1692,7 @@ ________________________________________________________________________________ To Install File Browser, ⚠️ run the following in the LXC console. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/filebrowser-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/filebrowser.sh)" ``` [File Browser](https://filebrowser.org/features) is a create-your-own-cloud-kind of software where you can install it on a server, direct it to a path and then access your files through a nice web interface. Many available features! @@ -1858,7 +1858,7 @@ ________________________________________________________________________________ To Install CrowdSec, ⚠️ run the following in the LXC console. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/crowdsec-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/crowdsec.sh)" ``` [CrowdSec](https://crowdsec.net/) is a free, open-source and collaborative IPS. Analyze behaviors, respond to attacks & share signals across the community. From c929b48ac4cb61a5d2e58d10b6a64fac9df8c788 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 16:34:40 -0400 Subject: [PATCH 0067/3335] Create code-server.sh --- misc/code-server.sh | 89 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 misc/code-server.sh diff --git a/misc/code-server.sh b/misc/code-server.sh new file mode 100644 index 00000000..2fcade90 --- /dev/null +++ b/misc/code-server.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +IP=$(hostname -I | awk '{print $1}') +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +APP="Code Server" +hostname="$(hostname)" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +while true; do + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear +function header_info { +echo -e "${BL} + ______ __ _____ + / ____/___ ____/ /__ / ___/___ ______ _____ _____ + / / / __ \/ __ / _ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ +/ /___/ /_/ / /_/ / __/ ___/ / __/ / | |/ / __/ / +\____/\____/\__,_/\___/ /____/\___/_/ |___/\___/_/ +${CL}" +} + +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y git &>/dev/null +msg_ok "Installed Dependencies" + +VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 3, length($2)-4) }') \ + +msg_info "Installing Code-Server v${VERSION}" +curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb &>/dev/null +sudo dpkg -i code-server_${VERSION}_amd64.deb &>/dev/null +rm -rf code-server_${VERSION}_amd64.deb +mkdir -p ~/.config/code-server/ +sudo systemctl enable --now code-server@$USER &>/dev/null +cat < ~/.config/code-server/config.yaml +bind-addr: 0.0.0.0:8680 +auth: none +password: +cert: false +EOF +sudo systemctl restart code-server@$USER +msg_ok "Installed Code-Server v${VERSION} on $hostname" + +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://$IP:8680${CL} \n" From 744d99bc6ef6bb656990a865e9def6e40a8f3876 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:02:56 -0400 Subject: [PATCH 0068/3335] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 653fd82d..6165e4ca 100644 --- a/README.md +++ b/README.md @@ -1721,6 +1721,29 @@ ________________________________________________________________________________
+
+ 🔸Code Server + +

+ +

Code Server

+ +To Install Code Server, ⚠️ run the following in the LXC console. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/code-server.sh)" +``` + +[Code Server](https://code.visualstudio.com/docs/remote/vscode-server) is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH. + + + +**Code Server Interface - http:// IP:8680** + +___________________________________________________________________________________________ + +
+
Webmin System Administration From 2693a5c5ae01495497efe4465a17b1bb247b13f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:04:32 -0400 Subject: [PATCH 0069/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 74eb4deb..0cd09df0 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-04 + +### Changed + +- **Code Server** + - NEW Script + ## 2022-08-02 ### Changed From a87cb3533112b2ead20b76ef137ca05fd3de957c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:08:57 -0400 Subject: [PATCH 0070/3335] Delete post_install.sh --- misc/post_install.sh | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 misc/post_install.sh diff --git a/misc/post_install.sh b/misc/post_install.sh deleted file mode 100644 index d529fb3c..00000000 --- a/misc/post_install.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -echo -e "\e[1;33m This script will Setup Repositories and attempt the No-Nag fix. PVE7 ONLY \e[0m" -while true; do - read -p "Start the PVE7 Post Install Script (y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo -e "This script requires Proxmox Virtual Environment 7.0 or greater" - echo -e "Exiting..." - sleep 2 - exit -fi -clear -echo -e "\e[1;33m Disable Enterprise Repository... \e[0m" -sleep 1 -sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list -echo -e "\e[1;33m Setup Repositories... \e[0m" -sleep 1 -cat < /etc/apt/sources.list -deb http://ftp.debian.org/debian bullseye main contrib -deb http://ftp.debian.org/debian bullseye-updates main contrib -deb http://security.debian.org/debian-security bullseye-security main contrib -deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription -# deb http://download.proxmox.com/debian/pve bullseye pvetest -EOF -echo -e "\e[1;33m Disable Subscription Nag... \e[0m" -echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script -apt --reinstall install proxmox-widget-toolkit &>/dev/null -echo -e "\e[1;33m Finished....Please Update Proxmox \e[0m" - -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/post_install.sh)" From c8741fdc1980b165500da8a8ff01e37f6d057e28 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:11:24 -0400 Subject: [PATCH 0071/3335] Rename post-install-v3.sh to post-install.sh --- misc/{post-install-v3.sh => post-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename misc/{post-install-v3.sh => post-install.sh} (100%) diff --git a/misc/post-install-v3.sh b/misc/post-install.sh similarity index 100% rename from misc/post-install-v3.sh rename to misc/post-install.sh From 98a7e71aca86c4a19dde10f9001e1c30b343fce3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:11:40 -0400 Subject: [PATCH 0072/3335] Update post-install.sh --- misc/post-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-install.sh b/misc/post-install.sh index 747c2128..543f36c6 100644 --- a/misc/post-install.sh +++ b/misc/post-install.sh @@ -33,7 +33,7 @@ echo -e "${RD} _______ ________ ______ _____ _ _____ _ _ _ | __ \ \ / / ____|____ | | __ \ | | |_ _| | | | | | | |__) \ \ / /| |__ / / | |__) |__ ___| |_ | | _ __ ___| |_ __ _| | | - | ___/ \ \/ / | __| v3 / / | ___/ _ \/ __| __| | | | _ \/ __| __/ _ | | | + | ___/ \ \/ / | __| / / | ___/ _ \/ __| __| | | | _ \/ __| __/ _ | | | | | \ / | |____ / / | | | (_) \__ \ |_ _| |_| | | \__ \ || (_| | | | |_| \/ |______|/_/ |_| \___/|___/\__| |_____|_| |_|___/\__\__,_|_|_| ${CL}" From c3d2e486ef0858303460d0d6f6b8654c05002da6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:12:42 -0400 Subject: [PATCH 0073/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6165e4ca..c85d3ee1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 So Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install-v3.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install.sh)" ``` It's recommended to answer `y` to all options. From 0b7fd7ed8aa2d29619c5fcfc28ac78276af629a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:18:29 -0400 Subject: [PATCH 0074/3335] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c85d3ee1..2dcdee2e 100644 --- a/README.md +++ b/README.md @@ -1722,23 +1722,23 @@ ________________________________________________________________________________
- 🔸Code Server + 🔸VS Code Server

-

Code Server

+

VS Code Server

-To Install Code Server, ⚠️ run the following in the LXC console. +To Install VS Code Server, ⚠️ run the following in the LXC console. ```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/code-server.sh)" ``` -[Code Server](https://code.visualstudio.com/docs/remote/vscode-server) is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH. +[VS Code Server](https://code.visualstudio.com/docs/remote/vscode-server) is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH. -**Code Server Interface - http:// IP:8680** +**VS Code Server Interface - http:// IP:8680** ___________________________________________________________________________________________ From 79eb153c5af39fa644547b0a20a67467ee02f162 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Aug 2022 18:18:50 -0400 Subject: [PATCH 0075/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0cd09df0..a66d0b91 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Changed -- **Code Server** +- **VS Code Server** - NEW Script ## 2022-08-02 From 47a76e6977541e25a08e4421553a20ddb4113ded Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Aug 2022 11:18:16 -0400 Subject: [PATCH 0076/3335] Update post-install.sh --- misc/post-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/misc/post-install.sh b/misc/post-install.sh index 543f36c6..55100fb7 100644 --- a/misc/post-install.sh +++ b/misc/post-install.sh @@ -30,12 +30,11 @@ if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then fi function header_info { echo -e "${RD} - _______ ________ ______ _____ _ _____ _ _ _ - | __ \ \ / / ____|____ | | __ \ | | |_ _| | | | | | - | |__) \ \ / /| |__ / / | |__) |__ ___| |_ | | _ __ ___| |_ __ _| | | - | ___/ \ \/ / | __| / / | ___/ _ \/ __| __| | | | _ \/ __| __/ _ | | | - | | \ / | |____ / / | | | (_) \__ \ |_ _| |_| | | \__ \ || (_| | | | - |_| \/ |______|/_/ |_| \___/|___/\__| |_____|_| |_|___/\__\__,_|_|_| + ____ _ _____________ ____ __ ____ __ ____ + / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / + / ____/| |/ / /___ / / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/ /_/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ ${CL}" } From 978af4df27b446cf1c74ba9e2f5cea3a1862cf30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Aug 2022 12:55:38 -0400 Subject: [PATCH 0077/3335] Update nginx-proxy-manager-v4.sh --- ct/nginx-proxy-manager-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 73ab124d..1dd6b6a7 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -3,7 +3,7 @@ echo -e "Loading..." APP="Nginx Proxy Manager" var_disk="3" var_cpu="1" -var_ram="1048" +var_ram="1024" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') From 0d8ece655393834ed2c08ad80bf29e57d0829d44 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Aug 2022 20:13:56 -0400 Subject: [PATCH 0078/3335] Update zigbee2mqtt-v4.sh --- ct/zigbee2mqtt-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 25a20cab..0a8e837e 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -49,7 +49,7 @@ echo -e "${YW} / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / /____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ - /____/ 🐝 v4 + v4 /____/ 🐝 ${CL}" } function msg_info() { From 1b8e9814997a704e7f20368b5294e1736321e721 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Aug 2022 15:23:25 -0400 Subject: [PATCH 0079/3335] Create pimox-haos-vm-v4.sh --- vm/pimox-haos-vm-v4.sh | 256 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 vm/pimox-haos-vm-v4.sh diff --git a/vm/pimox-haos-vm-v4.sh b/vm/pimox-haos-vm-v4.sh new file mode 100644 index 00000000..624fcc62 --- /dev/null +++ b/vm/pimox-haos-vm-v4.sh @@ -0,0 +1,256 @@ +#!/usr/bin/env bash +echo -e "Loading..." +GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +NEXTID=$(pvesh get /cluster/nextid) +LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +HA=`echo "\033[1;34m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + [ ! -z ${VMID-} ] && cleanup_vmid + exit $EXIT +} +function cleanup_vmid() { + if $(qm status $VMID &>/dev/null); then + if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then + qm stop $VMID + fi + qm destroy $VMID + fi +} +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + ____ _ __ ___ __ _____ ____ _____ + / __ \(_) / |/ /___ _ __ / / / / | / __ \/ ___/ + / /_/ / /v4_/ /|_/ / __ \| |/_/ / /_/ / /| |/ / / /\__ \ + / ____/ /___/ / / / /_/ /> < / __ / ___ / /_/ /___/ / +/_/ /_/ /_/ /_/\____/_/|_| /_/ /_/_/ |_\____//____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function default_settings() { + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + HN=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" +} +function advanced_settings() { +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 2 \ +"$STABLE" "Stable" ON \ +"$LATEST" "Latest" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" +else + exit +fi +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" +else + exit +fi +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${STABLE} --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + exit +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" +else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then + echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +start_script +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) +done < <(pvesm status -content images | awk 'NR>1') +if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then + echo -e "'Disk image' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." +elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the HAOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_generic-aarch64-${BRANCH}.qcow2.xz +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}haos_generic-aarch64-${BRANCH}.qcow2.xz${CL}" +msg_info "Extracting Disk Image" +unxz $FILE +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in + nfs|dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done +msg_ok "Extracted Disk Image" +msg_info "Creating HAOS VM" +qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ + -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 128 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF},size=128K \ + -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null +qm set $VMID \ + -boot order=scsi0 >/dev/null +qm set $VMID -description "# Home Assistant OS +### https://github.com/tteck/Proxmox" >/dev/null +msg_ok "Created HAOS VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then +msg_info "Starting Home Assistant OS VM" +qm start $VMID +msg_ok "Started Home Assistant OS VM" +fi +msg_ok "Completed Successfully!\n" From 8113f8b18a47aa1037393db1bd8e155343efcdf3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Aug 2022 15:51:17 -0400 Subject: [PATCH 0080/3335] Update pimox-haos-vm-v4.sh --- vm/pimox-haos-vm-v4.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/pimox-haos-vm-v4.sh b/vm/pimox-haos-vm-v4.sh index 624fcc62..717300da 100644 --- a/vm/pimox-haos-vm-v4.sh +++ b/vm/pimox-haos-vm-v4.sh @@ -236,13 +236,13 @@ for i in {0,1}; do done msg_ok "Extracted Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ +qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 128 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},size=128K \ - -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null + -efidisk0 ${DISK0_REF},efitype=4m,size=64M \ + -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS From d0aee3ceced5a1c3c1ad5d5d3b50f60de7cff76b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Aug 2022 21:57:31 -0400 Subject: [PATCH 0081/3335] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2dcdee2e..65f280b0 100644 --- a/README.md +++ b/README.md @@ -1239,9 +1239,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v4.sh) ⚙️ **To Update Omada** -```yaml -Working On -``` +https://github.com/tteck/Proxmox/issues/402#issue-1328460983 + ____________________________________________________________________________________________
From 430bd65f3332fccedce15dce78ae2f396d2e518b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Aug 2022 17:46:57 -0400 Subject: [PATCH 0082/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index dbbf1db5..af7b1ae3 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -127,17 +127,26 @@ NODE_OPTIONS=--max_old_space_size=2048 make all &>/dev/null cp -a assets/ /opt/photoprism/assets/ &>/dev/null msg_ok "Built PhotoPrism" -env_path="/var/lib/photoprism/.env" -echo " -PHOTOPRISM_AUTH_MODE='password' -PHOTOPRISM_ADMIN_PASSWORD='changeme' -PHOTOPRISM_HTTP_HOST='0.0.0.0' -PHOTOPRISM_HTTP_PORT=2342 -PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' -PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' -PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' -" > $env_path +#env_path="/var/lib/photoprism/.env" +#echo " +#PHOTOPRISM_AUTH_MODE='password' +#PHOTOPRISM_ADMIN_PASSWORD='changeme' +#PHOTOPRISM_HTTP_HOST='0.0.0.0' +#PHOTOPRISM_HTTP_PORT=2342 +#PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' +#PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' +#PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' +#" > $env_path +cat < /var/lib/photoprism/.env +PHOTOPRISM_AUTH_MODE="password" +PHOTOPRISM_ADMIN_PASSWORD="changeme" +PHOTOPRISM_HTTP_HOST="0.0.0.0" +PHOTOPRISM_HTTP_PORT="2342" +PHOTOPRISM_STORAGE_PATH="/var/lib/photoprism/storage" +PHOTOPRISM_ORIGINALS_PATH="/var/lib/photoprism/photos/Originals" +PHOTOPRISM_IMPORT_PATH="/var/lib/photoprism/photos/Import" +EOF msg_info "Creating Service" service_path="/etc/systemd/system/photoprism.service" From eebaf645f173eaf080e258c1aea5f0056520b25c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Aug 2022 20:04:09 -0400 Subject: [PATCH 0083/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65f280b0..a05e006d 100644 --- a/README.md +++ b/README.md @@ -1721,7 +1721,7 @@ ________________________________________________________________________________
- 🔸VS Code Server + VS Code Server

From ef9e363498f32226dd6d4311b2a5fda85778d4ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Aug 2022 10:01:51 -0400 Subject: [PATCH 0084/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 18ca623d..390abae4 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash echo -e "Loading..." -PVE=$(pveversion | grep "pve-manager/7" | wc -l) GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') @@ -47,11 +46,12 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [[ "$PVE" != "1" ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit +if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit fi if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" From 35c83337680bde52340488eaee51ea6cb395899b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Aug 2022 10:04:39 -0400 Subject: [PATCH 0085/3335] Update post-install.sh --- misc/post-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/post-install.sh b/misc/post-install.sh index 55100fb7..b88fe3b2 100644 --- a/misc/post-install.sh +++ b/misc/post-install.sh @@ -23,10 +23,11 @@ while true; do esac done if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo -e "This script requires Proxmox Virtual Environment 7.0 or greater" - echo -e "Exiting..." - sleep 2 - exit + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit fi function header_info { echo -e "${RD} From 1cdc6b9687ce85e0be5d8cacb8cab8c97af47ec6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Aug 2022 13:43:47 -0400 Subject: [PATCH 0086/3335] Update haos-vm-v4.sh Validate Storage --- vm/haos-vm-v4.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 390abae4..81141b62 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -194,6 +194,7 @@ else fi } start_script +msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') TYPE=$(echo $line | awk '{printf "%-10s", $2}') @@ -203,11 +204,13 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) +STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content images | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - echo -e "'Disk image' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + echo -e "${RD}⚠ Unable to detect a valid storage location.${CL}" + echo -e "Exiting..." + exit elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else From 3ffee0b695d79d524008b25d1ecab18914a2327d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Aug 2022 13:45:14 -0400 Subject: [PATCH 0087/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a05e006d..50b0ddfb 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ________________________________________________________________________________
- Home Assistant OS VM + 🔸Home Assistant OS VM

From cf8c77b7c4529ee6c0307c31d16216468fcc299a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Aug 2022 13:46:44 -0400 Subject: [PATCH 0088/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a66d0b91..c145dfc5 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-11 + +### Changed + +- **Home Assistant OS VM** + - Validate Storage + ## 2022-08-04 ### Changed From 54bf1dffb7c897bc1133074502e7c91e6e5e8f73 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Aug 2022 05:25:50 -0400 Subject: [PATCH 0089/3335] maintenance (#420) --- ct/adguard-v4.sh | 1 + ct/daemonsync-v4.sh | 1 + ct/dashy-v4.sh | 1 + ct/debian-v4.sh | 1 + ct/deconz-v4.sh | 1 + ct/docker-v4.sh | 1 + ct/esphome-v4.sh | 1 + ct/grafana-v4.sh | 1 + ct/grocy-v4.sh | 1 + ct/heimdalldashboard-v4.sh | 1 + ct/homeassistant-v4.sh | 1 + ct/homebridge-v4.sh | 1 + ct/influxdb-v4.sh | 1 + ct/iobroker-v4.sh | 1 + ct/jellyfin-v4.sh | 1 + ct/keycloak-v4.sh | 1 + ct/magicmirror-v4.sh | 1 + ct/mariadb-v4.sh | 1 + ct/meshcentral-v4.sh | 1 + ct/motioneye-v4.sh | 1 + ct/mqtt-v4.sh | 1 + ct/n8n-v4.sh | 1 + ct/nginx-proxy-manager-v4.sh | 1 + ct/nocodb-v4.sh | 1 + ct/node-red-v4.sh | 1 + ct/omada-v4.sh | 1 + ct/openhab-v4.sh | 1 + ct/photoprism-v4.sh | 1 + ct/pihole-v4.sh | 1 + ct/plex-v4.sh | 1 + ct/podman-homeassistant-v4.sh | 1 + ct/postgresql-v4.sh | 1 + ct/prometheus-v4.sh | 1 + ct/technitiumdns-v4.sh | 1 + ct/ubuntu-v4.sh | 1 + ct/unifi-v4.sh | 1 + ct/uptimekuma-v4.sh | 1 + ct/vaultwarden-v4.sh | 1 + ct/whoogle-v4.sh | 1 + ct/wireguard-v4.sh | 1 + ct/zigbee2mqtt-v4.sh | 1 + ct/zwavejs2mqtt-v4.sh | 1 + 42 files changed, 42 insertions(+) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index ad961086..bb40f982 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index f805e6ac..3fee2a6e 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index ab5bac02..5383cf97 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 8e2cbcab..fb470b8a 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 388083aa..28db39a2 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -149,6 +149,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index 50deaa4d..d83382b7 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index a3409634..e6488c95 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 9ec1d569..7ed70c2c 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 172f92c0..680bcc4a 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 6fecd9d9..3b5c52bd 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 9af2f420..17ff5cdc 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index fc197eb6..87b60dcb 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 865c93cc..f7b0fa7a 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 2cf95f20..7b56f873 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index bf6c0d7f..210bfdf9 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -149,6 +149,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 739dc010..61954dae 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 237ff677..9f81130a 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index ceabd448..effb77bf 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index fc66509e..35ef4971 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 64d25618..0ce01077 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 624297b3..01638788 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index 22863a44..5cdcc286 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 1dd6b6a7..39ffe521 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 6b3566f1..08e6fd4b 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index f79341df..04aba883 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 9c121060..6236796c 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -149,6 +149,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index ae186e7d..128a0223 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index 41ed38cb..9ffc9399 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 6fbfa78a..60dd7c25 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index cde23da8..9c43b82c 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -149,6 +149,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 79f851a6..6c97d5d8 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -150,6 +150,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index 33f06931..7d8c4d13 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 13ae0854..554e531f 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index 061ef6b2..fa20dafc 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index fd4c3077..8df0e0f4 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -149,6 +149,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index f7cea5c7..71f3ac51 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index 8569b392..3a806bff 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index f82d066f..fa33cb7b 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index bf0f9b9e..f5dabd3e 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -146,6 +146,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index f63f5202..6e2e9282 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -148,6 +148,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 0a8e837e..2c5662e2 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi diff --git a/ct/zwavejs2mqtt-v4.sh b/ct/zwavejs2mqtt-v4.sh index 9c732818..9854db8e 100644 --- a/ct/zwavejs2mqtt-v4.sh +++ b/ct/zwavejs2mqtt-v4.sh @@ -147,6 +147,7 @@ DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DI exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; else exit fi From 0df983699d0de9e3944a714c20250c1d8db6d834 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Aug 2022 13:24:37 -0400 Subject: [PATCH 0090/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 81141b62..6ae0ef59 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -208,7 +208,7 @@ STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content images | awk 'NR>1') VALID=$(pvesm status -content images | awk 'NR>1') if [ -z "$VALID" ]; then - echo -e "${RD}⚠ Unable to detect a valid storage location.${CL}" + echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" echo -e "Exiting..." exit elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then From 1b3f2b0a752df742cff405c68fa76af92a07da7a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Aug 2022 15:08:00 -0400 Subject: [PATCH 0091/3335] Update haos-vm-v4.sh add Dev branch option --- vm/haos-vm-v4.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 6ae0ef59..7adda760 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -2,8 +2,9 @@ echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) -LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') +DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` HA=`echo "\033[1;34m"` @@ -100,9 +101,10 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 2 \ +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 3 \ "$STABLE" "Stable" ON \ "$LATEST" "Latest" OFF \ +"$DEV" "Dev" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -117,7 +119,7 @@ if [ $exitstatus = 0 ]; then else exit fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${STABLE} --title "HOSTNAME" 3>&1 1>&2 2>&3) +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' ') @@ -224,7 +226,11 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +if [ "$BRANCH" == "$DEV" ]; then +URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +else URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +fi sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL From f215f21d885464366b457ef4368f3ace79ac38b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Aug 2022 15:08:45 -0400 Subject: [PATCH 0092/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50b0ddfb..a1093d3e 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ ________________________________________________________________________________

Home Assistant OS VM

-

Option to create VM using the Latest or Stable Image

+

Option to create VM using Stable, Latest or Dev Image

The script automates the manual process of finding, downloading and extracting the Official KVM (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. No hidden (kpartx, unzip, ect...) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. From 35826c04e1d519927c258b3d41d31f3213657170 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Aug 2022 15:10:28 -0400 Subject: [PATCH 0093/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c145dfc5..864950b4 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-13 + +### Changed + +- **Home Assistant OS VM** + - Option to create VM using Stable, Latest or Dev Image + ## 2022-08-11 ### Changed From e2bea6da89228860dcac150790378e80190c89f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Aug 2022 08:02:21 -0400 Subject: [PATCH 0094/3335] Change Latest to Beta (#425) * Update haos-vm-v4.sh * Update README.md * Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- README.md | 2 +- vm/haos-vm-v4.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 864950b4..c7cea0e3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Home Assistant OS VM** - - Option to create VM using Stable, Latest or Dev Image + - Option to create VM using Stable, Beta or Dev Image ## 2022-08-11 diff --git a/README.md b/README.md index a1093d3e..9dcc539b 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ ________________________________________________________________________________

Home Assistant OS VM

-

Option to create VM using Stable, Latest or Dev Image

+

Option to create VM using Stable, Beta or Dev Image

The script automates the manual process of finding, downloading and extracting the Official KVM (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. No hidden (kpartx, unzip, ect...) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 7adda760..1f9fa7cd 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -3,7 +3,7 @@ echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') +BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` @@ -103,7 +103,7 @@ function default_settings() { function advanced_settings() { BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 3 \ "$STABLE" "Stable" ON \ -"$LATEST" "Latest" OFF \ +"$BETA" "Beta" OFF \ "$DEV" "Dev" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? From 4a1eb2e3e136dcb006410db58c958774bf57cdb5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Aug 2022 07:38:56 -0400 Subject: [PATCH 0095/3335] Update haos_vm.sh --- vm/haos_vm.sh | 360 ++++++++++++++++++++------------------------------ 1 file changed, 141 insertions(+), 219 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 89ec3614..9acaeb70 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash echo -e "Loading..." -PVE=$(pveversion | grep "pve-manager/7" | wc -l) GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) -RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +BETA=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') +DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` +HA=`echo "\033[1;34m"` RD=`echo "\033[01;31m"` BGN=`echo "\033[4;92m"` GN=`echo "\033[1;92m"` @@ -23,7 +24,6 @@ shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR trap cleanup EXIT - function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -33,7 +33,6 @@ function error_exit() { [ ! -z ${VMID-} ] && cleanup_vmid exit $EXIT } - function cleanup_vmid() { if $(qm status $VMID &>/dev/null); then if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then @@ -42,241 +41,160 @@ function cleanup_vmid() { qm destroy $VMID fi } - function cleanup() { popd >/dev/null rm -rf $TEMP_DIR } - TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - -if [[ "$PVE" == "1" ]]; then - echo -e "${YW}This script is for Proxmox Virtual Environment 6${CL}" +if [ `pveversion | grep "pve-manager/7" | wc -l` -eq 1 ]; then + echo -e "${YW}This script is for Proxmox Virtual Environment 6.xx${CL}" echo -e "Continuing..." - sleep 5 + sleep 3 fi - -while true; do +if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then + echo "User selected Yes" +else clear - read -p "This will create a New Home Assistant OS VM. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear - + echo -e "⚠ User exited script \n" + exit +fi function header_info { -echo -e "${BL} - _ _ ____ _____ - | | | | /\ / __ \ / ____| - | |__| | / \ | | | | (___ - | __ | / /\ \| | | |\___ \ - | | | |/ ____ \ |__| |____) | - |_| |_/_/ ${CL}${YW}v3${CL}${BL} \_\____/|_____/ +echo -e "${HA} + __ _____ ____ _____ + / / / / | / __ \/ ___/ + / /_/ / /| |/ / / /\__ \ + / __ / ___ / /_/ /___/ / +/_/ /_/_/v4|_\____//____/ + Home Assistant OS ${CL}" } -header_info - function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } - function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using Version ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using VM ID ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using VM Name ${BGN}haos${STABLE}${CL}" - VM_NAME=haos${STABLE} - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}4096${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" - START_VM="yes" - + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + HN=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Latest for Version ${RELEASE}, or Press [ENTER] for Stable Version ${STABLE} " - read BRANCH - if [ -z $BRANCH ]; then BRANCH=$STABLE; - else - BRANCH=$RELEASE; fi; - echo -en "${DGN}Set Version To ${BL}$BRANCH${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${YW}Enter the VM ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read VMID - if [ -z $VMID ]; then VMID=$NEXTID; fi; - echo -en "${DGN}Set VM ID To ${BL}$VMID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${YW}Enter VM Name (no-spaces), or Press [ENTER] for Default: haos${BRANCH} " - read VMNAME - if [ -z $VMNAME ]; then - VM_NAME=haos${BRANCH} - else - VM_NAME=$(echo ${VMNAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$VM_NAME${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}${CORE_COUNT}${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 4096 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Valid MAC Address, or Press [ENTER] for Generated MAC: $GEN_MAC " - read MAC - if [ -z $MAC ]; then MAC=$GEN_MAC; fi; - echo -en "${DGN}Set MAC Address To ${BL}$MAC${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - echo -e "${YW}Start VM when completed, or Press [ENTER] for Default: yes " - read START_VM - if [ -z $START_VM ]; then START_VM="yes"; - else - START_VM="no"; fi; - echo -en "${DGN}Starting VM when completed ${BL}$START_VM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - echo -e "${DGN}Start VM when completed ${BGN}$START_VM${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 3 \ +"$STABLE" "Stable" ON \ +"$BETA" "Beta" OFF \ +"$DEV" "Dev" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" +else + exit +fi +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" +else + exit +fi +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + exit +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" +else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then + echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings fi } - function start_script() { - echo -e "${YW}Type Advanced (Latest ${RELEASE}), or Press [ENTER] for Default Settings (Stable ${STABLE}) " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi } - start_script - +msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') TYPE=$(echo $line | awk '{printf "%-10s", $2}') @@ -286,11 +204,13 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) +STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content images | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - echo -e "'Disk image' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" + echo -e "Exiting..." + exit elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else @@ -304,7 +224,11 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +if [ "$BRANCH" == "$DEV" ]; then +URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +else URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +fi sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL @@ -326,9 +250,8 @@ for i in {0,1}; do eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} done msg_ok "Extracted KVM Disk Image" - msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ +qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 128 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null @@ -339,8 +262,7 @@ qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS ### https://github.com/tteck/Proxmox" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" - +msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" qm start $VMID From ee43d67571deedf5b66232fbec991d4d9801036e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Aug 2022 09:03:34 -0400 Subject: [PATCH 0096/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dcc539b..4aae6cb2 100644 --- a/README.md +++ b/README.md @@ -972,7 +972,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nocodb-v4.sh Run in the LXC console ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/nocodb-update.sh)" +cd /opt/nocodb && npm run upgrade ``` ____________________________________________________________________________________________ From 249c751efbd7f1a525e2a2c2d21b1696eb80a593 Mon Sep 17 00:00:00 2001 From: cklam2 Date: Fri, 19 Aug 2022 12:40:45 +0200 Subject: [PATCH 0097/3335] Update photoprism-install.sh (#442) --- setup/photoprism-install.sh | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index af7b1ae3..72190169 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -97,6 +97,7 @@ cp /usr/local/go/bin/richgo /usr/local/bin/richgo cp /usr/local/go/bin/gosu /usr/local/sbin/gosu chown root:root /usr/local/sbin/gosu chmod 755 /usr/local/sbin/gosu +rm go1.18.3.linux-amd64.tar.gz msg_ok "Installed Golang" msg_info "Installing Tensorflow" @@ -111,6 +112,7 @@ if [[ "$AVX" =~ avx2 ]]; then tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null fi ldconfig &>/dev/null +rm libtensorflow-linux-avx2-1.15.2.tar.gz msg_ok "Installed Tensorflow" msg_info "Cloning PhotoPrism" @@ -127,25 +129,17 @@ NODE_OPTIONS=--max_old_space_size=2048 make all &>/dev/null cp -a assets/ /opt/photoprism/assets/ &>/dev/null msg_ok "Built PhotoPrism" -#env_path="/var/lib/photoprism/.env" -#echo " -#PHOTOPRISM_AUTH_MODE='password' -#PHOTOPRISM_ADMIN_PASSWORD='changeme' -#PHOTOPRISM_HTTP_HOST='0.0.0.0' -#PHOTOPRISM_HTTP_PORT=2342 -#PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' -#PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' -#PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' -#" > $env_path - -cat < /var/lib/photoprism/.env -PHOTOPRISM_AUTH_MODE="password" -PHOTOPRISM_ADMIN_PASSWORD="changeme" -PHOTOPRISM_HTTP_HOST="0.0.0.0" -PHOTOPRISM_HTTP_PORT="2342" -PHOTOPRISM_STORAGE_PATH="/var/lib/photoprism/storage" -PHOTOPRISM_ORIGINALS_PATH="/var/lib/photoprism/photos/Originals" -PHOTOPRISM_IMPORT_PATH="/var/lib/photoprism/photos/Import" +cat < /var/lib/photoprism/options.yml +# Authentication +AuthMode: password +AdminPassword: changeme +# Listening address/port +HttpPort: 2342 +HttpHost: 0.0.0.0 +# Paths +StoragePath: /var/lib/photoprism/storage +OriginalsPath: /var/lib/photoprism/photos/Originals +ImportPath: /var/lib/photoprism/photos/Import EOF msg_info "Creating Service" service_path="/etc/systemd/system/photoprism.service" @@ -158,8 +152,7 @@ After=network.target Type=forking User=root WorkingDirectory=/opt/photoprism -EnvironmentFile=/var/lib/photoprism/.env -ExecStart=/opt/photoprism/bin/photoprism up -d +ExecStart=/opt/photoprism/bin/photoprism --config-path /var/lib/photoprism/ up -d ExecStop=/opt/photoprism/bin/photoprism down [Install] From ee6b092866529e366e132bce1e8583ea5b9f5767 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 07:10:31 -0400 Subject: [PATCH 0098/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 72190169..39664570 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -83,8 +83,8 @@ apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Golang" -wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz &>/dev/null -tar -xzf go1.18.3.linux-amd64.tar.gz -C /usr/local &>/dev/null +wget https://golang.org/dl/go1.18.4.linux-amd64.tar.gz &>/dev/null +tar -xzf go1.18.4.linux-amd64.tar.gz -C /usr/local &>/dev/null ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null go install github.com/tianon/gosu@latest &>/dev/null go install golang.org/x/tools/cmd/goimports@latest &>/dev/null @@ -97,7 +97,6 @@ cp /usr/local/go/bin/richgo /usr/local/bin/richgo cp /usr/local/go/bin/gosu /usr/local/sbin/gosu chown root:root /usr/local/sbin/gosu chmod 755 /usr/local/sbin/gosu -rm go1.18.3.linux-amd64.tar.gz msg_ok "Installed Golang" msg_info "Installing Tensorflow" @@ -112,7 +111,6 @@ if [[ "$AVX" =~ avx2 ]]; then tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null fi ldconfig &>/dev/null -rm libtensorflow-linux-avx2-1.15.2.tar.gz msg_ok "Installed Tensorflow" msg_info "Cloning PhotoPrism" @@ -123,7 +121,7 @@ cd photoprism git checkout release &>/dev/null msg_ok "Cloned PhotoPrism" -msg_info "Building PhotoPrism" +msg_info "Building PhotoPrism (Patience)" NODE_OPTIONS=--max_old_space_size=2048 make all &>/dev/null ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null cp -a assets/ /opt/photoprism/assets/ &>/dev/null @@ -141,6 +139,7 @@ StoragePath: /var/lib/photoprism/storage OriginalsPath: /var/lib/photoprism/photos/Originals ImportPath: /var/lib/photoprism/photos/Import EOF + msg_info "Creating Service" service_path="/etc/systemd/system/photoprism.service" @@ -157,7 +156,6 @@ ExecStop=/opt/photoprism/bin/photoprism down [Install] WantedBy=multi-user.target" > $service_path -systemctl enable --now photoprism &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -181,5 +179,6 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* +rm -rf /var/{cache,log}/* /root/go1.18.4.linux-amd64.tar.gz /root/libtensorflow-linux-avx2-1.15.2.tar.gz /root/libtensorflow-linux-avx-1.15.2.tar.gz /root/libtensorflow-linux-cpu-1.15.2.tar.gz +systemctl enable --now photoprism &>/dev/null msg_ok "Cleaned" From 0ba075e9236c0ffe4ed3fe52cec343f0c2fd7ec7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 11:59:03 -0400 Subject: [PATCH 0099/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 39664570..758d1db8 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -60,7 +60,7 @@ apt update &>/dev/null apt-get -qqy upgrade &>/dev/null msg_ok "Updated Container OS" -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (Patience)" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null apt-get install -y gcc &>/dev/null @@ -82,7 +82,7 @@ msg_info "Installing Node.js" apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" -msg_info "Installing Golang" +msg_info "Installing Golang (Patience)" wget https://golang.org/dl/go1.18.4.linux-amd64.tar.gz &>/dev/null tar -xzf go1.18.4.linux-amd64.tar.gz -C /usr/local &>/dev/null ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null @@ -179,6 +179,10 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /root/go1.18.4.linux-amd64.tar.gz /root/libtensorflow-linux-avx2-1.15.2.tar.gz /root/libtensorflow-linux-avx-1.15.2.tar.gz /root/libtensorflow-linux-cpu-1.15.2.tar.gz +rm -rf /var/{cache,log}/* \ +/go1.18.4.linux-amd64.tar.gz \ +/libtensorflow-linux-avx2-1.15.2.tar.gz \ +/libtensorflow-linux-avx-1.15.2.tar.gz \ +/libtensorflow-linux-cpu-1.15.2.tar.gz systemctl enable --now photoprism &>/dev/null msg_ok "Cleaned" From 84528b901564a24360155d8bbc38d99667c93f1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 12:40:47 -0400 Subject: [PATCH 0100/3335] Update README.md --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 4aae6cb2..1f6b159c 100644 --- a/README.md +++ b/README.md @@ -1641,7 +1641,48 @@ Search: `DAEMON Sync` in your favorite app store __________________________________________________________________________________________
+ +
+ 🔸PhotoPrism LXC +

+ +

PhotoPrism LXC

+ +[PhotoPrism](https://photoprism.app/) is an AI-powered app for browsing, organizing & sharing your photo collection. + +To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**PhotoPrism Interface - IP:2342** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + changeme + ``` +[PhotoSync](https://www.photosync-app.com/home.html) + +⚙️ **To Update PhotoPrism** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/photoprism-update.sh)" +``` +____________________________________________________________________________________________ + +
+
MotionEye VMS LXC From 2246589610405ba02ca92e36337c273728e5836a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 12:45:30 -0400 Subject: [PATCH 0101/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c7cea0e3..a50fdf58 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-19 + +### Changed + +- **PhotoPrism LXC** + - Fixed .env bug Thanks @cklam2 + ## 2022-08-13 ### Changed From 9884852326bb17fd08fc0cd3d61f1837df88382d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 12:54:52 -0400 Subject: [PATCH 0102/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a50fdf58..79846468 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **PhotoPrism LXC** - - Fixed .env bug Thanks @cklam2 + - Fixed .env bug (Thanks @cklam2) ## 2022-08-13 From cb0576e67e1e6a1bdecaa62ddb1edcd0844f1ea3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 15:13:03 -0400 Subject: [PATCH 0103/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 758d1db8..da489df7 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -56,8 +56,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies (Patience)" @@ -75,7 +75,7 @@ apt-get install -y ffmpeg &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null +curl -sL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -127,18 +127,16 @@ NODE_OPTIONS=--max_old_space_size=2048 make all &>/dev/null cp -a assets/ /opt/photoprism/assets/ &>/dev/null msg_ok "Built PhotoPrism" -cat < /var/lib/photoprism/options.yml -# Authentication -AuthMode: password -AdminPassword: changeme -# Listening address/port -HttpPort: 2342 -HttpHost: 0.0.0.0 -# Paths -StoragePath: /var/lib/photoprism/storage -OriginalsPath: /var/lib/photoprism/photos/Originals -ImportPath: /var/lib/photoprism/photos/Import -EOF +env_path="/var/lib/photoprism/.env" +echo " +PHOTOPRISM_AUTH_MODE='password' +PHOTOPRISM_ADMIN_PASSWORD='changeme' +PHOTOPRISM_HTTP_HOST='0.0.0.0' +PHOTOPRISM_HTTP_PORT='2342' +PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' +PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' +PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' +" > $env_path msg_info "Creating Service" service_path="/etc/systemd/system/photoprism.service" @@ -151,7 +149,8 @@ After=network.target Type=forking User=root WorkingDirectory=/opt/photoprism -ExecStart=/opt/photoprism/bin/photoprism --config-path /var/lib/photoprism/ up -d +EnvironmentFile=/var/lib/photoprism/.env +ExecStart=/opt/photoprism/bin/photoprism up -d ExecStop=/opt/photoprism/bin/photoprism down [Install] From e4ddc8fc0c37f0067f1fef3f76374f69a22867f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 16:08:49 -0400 Subject: [PATCH 0104/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index da489df7..883be3a3 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -179,9 +179,13 @@ msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* \ +/photoprism \ /go1.18.4.linux-amd64.tar.gz \ /libtensorflow-linux-avx2-1.15.2.tar.gz \ /libtensorflow-linux-avx-1.15.2.tar.gz \ /libtensorflow-linux-cpu-1.15.2.tar.gz -systemctl enable --now photoprism &>/dev/null msg_ok "Cleaned" + +msg_info "Starting PhotoPrism" +systemctl enable --now photoprism &>/dev/null +msg_info "Started PhotoPrism" From f50d5890a29ecc60b03fbf403169411f5793a4da Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 16:23:42 -0400 Subject: [PATCH 0105/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 883be3a3..73f42e95 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -133,6 +133,7 @@ PHOTOPRISM_AUTH_MODE='password' PHOTOPRISM_ADMIN_PASSWORD='changeme' PHOTOPRISM_HTTP_HOST='0.0.0.0' PHOTOPRISM_HTTP_PORT='2342' +PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' From 75a78e38cd3fcd3c4dabfb17fb0fd8e304952060 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 16:42:14 -0400 Subject: [PATCH 0106/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f6b159c..275d6551 100644 --- a/README.md +++ b/README.md @@ -1673,7 +1673,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v ``` [PhotoSync](https://www.photosync-app.com/home.html) -⚙️ **To Update PhotoPrism** +⚙️ **To Update or Change Branch** Run in the LXC Console ```yaml From 742d903ad1fe8c9790d8b9fddf7d3eff0369dadb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 16:59:59 -0400 Subject: [PATCH 0107/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 73f42e95..9cebf0d8 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -189,4 +189,4 @@ msg_ok "Cleaned" msg_info "Starting PhotoPrism" systemctl enable --now photoprism &>/dev/null -msg_info "Started PhotoPrism" +msg_ok "Started PhotoPrism" From f0b995e4ee1f0868338dc2e5e95af6463b718f01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 17:03:19 -0400 Subject: [PATCH 0108/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 9cebf0d8..b703e80a 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -189,4 +189,3 @@ msg_ok "Cleaned" msg_info "Starting PhotoPrism" systemctl enable --now photoprism &>/dev/null -msg_ok "Started PhotoPrism" From 79ce387391c746b065d5cc0e031fdf2ed921b20b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Aug 2022 17:09:38 -0400 Subject: [PATCH 0109/3335] Create mikrotik-routeros-v4.sh --- vm/mikrotik-routeros-v4.sh | 261 +++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 vm/mikrotik-routeros-v4.sh diff --git a/vm/mikrotik-routeros-v4.sh b/vm/mikrotik-routeros-v4.sh new file mode 100644 index 00000000..848a505c --- /dev/null +++ b/vm/mikrotik-routeros-v4.sh @@ -0,0 +1,261 @@ +#!/usr/bin/env bash +echo -e "Loading..." +GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +NEXTID=$(pvesh get /cluster/nextid) +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +HA=`echo "\033[1;34m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + [ ! -z ${VMID-} ] && cleanup_vmid + exit $EXIT +} +function cleanup_vmid() { + if $(qm status $VMID &>/dev/null); then + if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then + qm stop $VMID + fi + qm destroy $VMID + fi +} +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit +fi +if (whiptail --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${RD} + __ ____ __ __ _ __ ____ __ ____ _____ + / |/ (_) /___________ / /_(_) /__ / __ \____ __ __/ /____ _____/ __ \/ ___/ + / /|_/ / / //_/ ___/ __ \/ __/ / //_/ / /_/ / __ \/ / / / __/ _ \/ ___/ / / /\__ \ + / / / / / < / / / /_/ / /_/ / < v4 / _ _/ /_/ / /_/ / /_/ __/ / / /_/ /___/ / +/_/ /_/_/_/|_/_/ \____/\__/_/_/|_| /_/ |_|\____/\__,_/\__/\___/_/ \____//____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function default_settings() { + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros${CL}" + HN=mikrotik-routeros + echo -e "${DGN}Allocated Cores: ${BGN}1${CL}" + CORE_COUNT="1" + echo -e "${DGN}Allocated RAM: ${BGN}1024${CL}" + RAM_SIZE="1024" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}" +} +function advanced_settings() { +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" +else + exit +fi +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + exit +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then + echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}" + START_VM="yes" +else + echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}no${CL}" + START_VM="no" +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then + echo -e "${RD}Creating Mikrotik RouterOS VM using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +start_script +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi +STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" + echo -e "Exiting..." + exit +elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Getting URL for Mikrotik RouterOS Disk Image" + +URL=https://download.mikrotik.com/routeros/7.4.1/install-image-7.4.1.zip + +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}$FILE${CL}" +msg_info "Extracting Mikrotik RouterOS Disk Image" +gunzip -f -S .zip $FILE +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in + nfs|dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; + btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_FORMAT="subvol" + DISK_IMPORT="-format raw" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done +msg_ok "Extracted Mikrotik RouterOS Disk Image" +msg_info "Creating Mikrotik RouterOS VM" +qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ + -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ + -scsi0 ${DISK1_REF},size=2G >/dev/null +qm set $VMID \ + -boot order=scsi0 >/dev/null +qm set $VMID -description "# Mikrotik RouterOS +### https://github.com/tteck/Proxmox" >/dev/null +msg_ok "Mikrotik RouterOS VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then +msg_info "Starting Mikrotik RouterOS VM" +qm start $VMID +msg_ok "Started Mikrotik RouterOS VM" +fi +msg_ok "Completed Successfully!\n" From 0604f6feeb8171045fb0e098b9dd3ab050de73a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Aug 2022 07:36:35 -0400 Subject: [PATCH 0110/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 275d6551..49c0425d 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ________________________________________________________________________________
- 🔸Home Assistant OS VM + Home Assistant OS VM

From 531dede13ae26e22b97e08c50e8d9f7ffa250a86 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Aug 2022 12:46:48 -0400 Subject: [PATCH 0111/3335] Update post-install.sh --- misc/post-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/post-install.sh b/misc/post-install.sh index b88fe3b2..14c0dcc2 100644 --- a/misc/post-install.sh +++ b/misc/post-install.sh @@ -107,11 +107,11 @@ fi read -r -p "Update Proxmox VE 7 now? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then -msg_info "Updating Proxmox VE 7" +msg_info "Updating Proxmox VE 7 (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null -msg_ok "Updated Proxmox VE 7 (Reboot Recommended)" +msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)" fi sleep 2 -msg_ok "Finished Post Install Routines" +msg_ok "Completed Post Install Routines" From dbd238cd64a3cc922bd83c57bd43fda621ceba82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Aug 2022 14:53:51 -0400 Subject: [PATCH 0112/3335] Update keycloak-install.sh --- setup/keycloak-install.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index b593459c..7d155d9f 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -55,21 +55,25 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (Patience)" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null apt-get install -y openjdk-11-jdk &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing Keycloak" +RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 2, length($2)-3) }') \ + +msg_info "Installing Keycloak v$RELEASE" cd /opt -wget https://github.com/keycloak/keycloak/releases/download/18.0.0/keycloak-18.0.0.tar.gz &>/dev/null -tar -xvf keycloak-18.0.0.tar.gz &>/dev/null -mv keycloak-18.0.0 keycloak +wget https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz &>/dev/null +tar -xvf keycloak-$RELEASE.tar.gz &>/dev/null +mv keycloak-$RELEASE keycloak msg_ok "Installed Keycloak" msg_info "Creating Service" From def4a71f47cb30f82cb7b5f7b8019c30c375fe20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Aug 2022 17:16:40 -0400 Subject: [PATCH 0113/3335] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 49c0425d..8651a8c0 100644 --- a/README.md +++ b/README.md @@ -1976,6 +1976,28 @@ ________________________________________________________________________________
+
+ 🔸Mikrotik RouterOS VM + +

+ +

Mikrotik RouterOS VM

+ +[Mikrotik RouterOS](https://wiki.mikrotik.com/wiki/Manual:TOC) can be installed on a PC and will turn it into a router with all the necessary features - routing, firewall, bandwidth management, wireless access point, backhaul link, hotspot gateway, VPN server and more. + +To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mikrotik-routeros-v4.sh.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 2GB Storage - 1CPU ⚡

+ + +____________________________________________________________________________________________ + +
+
Vaultwarden LXC From f957994ddd141b0b8b679cce344f8a9e7b902b79 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Aug 2022 17:18:11 -0400 Subject: [PATCH 0114/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 79846468..acec539e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-20 + +### Changed + +- **Mikrotik RouterOS VM** + - NEW Script + ## 2022-08-19 ### Changed From aa428ffcab32f6cd718ba249c1d008cff7199e13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Aug 2022 06:42:56 -0400 Subject: [PATCH 0115/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8651a8c0..c5be8c19 100644 --- a/README.md +++ b/README.md @@ -1990,6 +1990,7 @@ To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox S ``` bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mikrotik-routeros-v4.sh.sh)" ``` +Setup is done via VM console.

⚡ Default Settings: 1GB RAM - 2GB Storage - 1CPU ⚡

From 0849ab2330792f5cdc58791fd2b6555b691394f4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 08:49:58 -0400 Subject: [PATCH 0116/3335] Create wikijs-v4.sh --- ct/wikijs-v4.sh | 265 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 ct/wikijs-v4.sh diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh new file mode 100644 index 00000000..99f794fd --- /dev/null +++ b/ct/wikijs-v4.sh @@ -0,0 +1,265 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Wikijs" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${BL} + _ ___ __ _ _ +| | / (_) /__(_) (_)____ +| | /| / / / //_/ / / / ___/ +| |/ |/ / / ,< / / / (__ ) +|__/|__/_/_/|_/_(_)_/ /____/ + /___/ v4 +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 41b4c1f56e21048b99f9fc698358107e99284f7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 08:51:00 -0400 Subject: [PATCH 0117/3335] Create wikijs-install.sh --- setup/wikijs-install.sh | 138 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 setup/wikijs-install.sh diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh new file mode 100644 index 00000000..baa71eb0 --- /dev/null +++ b/setup/wikijs-install.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +msg_info "Updating Container OS" +apt update &>/dev/null +apt-get -qqy upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y git &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +curl -sL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + +msg_info "Installing Wiki.js" +mkdir -p /opt/wikijs +cd /opt/wikijs +wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null +tar xzf wiki-js.tar.gz +rm wiki-js.tar.gz + +cat < /opt/wikijs/config.yml +bindIP: 0.0.0.0 +port: 3000 +db: + type: sqlite + storage: /opt/wikijs/db.sqlite +logLevel: info +logFormat: default +dataPath: /opt/wikijs/data +bodyParserLimit: 5mb +EOF +npm rebuild sqlite3 &>/dev/null +msg_ok "Installed Wiki.js" + +msg_info "Creating Service" +service_path="/etc/systemd/system/wikijs.service" + +echo "[Unit] +Description=Wiki.js +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/node server +Restart=always +User=root +Environment=NODE_ENV=production +WorkingDirectory=/opt/wikijs + +[Install] +WantedBy=multi-user.target" > $service_path +systemctl enable --now wikijs &>/dev/null +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* +msg_ok "Cleaned" From 3ee91ed75b083f2ce0dcccd6c4427cf03a8c341d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 08:52:00 -0400 Subject: [PATCH 0118/3335] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index c5be8c19..cee0e5fd 100644 --- a/README.md +++ b/README.md @@ -1481,6 +1481,29 @@ ________________________________________________________________________________
+
+ 🔸Wiki.js LXC + +

+ +

Wiki.js LXC

+ +[Wiki.js](https://js.wiki/) is a modern, lightweight and powerful wiki app built on NodeJS. + +To create a new Proxmox Wiki.js LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wikijs-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Wiki.js Interface - IP:3000** + +____________________________________________________________________________________________ + +
+
Heimdall Dashboard LXC From af9af711db852d8378af55e0833bb13005fee06b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 09:03:47 -0400 Subject: [PATCH 0119/3335] Update wikijs-v4.sh --- ct/wikijs-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 99f794fd..32df8a0d 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -258,7 +258,7 @@ pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} ${var_version} LXC +pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. From 18dece6f2d26744e1d87ea47e61ee1e4e4149b67 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 09:08:03 -0400 Subject: [PATCH 0120/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index acec539e..78fdd7cd 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-22 + +### Changed + +- **Wiki.js LXC** + - NEW Script + ## 2022-08-20 ### Changed From b68d7ba3df34bfe14a6457f0bf50a6ce771f63be Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 15:41:16 -0400 Subject: [PATCH 0121/3335] Create emby-install.sh --- setup/emby-install.sh | 105 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 setup/emby-install.sh diff --git a/setup/emby-install.sh b/setup/emby-install.sh new file mode 100644 index 00000000..ff07541f --- /dev/null +++ b/setup/emby-install.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +msg_info "Updating Container OS" +apt update &>/dev/null +apt-get -qqy upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting Up Hardware Acceleration" +apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 \ + beignet-opencl-icd &>/dev/null + +/bin/chgrp video /dev/dri +/bin/chmod 755 /dev/dri +/bin/chmod 660 /dev/dri/* +msg_ok "Set Up Hardware Acceleration" + +msg_info "Installing Emby" +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.6.0/emby-server-deb_4.7.6.0_amd64.deb &>/dev/null +dpkg -i emby-server-deb_4.7.6.0_amd64.deb &>/dev/null +apt-get install -y ffmpeg &>/dev/null +msg_ok "Installed Emby" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* +msg_ok "Cleaned" From 38e502aaa8f701598a532cad762999be37741925 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 15:43:38 -0400 Subject: [PATCH 0122/3335] Create emby-v4.sh --- ct/emby-v4.sh | 277 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 ct/emby-v4.sh diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh new file mode 100644 index 00000000..ed9c62b4 --- /dev/null +++ b/ct/emby-v4.sh @@ -0,0 +1,277 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Emby" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +echo -e "${DGN} + ______ __ + / ____/___ v4_ / /_ __ __ + / __/ / __ __ \/ __ \/ / / / + / /___/ / / / / / /_/ / /_/ / +/_____/_/ /_/ /_/_.___/\__, / + /____/ +${CL}" +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +"18.04" "Bionic" OFF \ +"20.04" "Focal" ON \ +"21.10" "Impish" OFF \ +"22.04" "Jammy" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8096${CL}\n" From 2c0f36b42465b5c094c1d9ec0b49b2b8764cd36f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 15:44:16 -0400 Subject: [PATCH 0123/3335] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index cee0e5fd..3b6169f1 100644 --- a/README.md +++ b/README.md @@ -1306,6 +1306,30 @@ ________________________________________________________________________________
+
+ 🔸Emby Media Server LXC +

+

Emby Media Server LXC

+ +To create a new Proxmox Emby Media Server LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**Emby Media Server Interface - IP:8096** + +⚙️ **To Update Emby Media Server** + +Run in the LXC console +```yaml + +``` +____________________________________________________________________________________________ + +
+
Jellyfin Media Server LXC

From d99fbb45611fed17356ad4be9bc63bc604337a4b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 15:46:23 -0400 Subject: [PATCH 0124/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 78fdd7cd..83a0040f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Wiki.js LXC** - NEW Script +- **Emby Media Server LXC** + - NEW Script ## 2022-08-20 From 3437c136a9bb23dc966049ba237afa753b62e60c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 15:55:34 -0400 Subject: [PATCH 0125/3335] Update README.md --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 3b6169f1..6cbdc313 100644 --- a/README.md +++ b/README.md @@ -1320,12 +1320,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" **Emby Media Server Interface - IP:8096** -⚙️ **To Update Emby Media Server** +⚙️ **Emby Media Server Uses Automatic Updates** -Run in the LXC console -```yaml - -``` ____________________________________________________________________________________________
From ef0180298d28002ea8768426ffbc34ab4dbdf2db Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Aug 2022 15:57:22 -0400 Subject: [PATCH 0126/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cbdc313..480c9c22 100644 --- a/README.md +++ b/README.md @@ -1320,7 +1320,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" **Emby Media Server Interface - IP:8096** -⚙️ **Emby Media Server Uses Automatic Updates** +⚙️ **Emby Media Server Utilizes Automatic Updates** ____________________________________________________________________________________________ From ac18ede76b95aa402d905268ba9aa679d754cdcc Mon Sep 17 00:00:00 2001 From: chpego <38792705+chpego@users.noreply.github.com> Date: Mon, 22 Aug 2022 22:11:05 +0200 Subject: [PATCH 0127/3335] generate a new token admin (#446) --- setup/vaultwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index ec4da4f3..5b994967 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -106,7 +106,7 @@ msg_ok "Downloaded Web-Vault ${WEBVAULT}" cat < /opt/vaultwarden/.env ## https://github.com/dani-garcia/vaultwarden/blob/main/.env.template -# ADMIN_TOKEN=Vy2VyYTTsKPv8W5aEOWUbB/Bt3DEKePbHmI4m9VcemUMS2rEviDowNAFqYi1xjmp +# ADMIN_TOKEN=$(openssl rand -base64 48) ROCKET_ADDRESS=0.0.0.0 DATA_FOLDER=/opt/vaultwarden/data DATABASE_MAX_CONNS=10 From d93c146b87e4fde47d86b11d32984817cfada295 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 08:36:08 -0400 Subject: [PATCH 0128/3335] v5.5.6 --- setup/omada-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/omada-install.sh b/setup/omada-install.sh index c52bc085..6a7c930f 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -69,9 +69,9 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv sudo dpkg -i mongodb-org-server_3.6.23_amd64.deb &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing Omada Controller v5.4.6" -wget -qL https://static.tp-link.com/upload/software/2022/202207/20220729/Omada_SDN_Controller_v5.4.6_Linux_x64.deb -sudo dpkg -i Omada_SDN_Controller_v5.4.6_Linux_x64.deb &>/dev/null +msg_info "Installing Omada Controller v5.5.6" +wget -qL https://static.tp-link.com/upload/software/2022/202208/20220822/Omada_SDN_Controller_v5.5.6_Linux_x64.deb +sudo dpkg -i Omada_SDN_Controller_v5.5.6_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" PASS=$(grep -w "root" /etc/shadow | cut -b6); From f15190ebd4ab734bd6f8d15b14f69ebeb7b92139 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 08:59:43 -0400 Subject: [PATCH 0129/3335] Update vaultwarden-install.sh --- setup/vaultwarden-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 5b994967..897f7ca5 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -74,11 +74,11 @@ msg_ok "Installed Dependencies" WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \ | grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') \ +| awk '{print substr($2, 2, length($2)-3) }') VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest \ | grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') \ +| awk '{print substr($2, 2, length($2)-3) }') msg_info "Installing Rust" curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal &>/dev/null From bedb9f650c01d572b291df4270d93c796f2912d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 09:04:51 -0400 Subject: [PATCH 0130/3335] Update vaultwarden-update.sh --- misc/vaultwarden-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index b645e810..91159e1b 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest \ | grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') \ +| awk '{print substr($2, 2, length($2)-3) }') RD=`echo "\033[01;31m"` BL=`echo "\033[36m"` From 0a8ec7f066ad1f846c2c8c8b1c2f7eab51f638f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 09:05:18 -0400 Subject: [PATCH 0131/3335] Update web-vault-update.sh --- misc/web-vault-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/web-vault-update.sh b/misc/web-vault-update.sh index d55b0aeb..a6b5eaf8 100644 --- a/misc/web-vault-update.sh +++ b/misc/web-vault-update.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \ | grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') \ +| awk '{print substr($2, 2, length($2)-3) }') RD=`echo "\033[01;31m"` BL=`echo "\033[36m"` From 36cfc3043b6159bc489516fc7fbf1c3a36deab0a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 10:46:07 -0400 Subject: [PATCH 0132/3335] Update vaultwarden-install.sh --- setup/vaultwarden-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 897f7ca5..81ca2b28 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -105,8 +105,7 @@ tar -xzf bw_web_$WEBVAULT.tar.gz -C /opt/vaultwarden/ &>/dev/null msg_ok "Downloaded Web-Vault ${WEBVAULT}" cat < /opt/vaultwarden/.env -## https://github.com/dani-garcia/vaultwarden/blob/main/.env.template -# ADMIN_TOKEN=$(openssl rand -base64 48) +ADMIN_TOKEN=$(openssl rand -base64 48) ROCKET_ADDRESS=0.0.0.0 DATA_FOLDER=/opt/vaultwarden/data DATABASE_MAX_CONNS=10 From 3caf5fb5bde5bb4c9e1d2d7d675ce93016f5f8f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 10:47:17 -0400 Subject: [PATCH 0133/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 480c9c22..31685268 100644 --- a/README.md +++ b/README.md @@ -2066,7 +2066,7 @@ Expect 30+ minute install time. **Vaultwarden Interface: CTIP:8000** -⚙️ **Path to Vaultwarden .env file** (to enable `ADMIN_TOKEN`) +⚙️ **Path to Vaultwarden .env file** (to find the `ADMIN_TOKEN`) ```yaml /opt/vaultwarden/.env ``` From b11d161c30f7a051966c7c878386afcb7cba076f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 13:28:14 -0400 Subject: [PATCH 0134/3335] Update docker-install.sh --- setup/docker-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/docker-install.sh b/setup/docker-install.sh index aec07703..3ee63673 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -83,7 +83,7 @@ EOF sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" -read -r -p "Would you like to add Portainer? " prompt +read -r -p "Would you like to add Portainer? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then PORTAINER="Y" @@ -105,7 +105,7 @@ docker run -d \ msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" fi -read -r -p "Would you like to add Docker Compose? " prompt +read -r -p "Would you like to add Docker Compose? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then DOCKER_COMPOSE="Y" From 3cce666e4c2d1a4cd9012bd61bff64d79139d209 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 13:57:59 -0400 Subject: [PATCH 0135/3335] Update docker-install.sh --- setup/docker-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 3ee63673..f5ccbb05 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -83,7 +83,7 @@ EOF sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" -read -r -p "Would you like to add Portainer? " prompt +read -r -p "Would you like to add Portainer? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then PORTAINER="Y" @@ -105,7 +105,7 @@ docker run -d \ msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" fi -read -r -p "Would you like to add Docker Compose? " prompt +read -r -p "Would you like to add Docker Compose? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then DOCKER_COMPOSE="Y" From 08b41260228853fdd783af865851e4f2b0af00f4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 20:53:10 -0400 Subject: [PATCH 0136/3335] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 31685268..118331c3 100644 --- a/README.md +++ b/README.md @@ -1311,6 +1311,8 @@ ________________________________________________________________________________

Emby Media Server LXC

+[Emby](https://emby.media/) brings together your personal videos, music, photos, and live television. + To create a new Proxmox Emby Media Server LXC, run the following in the Proxmox Shell. ```yaml From 4a5a609e26237e42826fa6fada88278a7c9d6412 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Aug 2022 21:37:12 -0400 Subject: [PATCH 0137/3335] Update post-install.sh --- misc/post-install.sh | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/misc/post-install.sh b/misc/post-install.sh index 14c0dcc2..73c32268 100644 --- a/misc/post-install.sh +++ b/misc/post-install.sh @@ -12,8 +12,8 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" - -echo -e "\e[1;33m This script will Perform Post Install Routines. PVE7 ONLY \e[0m" +clear +echo -e "${BL}This script will Perform Post Install Routines.${CL}" while true; do read -p "Start the PVE7 Post Install Script (y/n)?" yn case $yn in @@ -23,11 +23,11 @@ while true; do esac done if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" - echo "Exiting..." - sleep 3 - exit + echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version: 7.XX${CL}" + echo -e "\nExiting..." + sleep 3 + exit fi function header_info { echo -e "${RD} @@ -51,7 +51,7 @@ function msg_ok() { clear header_info -read -r -p "Disable Enterprise Repository? " prompt +read -r -p "Disable Enterprise Repository? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then msg_info "Disabling Enterprise Repository" @@ -60,7 +60,7 @@ sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list msg_ok "Disabled Enterprise Repository" fi -read -r -p "Add/Correct PVE7 Sources (sources.list)? " prompt +read -r -p "Add/Correct PVE7 Sources (sources.list)? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then msg_info "Adding or Correcting PVE7 Sources" @@ -73,7 +73,7 @@ sleep 2 msg_ok "Added or Corrected PVE7 Sources" fi -read -r -p "Enable No-Subscription Repository? " prompt +read -r -p "Enable No-Subscription Repository? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then msg_info "Enabling No-Subscription Repository" @@ -84,7 +84,7 @@ sleep 2 msg_ok "Enabled No-Subscription Repository" fi -read -r -p "Add (Disabled) Beta/Test Repository? " prompt +read -r -p "Add (Disabled) Beta/Test Repository? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then msg_info "Adding Beta/Test Repository and set disabled" @@ -95,7 +95,7 @@ sleep 2 msg_ok "Added Beta/Test Repository" fi -read -r -p "Disable Subscription Nag? " prompt +read -r -p "Disable Subscription Nag? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then msg_info "Disabling Subscription Nag" @@ -104,7 +104,7 @@ apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag" fi -read -r -p "Update Proxmox VE 7 now? " prompt +read -r -p "Update Proxmox VE 7 now? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] then msg_info "Updating Proxmox VE 7 (Patience)" @@ -113,5 +113,14 @@ apt-get -y dist-upgrade &>/dev/null msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)" fi +read -r -p "Reboot Proxmox VE 7 now? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Rebooting Proxmox VE 7" +sleep 2 +msg_ok "Completed Post Install Routines" +reboot +fi + sleep 2 msg_ok "Completed Post Install Routines" From dd4c9f2f1f21a0bb1944a3cdb3ead5bce1b96d18 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Aug 2022 17:53:53 -0400 Subject: [PATCH 0138/3335] Update emby-install.sh --- setup/emby-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/emby-install.sh b/setup/emby-install.sh index ff07541f..d8c52828 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -75,10 +75,11 @@ apt-get -y install \ /bin/chmod 660 /dev/dri/* msg_ok "Set Up Hardware Acceleration" +LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + msg_info "Installing Emby" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.6.0/emby-server-deb_4.7.6.0_amd64.deb &>/dev/null -dpkg -i emby-server-deb_4.7.6.0_amd64.deb &>/dev/null -apt-get install -y ffmpeg &>/dev/null +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null +dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null msg_ok "Installed Emby" PASS=$(grep -w "root" /etc/shadow | cut -b6); From 31df60631d9b8398f60ccd080707e1b2981cc0ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Aug 2022 14:55:31 -0400 Subject: [PATCH 0139/3335] Update haos_vm.sh --- vm/haos_vm.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 9acaeb70..40a34f64 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -49,8 +49,9 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ `pveversion | grep "pve-manager/7" | wc -l` -eq 1 ]; then echo -e "${YW}This script is for Proxmox Virtual Environment 6.xx${CL}" - echo -e "Continuing..." - sleep 3 + echo "Exiting..." + sleep 3 + exit fi if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" From 71c0880e0da8670404e98426d63667e400288d14 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Aug 2022 14:59:47 -0400 Subject: [PATCH 0140/3335] Update haos_vm.sh --- vm/haos_vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 40a34f64..3c7abfbf 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -48,7 +48,7 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ `pveversion | grep "pve-manager/7" | wc -l` -eq 1 ]; then - echo -e "${YW}This script is for Proxmox Virtual Environment 6.xx${CL}" + echo -e "\n🚨 ${RD}This script is for Proxmox Virtual Environment 6.xx${CL}\n" echo "Exiting..." sleep 3 exit From 0a6820f6c269207533d5a0f18d78ca7a2e103d4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Aug 2022 15:02:28 -0400 Subject: [PATCH 0141/3335] Update haos_vm.sh --- vm/haos_vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 3c7abfbf..5f204f69 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -48,7 +48,7 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ `pveversion | grep "pve-manager/7" | wc -l` -eq 1 ]; then - echo -e "\n🚨 ${RD}This script is for Proxmox Virtual Environment 6.xx${CL}\n" + echo -e "\n🚨 ${RD} This script is for Proxmox Virtual Environment 6.xx${CL}\n" echo "Exiting..." sleep 3 exit From 6ab155763cbdfa792acdf289b7c171c0cd76b1a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Aug 2022 23:10:45 -0400 Subject: [PATCH 0142/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 118331c3..1cbffbdb 100644 --- a/README.md +++ b/README.md @@ -1688,7 +1688,7 @@ ________________________________________________________________________________
- 🔸PhotoPrism LXC + PhotoPrism LXC

From 5b869e1ae7d8c25e2c67e0f6169062e7f68e09f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Aug 2022 09:56:01 -0400 Subject: [PATCH 0143/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1cbffbdb..d2aa49b2 100644 --- a/README.md +++ b/README.md @@ -2033,7 +2033,7 @@ ________________________________________________________________________________ To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mikrotik-routeros-v4.sh.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mikrotik-routeros-v4.sh)" ``` Setup is done via VM console. From 4c44097d9811e210d082c6d6e9aedf4229c71602 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Aug 2022 10:58:47 -0400 Subject: [PATCH 0144/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2aa49b2..a9f295e4 100644 --- a/README.md +++ b/README.md @@ -2033,7 +2033,7 @@ ________________________________________________________________________________ To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mikrotik-routeros-v4.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/mikrotik-routeros-v4.sh)" ``` Setup is done via VM console. From 02c4dc5d282c044a69287acebc5893d5f7fcceb5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Aug 2022 01:58:17 -0400 Subject: [PATCH 0145/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9f295e4..7032171b 100644 --- a/README.md +++ b/README.md @@ -2022,7 +2022,7 @@ ________________________________________________________________________________
- 🔸Mikrotik RouterOS VM + Mikrotik RouterOS VM

From 38295ed54dddeac46e5cea5d31617432455c0261 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Aug 2022 16:25:22 -0400 Subject: [PATCH 0146/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7032171b..6eeda68b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@

Proxmox VE 7 Post Install

-The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag and Update Proxmox VE. +The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox VE and Reboot PVE. Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** From 258f48003bdd03f165edab7450883685549d813e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Aug 2022 00:28:31 -0400 Subject: [PATCH 0147/3335] Update create_lxc.sh --- ct/create_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 4cb7864e..82269485 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -33,7 +33,7 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } - +msg_info "Validating Storage" function select_storage() { local CLASS=$1 local CONTENT From 12271b69d757db0f36c6102083eaed954ab9b937 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Aug 2022 08:28:22 -0400 Subject: [PATCH 0148/3335] Update edge-kernel.sh --- misc/edge-kernel.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index e4c37235..69d58d40 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -25,7 +25,7 @@ show_menu(){ proxmox-boot-tool kernel list echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}" printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Install Proxmox 5.18 Edge Kernel & Reboot\n" + printf "${menu}**${number} 1)${normal} Install Proxmox Edge Kernel & Reboot\n" printf "${menu}**${number} 2)${normal} Switch to Proxmox VE 7 ${menu}${PVE_KERNEL}${normal} Kernel & Reboot\n" printf "${menu}**${number} 3)${normal} Switch to Proxmox Edge ${menu}${EDGE_KERNEL}${normal} Kernel & Reboot\n" printf "${menu}**${number} 4)${normal} Unpin Current Kernel\n" @@ -49,7 +49,7 @@ while [ $opt != '' ] else case $opt in 1) while true; do - read -p "Are you sure you want to Install Proxmox 5.18 Edge Kernel & Reboot? Proceed(y/n)?" yn + read -p "Are you sure you want to Install Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -57,12 +57,12 @@ while [ $opt != '' ] esac done clear; - option_picked "Installing Proxmox 5.18 Edge Kernel & Rebooting"; + option_picked "Installing Proxmox Edge Kernel & Rebooting"; apt-get install -y gnupg curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add - echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" > /etc/apt/sources.list.d/pve-edge-kernel.list apt-get -y update - apt-get -y install pve-kernel-5.18-edge + apt-get -y install pve-kernel-5.19-edge reboot break; ;; From 12222e2bc50f61faf11f5e820488f83cfa04f10a Mon Sep 17 00:00:00 2001 From: Dustin <56093730+Dustin36@users.noreply.github.com> Date: Mon, 29 Aug 2022 01:34:07 +0200 Subject: [PATCH 0149/3335] Correct Spelling (#462) --- setup/homebridge-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 8ba3327f..0ff43cd8 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -72,9 +72,9 @@ msg_info "Installing Node.js" sudo apt-get install -y nodejs gcc g++ make python net-tools &>/dev/null msg_ok "Installed Node.js" -msg_info "nstalling Homebridge" +msg_info "Installing Homebridge" sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x &>/dev/null -msg_info "nstalled Homebridge" +msg_info "Installed Homebridge" msg_info "Creating Service" sudo hb-service install --user homebridge &>/dev/null From 4fda1984034f3dd83ca26c1a1578c099eefa07a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Aug 2022 22:14:46 -0400 Subject: [PATCH 0150/3335] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6eeda68b..8c5ac4ce 100644 --- a/README.md +++ b/README.md @@ -1371,7 +1371,9 @@ To create a new Proxmox Pi-hole LXC, run the following in the Proxmox Shell. bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v4.sh)" ```

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- + +⚠️ **Reboot Pi-hole LXC after install** + ⚙️ **To set your password:** Run in the LXC console From 88c9db5b6bd5e1fc03026593e47c0e4763d35612 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Aug 2022 08:35:37 -0400 Subject: [PATCH 0151/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c5ac4ce..ff28afc3 100644 --- a/README.md +++ b/README.md @@ -1307,7 +1307,7 @@ ________________________________________________________________________________
- 🔸Emby Media Server LXC + Emby Media Server LXC

Emby Media Server LXC

@@ -1506,7 +1506,7 @@ ________________________________________________________________________________
- 🔸Wiki.js LXC + Wiki.js LXC

From 40897f22c56b11192b041e8402e030e109bf39d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Aug 2022 18:43:55 -0400 Subject: [PATCH 0152/3335] maintenance (#466) --- setup/adguard-install.sh | 4 ++-- setup/daemonsync-install.sh | 4 ++-- setup/dashy-install.sh | 4 ++-- setup/debian-install.sh | 4 ++-- setup/deconz-install.sh | 4 ++-- setup/docker-install.sh | 4 ++-- setup/emby-install.sh | 4 ++-- setup/esphome-install.sh | 4 ++-- setup/grafana-install.sh | 4 ++-- setup/grocy-install.sh | 4 ++-- setup/heimdalldashboard-install.sh | 4 ++-- setup/homeassistant-install.sh | 4 ++-- setup/homebridge-install.sh | 4 ++-- setup/influxdb-install.sh | 4 ++-- setup/iobroker-install.sh | 4 ++-- setup/jellyfin-install.sh | 4 ++-- setup/magicmirror-install.sh | 4 ++-- setup/mariadb-install.sh | 4 ++-- setup/meshcentral-install.sh | 4 ++-- setup/motioneye-install.sh | 4 ++-- setup/mqtt-install.sh | 4 ++-- setup/n8n-install.sh | 4 ++-- setup/nginx-proxy-manager-install.sh | 4 ++-- setup/nocodb-install.sh | 4 ++-- setup/node-red-install.sh | 4 ++-- setup/omada-install.sh | 4 ++-- setup/openhab-install.sh | 4 ++-- setup/pihole-install.sh | 2 +- setup/plex-install.sh | 4 ++-- setup/podman-homeassistant-install.sh | 4 ++-- setup/postgresql-install.sh | 2 +- setup/prometheus-install.sh | 4 ++-- setup/technitiumdns-install.sh | 4 ++-- setup/ubuntu-install.sh | 4 ++-- setup/unifi-install.sh | 4 ++-- setup/uptimekuma-install.sh | 4 ++-- setup/vaultwarden-install.sh | 4 ++-- setup/whoogle-install.sh | 4 ++-- setup/wikijs-install.sh | 4 ++-- setup/wireguard-install.sh | 4 ++-- setup/zigbee2mqtt-install.sh | 4 ++-- setup/zwavejs2mqtt-install.sh | 4 ++-- 42 files changed, 82 insertions(+), 82 deletions(-) diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index fd8ff882..ba2c520b 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index 2af9de0a..cd41862b 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 02039294..3a5746e9 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 48e7eb1f..299f9728 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index d38b416a..643e818e 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/docker-install.sh b/setup/docker-install.sh index f5ccbb05..8c65c7f5 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/emby-install.sh b/setup/emby-install.sh index d8c52828..63305ab4 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index e8c0c05a..ffb1ff5b 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 9eff5400..b1dbe1c8 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index de7bc523..7910ce7c 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 852068d8..1420ca67 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 8ee274bb..fe4c60fd 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 0ff43cd8..eae42a0e 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 216949e7..5f4fd34e 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 9db4f6d3..05bbfd36 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index dccddafe..d61151a5 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 880f959a..0e80fb54 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index 18db68da..a8e6b69b 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 485b352f..bdeb64b2 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index 4b96cc31..a47c3841 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index fd52f630..6bfc4f04 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 09670422..282f6c6e 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index afa87e32..b2d01b5c 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 9e51d2e1..ee32e987 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 058fb297..f09cbc92 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 6a7c930f..c65a4104 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS (216 packages)" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index c4e69e18..3fa1e64b 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 0a47cc07..6ac189ad 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -56,7 +56,7 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" apt-get update &>/dev/null -apt-get -y dist-upgrade &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/plex-install.sh b/setup/plex-install.sh index c5030bc2..1b2d091c 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 43fd53b9..9f23fc47 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index c9cc2a7b..a37609b2 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -56,7 +56,7 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index e83fa5a0..5c0cfc1e 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 1a9e5271..9755d9e3 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 7173f364..c26130b6 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index f47cb3e3..0d1cecc3 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -56,8 +56,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index 948ab37f..2e90fb3c 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 81ca2b28..699cdd4a 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -55,8 +55,8 @@ msg_ok "Setup Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 52d65c56..dd79d68d 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index baa71eb0..a1bb4882 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 4804a3c6..1a0476e3 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -72,8 +72,8 @@ UNATTUPG=1 EOF msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 8056c2b6..2b109303 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" diff --git a/setup/zwavejs2mqtt-install.sh b/setup/zwavejs2mqtt-install.sh index 06aabdda..c1fa407c 100644 --- a/setup/zwavejs2mqtt-install.sh +++ b/setup/zwavejs2mqtt-install.sh @@ -55,8 +55,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" msg_info "Updating Container OS" -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" msg_info "Installing Dependencies" From b21ce7b82eea091d8ec5e54b2e5e06fe6d743838 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Aug 2022 19:34:29 -0400 Subject: [PATCH 0153/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 59 ++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 1f9fa7cd..358b707b 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -16,6 +16,7 @@ CL=`echo "\033[m"` BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -48,11 +49,11 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" - echo "Exiting..." - sleep 3 - exit + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit fi if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" @@ -79,26 +80,31 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - HN=haos${STABLE} - echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" - CORE_COUNT="2" - echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + HN=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 3 \ @@ -210,9 +216,8 @@ STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content images | awk 'NR>1') VALID=$(pvesm status -content images | awk 'NR>1') if [ -z "$VALID" ]; then - echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" - echo -e "Exiting..." - exit +msg_error "Unable to detect a valid storage location." + exit elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else From 77f299cb0568c09c1192318d9599c9e94c3d1c54 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Aug 2022 20:22:03 -0400 Subject: [PATCH 0154/3335] Add network tools (#467) --- setup/debian-install.sh | 8 ++++++++ setup/ubuntu-install.sh | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 299f9728..d738a621 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -37,6 +37,10 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen @@ -54,6 +58,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; fi; +RESOLVEDIP=$(nslookup "google.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index c26130b6..55469d7a 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; fi; +RESOLVEDIP=$(nslookup "google.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null From 1f30030268bd9773c4f8918675f293f8b1e81a13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Aug 2022 21:26:55 -0400 Subject: [PATCH 0155/3335] Update debian-install.sh --- setup/debian-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/debian-install.sh b/setup/debian-install.sh index d738a621..48b5b4c8 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -59,8 +59,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; fi; -RESOLVEDIP=$(nslookup "google.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved to $RESOLVEDIP"; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; msg_info "Updating Container OS" apt-get update &>/dev/null From e6fa32fc34afdd86425177753d996a3a546355eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Aug 2022 21:28:05 -0400 Subject: [PATCH 0156/3335] Update ubuntu-install.sh --- setup/ubuntu-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 55469d7a..d3c93401 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -60,8 +60,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; fi; -RESOLVEDIP=$(nslookup "google.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved to $RESOLVEDIP"; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; msg_info "Updating Container OS" apt-get update &>/dev/null From 1779aab46096a1134903ed4eaf65f8679b106cf6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 15:37:13 -0400 Subject: [PATCH 0157/3335] Update debian-install.sh --- setup/debian-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 48b5b4c8..90b25b47 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -58,9 +58,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; fi; -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; IC="YES"; else msg_error "Internet NOT Connected"; IC="NO"; fi; +if [[ ${IC} == "YES" ]]; then RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +fi msg_info "Updating Container OS" apt-get update &>/dev/null From 1e5d1381602ddb3d1261d095b03eb7162143b67e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 15:38:08 -0400 Subject: [PATCH 0158/3335] Update ubuntu-install.sh --- setup/ubuntu-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index d3c93401..1cf8f254 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -59,9 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; fi; -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; IC="YES"; else msg_error "Internet NOT Connected"; IC="NO"; fi; +if [[ ${IC} == "YES" ]]; then RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +fi msg_info "Updating Container OS" apt-get update &>/dev/null From c6ef397bc9b5de19431330d494d428cff3bc2026 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 17:10:14 -0400 Subject: [PATCH 0159/3335] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..8ecf7b04 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +ko_fi: proxmoxhelperscripts From 35baa41feb11d2ab93383891c5b8f48eeb9fed81 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 17:37:10 -0400 Subject: [PATCH 0160/3335] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ff28afc3..13f0a434 100644 --- a/README.md +++ b/README.md @@ -2091,3 +2091,5 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/web-vault- ____________________________________________________________________________________________
+ +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF) From 56615fbe793af35dd498ccce7bd75f33faba6030 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 19:59:07 -0400 Subject: [PATCH 0161/3335] Update create_lxc.sh --- ct/create_lxc.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 82269485..f82768a5 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -5,6 +5,7 @@ RD=`echo "\033[01;31m"` GN=`echo "\033[1;92m"` CL=`echo "\033[m"` CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" set -o errexit @@ -33,7 +34,15 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Validating Storage" +VALID=$(pvesm status -content rootdir | awk 'NR>1') +if [ -z "$VALID" ]; then msg_error "Unable to detect a valid storage location."; exit 1; fi; + function select_storage() { local CLASS=$1 local CONTENT @@ -57,10 +66,7 @@ function select_storage() { MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content $CONTENT | awk 'NR>1') - if [ $((${#MENU[@]}/3)) -eq 0 ]; then - echo -e "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then + if [ $((${#MENU[@]}/3)) -eq 1 ]; then printf ${MENU[0]} else local STORAGE @@ -117,4 +123,3 @@ msg_info "Creating LXC Container" pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." - From 6eff2a95b4949c701830d43ffad1d30f0665ca57 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 20:01:03 -0400 Subject: [PATCH 0162/3335] Update debian-install.sh --- setup/debian-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 90b25b47..84f28bfa 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -58,10 +58,9 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; IC="YES"; else msg_error "Internet NOT Connected"; IC="NO"; fi; -if [[ ${IC} == "YES" ]]; then RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) - if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; -fi +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; msg_info "Updating Container OS" apt-get update &>/dev/null From 14a88737622715854e01e7fc49a7fdca2b128843 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Aug 2022 20:01:32 -0400 Subject: [PATCH 0163/3335] Update ubuntu-install.sh --- setup/ubuntu-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 1cf8f254..5514c920 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -59,10 +59,9 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; IC="YES"; else msg_error "Internet NOT Connected"; IC="NO"; fi; -if [[ ${IC} == "YES" ]]; then RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) - if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; -fi +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; msg_info "Updating Container OS" apt-get update &>/dev/null From fe206d8483ab67eed4cb1ec5b47a9a1b6c8ed883 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 31 Aug 2022 05:18:35 -0400 Subject: [PATCH 0164/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 358b707b..8eb97bbc 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -275,7 +275,8 @@ qm set $VMID \ qm set $VMID \ -boot order=scsi0 >/dev/null qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox" >/dev/null +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" From 5a5afad573d651140cfcbd73757b886312208843 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 31 Aug 2022 05:20:58 -0400 Subject: [PATCH 0165/3335] Add Internet & DNS Check (#471) --- setup/adguard-install.sh | 13 +++++++++++-- setup/daemonsync-install.sh | 13 +++++++++++-- setup/dashy-install.sh | 13 +++++++++++-- setup/deconz-install.sh | 9 +++++++++ setup/docker-install.sh | 13 +++++++++++-- setup/emby-install.sh | 13 +++++++++++-- setup/esphome-install.sh | 13 +++++++++++-- setup/grafana-install.sh | 13 +++++++++++-- setup/grocy-install.sh | 9 +++++++++ setup/heimdalldashboard-install.sh | 13 +++++++++++-- setup/homeassistant-install.sh | 13 +++++++++++-- setup/homebridge-install.sh | 13 +++++++++++-- setup/influxdb-install.sh | 13 +++++++++++-- setup/iobroker-install.sh | 13 +++++++++++-- setup/jellyfin-install.sh | 13 +++++++++++-- setup/keycloak-install.sh | 9 +++++++++ setup/magicmirror-install.sh | 9 +++++++++ setup/mariadb-install.sh | 13 +++++++++++-- setup/meshcentral-install.sh | 13 +++++++++++-- setup/motioneye-install.sh | 13 +++++++++++-- setup/mqtt-install.sh | 13 +++++++++++-- setup/n8n-install.sh | 13 +++++++++++-- setup/nginx-proxy-manager-install.sh | 13 +++++++++++-- setup/nocodb-install.sh | 13 +++++++++++-- setup/node-red-install.sh | 13 +++++++++++-- setup/omada-install.sh | 15 ++++++++++++--- setup/openhab-install.sh | 9 +++++++++ setup/photoprism-install.sh | 9 +++++++++ setup/pihole-install.sh | 13 +++++++++++-- setup/plex-install.sh | 13 +++++++++++-- setup/podman-homeassistant-install.sh | 13 +++++++++++-- setup/postgresql-install.sh | 9 +++++++++ setup/prometheus-install.sh | 9 +++++++++ setup/technitiumdns-install.sh | 13 +++++++++++-- setup/unifi-install.sh | 13 +++++++++++-- setup/uptimekuma-install.sh | 13 +++++++++++-- setup/vaultwarden-install.sh | 13 +++++++++++-- setup/whoogle-install.sh | 9 +++++++++ setup/wikijs-install.sh | 9 +++++++++ setup/wireguard-install.sh | 13 +++++++++++-- setup/zigbee2mqtt-install.sh | 13 +++++++++++-- setup/zwavejs2mqtt-install.sh | 13 +++++++++++-- 42 files changed, 443 insertions(+), 65 deletions(-) diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index ba2c520b..61be5518 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index cd41862b..35957afc 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 3a5746e9..8267f380 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index 643e818e..1cb64ebb 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 8c65c7f5..1780dcfd 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 63305ab4..0ba9b200 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index ffb1ff5b..1f4323be 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index b1dbe1c8..9803f66a 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 7910ce7c..66317825 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 1420ca67..c70347a4 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index fe4c60fd..80e53aba 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index eae42a0e..8678c607 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 5f4fd34e..6495809f 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 05bbfd36..7ba4a65f 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index d61151a5..d0a32cd4 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index 7d155d9f..06c679f6 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 0e80fb54..0c903cd2 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index a8e6b69b..c9025669 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index bdeb64b2..0221f817 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index a47c3841..2229ac30 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index 6bfc4f04..ade1c168 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 282f6c6e..9adffc10 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index b2d01b5c..2f9b21b0 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index ee32e987..ae27d97c 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index f09cbc92..180daf92 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/omada-install.sh b/setup/omada-install.sh index c65a4104..4260e995 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -38,23 +38,32 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -msg_info "Updating Container OS (216 packages)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 3fa1e64b..4ec66d79 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index b703e80a..aa692945 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -39,6 +39,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -55,6 +60,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 6ac189ad..c27e7ea4 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 1b2d091c..be02e9a4 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 9f23fc47..c5d9b23f 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index a37609b2..175011f8 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 5c0cfc1e..2da05e62 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 9755d9e3..48650070 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 0d1cecc3..8e899809 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -39,22 +39,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index 2e90fb3c..b29954f1 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 699cdd4a..3f18807a 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -47,13 +52,17 @@ while [ "$(hostname -I)" = "" ]; do ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done -msg_ok "Setup Container OS" +msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index dd79d68d..e7854c82 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index a1bb4882..8866f812 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -38,6 +38,11 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null @@ -54,6 +59,10 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 1a0476e3..d295d4db 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + OPTIONS_PATH='/options.conf' cat >$OPTIONS_PATH <<'EOF' IPv4dev=eth0 diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 2b109303..910da0fe 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/setup/zwavejs2mqtt-install.sh b/setup/zwavejs2mqtt-install.sh index c1fa407c..c439b9c8 100644 --- a/setup/zwavejs2mqtt-install.sh +++ b/setup/zwavejs2mqtt-install.sh @@ -38,22 +38,31 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + 1>&2 echo -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) if [ $NUM -eq 0 ] then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + msg_info "Updating Container OS" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null From 5fc225a957ca9023d566075a12d1d1502b89b343 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 31 Aug 2022 05:23:25 -0400 Subject: [PATCH 0166/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 83a0040f..bb61be63 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-08-31 + +### Changed + +- **All LXC's** + - Add Internet & DNS Check + ## 2022-08-22 ### Changed From 6ff58734d3f2ac78cbf4422eda95eef90b0c9896 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 31 Aug 2022 06:46:22 -0400 Subject: [PATCH 0167/3335] Delete haos-vm-v3.sh --- vm/haos-vm-v3.sh | 359 ----------------------------------------------- 1 file changed, 359 deletions(-) delete mode 100644 vm/haos-vm-v3.sh diff --git a/vm/haos-vm-v3.sh b/vm/haos-vm-v3.sh deleted file mode 100644 index 4dbb9499..00000000 --- a/vm/haos-vm-v3.sh +++ /dev/null @@ -1,359 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -PVE=$(pveversion | grep "pve-manager/7" | wc -l) -GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') -NEXTID=$(pvesh get /cluster/nextid) -RELEASE=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - [ ! -z ${VMID-} ] && cleanup_vmid - exit $EXIT -} - -function cleanup_vmid() { - if $(qm status $VMID &>/dev/null); then - if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then - qm stop $VMID - fi - qm destroy $VMID - fi -} - -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -if [[ "$PVE" != "1" ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi - -while true; do - clear - read -p "This will create a New Home Assistant OS VM. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear - -function header_info { -echo -e "${BL} - _ _ ____ _____ - | | | | /\ / __ \ / ____| - | |__| | / \ | | | | (___ - | __ | / /\ \| | | |\___ \ - | | | |/ ____ \ |__| |____) | - |_| |_/_/ ${CL}${YW}v3${CL}${BL} \_\____/|_____/ -${CL}" -} -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using Version ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using VM ID ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using VM Name ${BGN}haos${STABLE}${CL}" - VM_NAME=haos${STABLE} - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}4096${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed ${BGN}yes${CL}" - START_VM="yes" - -} -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Latest for Version ${RELEASE}, or Press [ENTER] for Stable Version ${STABLE} " - read BRANCH - if [ -z $BRANCH ]; then BRANCH=$STABLE; - else - BRANCH=$RELEASE; fi; - echo -en "${DGN}Set Version To ${BL}$BRANCH${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${YW}Enter the VM ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read VMID - if [ -z $VMID ]; then VMID=$NEXTID; fi; - echo -en "${DGN}Set VM ID To ${BL}$VMID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${YW}Enter VM Name (no-spaces), or Press [ENTER] for Default: haos${BRANCH} " - read VMNAME - if [ -z $VMNAME ]; then - VM_NAME=haos${BRANCH} - else - VM_NAME=$(echo ${VMNAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$VM_NAME${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}${CORE_COUNT}${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 4096 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Valid MAC Address, or Press [ENTER] for Generated MAC: $GEN_MAC " - read MAC - if [ -z $MAC ]; then MAC=$GEN_MAC; fi; - echo -en "${DGN}Set MAC Address To ${BL}$MAC${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - echo -e "${YW}Start VM when completed, or Press [ENTER] for Default: yes " - read START_VM - if [ -z $START_VM ]; then START_VM="yes"; - else - START_VM="no"; fi; - echo -en "${DGN}Starting VM when completed ${BL}$START_VM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$BRANCH${CL}" - echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${DGN}Using VM Name ${BGN}$VM_NAME${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address ${BGN}$MAC${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - echo -e "${DGN}Start VM when completed ${BGN}$START_VM${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced (Latest ${RELEASE}), or Press [ENTER] for Default Settings (Stable ${STABLE}) " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content images | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - echo -e "'Disk image' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the HAOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" -URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -sleep 2 -msg_ok "${CL}${BL}${URL}${CL}" -wget -q --show-progress $URL -echo -en "\e[1A\e[0K" -FILE=$(basename $URL) -msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" -msg_info "Extracting KVM Disk Image" -unxz $FILE -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DISK_IMPORT="-format qcow2" - ;; - - btrfs) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_FORMAT="subvol" - DISK_IMPORT="-format raw" - ;; - -esac -for i in {0,1}; do - disk="DISK$i" - eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} - eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} -done -msg_ok "Extracted KVM Disk Image" - -msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $VM_NAME -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ - -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null -qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ - -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null -qm set $VMID \ - -boot order=scsi0 >/dev/null -qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}${VM_NAME}" - -if [ "$START_VM" == "yes" ]; then -msg_info "Starting Home Assistant OS VM" -qm start $VMID -msg_ok "Started Home Assistant OS VM" -fi -msg_ok "Completed Successfully!\n" From 538f355dedb9a36c192342f53cbe9c4e326819e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 1 Sep 2022 05:59:20 -0400 Subject: [PATCH 0168/3335] Add files via upload --- misc/images/add_integration.png | Bin 0 -> 2749 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/add_integration.png diff --git a/misc/images/add_integration.png b/misc/images/add_integration.png new file mode 100644 index 0000000000000000000000000000000000000000..64d19fd2a24fb2838def65c1fd723513bad01ed5 GIT binary patch literal 2749 zcmV;u3PSaXP)h~s!dhdiorz6bYhs&b8f~TlV>>l7 z*#6V$WK270(ljZdwp6256Vq&*hyhJ1f%S#T!-z;h1@`Xyp8m1y!omW}BSkXzGqc0p zbIv{YcYb@m=lsrZ7YQIQFYiG~lC}yVG9^h$k{2>V_DJdypxt2E9xYZeyc!I)-kB=ulK7P;wTCrjU&pr1XFK1Vrm}hSW_Iq} ziOc0emSxthTgQF(-N(6e=Qwrh)Sw17R5BA}5{*#f5PabjVRcDHn4S<=cibvmaSE<< zYXdMlQ6^pw0%&myY7~LX-~Y4I$4aEcbS@lMoPtY^K>t(YC2ot8xb6Xas|vvM1c@Z0 z#K->)yiYVhW-qy*9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XiKy0&)1PM46fW{1{_? za$way-P-%X^Io$|oUZe*Iuu%cf@eSTU^c+qafAQ5?oXF|%suR6?qMg-pXv;SYC8_& z^OJR)ZdLhSxtpslflh)*)9ptm-88xc1{rD`;o}>uPow2hd+_kz*&5AGVl)Ppx%&Egii(O@xNspBi-jXcjtqLxeX-uE$LWVRYkeGP z^iy&sUQm&kGrW#K3Epyb=2w4&M!U z@0>Sp9srq{nQY&_9f!lgrcIkzx^(G)`YA0frK+lmwzjrVncM9ST{kr~v1`{Z8X6ix zWyg*kW5I$2m`o;GT3QBbdcVvaCzFvN^S8@>eqIrn;ITS*Xp){MEPA$9glEZe({$XQ zs^h9l@VoO~3MwOK(RR;^;ieZVZm9hDQ+Gsxb!BUYA(UC#e76BvA}q7im8Va-saR~nSipP&N}JUl=b0cMT=Vnm(_UW4 zFz}ZJv3&g_7jqH^=F{Hj%O{mLRn{MOQ#jkmUpq30^@`vJCtMMCo*+Z@owR!O>L^Ty zf`S4vGBU!-ii?X;6om~NHiVVi?RE+Z3i|9%r_-@~`ErEl`|*+_QD0xrnKNfFo6YRl zv4i5`VvZg?8jac7f07OZWAu<{kZ5p;s3!VIGT9^{1YC~rz1wgzz4g|J{nkxGqdTKU zJVFRgo;*3yW@u=Hkb#>cZG?u#XhR@w%E0N7Hbg^Xv?0N1Syk1SN7@h#jnRf5`DJ;} zo;@W(h=+iWg%CGJ+9(Z;TNQ!00per7kRD=9e98X+>(#9cl%nzx00000NkvXXu0mjf Dr(IED literal 0 HcmV?d00001 From 9a510418421221a16c3a059858d850d6fef6373f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 1 Sep 2022 19:20:46 -0400 Subject: [PATCH 0169/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index aa692945..38e53a3e 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -84,7 +84,7 @@ apt-get install -y ffmpeg &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -curl -sL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null +curl -sL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -92,8 +92,8 @@ apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Golang (Patience)" -wget https://golang.org/dl/go1.18.4.linux-amd64.tar.gz &>/dev/null -tar -xzf go1.18.4.linux-amd64.tar.gz -C /usr/local &>/dev/null +wget https://golang.org/dl/go1.19.linux-amd64.tar.gz &>/dev/null +tar -xzf go1.19.linux-amd64.tar.gz -C /usr/local &>/dev/null ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null go install github.com/tianon/gosu@latest &>/dev/null go install golang.org/x/tools/cmd/goimports@latest &>/dev/null @@ -190,7 +190,7 @@ apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* \ /photoprism \ -/go1.18.4.linux-amd64.tar.gz \ +/go1.19.linux-amd64.tar.gz \ /libtensorflow-linux-avx2-1.15.2.tar.gz \ /libtensorflow-linux-avx-1.15.2.tar.gz \ /libtensorflow-linux-cpu-1.15.2.tar.gz From cdf9a6ba351cc1ad3b016f727bc4e021bac22895 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Sep 2022 12:47:11 -0400 Subject: [PATCH 0170/3335] Update frigate-support.sh --- misc/frigate-support.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/frigate-support.sh b/misc/frigate-support.sh index 3a26a3b9..18c80d18 100644 --- a/misc/frigate-support.sh +++ b/misc/frigate-support.sh @@ -73,5 +73,5 @@ EOF echo -e "\e[1;33m Finished....Reboot ${CTID} LXC to apply the changes \e[0m" # In the Proxmox web shell run (replace 106 with your LXC ID) -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/frigate-support.sh)" -s 106 +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/frigate-support.sh)" -s 106 # Reboot the LXC to apply the changes From b7d557a0594aef4ec3cea0700dc28e6bb79c790c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 15:13:49 -0400 Subject: [PATCH 0171/3335] Create navidrome-v4.sh --- ct/navidrome-v4.sh | 264 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 ct/navidrome-v4.sh diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh new file mode 100644 index 00000000..1c674333 --- /dev/null +++ b/ct/navidrome-v4.sh @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Navidrome" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + _ __ _ __ + / | / /___ __ v4__(_)___/ /________ ____ ___ ___ + / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ + / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ +/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:4533${CL} \n" From b4d4e48922fd632d29bc007c65a9d4424a303d72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 15:14:52 -0400 Subject: [PATCH 0172/3335] Create navidrome-install.sh --- setup/navidrome-install.sh | 147 +++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 setup/navidrome-install.sh diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh new file mode 100644 index 00000000..22619e02 --- /dev/null +++ b/setup/navidrome-install.sh @@ -0,0 +1,147 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y ffmpeg &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Navidrome" +sudo install -d -o root -g root /opt/navidrome +sudo install -d -o root -g root /var/lib/navidrome +wget https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null +sudo chown -R root:root /opt/navidrome +mkdir -p /music +cat < /var/lib/navidrome/navidrome.toml +MusicFolder = '/music' +EOF +msg_ok "Installed Navidrome" + +msg_info "Creating Service" +service_path="/etc/systemd/system/navidrome.service" + +echo "[Unit] +Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic +After=remote-fs.target network.target +AssertPathExists=/var/lib/navidrome + +[Service] +User=root +Group=root +Type=simple +ExecStart=/opt/navidrome/navidrome --configfile '/var/lib/navidrome/navidrome.toml' +WorkingDirectory=/var/lib/navidrome +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +DevicePolicy=closed +NoNewPrivileges=yes +PrivateTmp=yes +PrivateUsers=yes +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap +ReadWritePaths=/var/lib/navidrome +ProtectSystem=full + +[Install] +WantedBy=multi-user.target" > $service_path +systemctl daemon-reload +systemctl enable --now navidrome.service &>/dev/null + +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/Navidrome.tar.gz +msg_ok "Cleaned" From e97e83930665353e44239a4be889f6da091f23e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 15:22:24 -0400 Subject: [PATCH 0173/3335] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 13f0a434..2c0a5ab7 100644 --- a/README.md +++ b/README.md @@ -1689,6 +1689,29 @@ ________________________________________________________________________________
+
+ 🔸Navidrome LXC + +

+ +

Navidrome LXC

+ +[Navidrome](https://www.navidrome.org/) allows you to enjoy your music collection from anywhere, by making it available through a modern Web UI and through a wide range of third-party compatible mobile apps, for both iOS and Android devices. + +To create a new Proxmox Navidrome LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/navidrome-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +**Navidrome Interface - IP:4533** + +____________________________________________________________________________________________ + +
+
PhotoPrism LXC From 5cb30cc61398f5f0bb063580b67c56f2085d1b0f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 15:24:10 -0400 Subject: [PATCH 0174/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index bb61be63..80a8a9da 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-08 + +### Changed + +- **Navidrome LXC** + - NEW Script + ## 2022-08-31 ### Changed From 3846a041234582b5010b84f71ab1a7c6328cd4bf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 15:31:58 -0400 Subject: [PATCH 0175/3335] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2c0a5ab7..0faa460c 100644 --- a/README.md +++ b/README.md @@ -1706,6 +1706,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/navidrome-v4

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+To change Navidrome music folder path, edit: `/var/lib/photoprism/navidrome.toml` + **Navidrome Interface - IP:4533** ____________________________________________________________________________________________ From 0ed58641bcd5a751c6dfb34cba796d6db1c1e4ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 15:38:45 -0400 Subject: [PATCH 0176/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0faa460c..eb0acb5f 100644 --- a/README.md +++ b/README.md @@ -1706,7 +1706,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/navidrome-v4

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

-To change Navidrome music folder path, edit: `/var/lib/photoprism/navidrome.toml` +To change Navidrome music folder path, edit: `/var/lib/navidrome/navidrome.toml` **Navidrome Interface - IP:4533** From 3c9479c241e943d3284fb5eb8132eadaa9025ba7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 18:39:48 -0400 Subject: [PATCH 0177/3335] Create homepage-install.sh --- setup/homepage-install.sh | 131 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 setup/homepage-install.sh diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh new file mode 100644 index 00000000..9ec584b8 --- /dev/null +++ b/setup/homepage-install.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y git &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + +msg_info "Installing Homepage" +git clone https://github.com/benphelps/homepage.git /opt/homepage &>/dev/null +cd /opt/homepage +npm install &>/dev/null +npm run build &>/dev/null +mkdir -p config +msg_ok "Installed Homepage" + +msg_info "Creating Service" +service_path="/etc/systemd/system/homepage.service" +echo "[Unit] +Description=Homepage +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +WorkingDirectory=/opt/homepage/ +ExecStart=npm start +[Install] +WantedBy=multi-user.target" > $service_path +systemctl enable --now homepage &>/dev/null +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* +msg_ok "Cleaned" From 85d836e120536709e338627e1d5c5f407a4f6cc4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 18:54:54 -0400 Subject: [PATCH 0178/3335] Create homepage-v4.sh --- ct/homepage-v4.sh | 265 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 ct/homepage-v4.sh diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh new file mode 100644 index 00000000..dc41118d --- /dev/null +++ b/ct/homepage-v4.sh @@ -0,0 +1,265 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Homepage" +var_disk="3" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + __ __ + / / / /___ ____ ___ ___ ____ ____ _____ ____ + / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ + / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ +/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ + /_/ v4 /____/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 62e82c770ddacf02e883db0fbc0c07e4dacf60ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 19:04:37 -0400 Subject: [PATCH 0179/3335] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index eb0acb5f..2eec0b3b 100644 --- a/README.md +++ b/README.md @@ -1557,6 +1557,29 @@ ________________________________________________________________________________
+
+ 🔸Homepage LXC + + +

Homepage LXC

+ +[Homepage](https://github.com/benphelps/homepage) is a self-hosted dashboard. + +To create a new Proxmox Homepage LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 3GB Storage - 2vCPU ⚡

+ +[Configuration](https://github.com/benphelps/homepage/wiki) file path: `/opt/homepage/config/` + +**Homepage Interface - IP:3000** + +____________________________________________________________________________________________ + +
Dashy LXC From 04286fa868c29ce5108474773f44f34fb15401e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 19:05:43 -0400 Subject: [PATCH 0180/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 80a8a9da..09f7c45a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Navidrome LXC** - NEW Script +- **Homepage LXC** + - NEW Script ## 2022-08-31 From a76ff528493c955575f1757ce4e4adde822d847a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Sep 2022 19:10:43 -0400 Subject: [PATCH 0181/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2eec0b3b..83d738fb 100644 --- a/README.md +++ b/README.md @@ -1573,7 +1573,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4.

⚡ Default Settings: 1GB RAM - 3GB Storage - 2vCPU ⚡

-[Configuration](https://github.com/benphelps/homepage/wiki) file path: `/opt/homepage/config/` +[Configuration](https://github.com/benphelps/homepage/wiki) (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/` **Homepage Interface - IP:3000** From 376490dcd5518339277265686b47a2063be44556 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Sep 2022 10:41:23 -0400 Subject: [PATCH 0182/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 09f7c45a..7d88d1e3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-09 + +### Changed + +- **CasaOS LXC** + - NEW Script + ## 2022-09-08 ### Changed From 50b12c44dd7aa8608b7df9f483a427d3fbd1c0b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Sep 2022 10:45:13 -0400 Subject: [PATCH 0183/3335] Create CassOS (#490) * Create casaos-v4.sh * Create casaos-install.sh * Update README.md * Update casaos-v4.sh --- README.md | 24 ++++ ct/casaos-v4.sh | 270 ++++++++++++++++++++++++++++++++++++++++ setup/casaos-install.sh | 111 +++++++++++++++++ 3 files changed, 405 insertions(+) create mode 100644 ct/casaos-v4.sh create mode 100644 setup/casaos-install.sh diff --git a/README.md b/README.md index 83d738fb..0e5c956b 100644 --- a/README.md +++ b/README.md @@ -1126,6 +1126,30 @@ ________________________________________________________________________________
+
+ 🔸CasaOS LXC + +

+ +

CasaOS LXC

+ +[CasaOS](https://www.casaos.io/) is a community-based open source software focused on delivering simple home cloud experience around Docker ecosystem. + + +To create a new Proxmox CasaOS LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/CasaOS-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**CasaOS Interface - IP** + +____________________________________________________________________________________________ + +
+
Debian LXC diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh new file mode 100644 index 00000000..4f6509a5 --- /dev/null +++ b/ct/casaos-v4.sh @@ -0,0 +1,270 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="CasaOS" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + ______ ____ _____ + / ____/___ __v4______ _/ __ \/ ___/ + / / / __ `/ ___/ __ `/ / / /\__ \ +/ /___/ /_/ (__ ) /_/ / /_/ /___/ / +\____/\__,_/____/\__,_/\____//____/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ +"10" "Buster" OFF \ +"11" "Bullseye" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" +else + exit +fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP} ${CL} \n" diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh new file mode 100644 index 00000000..634a00e7 --- /dev/null +++ b/setup/casaos-install.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y unzip &>/dev/null +msg_ok "Installed Dependencies" + +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +cat >$DOCKER_CONFIG_PATH <<'EOF' +{ + "log-driver": "journald" +} +EOF + +msg_info "Installing CasaOS (Patience)" +wget -qO- https://get.casaos.io | bash &>/dev/null +msg_ok "Installed CasaOS" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +rm /etc/motd +rm /etc/update-motd.d/10-uname +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* +msg_ok "Cleaned" From eb57929e56f32458f2be5f6a835947851b1fa238 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Sep 2022 21:03:20 -0400 Subject: [PATCH 0184/3335] Update Kernel Clean to work with PBS --- misc/kernel-clean.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index c804741a..212ad8e0 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -14,7 +14,6 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" PARTY="🎉" current_kernel=$(uname -r) -pve=$(pveversion) while true; do read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn @@ -70,7 +69,9 @@ function edge_kernel() { function kernel_info() { latest_kernel=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | tac | head -n 1) - echo -e "${YW}PVE Version: ${BL}$pve\n${CL}" + if [[ "$MODE" != "PBS" ]]; then + echo -e "${YW}PVE Version: ${BL}$(pveversion)\n${CL}" + fi if [[ "$current_kernel" == *"pve"* ]]; then if [[ "$latest_kernel" != *"$current_kernel"* ]]; then echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}" @@ -120,4 +121,12 @@ msg_ok "Kernel Search Completed\n" fi } +if ! command -v pveversion >/dev/null 2>&1; then + echo -e " Switching to PBS mode" + MODE="PBS" + sleep 2 + else + MODE="PVE" +fi + check_root From 543a6e7bfce10610511e453bb1fabb7cae41093d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Sep 2022 21:06:32 -0400 Subject: [PATCH 0185/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7d88d1e3..fec654f4 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **CasaOS LXC** - NEW Script +- **Proxmox Kernel Clean** + - Now works with Proxmox Backup Server ## 2022-09-08 From 90ebd56c102c71f741f4fa56c49fc0411418db89 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 06:27:49 -0400 Subject: [PATCH 0186/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e5c956b..7552b528 100644 --- a/README.md +++ b/README.md @@ -1139,7 +1139,7 @@ ________________________________________________________________________________ To create a new Proxmox CasaOS LXC, run the following in the Proxmox Shell. ``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/CasaOS-v4.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/casaos-v4.sh)" ```

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

From de9ce16082e64cef51275690edcc1538f31e1476 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 12:10:30 -0400 Subject: [PATCH 0187/3335] Update mqtt-install.sh --- setup/mqtt-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index ade1c168..31ddf860 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -60,8 +60,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +#RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +#if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; msg_info "Updating Container OS" apt-get update &>/dev/null From 4132e882b37fcb14b1c5819493663455c91c1f4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 12:22:59 -0400 Subject: [PATCH 0188/3335] Update mqtt-install.sh --- setup/mqtt-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index 31ddf860..ade1c168 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -60,8 +60,8 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; -#RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -#if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; msg_info "Updating Container OS" apt-get update &>/dev/null From e1cd05db1e588c299d865388931aa16a5a79abcc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 21:34:18 -0400 Subject: [PATCH 0189/3335] Create syncthing-v4.sh --- ct/syncthing-v4.sh | 255 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 ct/syncthing-v4.sh diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh new file mode 100644 index 00000000..d151d1d4 --- /dev/null +++ b/ct/syncthing-v4.sh @@ -0,0 +1,255 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Syncthing" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + _____ __ __ _ + / ___/__ ______v4_____/ /_/ /_ (_)___ ____ _ + \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ + ___/ / /_/ / / / / /__/ /_/ / / / / / / / /_/ / +/____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / + /____/ /____/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8384 ${CL} (after initial start) \n" From 3656bc560235e53f5c6ea8f865cf4457da180b3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 21:35:27 -0400 Subject: [PATCH 0190/3335] Create syncthing-install.sh --- setup/syncthing-install.sh | 105 +++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 setup/syncthing-install.sh diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh new file mode 100644 index 00000000..2b09475a --- /dev/null +++ b/setup/syncthing-install.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y gnupg &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Syncthing" +curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg &>/dev/null +echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list &>/dev/null +apt-get update &>/dev/null +apt-get install -y syncthing &>/dev/null +systemctl enable syncthing@root.service &>/dev/null +msg_ok "Installed Syncthing" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* +msg_ok "Cleaned" From d37a619554dba88543591185c080392318ab2bca Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 21:39:02 -0400 Subject: [PATCH 0191/3335] Update README.md --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7552b528..b88273be 100644 --- a/README.md +++ b/README.md @@ -1948,11 +1948,42 @@ bash /etc/webmin/uninstall.sh ``` ___________________________________________________________________________________________ +
+ +
+ 🔸Syncthing LXC + +

+ +

Syncthing LXC

+ +[Syncthing](https://syncthing.net/) is a continuous file synchronization program. It synchronizes files between two or more computers. + +To create a new Proxmox Syncthing LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/syncthing-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +⚙️ For the initial start, run `syncthing --gui-address=0.0.0.0:8384` in the LXC console, then go to the LXC IP:8384 In settings set the LXC IP address under the GUI (also set the GUI Authentication User and GUI Authentication Password) and Connections tab's and save. Reboot the LXC. + +**Syncthing Interface - IP:8384** + +⚙️ **To Update Syncthing** + +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ +
WireGuard LXC - +

WireGuard LXC

From 80d2305a0f386ba7179d38f5571fddf46dce0e9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Sep 2022 21:41:04 -0400 Subject: [PATCH 0192/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index fec654f4..7b747e4c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-10 + +### Changed + +- **Syncthing LXC** + - NEW Script + ## 2022-09-09 ### Changed From b803b562ca6b6d0f906c632caf6165cf8c792a34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 02:17:44 -0400 Subject: [PATCH 0193/3335] Update homepage-install.sh --- setup/homepage-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 9ec584b8..661898df 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -74,7 +74,7 @@ apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null +curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -84,9 +84,9 @@ msg_ok "Installed Node.js" msg_info "Installing Homepage" git clone https://github.com/benphelps/homepage.git /opt/homepage &>/dev/null cd /opt/homepage +mkdir -p config npm install &>/dev/null npm run build &>/dev/null -mkdir -p config msg_ok "Installed Homepage" msg_info "Creating Service" From 1515ce2ab72ca367123c5fc79e908563cd2b20f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 04:12:24 -0400 Subject: [PATCH 0194/3335] Update homepage-install.sh --- setup/homepage-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 661898df..2ee58a14 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -79,14 +79,15 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" apt-get install -y nodejs &>/dev/null +npm install -g pnpm &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Homepage" git clone https://github.com/benphelps/homepage.git /opt/homepage &>/dev/null cd /opt/homepage mkdir -p config -npm install &>/dev/null -npm run build &>/dev/null +pnpm install &>/dev/null +pnpm build &>/dev/null msg_ok "Installed Homepage" msg_info "Creating Service" From 7fe2b50c1f604b4a72f93b5cd4d7d91a87c4745b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 04:26:19 -0400 Subject: [PATCH 0195/3335] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b88273be..33f1ed61 100644 --- a/README.md +++ b/README.md @@ -1601,6 +1601,13 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4. **Homepage Interface - IP:3000** +⚙️ **To Update Homepage** + +Run in the LXC console +```yaml +cd /opt/homepage && systemctl stop homepage && git pull --force && pnpm install && pnpm build && systemctl start homepage +``` + ____________________________________________________________________________________________
From 8e77bfaf3d5595ba512352e888d6210ca2ab95ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 04:44:16 -0400 Subject: [PATCH 0196/3335] Create homepage-update.sh --- misc/homepage-update.sh | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 misc/homepage-update.sh diff --git a/misc/homepage-update.sh b/misc/homepage-update.sh new file mode 100644 index 00000000..239bd879 --- /dev/null +++ b/misc/homepage-update.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +APP="NocoDB" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +while true; do + read -p "This will Update ${APP}. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear +function header_info { +cat << "EOF" + __ __ + / / / /___ ____ ___ ___ ____ ____ _____ ____ + / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ + / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ +/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ + /_/ UPDATE /____/ +EOF +} + +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Updating ${APP}" +if ! command -v pnpm >/dev/null 2>&1; then + npm install -g pnpm &>/dev/null +fi +cd /opt/homepage +systemctl stop homepage +git pull --force &>/dev/null +pnpm install &>/dev/null +pnpm build &>/dev/null +systemctl start homepage +msg_ok "Updated ${APP}" From f4f30bbc4036a3b15e0cf3c30800b02e1bcb3b63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 04:47:46 -0400 Subject: [PATCH 0197/3335] Update homepage-update.sh --- misc/homepage-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/homepage-update.sh b/misc/homepage-update.sh index 239bd879..7b8ac4c6 100644 --- a/misc/homepage-update.sh +++ b/misc/homepage-update.sh @@ -9,7 +9,7 @@ CL=`echo "\033[m"` BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" -APP="NocoDB" +APP="Homepage" set -o errexit set -o errtrace set -o nounset From 0be6894a45bd15be524618bac7b51c437d816cf8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 04:50:12 -0400 Subject: [PATCH 0198/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33f1ed61..5f1d27a2 100644 --- a/README.md +++ b/README.md @@ -1605,7 +1605,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4. Run in the LXC console ```yaml -cd /opt/homepage && systemctl stop homepage && git pull --force && pnpm install && pnpm build && systemctl start homepage +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/homepage-update.sh)" ``` ____________________________________________________________________________________________ From 4661d073cd0e74ae28bc030fcf866262404957f0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 10:58:04 -0400 Subject: [PATCH 0199/3335] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5f1d27a2..c28cd71b 100644 --- a/README.md +++ b/README.md @@ -1146,6 +1146,12 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/casaos-v4.sh **CasaOS Interface - IP** +⚙️ **To Update CasaOS** + +```yaml +update from the CasaOS UI +``` + ____________________________________________________________________________________________ From b5331838296a10b4981d7bb8ae468d1a2522066a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 14:51:09 -0400 Subject: [PATCH 0200/3335] Create trilium-v4.sh --- ct/trilium-v4.sh | 254 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 ct/trilium-v4.sh diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh new file mode 100644 index 00000000..0cdd70e8 --- /dev/null +++ b/ct/trilium-v4.sh @@ -0,0 +1,254 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Trilium" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + ______ _ ___ + /_ __/_v4_(_) (_)_ ______ ___ + / / / ___/ / / / / / / __ `__ \ + / / / / / / / / /_/ / / / / / / +/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" From 7c9f3752c7510de58963457ecfb18d9c7a8a5546 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 14:52:16 -0400 Subject: [PATCH 0201/3335] Create trilium-install.sh --- setup/trilium-install.sh | 122 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 setup/trilium-install.sh diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh new file mode 100644 index 00000000..00a32428 --- /dev/null +++ b/setup/trilium-install.sh @@ -0,0 +1,122 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Trilium" +wget -q https://github.com/zadam/trilium/releases/download/v0.54.3/trilium-linux-x64-server-0.54.3.tar.xz +tar -xvf trilium-linux-x64-server-0.54.3.tar.xz &>/dev/null +mv trilium-linux-x64-server /opt/trilium +msg_ok "Installed Trilium" + +msg_info "Creating Service" +service_path="/etc/systemd/system/trilium.service" + +echo "[Unit] +Description=Trilium Daemon +After=syslog.target network.target + +[Service] +User=root +Type=simple +ExecStart=/opt/trilium/trilium.sh +WorkingDirectory=/opt/trilium/ +TimeoutStopSec=20 +Restart=always + +[Install] +WantedBy=multi-user.target" > $service_path +systemctl enable --now -q trilium +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/trilium-linux-x64-server-0.54.3.tar.xz +msg_ok "Cleaned" From 5dd18e581c6caaa6629ecde7d6620a16ff8202a0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 15:06:39 -0400 Subject: [PATCH 0202/3335] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index c28cd71b..c18a3bfc 100644 --- a/README.md +++ b/README.md @@ -1535,6 +1535,29 @@ ________________________________________________________________________________ +
+ 🔸Trilium LXC + +

+ +

Trilium LXC

+ +[Trilium](https://github.com/zadam/trilium#trilium-notes) is a hierarchical note taking application with focus on building large personal knowledge bases. + +To create a new Proxmox Trilium LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/trilium-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Trilium Interface - IP:8080** + +____________________________________________________________________________________________ + +
+
Wiki.js LXC From 9d57ca692a4be59dd2231a1bfa7348f60ecab39d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 15:07:47 -0400 Subject: [PATCH 0203/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7b747e4c..0bab3311 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-11 + +### Changed + +- **Trilium LXC** + - NEW Script + ## 2022-09-10 ### Changed From 85d72e8225daded4ba4de7f136d5dcc3dac72828 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 15:48:35 -0400 Subject: [PATCH 0204/3335] Create trilium-update.sh --- misc/trilium-update.sh | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 misc/trilium-update.sh diff --git a/misc/trilium-update.sh b/misc/trilium-update.sh new file mode 100644 index 00000000..108f75ce --- /dev/null +++ b/misc/trilium-update.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +VWRELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 3, length($2)-4) }') + +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +CM='\xE2\x9C\x94\033' +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +function update_info { +cat << "EOF" + ______ _ ___ + /_ __/____(_) (_)_ ______ ___ + / / / ___/ / / / / / / __ `__ \ + / / / / / / / / /_/ / / / / / / +/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ + UPDATE + +EOF +} +update_info +while true; do + read -p "This will Update Trilium to v$VWRELEASE. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +sleep 2 +echo -e "${GN} Stopping Trilium... ${CL}" +systemctl stop trilium.service +sleep 1 + +echo -e "${GN} Updating to v${VWRELEASE}... ${CL}" +wget -q https://github.com/zadam/trilium/releases/download/v$VWRELEASE/trilium-linux-x64-server-$VWRELEASE.tar.xz + +tar -xzf trilium-linux-x64-server-$VWRELEASE.tar.xz -C /opt/trilium &>/dev/null + +echo -e "${GN} Cleaning up... ${CL}" +rm trilium-linux-x64-server-$VWRELEASE.tar.xz + +echo -e "${GN} Starting Trilium... ${CL}" +systemctl start trilium.service +sleep 1 +echo -e "${GN} Finished Update ${CL}" From 06e0a1208ad24001b83790aa03f1aa4129821d38 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 16:02:41 -0400 Subject: [PATCH 0205/3335] Create navidrome-update.sh --- misc/navidrome-update.sh | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 misc/navidrome-update.sh diff --git a/misc/navidrome-update.sh b/misc/navidrome-update.sh new file mode 100644 index 00000000..fb9a95ff --- /dev/null +++ b/misc/navidrome-update.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +VWRELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 3, length($2)-4) }') + +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +CM='\xE2\x9C\x94\033' +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +function update_info { +cat << "EOF" + _ __ _ __ + / | / /___ __ __(_)___/ /________ ____ ___ ___ + / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ + / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ +/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ + UPDATE + +EOF +} +update_info +while true; do + read -p "This will Update Navidrome to v$VWRELEASE. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +sleep 2 +echo -e "${GN} Stopping Navidrome... ${CL}" +systemctl stop navidrome.service +sleep 1 + +echo -e "${GN} Updating to v${VWRELEASE}... ${CL}" +wget https://github.com/navidrome/navidrome/releases/download/v$VWRELEASE/navidrome_$VWRELEASE_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null + +echo -e "${GN} Cleaning up... ${CL}" +rm Navidrome.tar.gz + +echo -e "${GN} Starting Navidrome... ${CL}" +systemctl start navidrome.service +sleep 1 +echo -e "${GN} Finished Update ${CL}" From 37d393a1a5bd197f07b68a8e89c589091bb3165c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 16:06:46 -0400 Subject: [PATCH 0206/3335] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index c18a3bfc..ba6f5f6a 100644 --- a/README.md +++ b/README.md @@ -1554,6 +1554,13 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/trilium-v4.s **Trilium Interface - IP:8080** +⚙️ **To Update Trilium** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/trilium-update.sh)" +``` + ____________________________________________________________________________________________
@@ -1793,6 +1800,13 @@ To change Navidrome music folder path, edit: `/var/lib/navidrome/navidrome.toml` **Navidrome Interface - IP:4533** +⚙️ **To Update Navidrome** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/navidrome-update.sh)" +``` + ____________________________________________________________________________________________ From 930af6e1de298e6916d2deb67ad236761c61ef72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 20:50:52 -0400 Subject: [PATCH 0207/3335] Update navidrome-install.sh --- setup/navidrome-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index 22619e02..21d44e78 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -67,16 +67,20 @@ apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (patience)" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null apt-get install -y ffmpeg &>/dev/null msg_ok "Installed Dependencies" +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 3, length($2)-4) }') + msg_info "Installing Navidrome" sudo install -d -o root -g root /opt/navidrome sudo install -d -o root -g root /var/lib/navidrome -wget https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null sudo chown -R root:root /opt/navidrome mkdir -p /music From be3bbcc509398ef8dcf2437e02d00cecc6241a95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 20:52:26 -0400 Subject: [PATCH 0208/3335] Update trilium-install.sh --- setup/trilium-install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index 00a32428..36524370 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -72,9 +72,13 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 3, length($2)-4) }') + msg_info "Installing Trilium" -wget -q https://github.com/zadam/trilium/releases/download/v0.54.3/trilium-linux-x64-server-0.54.3.tar.xz -tar -xvf trilium-linux-x64-server-0.54.3.tar.xz &>/dev/null +wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null mv trilium-linux-x64-server /opt/trilium msg_ok "Installed Trilium" @@ -118,5 +122,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/trilium-linux-x64-server-0.54.3.tar.xz +rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/trilium-linux-x64-server-$RELEASE.tar.xz msg_ok "Cleaned" From dbe0e4909d5e20fabdc6e049c9e4a4f656af984a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 20:53:52 -0400 Subject: [PATCH 0209/3335] Update navidrome-update.sh --- misc/navidrome-update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/navidrome-update.sh b/misc/navidrome-update.sh index fb9a95ff..c3ecded7 100644 --- a/misc/navidrome-update.sh +++ b/misc/navidrome-update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VWRELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \ +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \ | grep "tag_name" \ | awk '{print substr($2, 3, length($2)-4) }') @@ -21,7 +21,7 @@ EOF } update_info while true; do - read -p "This will Update Navidrome to v$VWRELEASE. Proceed(y/n)?" yn + read -p "This will Update Navidrome to v$RELEASE. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -33,8 +33,8 @@ echo -e "${GN} Stopping Navidrome... ${CL}" systemctl stop navidrome.service sleep 1 -echo -e "${GN} Updating to v${VWRELEASE}... ${CL}" -wget https://github.com/navidrome/navidrome/releases/download/v$VWRELEASE/navidrome_$VWRELEASE_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +echo -e "${GN} Updating to v${RELEASE}... ${CL}" +wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null echo -e "${GN} Cleaning up... ${CL}" From 99d81287e54ce4d4a9f32cbcbf93edfeb94deefc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Sep 2022 20:56:31 -0400 Subject: [PATCH 0210/3335] Update trilium-update.sh --- misc/trilium-update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/trilium-update.sh b/misc/trilium-update.sh index 108f75ce..9220c2d7 100644 --- a/misc/trilium-update.sh +++ b/misc/trilium-update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VWRELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \ +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \ | grep "tag_name" \ | awk '{print substr($2, 3, length($2)-4) }') @@ -21,7 +21,7 @@ EOF } update_info while true; do - read -p "This will Update Trilium to v$VWRELEASE. Proceed(y/n)?" yn + read -p "This will Update Trilium to v$RELEASE. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -33,13 +33,13 @@ echo -e "${GN} Stopping Trilium... ${CL}" systemctl stop trilium.service sleep 1 -echo -e "${GN} Updating to v${VWRELEASE}... ${CL}" -wget -q https://github.com/zadam/trilium/releases/download/v$VWRELEASE/trilium-linux-x64-server-$VWRELEASE.tar.xz +echo -e "${GN} Updating to v${RELEASE}... ${CL}" +wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -tar -xzf trilium-linux-x64-server-$VWRELEASE.tar.xz -C /opt/trilium &>/dev/null +tar -xzf trilium-linux-x64-server-$RELEASE.tar.xz -C /opt/trilium &>/dev/null echo -e "${GN} Cleaning up... ${CL}" -rm trilium-linux-x64-server-$VWRELEASE.tar.xz +rm trilium-linux-x64-server-$RELEASE.tar.xz echo -e "${GN} Starting Trilium... ${CL}" systemctl start trilium.service From d9689afab542e0912b7b2198ec1d5cbae461a8c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Sep 2022 11:25:48 -0400 Subject: [PATCH 0211/3335] Update README.md --- README.md | 57 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index ba6f5f6a..c1528a6a 100644 --- a/README.md +++ b/README.md @@ -1275,34 +1275,6 @@ ________________________________________________________________________________ -
- MeshCentral LXC - -

- -

MeshCentral LXC

- -MeshCentral is a full computer management web site. With MeshCentral, you can run your own web server to remotely manage and control computers on a local network or anywhere on the internet. - -To create a new Proxmox MeshCentral LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**MeshCentral Interface - http:// IP** - -⚙️ **To Update MeshCentral** - -```yaml -Update from the MeshCentral UI -``` -____________________________________________________________________________________________ - -
-
Plex Media Server LXC @@ -2082,6 +2054,35 @@ ________________________________________________________________________________
+ +
+ MeshCentral LXC + +

+ +

MeshCentral LXC

+ +[MeshCentral](https://meshcentral.com/info/) is a full computer management web site. With MeshCentral, you can run your own web server to remotely manage and control computers on a local network or anywhere on the internet. + +To create a new Proxmox MeshCentral LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**MeshCentral Interface - http:// IP** + +⚙️ **To Update MeshCentral** + +```yaml +Update from the MeshCentral UI +``` +____________________________________________________________________________________________ + +
+
Tailscale From d006211d01801d29f17b1f8da8637faa3dcdfada Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Sep 2022 17:35:37 -0400 Subject: [PATCH 0212/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1528a6a..5bdebc67 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

-
🔸 +
Proxmox VE 7 Post Install From f0188f79f58417ad236e365b943be412775712cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Sep 2022 17:40:47 -0400 Subject: [PATCH 0213/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bdebc67..9e590b91 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

- +
Proxmox VE 7 Post Install From d91326f95deb10978ad94cfe090e120cad6986a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Sep 2022 17:50:00 -0400 Subject: [PATCH 0214/3335] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9e590b91..313a1819 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

- +
Proxmox VE 7 Post Install @@ -2245,5 +2246,3 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/web-vault- ____________________________________________________________________________________________
- -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF) From 12ca8e5493aeb468e7a727719c51f600d29bc235 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Sep 2022 18:24:32 -0400 Subject: [PATCH 0215/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 313a1819..5bc5d171 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

-
From d9caa28a4331435ad8b48652ec79ade7aedf37f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Sep 2022 21:48:08 -0400 Subject: [PATCH 0216/3335] maintenance (#506) * maintenance * maintenance * maintenance * Update debian-v4.sh * Update debian-v4.sh --- ct/adguard-v4.sh | 14 ++------------ ct/casaos-v4.sh | 18 ++++-------------- ct/daemonsync-v4.sh | 14 ++------------ ct/dashy-v4.sh | 14 ++------------ ct/debian-v4.sh | 14 ++------------ ct/deconz-v4.sh | 6 +++--- ct/docker-v4.sh | 18 ++++-------------- ct/emby-v4.sh | 6 +++--- ct/esphome-v4.sh | 14 ++------------ ct/grafana-v4.sh | 14 ++------------ ct/grocy-v4.sh | 14 ++------------ ct/heimdalldashboard-v4.sh | 14 ++------------ ct/homeassistant-v4.sh | 14 ++------------ ct/homebridge-v4.sh | 14 ++------------ ct/homepage-v4.sh | 14 ++------------ ct/influxdb-v4.sh | 14 ++------------ ct/iobroker-v4.sh | 14 ++------------ ct/jellyfin-v4.sh | 3 ++- ct/keycloak-v4.sh | 14 ++------------ ct/magicmirror-v4.sh | 14 ++------------ ct/mariadb-v4.sh | 14 ++------------ ct/meshcentral-v4.sh | 14 ++------------ ct/motioneye-v4.sh | 14 ++------------ ct/mqtt-v4.sh | 14 ++------------ ct/n8n-v4.sh | 14 ++------------ ct/navidrome-v4.sh | 14 ++------------ ct/nginx-proxy-manager-v4.sh | 14 ++------------ ct/nocodb-v4.sh | 14 ++------------ ct/node-red-v4.sh | 14 ++------------ ct/omada-v4.sh | 12 ++++++------ ct/openhab-v4.sh | 14 ++------------ ct/photoprism-v4.sh | 14 ++------------ ct/pihole-v4.sh | 14 ++------------ ct/plex-v4.sh | 3 ++- ct/podman-homeassistant-v4.sh | 14 ++------------ ct/postgresql-v4.sh | 14 ++------------ ct/prometheus-v4.sh | 14 ++------------ ct/syncthing-v4.sh | 3 ++- ct/technitiumdns-v4.sh | 14 ++------------ ct/trilium-v4.sh | 3 ++- ct/ubuntu-v4.sh | 8 ++++---- ct/unifi-v4.sh | 14 ++------------ ct/uptimekuma-v4.sh | 14 ++------------ ct/vaultwarden-v4.sh | 14 ++------------ ct/whoogle-v4.sh | 14 ++------------ ct/wikijs-v4.sh | 14 ++------------ ct/wireguard-v4.sh | 22 ++++++---------------- ct/zigbee2mqtt-v4.sh | 22 ++++++---------------- ct/zwavejs2mqtt-v4.sh | 14 ++------------ 49 files changed, 118 insertions(+), 524 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index bb40f982..e54d84aa 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 4f6509a5..a4a95bf7 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -70,9 +70,8 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -264,7 +253,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP} ${CL} \n" diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 3fee2a6e..07334f6a 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 5383cf97..07232766 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index fb470b8a..ddc48a91 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,5 +247,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 28db39a2..c7a671bf 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -70,8 +70,7 @@ fi } function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" @@ -272,7 +271,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}${CL}\n" diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index d83382b7..5534f38a 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -69,9 +69,8 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -263,5 +252,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index ed9c62b4..6ea1bcec 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -71,8 +71,7 @@ fi } function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" @@ -271,7 +270,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index e6488c95..9172c085 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 7ed70c2c..d2622f59 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 680bcc4a..54755899 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}${CL} \n" diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 3b5c52bd..4c534619 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 17ff5cdc..3b2083ad 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -263,7 +252,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8123${CL} diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 87b60dcb..abbee6a9 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index dc41118d..97df3d81 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index f7b0fa7a..7f9f991e 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,5 +247,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 7b56f873..364cf6e1 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 210bfdf9..bee0357b 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -270,7 +270,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 61954dae..2c5db5a9 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 9f81130a..06aee016 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index effb77bf..771db328 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "Adminer should be reachable by going to the following URL. ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 35ef4971..602a6db5 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}${CL} \n" diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 0ce01077..7a53e637 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 01638788..899552a9 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,5 +247,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index 5cdcc286..d683c6fd 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 1c674333..4cb19868 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:4533${CL} \n" diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 39ffe521..bea15edf 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/nginx-proxy-manager-install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 08e6fd4b..050e5ff9 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080/dashboard${CL} \n" diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 04aba883..9230148b 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 6236796c..f4f1a9af 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -70,9 +70,8 @@ fi } function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -93,8 +92,8 @@ function default_settings() { GATE="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -261,7 +260,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index 128a0223..e724c8e3 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index 9ffc9399..cbfa9b92 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 60dd7c25..d917e1f5 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index 9c43b82c..cad50e02 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -270,7 +270,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:32400/web${CL}\n" diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 6c97d5d8..55efec47 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -73,7 +73,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -101,16 +100,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ @@ -267,7 +256,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8123${CL} diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index 7d8c4d13..230fa91f 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "Adminer should be reachable by going to the following URL. ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 554e531f..587412e9 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index d151d1d4..27d73050 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -249,7 +249,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8384 ${CL} (after initial start) \n" diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index fa20dafc..e7f78fd4 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index 0cdd70e8..8dc66c67 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -248,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 8df0e0f4..f485ca4e 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -70,9 +70,8 @@ fi } function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -261,5 +260,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index 71f3ac51..d6f7b954 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP}${CL} should be reachable by going to the following URL. ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index 3a806bff..4f7f4e3b 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3001${CL} \n" diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index fa33cb7b..02b0f684 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_info "Setting Container to Normal Resources" pct set $CTID -memory 512 pct set $CTID -cores 1 diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index f5dabd3e..21a1ecdf 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -69,7 +69,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -97,16 +96,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -258,7 +247,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 32df8a0d..b41e5a4a 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -259,7 +248,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 6e2e9282..564dd218 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -71,9 +71,8 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -94,21 +93,11 @@ function default_settings() { GATE="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -260,7 +249,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "WGDashboard should be reachable by going to the following URL. ${BL}http://${IP}:10086${CL} \n" diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 2c5662e2..48fcc97f 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -70,9 +70,8 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -93,21 +92,11 @@ function default_settings() { GATE="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ @@ -269,5 +258,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" diff --git a/ct/zwavejs2mqtt-v4.sh b/ct/zwavejs2mqtt-v4.sh index 9854db8e..56fe0f5c 100644 --- a/ct/zwavejs2mqtt-v4.sh +++ b/ct/zwavejs2mqtt-v4.sh @@ -70,7 +70,6 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -98,16 +97,6 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ -"10" "Buster" OFF \ -"11" "Bullseye" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Debian Version: ${BGN}$var_version${CL}" -else - exit -fi CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ @@ -270,7 +259,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/" +### https://tteck.github.io/Proxmox/ +" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8091${CL} \n" From a83c5e8b972f607bf094e1bfc651461be2719ad8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Sep 2022 22:53:25 -0400 Subject: [PATCH 0217/3335] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 5bc5d171..f911c2f3 100644 --- a/README.md +++ b/README.md @@ -866,8 +866,7 @@ advanced: Run in the LXC console ```yaml -cd /opt/zigbee2mqtt -npm start +cd /opt/zigbee2mqtt && npm start ``` ⚙️ **To update Zigbee2MQTT** From 7aaf479d33b22e38589c02e81534b53f2c130d52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Sep 2022 06:03:31 -0400 Subject: [PATCH 0218/3335] Update casaos-v4.sh --- ct/casaos-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index a4a95bf7..344b3534 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -254,7 +254,7 @@ lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ -" +" msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP} ${CL} \n" From fd1ce4a327bc2e97ee5736820701d8fe3de371fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Sep 2022 18:03:30 -0400 Subject: [PATCH 0219/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f911c2f3..a2dc7774 100644 --- a/README.md +++ b/README.md @@ -1590,7 +1590,7 @@ ________________________________________________________________________________
- 🔸Homepage LXC + Homepage LXC

Homepage LXC

@@ -1752,7 +1752,7 @@ ________________________________________________________________________________
- 🔸Navidrome LXC + Navidrome LXC

From 22a7800fb58c3c8ddc6bd46eb037157637a4c9df Mon Sep 17 00:00:00 2001 From: Donkeykong307 Date: Fri, 16 Sep 2022 03:59:38 +0100 Subject: [PATCH 0220/3335] Made Paperless-ngx Script (#508) Downloads and installs Paperless-ngx including JBIG2. Makes a paperless.creds file in root home directory that contains the usernames and passwords for Postgres Database and the WebUI. --- setup/paperless-ngx-install.sh | 260 +++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 setup/paperless-ngx-install.sh diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh new file mode 100644 index 00000000..993a49ec --- /dev/null +++ b/setup/paperless-ngx-install.sh @@ -0,0 +1,260 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Paperless Dependencies" +apt-get install -y --no-install-recommends \ + python3 \ + python3-pip \ + python3-dev \ + imagemagick \ + fonts-liberation \ + optipng \ + gnupg \ + libpq-dev \ + libmagic-dev \ + mime-support \ + libzbar0 \ + poppler-utils \ + sudo &>/dev/null +msg_ok "Installed Paperless Dependencies" + +msg_info "Installing OCR Dependencies" +apt-get install -y --no-install-recommends \ + unpaper \ + ghostscript \ + icc-profiles-free \ + qpdf \ + liblept5 \ + libxml2 \ + pngquant \ + zlib1g \ + tesseract-ocr \ + tesseract-ocr-eng &>/dev/null +msg_ok "Installed OCR Dependencies" + +msg_info "Installing Extra Dependencies" +apt-get install -y --no-install-recommends \ + redis \ + postgresql \ + build-essential \ + python3-setuptools \ + python3-wheel &>/dev/null +msg_ok "Installed Extra Dependencies" + +msg_info "Installing JBIG2" +apt-get install -y --no-install-recommends \ + build-essential \ + automake \ + libtool \ + pkg-config \ + git \ + curl \ + libtiff-dev \ + libpng-dev \ + libleptonica-dev &>/dev/null + +git clone https://github.com/agl/jbig2enc /opt/jbig2enc &>/dev/null +cd /opt/jbig2enc +/bin/bash -c "./autogen.sh" &>/dev/null && \ +/bin/bash -c "./configure && make" &>/dev/null && \ +/bin/bash -c "make install" &>/dev/null +rm -rf /opt/jbig2enc +msg_ok "Installed JBIG2" + +msg_info "Downloading Paperless-NGx" +cd /opt && \ +wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && \ +tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && \ +mv paperless-ngx paperless && \ +rm paperless-ngx-$Paperlessngx.tar.xz +cd /opt/paperless + +## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file +sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt + +/usr/bin/python3 -m pip install --upgrade pip &>/dev/null +/usr/bin/python3 -m pip install -r requirements.txt &>/dev/null +msg_ok "Downloaded Paperless-NGx" + +msg_info "Setting up database" +DB_USER=paperless +DB_PASS="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)" +DB_NAME=paperlessdb + +sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" &>/dev/null +sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" &>/dev/null + +echo "Paperless-NGx Database User" >> ~/paperless.creds +echo $DB_USER >> ~/paperless.creds +echo "Paperless-NGx Database Password" >> ~/paperless.creds +echo $DB_PASS >> ~/paperless.creds +echo "Paperless-NGx Database Name" >> ~/paperless.creds +echo $DB_NAME >> ~/paperless.creds + +/bin/bash -c "mkdir -p {consume,media}" + +sed -i -e 's|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=paperlessdb|' /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf + +cd /opt/paperless/src +/usr/bin/python3 manage.py migrate &>/dev/null +msg_ok "Set up database" + +msg_info "Setting up admin Paperless-NGx User & Password" +## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations +cat << EOF | python3 /opt/paperless/src/manage.py shell +from django.contrib.auth import get_user_model +UserModel = get_user_model() +if len(UserModel.objects.all()) == 1: + user = UserModel.objects.create_user('admin', password='$DB_PASS') + user.is_superuser = True + user.is_staff = True + user.save() +EOF +echo "" >> ~/paperless.creds +echo "Paperless-NGx WebUI User" >> ~/paperless.creds +echo admin >> ~/paperless.creds +echo "Paperless-NGx WebUI Password" >> ~/paperless.creds +echo $DB_PASS >> ~/paperless.creds +msg_ok "Set up admin Paperless-NGx User & Password" + +cat << EOF > /etc/systemd/system/paperless-scheduler.service +[Unit] +Description=Paperless consumer +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=python3 manage.py qcluster + +[Install] +WantedBy=multi-user.target +EOF + +cat << EOF > /etc/systemd/system/paperless-consumer.service +[Unit] +Description=Paperless consumer +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=python3 manage.py document_consumer + +[Install] +WantedBy=multi-user.target +EOF + +cat << EOF > /etc/systemd/system/paperless-webserver.service +[Unit] +Description=Paperless webserver +After=network.target +Wants=network.target +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=/usr/local/bin/gunicorn -c /opt/paperless/gunicorn.conf.py paperless.asgi:application + +[Install] +WantedBy=multi-user.target +EOF + +sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml + +systemctl daemon-reload +systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler &>/dev/null + +msg_ok "Finished installing Paperless-NGx" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +rm /etc/motd +rm /etc/update-motd.d/10-uname +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From b2575522ffb33f2b78b5137008ddc22487092c56 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Sep 2022 23:19:24 -0400 Subject: [PATCH 0221/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a2dc7774..7494601f 100644 --- a/README.md +++ b/README.md @@ -1127,7 +1127,7 @@ ________________________________________________________________________________
- 🔸CasaOS LXC + CasaOS LXC

From 7d18b44a052269955c428273412111b1bf291a9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 00:11:08 -0400 Subject: [PATCH 0222/3335] Create paperless-ngx-v4.sh --- ct/paperless-ngx-v4.sh | 255 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 ct/paperless-ngx-v4.sh diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh new file mode 100644 index 00000000..69f151d4 --- /dev/null +++ b/ct/paperless-ngx-v4.sh @@ -0,0 +1,255 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Paperless-ngx" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + ____ __ + / __ \____ _____ ___ _____/ /__v4__________ ____ ____ __ __ + / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ + / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < +/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| + /_/ /____/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From 92c5a572d164e873a46ca8ae6ea4f10e9d88357c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 00:12:35 -0400 Subject: [PATCH 0223/3335] Update paperless-ngx-install.sh --- setup/paperless-ngx-install.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 993a49ec..d1872eb5 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -18,7 +18,6 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) function error_exit() { trap - ERR @@ -69,7 +68,7 @@ apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" -msg_info "Installing Paperless Dependencies" +msg_info "Installing Paperless-ngx Dependencies" apt-get install -y --no-install-recommends \ python3 \ python3-pip \ @@ -84,7 +83,7 @@ apt-get install -y --no-install-recommends \ libzbar0 \ poppler-utils \ sudo &>/dev/null -msg_ok "Installed Paperless Dependencies" +msg_ok "Installed Paperless-ngx Dependencies" msg_info "Installing OCR Dependencies" apt-get install -y --no-install-recommends \ @@ -129,7 +128,8 @@ cd /opt/jbig2enc rm -rf /opt/jbig2enc msg_ok "Installed JBIG2" -msg_info "Downloading Paperless-NGx" +msg_info "Downloading Paperless-ngx" +Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) cd /opt && \ wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && \ tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && \ @@ -142,7 +142,7 @@ sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://gi /usr/bin/python3 -m pip install --upgrade pip &>/dev/null /usr/bin/python3 -m pip install -r requirements.txt &>/dev/null -msg_ok "Downloaded Paperless-NGx" +msg_ok "Downloaded Paperless-ngx" msg_info "Setting up database" DB_USER=paperless @@ -152,11 +152,11 @@ DB_NAME=paperlessdb sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" &>/dev/null sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" &>/dev/null -echo "Paperless-NGx Database User" >> ~/paperless.creds +echo "Paperless-ngx Database User" >> ~/paperless.creds echo $DB_USER >> ~/paperless.creds -echo "Paperless-NGx Database Password" >> ~/paperless.creds +echo "Paperless-ngx Database Password" >> ~/paperless.creds echo $DB_PASS >> ~/paperless.creds -echo "Paperless-NGx Database Name" >> ~/paperless.creds +echo "Paperless-ngx Database Name" >> ~/paperless.creds echo $DB_NAME >> ~/paperless.creds /bin/bash -c "mkdir -p {consume,media}" @@ -170,7 +170,7 @@ cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null msg_ok "Set up database" -msg_info "Setting up admin Paperless-NGx User & Password" +msg_info "Setting up admin Paperless-ngx User & Password" ## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations cat << EOF | python3 /opt/paperless/src/manage.py shell from django.contrib.auth import get_user_model @@ -182,11 +182,11 @@ if len(UserModel.objects.all()) == 1: user.save() EOF echo "" >> ~/paperless.creds -echo "Paperless-NGx WebUI User" >> ~/paperless.creds +echo "Paperless-ngx WebUI User" >> ~/paperless.creds echo admin >> ~/paperless.creds -echo "Paperless-NGx WebUI Password" >> ~/paperless.creds +echo "Paperless-ngx WebUI Password" >> ~/paperless.creds echo $DB_PASS >> ~/paperless.creds -msg_ok "Set up admin Paperless-NGx User & Password" +msg_ok "Set up admin Paperless-ngx User & Password" cat << EOF > /etc/systemd/system/paperless-scheduler.service [Unit] @@ -234,7 +234,7 @@ sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /et systemctl daemon-reload systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler &>/dev/null -msg_ok "Finished installing Paperless-NGx" +msg_ok "Finished installing Paperless-ngx" PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then From d80b6ede5daeec66dc0665c33e6b62c9991ae060 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 00:13:16 -0400 Subject: [PATCH 0224/3335] Update paperless-ngx-install.sh --- setup/paperless-ngx-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index d1872eb5..2f424f81 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -110,7 +110,6 @@ msg_ok "Installed Extra Dependencies" msg_info "Installing JBIG2" apt-get install -y --no-install-recommends \ - build-essential \ automake \ libtool \ pkg-config \ From 8fefb7f4c5279d6e4ef2ad3810043297b292e424 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 00:15:31 -0400 Subject: [PATCH 0225/3335] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 7494601f..f3c73ab9 100644 --- a/README.md +++ b/README.md @@ -1507,6 +1507,36 @@ ________________________________________________________________________________
+ +
+ 🔸Paperless-ngx LXC + +

+ +

Paperless-ngx LXC

+ +[Paperless-ngx](https://paperless-ngx.readthedocs.io/en/latest/#) is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper. + +To create a new Proxmox Paperless-ngx LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/paperless-ngx-v4.sh)" +``` + +

⚡ Default Settings: 2048MiB RAM - 4GB Storage - 2vCPU ⚡

+ +**Paperless-ngx Interface - IP:8080** + +🛈 A paperless.creds file is in root home directory that contains the usernames and passwords. + +Run in the LXC Console +```yaml +cat paperless.creds +``` +____________________________________________________________________________________________ + +
+
🔸Trilium LXC From 705b7f44c41889f82a19cd86a536a506cff19e0f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 00:18:13 -0400 Subject: [PATCH 0226/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0bab3311..5691e8f1 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-16 + +### Changed + +- **Paperless-ngx LXC** + - NEW Script + ## 2022-09-11 ### Changed From 41f9cf3077b88c99009f9bc464b6e3b90def3db5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 00:20:14 -0400 Subject: [PATCH 0227/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5691e8f1..33c2b4fd 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Paperless-ngx LXC** - - NEW Script + - NEW Script (Thanks @Donkeykong307) ## 2022-09-11 From 3752fc9b948fd9e42620e02ef89781892d7ba006 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 06:04:06 -0400 Subject: [PATCH 0228/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3c73ab9..776a1ed6 100644 --- a/README.md +++ b/README.md @@ -1525,7 +1525,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/paperless-ng

⚡ Default Settings: 2048MiB RAM - 4GB Storage - 2vCPU ⚡

-**Paperless-ngx Interface - IP:8080** +**Paperless-ngx Interface - IP:8000** 🛈 A paperless.creds file is in root home directory that contains the usernames and passwords. From 415f743863ccfdfc1e92c6c88121c8e3673bd536 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 07:56:29 -0400 Subject: [PATCH 0229/3335] Create paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 misc/paperless-ngx-update.sh diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh new file mode 100644 index 00000000..b6e162f8 --- /dev/null +++ b/misc/paperless-ngx-update.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +clear +RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -e + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +cat << "EOF" + ____ __ + / __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __ + / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ + / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < +/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| + /_/ UPDATE /____/ +EOF + +while true; do + read -p "This will Update Paperless-ngx to $RELEASE. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +sleep 2 +msg_info "Stopping Paperless-ngx" +systemctl stop paperless-consumer paperless-webserver paperless-scheduler +sleep 1 +msg_ok "Stopped Paperless-ngx" + +msg_info "Updating to ${RELEASE}" +wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null +tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null +cp -r paperless-ngx/* /opt/paperless/ +cd /opt/paperless +pip install -r requirements.txt &>/dev/null +cd src +python3 manage.py migrate &>/dev/null +msg_ok "Updated to ${RELEASE}" + +msg_info "Cleaning up" +cd ~ +rm paperless-ngx-$RELEASE.tar.xz +rm -rf paperless-ngx +msg_ok "Cleaned" + +msg_info "Starting Paperless-ngx" +systemctl start paperless-consumer paperless-webserver paperless-scheduler +sleep 1 +msg_ok "Finished Update" From 049cb371243e452dc748c74b6ed447d2d9a7126d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 08:35:11 -0400 Subject: [PATCH 0230/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index b6e162f8..5c4f39b6 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -73,3 +73,4 @@ msg_info "Starting Paperless-ngx" systemctl start paperless-consumer paperless-webserver paperless-scheduler sleep 1 msg_ok "Finished Update" +echo -e "\n${BL}It may take a minute or so for Paperless-ngx to become available.${CL}\n" From e75acf208c38a3e2e9fbef7fb306cf96f7858cbf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 14:07:50 -0400 Subject: [PATCH 0231/3335] Update homepage-install.sh --- setup/homepage-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 2ee58a14..e3e49589 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -74,7 +74,7 @@ apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null +curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 46f0337d066c2991fc022b9c2e60049de8d1c3d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 14:40:15 -0400 Subject: [PATCH 0232/3335] Switch from pnpm to npm --- setup/homepage-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index e3e49589..127ea407 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -79,15 +79,15 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" apt-get install -y nodejs &>/dev/null -npm install -g pnpm &>/dev/null +# npm install -g pnpm &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Homepage" git clone https://github.com/benphelps/homepage.git /opt/homepage &>/dev/null cd /opt/homepage mkdir -p config -pnpm install &>/dev/null -pnpm build &>/dev/null +npm install &>/dev/null +npm run build &>/dev/null msg_ok "Installed Homepage" msg_info "Creating Service" From d6bea05d9de3e2db823ae3b64bfe3a6b2eba49e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:05:41 -0400 Subject: [PATCH 0233/3335] Create CONTRIBUTING.md --- .github/CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..2f938e25 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,5 @@ +# Contributing to Proxmox Helper Scripts + +Everybody is invited and welcome to contribute to Proxmox Helper Scripts. + +- Pull requests are always created against the [**pull-requests**](https://github.com/tteck/Proxmox/tree/pull-requests) branch. From 53ab4ea2c2490d8f332cd4aca446cbac2782b3b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:10:39 -0400 Subject: [PATCH 0234/3335] Create CODE_OF_CONDUCT.md --- .github/CODE_OF_CONDUCT.md | 132 +++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 .github/CODE_OF_CONDUCT.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..4cf8cff5 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations From ea44c02315d56b86807a953ff75fd4efb4e451ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:21:29 -0400 Subject: [PATCH 0235/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd84ea78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. From e6938f8b3f2328d2c7e729194d8330002e573f61 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:26:14 -0400 Subject: [PATCH 0236/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..69da9eac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: Feature Request +labels: Feature Request +assignees: tteck + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 8c614be4984995f145e758a2520f573dda869a7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:29:21 -0400 Subject: [PATCH 0237/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea78..ccb3b3f9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' -assignees: '' +title: BUG +labels: bug +assignees: tteck --- @@ -12,10 +12,6 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error **Expected behavior** A clear and concise description of what you expected to happen. @@ -23,16 +19,5 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - **Additional context** Add any other context about the problem here. From 3d57ef88c96a1b4dff2abaae6891ce53e16c0015 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:36:06 -0400 Subject: [PATCH 0238/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ccb3b3f9..d029a230 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug report about: Create a report to help us improve -title: BUG +title: '' labels: bug assignees: tteck @@ -10,12 +10,6 @@ assignees: tteck **Describe the bug** A clear and concise description of what the bug is. -**To Reproduce** -Steps to reproduce the behavior: - -**Expected behavior** -A clear and concise description of what you expected to happen. - **Screenshots** If applicable, add screenshots to help explain your problem. From 2bdef16284e948153ad3e87bca729c76076c339b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:37:41 -0400 Subject: [PATCH 0239/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 69da9eac..ea28cca8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest an idea for this project -title: Feature Request +title: '' labels: Feature Request assignees: tteck From a490ca5aacd42fd7ae1f01e6a9fafe3cd78111c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:44:27 -0400 Subject: [PATCH 0240/3335] Create pull_request_template.md --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1 @@ + From 9af7ce69f375708b124adfadf92db708b96ca4cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Sep 2022 23:52:52 -0400 Subject: [PATCH 0241/3335] Update pull_request_template.md --- .github/pull_request_template.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8b137891..ef2d9b8f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1 +1,16 @@ +# Pull Request Template +## Description + +Please include a summary of the change and/or which issue is fixed. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix +- [ ] New feature +- [ ] New Script +- [ ] This change requires a documentation update From a65a27ad89628a782dd86396370ffcc3af7fdbe8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:01:08 -0400 Subject: [PATCH 0242/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index ea28cca8..66a63d73 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,14 +7,4 @@ assignees: tteck --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. +**Please submit feature request to the [discussions](https://github.com/tteck/Proxmox/discussions)area.** From 2d451515c2316dff4117b8eea20a4954c01ba7af Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:03:35 -0400 Subject: [PATCH 0243/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 66a63d73..aaae8874 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,4 +7,4 @@ assignees: tteck --- -**Please submit feature request to the [discussions](https://github.com/tteck/Proxmox/discussions)area.** +**Please submit feature request to [discussions](https://github.com/tteck/Proxmox/discussions)** From a6d4c68753a6539cab1433c4a7c8d2fc22f39c0c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:09:05 -0400 Subject: [PATCH 0244/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index aaae8874..f129ea0e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "**Please submit feature request to [discussions](https://github.com/tteck/Proxmox/discussions)**" labels: Feature Request assignees: tteck From 23a1ab5789ebb6a2932ce7193cfc1e7967bf34a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:15:26 -0400 Subject: [PATCH 0245/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature-script-request.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature-script-request.md diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.md b/.github/ISSUE_TEMPLATE/feature-script-request.md new file mode 100644 index 00000000..45cb200f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-script-request.md @@ -0,0 +1,11 @@ +--- +name: Feature/Script Request +about: Suggest an idea for this project +title: Please submit feature/script requests to Discussions +labels: Feature Request +assignees: tteck + +--- + +Please submit feature request to Discussions +https://github.com/tteck/Proxmox/discussions From 37d4df6beab09f4729c495e1aa8a8557c9e5ff6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:17:48 -0400 Subject: [PATCH 0246/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature-script-request.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.md b/.github/ISSUE_TEMPLATE/feature-script-request.md index 45cb200f..22265d7c 100644 --- a/.github/ISSUE_TEMPLATE/feature-script-request.md +++ b/.github/ISSUE_TEMPLATE/feature-script-request.md @@ -7,5 +7,5 @@ assignees: tteck --- -Please submit feature request to Discussions +Please submit feature/script requests to Discussions https://github.com/tteck/Proxmox/discussions diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index f129ea0e..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "**Please submit feature request to [discussions](https://github.com/tteck/Proxmox/discussions)**" -labels: Feature Request -assignees: tteck - ---- - -**Please submit feature request to [discussions](https://github.com/tteck/Proxmox/discussions)** From 057b26539df687261fe47586ea44a6cbd1644555 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:23:43 -0400 Subject: [PATCH 0247/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d029a230..5ed782af 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -15,3 +15,5 @@ If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. + +**Bug reports will be closed after 12 hours of NO communication.** From 09df541b3997058b3ecdd784340aaa044326fa93 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:29:04 -0400 Subject: [PATCH 0248/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5ed782af..942ae955 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -17,3 +17,8 @@ If applicable, add screenshots to help explain your problem. Add any other context about the problem here. **Bug reports will be closed after 12 hours of NO communication.** + +As the saying goes... +It’s not DNS +There’s no way it’s DNS +It was DNS From 1b0f173ffc3077f7e8e2f5569a7e9d1a6fa94a95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:42:34 -0400 Subject: [PATCH 0249/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 942ae955..5731f240 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help us improve (script related) title: '' labels: bug assignees: tteck From 20b2c069c8198914c0db841f6391209bdc96427a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 00:49:02 -0400 Subject: [PATCH 0250/3335] Update issue templates --- .github/ISSUE_TEMPLATE/feature-script-request.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.md b/.github/ISSUE_TEMPLATE/feature-script-request.md index 22265d7c..ddcfa3a4 100644 --- a/.github/ISSUE_TEMPLATE/feature-script-request.md +++ b/.github/ISSUE_TEMPLATE/feature-script-request.md @@ -1,11 +1,11 @@ --- name: Feature/Script Request -about: Suggest an idea for this project -title: Please submit feature/script requests to Discussions +about: Suggest an idea for this project in Discussions +title: Please submit feature/script requests in Discussions labels: Feature Request assignees: tteck --- -Please submit feature/script requests to Discussions +Please submit feature/script requests in Discussions https://github.com/tteck/Proxmox/discussions From 9d41a71a2c81026d01acff6856659171d018bdc6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 01:03:38 -0400 Subject: [PATCH 0251/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 776a1ed6..d7715b60 100644 --- a/README.md +++ b/README.md @@ -2003,7 +2003,7 @@ ________________________________________________________________________________
- 🔸Syncthing LXC + Syncthing LXC

From 0f5f9273dfe075fab3b65fdbb99f8e0fc74dceca Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 06:57:25 -0400 Subject: [PATCH 0252/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5731f240..09e6995c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -16,7 +16,7 @@ If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. -**Bug reports will be closed after 12 hours of NO communication.** +**Bug reports will be closed after 12 hours of NO activity.** As the saying goes... It’s not DNS From 7ba8391cca61e57e8e4f0de8bbd9c9d6590c7fe6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 09:30:42 -0400 Subject: [PATCH 0253/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 09e6995c..1b3a752e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,18 +7,10 @@ assignees: tteck --- -**Describe the bug** +**Describe the issue** A clear and concise description of what the bug is. **Screenshots** If applicable, add screenshots to help explain your problem. -**Additional context** -Add any other context about the problem here. - **Bug reports will be closed after 12 hours of NO activity.** - -As the saying goes... -It’s not DNS -There’s no way it’s DNS -It was DNS From 58d56ef28c8f794c1b8ccf30c10ce0e11da2e1a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 12:05:13 -0400 Subject: [PATCH 0254/3335] Update homepage-install.sh --- setup/homepage-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 127ea407..833d35a6 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -74,20 +74,20 @@ apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null +curl -fsSL https://deb.nodesource.com/setup_14.x | bash - &>/dev/null msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" apt-get install -y nodejs &>/dev/null -# npm install -g pnpm &>/dev/null +npm install -g pnpm &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Homepage" git clone https://github.com/benphelps/homepage.git /opt/homepage &>/dev/null cd /opt/homepage mkdir -p config -npm install &>/dev/null -npm run build &>/dev/null +pnpm install &>/dev/null +pnpm build &>/dev/null msg_ok "Installed Homepage" msg_info "Creating Service" @@ -102,7 +102,7 @@ Restart=always RestartSec=1 User=root WorkingDirectory=/opt/homepage/ -ExecStart=npm start +ExecStart=pnpm start [Install] WantedBy=multi-user.target" > $service_path systemctl enable --now homepage &>/dev/null From c06f7afce96c1652852485daff16c0af4ef88956 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 12:16:27 -0400 Subject: [PATCH 0255/3335] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1b3a752e..dae485c8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,8 +2,8 @@ name: Bug report about: Create a report to help us improve (script related) title: '' -labels: bug -assignees: tteck +labels: '' +assignees: '' --- From fbab8319539eb074008ab0d4620cc87565acbfae Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 21:18:04 -0400 Subject: [PATCH 0256/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 5c4f39b6..9d515ac3 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -56,6 +56,7 @@ msg_ok "Stopped Paperless-ngx" msg_info "Updating to ${RELEASE}" wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null +cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless pip install -r requirements.txt &>/dev/null From e9e10555dd251410f4e2c2a39219679f52588c87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 21:40:44 -0400 Subject: [PATCH 0257/3335] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index d7715b60..94f286ce 100644 --- a/README.md +++ b/README.md @@ -1533,6 +1533,13 @@ Run in the LXC Console ```yaml cat paperless.creds ``` + +⚙️ **To Update Paperless-ngx** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/paperless-ngx-update.sh)" +``` ____________________________________________________________________________________________
From cd10962216f73ce732d645b593ae9dbe1451dcdf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Sep 2022 22:36:28 -0400 Subject: [PATCH 0258/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94f286ce..8521283c 100644 --- a/README.md +++ b/README.md @@ -1545,7 +1545,7 @@ ________________________________________________________________________________
- 🔸Trilium LXC + Trilium LXC

From fe7754808385adeff8912450c1d9c4530f6f2c47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 09:31:49 -0400 Subject: [PATCH 0259/3335] Create omv-v4.sh --- ct/omv-v4.sh | 265 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 ct/omv-v4.sh diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh new file mode 100644 index 00000000..c03834b1 --- /dev/null +++ b/ct/omv-v4.sh @@ -0,0 +1,265 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="OMV" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + ____ __ ___ ___ _ __ ____ + / __ \____v4___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ + / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ +/ /_/ / /_/ / __/ / / / / / / __/ /_/ / / /_/ /| |/ / /_/ / /_/ / / /_ +\____/ .___/\___/_/ /_/_/ /_/\___/\__,_/_/\__,_/ |___/\__,_/\__,_/_/\__/ + /_/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" From af6454abd044d287ccc574d71bea3f2dac1cfdec Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 09:33:12 -0400 Subject: [PATCH 0260/3335] Create omv-install.sh --- setup/omv-install.sh | 118 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 setup/omv-install.sh diff --git a/setup/omv-install.sh b/setup/omv-install.sh new file mode 100644 index 00000000..0f553a62 --- /dev/null +++ b/setup/omv-install.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +export DEBIAN_FRONTEND=noninteractive +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y gnupg &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing OpenMediaVault (Patience)" +wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key &>/dev/null +apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null + +cat <> /etc/apt/sources.list.d/openmediavault.list +deb https://packages.openmediavault.org/public shaitan main +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main +## Uncomment the following line to add software from the proposed repository. +# deb https://packages.openmediavault.org/public shaitan-proposed main +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main +## This software is not part of OpenMediaVault, but is offered by third-party +## developers as a service to OpenMediaVault users. +# deb https://packages.openmediavault.org/public shaitan partner +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner +EOF +apt-get update &>/dev/null +apt-get -y install openmediavault-keyring &>/dev/null +apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends install openmediavault &>/dev/null +omv-confdbadm populate +msg_ok "Installed OpenMediaVault" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 65c99088c9d97bba0683285573f8c5b01d2c2a94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 09:44:51 -0400 Subject: [PATCH 0261/3335] Add files via upload --- misc/images/omv.png | Bin 0 -> 2795 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/omv.png diff --git a/misc/images/omv.png b/misc/images/omv.png new file mode 100644 index 0000000000000000000000000000000000000000..b8de99c57387f34f2dcaa52fdf4cf9753d08b70f GIT binary patch literal 2795 zcmbVOc~leU77q}1kbnpR@|*<94q1SNM7AtIkX05@L?MtMVM#(VtlBmN5hB}QLDUL$ z0Yq6`0M|Bxq9W9yh*A()Bh@M{NKruR8&vwzD!04ymu|VYD(~WaQC)GcryaMHi4o1crb${2$P}>Rk~km`%h}H5xnW*jzJdX`Y&T4V za{w+tK<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vwG6ns8k7x$23f-%nq!Kt?ky GM)GfN<%gdD literal 0 HcmV?d00001 From 30a89363a3d5274efc40f6a4d0a5a9abbc135a95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 09:52:46 -0400 Subject: [PATCH 0262/3335] Update README.md --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 8521283c..9fe01cc4 100644 --- a/README.md +++ b/README.md @@ -1788,6 +1788,40 @@ ________________________________________________________________________________
+
+ 🔸OpenMediaVault LXC + +

+ +

OpenMediaVault LXC

+ +[OpenMediaVault](https://www.openmediavault.org/) is the next generation network attached storage (NAS) solution based on Debian Linux. + +To create a new Proxmox OpenMediaVault LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omv-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +**OpenMediaVault Interface - IP** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + openmediavault + ``` + +____________________________________________________________________________________________ + +
+
Navidrome LXC From 4bcec067e19e40d5105971154552a10913ed68e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 09:53:51 -0400 Subject: [PATCH 0263/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 33c2b4fd..2bf2047e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-20 + +### Changed + +- **OpenMediaVault LXC** + - NEW Script + ## 2022-09-16 ### Changed From 3d1c964d204b0a08d4afb94622b1f98d46e82905 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 12:37:36 -0400 Subject: [PATCH 0264/3335] Update pihole-install.sh Code refactoring --- setup/pihole-install.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index c27e7ea4..3d6a0e4d 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +export DEBIAN_FRONTEND=noninteractive YW=`echo "\033[33m"` RD=`echo "\033[01;31m"` BL=`echo "\033[36m"` @@ -76,8 +77,24 @@ apt-get install -y ntp &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Pi-hole" -wget -O tteck-install.sh https://install.pi-hole.net &>/dev/null -bash tteck-install.sh +mkdir -p /etc/pihole/ +cat < /etc/pihole/setupVars.conf +PIHOLE_INTERFACE=eth0 +PIHOLE_DNS_1=8.8.8.8 +PIHOLE_DNS_2=8.8.4.4 +QUERY_LOGGING=true +INSTALL_WEB_SERVER=true +INSTALL_WEB_INTERFACE=true +LIGHTTPD_ENABLED=true +CACHE_SIZE=10000 +DNS_FQDN_REQUIRED=true +DNS_BOGUS_PRIV=true +DNSMASQ_LISTENING=local +WEBPASSWORD=$(openssl rand -base64 48) +BLOCKING_ENABLED=true +EOF + +curl -sSL https://install.pi-hole.net | bash /dev/stdin --unattended &>/dev/null msg_ok "Installed Pi-hole" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -101,5 +118,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/tteck-install.sh msg_ok "Cleaned" From 94b7ef3ebb7c7dd13b9201cad35e98b254efc2e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 12:48:55 -0400 Subject: [PATCH 0265/3335] Update README.md --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9fe01cc4..4e410be7 100644 --- a/README.md +++ b/README.md @@ -1376,6 +1376,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v4.sh ⚠️ **Reboot Pi-hole LXC after install** +**Pi-hole Interface - http:// IP/admin** + ⚙️ **To set your password:** Run in the LXC console @@ -1383,12 +1385,6 @@ Run in the LXC console ```yaml pihole -a -p ``` -⚙️ **To Update Pi-hole:** - -```yaml -Update from the Pi-hole UI -``` - ____________________________________________________________________________________________
From 46d83226f8b1f9f0e2023e455bf21f55d3017a2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 13:03:29 -0400 Subject: [PATCH 0266/3335] Update mariadb-install.sh Make installing Adminer an option --- setup/mariadb-install.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index c9025669..15acb821 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -79,11 +79,21 @@ apt-get update >/dev/null apt-get install -y mariadb-server &>/dev/null msg_ok "Installed MariaDB" +read -r -p "Would you like to add Adminer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +ADMINER="Y" +else +ADMINER="N" +fi + +if [[ $ADMINER == "Y" ]]; then msg_info "Installing Adminer" sudo apt install adminer -y &>/dev/null sudo a2enconf adminer &>/dev/null sudo systemctl reload apache2 &>/dev/null msg_ok "Installed Adminer" +fi PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then @@ -106,7 +116,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -mkdir /var/log/apache2 -chmod 750 /var/log/apache2 msg_ok "Cleaned" From 9b5749b5da5ae5fc3703d60cb619c363ed6508cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 13:11:45 -0400 Subject: [PATCH 0267/3335] Update postgresql-install.sh Make installing Adminer an option --- setup/postgresql-install.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 175011f8..7d68b81d 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -971,11 +971,21 @@ EOF sudo systemctl restart postgresql msg_ok "Installed PostgreSQL" +read -r -p "Would you like to add Adminer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +ADMINER="Y" +else +ADMINER="N" +fi + +if [[ $ADMINER == "Y" ]]; then msg_info "Installing Adminer" sudo apt install adminer -y &>/dev/null sudo a2enconf adminer &>/dev/null sudo systemctl reload apache2 &>/dev/null msg_ok "Installed Adminer" +fi PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then @@ -997,7 +1007,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -mkdir /var/log/apache2 -chmod 750 /var/log/apache2 msg_ok "Cleaned" From 04a27156302f10f55a80170fdd66442c197d5ed4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 13:14:21 -0400 Subject: [PATCH 0268/3335] Update mariadb-v4.sh --- ct/mariadb-v4.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index 771db328..3187a6d1 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -250,5 +250,3 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "Adminer should be reachable by going to the following URL. - ${BL}http://${IP}/adminer/${CL} \n" From 90131ef6138c0d9bd9335c09a38972d64ad08d39 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 13:15:03 -0400 Subject: [PATCH 0269/3335] Update postgresql-v4.sh --- ct/postgresql-v4.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index 230fa91f..ef9302e0 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -251,5 +251,3 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "Adminer should be reachable by going to the following URL. - ${BL}http://${IP}/adminer/${CL} \n" From eb3d31193f49d64e49aea94275dc42942f53e820 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 13:21:27 -0400 Subject: [PATCH 0270/3335] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4e410be7..fc113c8e 100644 --- a/README.md +++ b/README.md @@ -619,6 +619,7 @@ ________________________________________________________________________________

MariaDB

Mariadb LXC

+

Option to Install Adminer

[MariaDB](https://mariadb.org/) is a community-developed, commercially supported fork of the MySQL relational database management system. @@ -736,6 +737,7 @@ ________________________________________________________________________________

PostgreSQL LXC

+

Option to Install Adminer

[PostgreSQL](https://www.postgresql.org/), also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance. From a1d426d81d3111b58e2ce082576ec578aebd560b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 02:35:37 -0400 Subject: [PATCH 0271/3335] Update jellyfin-v4.sh remove 22.04 as an option for now --- ct/jellyfin-v4.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index bee0357b..88334668 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -98,11 +98,10 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "21.10" "Impish" OFF \ -"22.04" "Jammy" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From e643fb6332cf07c8de1b5f4d9041d25e2e85875c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 02:38:51 -0400 Subject: [PATCH 0272/3335] Update emby-v4.sh remove 22.04 as an option for now --- ct/emby-v4.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 6ea1bcec..db03bdfa 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -98,11 +98,10 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "21.10" "Impish" OFF \ -"22.04" "Jammy" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From cf4685077320c29812908dd1a6e27a5b7fc70bf7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 02:39:36 -0400 Subject: [PATCH 0273/3335] Update plex-v4.sh remove 22.04 as an option for now --- ct/plex-v4.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index cad50e02..0cbeeb10 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -98,11 +98,10 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "21.10" "Impish" OFF \ -"22.04" "Jammy" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From 47e5cea8e51bb65ce7b109bb1a3d38cfdbb05508 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 08:00:55 -0400 Subject: [PATCH 0274/3335] Update podman-homeassistant-install.sh --- setup/podman-homeassistant-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index c5d9b23f..239ccee9 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -71,11 +71,11 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null -apt-get install -y runc &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Podman" apt-get -y install podman &>/dev/null +systemctl enable --now podman.socket &>/dev/null msg_ok "Installed Podman" msg_info "Pulling Yacht Image" @@ -145,5 +145,4 @@ systemctl enable yacht &>/dev/null msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" From 95537511399b2179af48e93f5ac610dac7cc5485 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 08:23:35 -0400 Subject: [PATCH 0275/3335] Update podman-homeassistant-install.sh --- setup/podman-homeassistant-install.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 239ccee9..9a2ca71f 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -78,6 +78,15 @@ apt-get -y install podman &>/dev/null systemctl enable --now podman.socket &>/dev/null msg_ok "Installed Podman" +read -r -p "Would you like to add Yacht (Semifunctional)? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +YACHT="Y" +else +YACHT="N" +fi + +if [[ $YACHT == "Y" ]]; then msg_info "Pulling Yacht Image" podman pull docker.io/selfhostedpro/yacht:latest &>/dev/null msg_ok "Pulled Yacht Image" @@ -94,8 +103,12 @@ podman run -d \ -v /etc/timezone:/etc/timezone:ro \ -p 8000:8000 \ selfhostedpro/yacht:latest &>/dev/null +podman generate systemd \ + --new --name yacht \ + > /etc/systemd/system/yacht.service +systemctl enable yacht &>/dev/null msg_ok "Installed Yacht" - +fi msg_info "Pulling Home Assistant Image" podman pull docker.io/homeassistant/home-assistant:stable &>/dev/null msg_ok "Pulled Home Assistant Image" @@ -137,11 +150,6 @@ podman generate systemd \ > /etc/systemd/system/homeassistant.service systemctl enable homeassistant &>/dev/null -podman generate systemd \ - --new --name yacht \ - > /etc/systemd/system/yacht.service -systemctl enable yacht &>/dev/null - msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null From e9658f3e3afa319d801accfee94f8514bd885cfc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 08:39:26 -0400 Subject: [PATCH 0276/3335] Update podman-homeassistant-install.sh --- setup/podman-homeassistant-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 9a2ca71f..9a885507 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -125,6 +125,10 @@ podman run -d \ -v /etc/timezone:/etc/timezone:ro \ --net=host \ homeassistant/home-assistant:stable &>/dev/null +podman generate systemd \ + --new --name homeassistant \ + > /etc/systemd/system/homeassistant.service +systemctl enable homeassistant &>/dev/null msg_ok "Installed Home Assistant" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -144,12 +148,7 @@ systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - -podman generate systemd \ - --new --name homeassistant \ - > /etc/systemd/system/homeassistant.service -systemctl enable homeassistant &>/dev/null - + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null From ac878833a922ae3a60f6f828e9676dae36d3ccc1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 12:22:29 -0400 Subject: [PATCH 0277/3335] Update post-install.sh --- misc/post-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/post-install.sh b/misc/post-install.sh index 73c32268..21654ffd 100644 --- a/misc/post-install.sh +++ b/misc/post-install.sh @@ -22,6 +22,12 @@ while true; do * ) echo "Please answer yes or no.";; esac done + +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "\n🛑 No PVE Detected, Wrong Script!\n" + exit 1 +fi + if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version: 7.XX${CL}" From 67f23a220b0847a3f95b5366f5edc6eabc2387fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 12:25:28 -0400 Subject: [PATCH 0278/3335] Create post-pbs-install.sh --- misc/post-pbs-install.sh | 126 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 misc/post-pbs-install.sh diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh new file mode 100644 index 00000000..c73c1cfb --- /dev/null +++ b/misc/post-pbs-install.sh @@ -0,0 +1,126 @@ +#!/usr/bin/env bash -ex +set -euo pipefail +shopt -s inherit_errexit nullglob +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +clear +echo -e "${BL}This script will Perform Post Install Routines.${CL}" +while true; do + read -p "Start the PBS Post Install Script (y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done + +if command -v pveversion >/dev/null 2>&1; then + echo -e "\n🛑 PVE Detected, Wrong Script!\n" + exit 1 +fi + +function header_info { +cat << "EOF" + ____ ____ _____ ____ __ ____ __ ____ + / __ \/ __ ) ___/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / __ \__ \ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / + / ____/ /_/ /__/ / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ /_____/____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + +EOF +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +clear +header_info +read -r -p "Disable Enterprise Repository? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Disabling Enterprise Repository" +sleep 2 +sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list +msg_ok "Disabled Enterprise Repository" +fi + +read -r -p "Add/Correct PBS Sources (sources.list)? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Adding or Correcting PBS Sources" +cat < /etc/apt/sources.list +deb http://ftp.debian.org/debian bullseye main contrib +deb http://ftp.debian.org/debian bullseye-updates main contrib +deb http://security.debian.org/debian-security bullseye-security main contrib +EOF +sleep 2 +msg_ok "Added or Corrected PBS Sources" +fi + +read -r -p "Enable No-Subscription Repository? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Enabling No-Subscription Repository" +cat <> /etc/apt/sources.list +deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription +EOF +sleep 2 +msg_ok "Enabled No-Subscription Repository" +fi + +read -r -p "Add (Disabled) Beta/Test Repository? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Adding Beta/Test Repository and set disabled" +cat <> /etc/apt/sources.list +# deb http://download.proxmox.com/debian/pbs bullseye pbstest +EOF +sleep 2 +msg_ok "Added Beta/Test Repository" +fi + +read -r -p "Disable Subscription Nag? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Disabling Subscription Nag" +echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script +apt --reinstall install proxmox-widget-toolkit &>/dev/null +msg_ok "Disabled Subscription Nag" +fi + +read -r -p "Update Proxmox Backup Server now? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Updating Proxmox Backup Server (Patience)" +apt-get update &>/dev/null +apt-get -y dist-upgrade &>/dev/null +msg_ok "Updated Proxmox Backup Server (⚠ Reboot Recommended)" +fi + +read -r -p "Reboot Proxmox Backup Server now? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +msg_info "Rebooting Proxmox Backup Server" +sleep 2 +msg_ok "Completed Post Install Routines" +reboot +fi + +sleep 2 +msg_ok "Completed Post Install Routines" From 3fa9f13f7074f0d39342e844dad05e3f662353fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 12:45:14 -0400 Subject: [PATCH 0279/3335] Rename post-install.sh to post-pve-install.sh --- misc/{post-install.sh => post-pve-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename misc/{post-install.sh => post-pve-install.sh} (100%) diff --git a/misc/post-install.sh b/misc/post-pve-install.sh similarity index 100% rename from misc/post-install.sh rename to misc/post-pve-install.sh From 53dadc68739b002d0f2f8c6f84cf77cd63ddb60b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 12:46:02 -0400 Subject: [PATCH 0280/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc113c8e..c915ba57 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 So Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-install.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)" ``` It's recommended to answer `y` to all options. From 934614619b3f410d41bcafbae272709fca74a67b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 13:20:08 -0400 Subject: [PATCH 0281/3335] Update README.md --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c915ba57..c019be3f 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,26 @@ ________________________________________________________________________________
+
+ 🔸Proxmox Backup Server Post Install + +

+ +

Proxmox Backup Server Post Install

+ +The script will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS. + +Run the following in the Proxmox Shell. ⚠️ **Proxmox Backup Server ONLY** + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pbs-install.sh)" +``` + +It's recommended to answer `y` to all options. + +____________________________________________________________________________________________ + +
Home Assistant OS VM From 14aaaa47e4afa44f0e7f497f70b3b7ec07eb5c89 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 13:55:26 -0400 Subject: [PATCH 0282/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2bf2047e..5e25d802 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-21 + +### Changed + +- **Proxmox Backup Server Post Install** + - NEW Script + ## 2022-09-20 ### Changed From 52364ed5d02150523c205e4f50cd2d470bf7a044 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 17:43:10 -0400 Subject: [PATCH 0283/3335] Update zwave-copy-data.sh --- misc/zwave-copy-data.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/misc/zwave-copy-data.sh b/misc/zwave-copy-data.sh index 728fbaf7..4b6de0d1 100644 --- a/misc/zwave-copy-data.sh +++ b/misc/zwave-copy-data.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Use to copy all data from one Zwavejs2MQTT LXC to another +# Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/zwave-copy-data.sh)" while true; do - read -p "Use to copy all data from one Zwavejs2MQTT LXC to another. Proceed(y/n)?" yn + read -p "Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -51,7 +51,7 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -TITLE="Zigbee2MQTT LXC Data Copy" +TITLE="Zigbee2MQTT to Z-wave JS UI Data Copy" while read -r line; do TAG=$(echo "$line" | awk '{print $1}') ITEM=$(echo "$line" | awk '{print substr($0,36)}') @@ -69,7 +69,7 @@ while [ -z "${CTID_FROM:+x}" ]; do done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Zwavejs2MQTT LXC would you like to copy TO?\n" \ + "\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done @@ -82,7 +82,7 @@ done whiptail --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) -Version: 2022.03.06" 13 50 || exit +Version: 2022.09.21" 13 50 || exit info "Zwavejs2MQTT Data from '$CTID_FROM' to '$CTID_TO'" if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then msg "Stopping '$CTID_TO'..." @@ -90,13 +90,14 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then fi msg "Mounting Container Disks..." DATA_PATH=/opt/zwavejs2mqtt/store/ +DATA_PATH_NEW=/opt/zwave-js-ui/store/ CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." [ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \ die "Zwavejs2MQTT directories in '$CTID_FROM' not found." CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] || \ die "Zwavejs2MQTT directories in '$CTID_TO' not found." #rm -rf ${CTID_TO_PATH}${DATA_PATH} @@ -111,8 +112,8 @@ RSYNC_OPTIONS=( --no-inc-recursive --info=progress2 ) -msg "<======== Zwavejs2MQTT Data ========>" -rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DATA_PATH} ${CTID_TO_PATH}${DATA_PATH} +msg "<======== Zwavejs Data ========>" +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DATA_PATH} ${CTID_TO_PATH}${DATA_PATH_NEW} echo -en "\e[1A\e[0K\e[1A\e[0K" info "Successfully Transferred Data." From 7d85d7de4570bf18fa28181496a984af38100641 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 17:48:01 -0400 Subject: [PATCH 0284/3335] Update and rename zwavejs2mqtt-update.sh to zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 39 ++++++++++++++++++++++++++ misc/zwavejs2mqtt-update.sh | 56 ------------------------------------- 2 files changed, 39 insertions(+), 56 deletions(-) create mode 100644 misc/zwave-js-ui-update.sh delete mode 100644 misc/zwavejs2mqtt-update.sh diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh new file mode 100644 index 00000000..f0948ee1 --- /dev/null +++ b/misc/zwave-js-ui-update.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +set -e +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +CM='\xE2\x9C\x94\033' +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +echo -en "${GN} Updating Z-wave JS UI... " +systemctl stop zwave-js-ui.service +cd /opt/zwavejs2mqtt +curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null +unzip zwave-js-ui-v*.zip zwave-js-ui &>/dev/null +echo -e "${CM}${CL} \r" + +echo -en "${GN} Cleanup... " +rm zwave-js-ui-v*.zip +systemctl --system daemon-reload +systemctl start zwave-js-ui.service +echo -e "${CM}${CL} \n" + +echo -e "${GN} Finished ${CL}" + diff --git a/misc/zwavejs2mqtt-update.sh b/misc/zwavejs2mqtt-update.sh deleted file mode 100644 index cf02af01..00000000 --- a/misc/zwavejs2mqtt-update.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -set -e -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -echo -en "${GN} Updating Zwavejs2MQTT... " -systemctl stop zwavejs2mqtt.service -cd /opt/zwavejs2mqtt -curl -s https://api.github.com/repos/zwave-js/zwavejs2mqtt/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null -unzip -o zwavejs2mqtt-v*.zip zwavejs2mqtt &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Checking Service... " -SERVICE=/etc/systemd/system/zwavejs2mqtt.service -cat < $SERVICE -[Unit] -Description=ZWavejs2MQTT -Wants=network-online.target -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/zwavejs2mqtt -ExecStart=/opt/zwavejs2mqtt/zwavejs2mqtt -[Install] -WantedBy=multi-user.target -EOF -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleanup... " -rm zwavejs2mqtt-v*.zip -systemctl --system daemon-reload -systemctl start zwavejs2mqtt.service -systemctl enable zwavejs2mqtt.service &>/dev/null -echo -e "${CM}${CL} \n" - -echo -e "${GN} Finished ${CL}" - From 855d5e3a9a7aeeb2a896aa6be0adc47e7cadb6e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 17:54:27 -0400 Subject: [PATCH 0285/3335] Update and rename zwavejs2mqtt-v4.sh to zwave-js-ui-v4.sh --- ct/{zwavejs2mqtt-v4.sh => zwave-js-ui-v4.sh} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename ct/{zwavejs2mqtt-v4.sh => zwave-js-ui-v4.sh} (94%) diff --git a/ct/zwavejs2mqtt-v4.sh b/ct/zwave-js-ui-v4.sh similarity index 94% rename from ct/zwavejs2mqtt-v4.sh rename to ct/zwave-js-ui-v4.sh index 56fe0f5c..ab9fc567 100644 --- a/ct/zwavejs2mqtt-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash echo -e "Loading..." -APP="Zwavejs2MQTT" +APP="Zwave-JS-UI" var_disk="4" var_cpu="2" var_ram="1024" @@ -43,14 +43,14 @@ else exit fi function header_info { -echo -e "${BL} - _____ _ ___ __ _______ ____________ -/__ /_ ______ __ _____ (_)___|__ \ / |/ / __ \/_ __/_ __/ - / /| | /| / / __ / | / / _ \ / / ___/_/ // /|_/ / / / / / / / / - / /_| |/ |/ / /_/ /| |/ / __/ / (__ ) __// / / / /_/ / / / / / -/____/__/|__/\__,_/ |___/\___/_/ /____/____/_/ /_/\___\_\/_/ v4/_/ - /___/ -${CL}" +cat << "EOF" + _____ _______ __ ______ +/__ /_ ______ __v4 _____ / / ___/ / / / / _/ + / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / + / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / +/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ + +EOF } function msg_info() { local msg="$1" From 2531e299daa30142c36ba1768681ec0071246903 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 17:55:58 -0400 Subject: [PATCH 0286/3335] Update and rename zwavejs2mqtt-install.sh to zwave-js-ui-install.sh --- ...mqtt-install.sh => zwave-js-ui-install.sh} | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) rename setup/{zwavejs2mqtt-install.sh => zwave-js-ui-install.sh} (81%) diff --git a/setup/zwavejs2mqtt-install.sh b/setup/zwave-js-ui-install.sh similarity index 81% rename from setup/zwavejs2mqtt-install.sh rename to setup/zwave-js-ui-install.sh index c439b9c8..8948e19b 100644 --- a/setup/zwavejs2mqtt-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -74,28 +74,28 @@ apt-get install -y sudo &>/dev/null apt-get install -y unzip &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing Zwavejs2MQTT" -mkdir /opt/zwavejs2mqtt -cd /opt/zwavejs2mqtt +msg_info "Installing Z-Wave JS UI" +mkdir /opt/zwave-js-ui +cd /opt/zwave-js-ui mkdir store -curl -s https://api.github.com/repos/zwave-js/zwavejs2mqtt/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null -unzip zwavejs2mqtt-v*.zip zwavejs2mqtt &>/dev/null -msg_ok "Installed Zwavejs2MQTT" +curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null +unzip zwave-js-ui-v*.zip zwave-js-ui &>/dev/null +msg_ok "Installed Z-Wave JS UI" msg_info "Creating Service" -service_path="/etc/systemd/system/zwavejs2mqtt.service" +service_path="/etc/systemd/system/zwave-js-ui.service" echo "[Unit] -Description=ZWavejs2MQTT +Description=zwave-js-ui Wants=network-online.target After=network-online.target [Service] User=root -WorkingDirectory=/opt/zwavejs2mqtt -ExecStart=/opt/zwavejs2mqtt/zwavejs2mqtt +WorkingDirectory=/opt/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui [Install] WantedBy=multi-user.target" > $service_path -systemctl start zwavejs2mqtt -systemctl enable zwavejs2mqtt &>/dev/null +systemctl start zwave-js-ui +systemctl enable zwave-js-ui &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -117,8 +117,7 @@ msg_ok "Customized Container" fi msg_info "Cleaning up" -rm zwavejs2mqtt-v*.zip +rm zwave-js-ui-v*.zip apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" From e5581a5f3fdec1def850914b69051d096ca89298 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 17:59:02 -0400 Subject: [PATCH 0287/3335] Update README.md --- README.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c019be3f..e7aea991 100644 --- a/README.md +++ b/README.md @@ -937,38 +937,37 @@ ________________________________________________________________________________
- Zwavejs2MQTT LXC + 🔸Z-Wave JS UI LXC -

+

Zwavejs2MQTT LXC

-[Zwavejs2MQTT](https://zwave-js.github.io/zwavejs2mqtt/#/) is a fully configurable Z-Wave to MQTT Gateway and Control Panel. +[Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui#) is a fully configurable Z-Wave to MQTT Gateway and Control Panel. -To create a new Proxmox Zwavejs2MQTT LXC, run the following in the Proxmox Shell. +To create a new Proxmox Z-Wave JS UI LXC, run the following in the Proxmox Shell. ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwavejs2mqtt-v4.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwave-js-ui-v4.sh)" ```

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

-**Zwavejs2MQTT Interface - IP:8091** +**Z-Wave JS UI Interface - IP:8091** -⚙️ **Copy Data From a Existing Zwavejs2MQTT LXC to another Zwavejs2MQTT LXC** +⚙️ **Copy Data From a Existing Zwavejs2MQTT LXC to a Z-Wave JS UI LXC** Run in the Proxmox Shell ```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-copy-data.sh)" ``` -⚙️ **To Update Zwavejs2MQTT** +⚙️ **To Update Z-Wave JS UI** Run in the LXC Console ```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwavejs2mqtt-update.sh)" +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-js-ui-update.sh)" ``` ____________________________________________________________________________________________ -
From 6f2c2fddd10ab152144968eba49369667d208ba6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Sep 2022 18:06:16 -0400 Subject: [PATCH 0288/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5e25d802..572a8e51 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,10 @@ All notable changes to this project will be documented in this file. - **Proxmox Backup Server Post Install** - NEW Script +- **Z-wave JS UI LXC** + - NEW Script (and all sub scripts 🤞) +- **Zwave2MQTT LXC** + - Bye Bye Script ## 2022-09-20 From 8c60ea7a952dfd5b8b3b8c90b5f722403c73a22a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 06:13:02 -0400 Subject: [PATCH 0289/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7aea991..b311d0c7 100644 --- a/README.md +++ b/README.md @@ -941,7 +941,7 @@ ________________________________________________________________________________

-

Zwavejs2MQTT LXC

+

Z-Wave JS UI LXC

[Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui#) is a fully configurable Z-Wave to MQTT Gateway and Control Panel. From e6e6e44e8a5c3f267c1ed5f04162d79adf791cf3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 06:20:26 -0400 Subject: [PATCH 0290/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b311d0c7..8e9978d2 100644 --- a/README.md +++ b/README.md @@ -939,7 +939,7 @@ ________________________________________________________________________________
🔸Z-Wave JS UI LXC -

+

Z-Wave JS UI LXC

From 487998c3eb3790945eecc1af13ad7e41fca9ff50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 12:14:59 -0400 Subject: [PATCH 0291/3335] Update trilium-update.sh --- misc/trilium-update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/trilium-update.sh b/misc/trilium-update.sh index 9220c2d7..eb9a1d88 100644 --- a/misc/trilium-update.sh +++ b/misc/trilium-update.sh @@ -36,10 +36,10 @@ sleep 1 echo -e "${GN} Updating to v${RELEASE}... ${CL}" wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -tar -xzf trilium-linux-x64-server-$RELEASE.tar.xz -C /opt/trilium &>/dev/null - +tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null +cp -r trilium-linux-x64-server/* /opt/trilium/ echo -e "${GN} Cleaning up... ${CL}" -rm trilium-linux-x64-server-$RELEASE.tar.xz +rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server echo -e "${GN} Starting Trilium... ${CL}" systemctl start trilium.service From 24bb0654812b685203ce72ea03867b82255d6c30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 20:26:23 -0400 Subject: [PATCH 0292/3335] Create nextcloudpi-v4.sh --- ct/nextcloudpi-v4.sh | 255 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 ct/nextcloudpi-v4.sh diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh new file mode 100644 index 00000000..0985a708 --- /dev/null +++ b/ct/nextcloudpi-v4.sh @@ -0,0 +1,255 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="NextCloudPi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + _ __ __ ________ ______ _ + / | / /__ _ __/ /_/ ____/ /___ __v4______/ / __ \(_) + / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / + / /| / __/> &1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}https://${IP}/${CL} \n" From a00a9c532e327959adb7a016f8eaca28af868b6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 20:27:27 -0400 Subject: [PATCH 0293/3335] Create nextcloudpi-install.sh --- setup/nextcloudpi-install.sh | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 setup/nextcloudpi-install.sh diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh new file mode 100644 index 00000000..5d8d1555 --- /dev/null +++ b/setup/nextcloudpi-install.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing NextCloudPi (Patience)" +curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null +msg_ok "Installed NextCloudPi" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 873e91fab2bf76a5f0d374d8474665455f33ec7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 20:42:06 -0400 Subject: [PATCH 0294/3335] Update README.md --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 8e9978d2..22fe7a3c 100644 --- a/README.md +++ b/README.md @@ -1805,6 +1805,37 @@ ________________________________________________________________________________
+
+ 🔸NextCloudPi LXC + +

+ +

NextCloudPi LXC

+ +[NextCloudPi LXC](https://github.com/nextcloud/nextcloudpi#features) is the most popular self-hosted collaboration solution. + +To create a new Proxmox NextCloudPi LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nextcloudpi-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +❗1️. Set nc trusted domains + +Run in the LXC console +``` +sudo ncp-config +``` +Go to config ➡ nc-trusted-domains, add 0.0.0.0 or a static NextCloudPi IP + +Get back to the command prompt, and restart Apache2 `sudo service apache2 restart` + +❗2. **NextCloudPi Interface - https:// IP/** +____________________________________________________________________________________________ + +
+
🔸OpenMediaVault LXC From 89de8fd7dce81a75de08329f2234c9ca57dcbd3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 20:43:19 -0400 Subject: [PATCH 0295/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 572a8e51..e9209399 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-22 + +### Changed + +- **NextCloudPi LXC** + - NEW Script + ## 2022-09-21 ### Changed From 24b736dcb9dedb6b8c22edb97b80722de1bc9a6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 20:44:36 -0400 Subject: [PATCH 0296/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22fe7a3c..f0f1c399 100644 --- a/README.md +++ b/README.md @@ -1526,7 +1526,7 @@ ________________________________________________________________________________
- 🔸Paperless-ngx LXC + Paperless-ngx LXC

From 933841040a7cb9fbca91ecc2d7b9ec3b444c6b76 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 20:57:30 -0400 Subject: [PATCH 0297/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0f1c399..d5f483c6 100644 --- a/README.md +++ b/README.md @@ -1827,7 +1827,7 @@ Run in the LXC console ``` sudo ncp-config ``` -Go to config ➡ nc-trusted-domains, add 0.0.0.0 or a static NextCloudPi IP +Go to config ➡ nc-trusted-domains, add `0.0.0.0` or a static NextCloudPi IP Get back to the command prompt, and restart Apache2 `sudo service apache2 restart` From d3d5418a1b3ccf3f7083ada6b58c7e533cbe472f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Sep 2022 21:17:54 -0400 Subject: [PATCH 0298/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d5f483c6..7165704b 100644 --- a/README.md +++ b/README.md @@ -1832,6 +1832,7 @@ Go to config ➡ nc-trusted-domains, add `0.0.0.0` or a static NextCloudPi IP Get back to the command prompt, and restart Apache2 `sudo service apache2 restart` ❗2. **NextCloudPi Interface - https:// IP/** + ____________________________________________________________________________________________
From 7b736bce6d8740f38ed03863c03508381d1e4e63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 09:18:20 -0400 Subject: [PATCH 0299/3335] Update omv-v4.sh --- ct/omv-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index c03834b1..bff9e4db 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -70,7 +70,7 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" From 9cca4a56ce1d645fe4a4f966eb1a3ae1e5f53680 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 09:19:59 -0400 Subject: [PATCH 0300/3335] Update nextcloudpi-v4.sh --- ct/nextcloudpi-v4.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index 0985a708..22fed957 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -70,8 +70,8 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -98,8 +98,8 @@ function default_settings() { } function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ +"1" "Unprivileged" OFF \ +"0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From 5ce5d916658330bc7e271f59757167dac414cd3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 12:12:58 -0400 Subject: [PATCH 0301/3335] maintenance (#543) --- setup/adguard-install.sh | 1 - setup/casaos-install.sh | 1 - setup/daemonsync-install.sh | 1 - setup/dashy-install.sh | 1 - setup/debian-install.sh | 1 - setup/deconz-install.sh | 1 - setup/docker-install.sh | 1 - setup/emby-install.sh | 1 - setup/esphome-install.sh | 1 - setup/grafana-install.sh | 1 - setup/grocy-install.sh | 2 +- setup/heimdalldashboard-install.sh | 1 - setup/homeassistant-install.sh | 1 - setup/homebridge-install.sh | 1 - setup/homepage-install.sh | 1 - setup/influxdb-install.sh | 1 - setup/iobroker-install.sh | 1 - setup/jellyfin-install.sh | 1 - setup/keycloak-install.sh | 1 - setup/magicmirror-install.sh | 1 - setup/meshcentral-install.sh | 1 - setup/motioneye-install.sh | 1 - setup/mqtt-install.sh | 1 - setup/n8n-install.sh | 1 - setup/navidrome-install.sh | 2 +- setup/nginx-proxy-manager-install.sh | 1 - setup/nocodb-install.sh | 1 - setup/node-red-install.sh | 1 - setup/omada-install.sh | 1 - setup/openhab-install.sh | 1 - setup/plex-install.sh | 1 - setup/prometheus-install.sh | 2 +- setup/syncthing-install.sh | 1 - setup/technitiumdns-install.sh | 1 - setup/trilium-install.sh | 2 +- setup/ubuntu-install.sh | 1 - setup/unifi-install.sh | 1 - setup/uptimekuma-install.sh | 1 - setup/vaultwarden-install.sh | 1 - setup/whoogle-install.sh | 1 - setup/wikijs-install.sh | 1 - setup/wireguard-install.sh | 1 - setup/zigbee2mqtt-install.sh | 1 - 43 files changed, 4 insertions(+), 43 deletions(-) diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index 61be5518..080e2cff 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -98,5 +98,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index 634a00e7..8ee90a70 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -107,5 +107,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index 35957afc..e3bd458d 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -100,5 +100,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 8267f380..7485178e 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -131,5 +131,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 84f28bfa..bc9f39cb 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -92,5 +92,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index 1cb64ebb..bc6f0c0c 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -124,5 +124,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 1780dcfd..c4234aed 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -152,5 +152,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 0ba9b200..5a448e55 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -111,5 +111,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 1f4323be..8d0aab4e 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -120,5 +120,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 9803f66a..6503d3f1 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -109,5 +109,4 @@ systemctl enable grafana-server.service &>/dev/null msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 66317825..32ca846b 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -128,5 +128,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/cache/* /root/latest +rm -rf /root/latest msg_ok "Cleaned" diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index c70347a4..d4b509f7 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -131,5 +131,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 80e53aba..35617ab0 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -334,5 +334,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 8678c607..033a52b5 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -110,5 +110,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 833d35a6..8adb85c9 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -128,5 +128,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 6495809f..0dc32e13 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -111,5 +111,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 7ba4a65f..ab65830e 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -98,5 +98,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index d0a32cd4..f7f3576e 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -136,5 +136,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index 06c679f6..0c86f4fa 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -119,5 +119,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 0c903cd2..64dce914 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -221,5 +221,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 0221f817..eb2e219f 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -109,5 +109,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index 2229ac30..ff8afa47 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -128,5 +128,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index ade1c168..db9331d9 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -105,5 +105,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 9adffc10..322064c0 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -121,5 +121,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index 21d44e78..6a50e363 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -147,5 +147,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/Navidrome.tar.gz +rm -rf /root/Navidrome.tar.gz msg_ok "Cleaned" diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 2f9b21b0..4861405e 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -259,5 +259,4 @@ msg_ok "Started Services" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index ae27d97c..57083bb8 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -127,5 +127,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 180daf92..f9d90389 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -100,5 +100,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 4260e995..6c2dde53 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -103,5 +103,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 4ec66d79..1dec802f 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -115,5 +115,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/plex-install.sh b/setup/plex-install.sh index be02e9a4..90e21271 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -115,6 +115,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 2da05e62..378a8ab5 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -127,5 +127,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/prometheus-2.36.2.linux-amd64 /root/prometheus-2.36.2.linux-amd64.tar.gz +rm -rf /root/prometheus-2.36.2.linux-amd64 /root/prometheus-2.36.2.linux-amd64.tar.gz msg_ok "Cleaned" diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index 2b09475a..a9d942bc 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -101,5 +101,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 48650070..907c7e2f 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -98,5 +98,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index 36524370..8b259725 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -122,5 +122,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* /root/trilium-linux-x64-server-$RELEASE.tar.xz +rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz msg_ok "Cleaned" diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 5514c920..4abacf6d 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -93,5 +93,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 8e899809..49ebf87d 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -107,5 +107,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index b29954f1..f8663bfc 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -127,5 +127,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 3f18807a..2f9e90c7 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -183,5 +183,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index e7854c82..0a653770 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -114,5 +114,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 8866f812..db684221 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -143,5 +143,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index d295d4db..f9af0201 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -157,5 +157,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 910da0fe..944e2981 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -132,5 +132,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* msg_ok "Cleaned" From 3ce3c22681c9b29d7a901e45e1b997f0a4ccf937 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:29:04 -0400 Subject: [PATCH 0302/3335] Create emqx-v4.sh --- ct/emqx-v4.sh | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 ct/emqx-v4.sh diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh new file mode 100644 index 00000000..4cf17014 --- /dev/null +++ b/ct/emqx-v4.sh @@ -0,0 +1,255 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="EMQX" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + ________ _______v4 _ __ + / ____/ |/ / __ \ | |/ / + / __/ / /|_/ / / / / | / + / /___/ / / / /_/ / / | +/_____/_/ /_/\___\_\/_/|_| + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +else + exit +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +else + exit +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +else + exit +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +else + exit +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +else + exit +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +else + exit +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:18083${CL} \n" From 74ae3b9036da3e80bf83bd24acfb318bcdcb9a78 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:30:06 -0400 Subject: [PATCH 0303/3335] Create emqx-install.sh --- setup/emqx-install.sh | 102 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 setup/emqx-install.sh diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh new file mode 100644 index 00000000..b7bce533 --- /dev/null +++ b/setup/emqx-install.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y gnupg &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing EMQX" +wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +msg_ok "Installed EMQX" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" +systemctl start emqx From 7b38267b3420ab4ce783d8f0fd7b5290d8d01a0d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:40:41 -0400 Subject: [PATCH 0304/3335] Update README.md --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 7165704b..20012f39 100644 --- a/README.md +++ b/README.md @@ -560,6 +560,41 @@ ________________________________________________________________________________
+
+ 🔸EMQX LXC + +

hero

+ + +

EMQX LXC

+ +[EMQX](https://www.emqx.io/) is an Open-source MQTT broker with a high-performance real-time message processing engine, powering event streaming for IoT devices at massive scale. + +To create a new Proxmox EMQX LXC Container, run the following in the Proxmox Shell. + +```yaml + bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emqx-v4.sh)" +``` +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ + +**EMQX Interface - IP:18083** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + public + ``` +***More info to come when someone figures it out*** ッ + ____________________________________________________________________________________________ + +
+
Node-Red LXC From 25f1cde0170cd46c1885a984fdba51d522d4bf3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:41:35 -0400 Subject: [PATCH 0305/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index e9209399..72be5984 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-23 + +### Changed + +- **EMQX LXC** + - NEW Script + ## 2022-09-22 ### Changed From 9324a97796fb022a9f7b83eedd0a747fd681272f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:47:25 -0400 Subject: [PATCH 0306/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20012f39..6e4627e8 100644 --- a/README.md +++ b/README.md @@ -563,7 +563,7 @@ ________________________________________________________________________________
🔸EMQX LXC -

hero

+

EMQX LXC

From 5bc0ab338222f060ecef08c57c1c1e6a87f97018 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:49:43 -0400 Subject: [PATCH 0307/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6e4627e8..c730bc19 100644 --- a/README.md +++ b/README.md @@ -591,6 +591,7 @@ To create a new Proxmox EMQX LXC Container, run the following in the Proxmox She public ``` ***More info to come when someone figures it out*** ッ + ____________________________________________________________________________________________
From 07a8a57c5cf4ac072611e7593ea070fc4a903d8a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 17:57:56 -0400 Subject: [PATCH 0308/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c730bc19..d33cc60d 100644 --- a/README.md +++ b/README.md @@ -570,7 +570,7 @@ ________________________________________________________________________________ [EMQX](https://www.emqx.io/) is an Open-source MQTT broker with a high-performance real-time message processing engine, powering event streaming for IoT devices at massive scale. -To create a new Proxmox EMQX LXC Container, run the following in the Proxmox Shell. +To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell. ```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emqx-v4.sh)" From 87560b475f52b632d07e1e5e97a4c6ac699610c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 18:10:37 -0400 Subject: [PATCH 0309/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d33cc60d..ea6e6373 100644 --- a/README.md +++ b/README.md @@ -578,7 +578,7 @@ To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell.

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

-**EMQX Interface - IP:18083** +**EMQX Interface - IP:18083** (If the web UI doesn't load, reboot the LXC) ⚙️ **Initial Login** From 24601051775b2b01614a36abd6d8f9f2bb1695be Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 23:40:07 -0400 Subject: [PATCH 0310/3335] Update emqx-install.sh --- setup/emqx-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index b7bce533..5c6b42ab 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,8 +74,9 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash +sudo apt-get install -y emqx +sudo emqx start msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -99,4 +100,3 @@ msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null msg_ok "Cleaned" -systemctl start emqx From fb649c3899450373f63f5e6b9050f70c8e6d2c8a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Sep 2022 23:50:25 -0400 Subject: [PATCH 0311/3335] Update emqx-install.sh --- setup/emqx-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 5c6b42ab..4a6ed62a 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,9 +74,9 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash -sudo apt-get install -y emqx -sudo emqx start +curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null +sudo apt-get install -y emqx &>/dev/null +sudo emqx start &>/dev/null msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6); From 4c547cf1bdd8fe9321c26c7f42dc4ef7ca6270cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Sep 2022 00:04:34 -0400 Subject: [PATCH 0312/3335] Update emqx-install.sh --- setup/emqx-install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 4a6ed62a..69ee6b25 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,9 +74,12 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null -sudo apt-get install -y emqx &>/dev/null -sudo emqx start &>/dev/null +#curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null +#sudo apt-get install -y emqx &>/dev/null +#sudo emqx start &>/dev/null +wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +systemctl start emqx msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6); From 104d35e999ab5bcbceaabb339a6811b79303fbb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Sep 2022 00:30:23 -0400 Subject: [PATCH 0313/3335] Update README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea6e6373..24efdac7 100644 --- a/README.md +++ b/README.md @@ -578,7 +578,7 @@ To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell.

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

-**EMQX Interface - IP:18083** (If the web UI doesn't load, reboot the LXC) +**EMQX Interface - IP:18083** ⚙️ **Initial Login** @@ -590,7 +590,16 @@ To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell. ```yaml public ``` -***More info to come when someone figures it out*** ッ +⚙️ **Setup** + +Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker. + +⚙️ **To Update EMQX** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` ____________________________________________________________________________________________ From 4078e67dad608d74dcd1dc02ecf522e64a2c991b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Sep 2022 00:39:40 -0400 Subject: [PATCH 0314/3335] Update emqx-install.sh --- setup/emqx-install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 69ee6b25..4947a0cc 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,12 +74,12 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -#curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null -#sudo apt-get install -y emqx &>/dev/null -#sudo emqx start &>/dev/null -wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null -systemctl start emqx +curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null +sudo apt-get install -y emqx &>/dev/null +sudo emqx start &>/dev/null +#wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +#apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +#systemctl start emqx msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -102,4 +102,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null +rm -rf emqx-5.0.8-debian11-amd64.deb msg_ok "Cleaned" From 0060499d74050742bb341109452a199d71425072 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Sep 2022 04:13:18 -0400 Subject: [PATCH 0315/3335] Update emqx-install.sh --- setup/emqx-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 4947a0cc..5d7c25ae 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,12 +74,12 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null -sudo apt-get install -y emqx &>/dev/null -sudo emqx start &>/dev/null -#wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -#apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null -#systemctl start emqx +#curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null +#sudo apt-get install -y emqx &>/dev/null +#sudo emqx start &>/dev/null +wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +systemctl start emqx msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6); From af5172beaf6d8092fb72ca98fdde81a3cb554fa7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Sep 2022 12:15:15 -0400 Subject: [PATCH 0316/3335] Update emqx-install.sh --- setup/emqx-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 5d7c25ae..c2894145 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,11 +74,11 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -#curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | sudo bash &>/dev/null -#sudo apt-get install -y emqx &>/dev/null +curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | bash &>/dev/null +apt-get install -y emqx &>/dev/null #sudo emqx start &>/dev/null -wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +#wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +#apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null systemctl start emqx msg_ok "Installed EMQX" From 050268ad7aaf2d9aed5e0416b973a57b88cf75e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Sep 2022 12:19:12 -0400 Subject: [PATCH 0317/3335] Update emqx-install.sh --- setup/emqx-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index c2894145..aef1b4c7 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,11 +74,11 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | bash &>/dev/null -apt-get install -y emqx &>/dev/null +#curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | bash &>/dev/null +#apt-get install -y emqx &>/dev/null #sudo emqx start &>/dev/null -#wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -#apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null systemctl start emqx msg_ok "Installed EMQX" From cb33d1b2043f8d5103ff1b17462fa5700898ac24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Sep 2022 14:38:42 -0400 Subject: [PATCH 0318/3335] Update emqx-install.sh --- setup/emqx-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index aef1b4c7..3dc6c6c0 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -74,11 +74,11 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" -#curl -s https://assets.emqx.com/scripts/install-emqx-deb.sh | bash &>/dev/null -#apt-get install -y emqx &>/dev/null +curl -s https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh | bash &>/dev/null +sudo apt-get install -y emqx=5.0.8 &>/dev/null #sudo emqx start &>/dev/null -wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null +#wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null +#apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null systemctl start emqx msg_ok "Installed EMQX" From 0011c04cd3ef6f2279ce15918726dfcdd1de6677 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Sep 2022 14:45:28 -0400 Subject: [PATCH 0319/3335] Update emqx-install.sh --- setup/emqx-install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 3dc6c6c0..0694ad1f 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -70,15 +70,11 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing EMQX" curl -s https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh | bash &>/dev/null sudo apt-get install -y emqx=5.0.8 &>/dev/null -#sudo emqx start &>/dev/null -#wget https://www.emqx.com/en/downloads/broker/5.0.8/emqx-5.0.8-debian11-amd64.deb &>/dev/null -#apt install ./emqx-5.0.8-debian11-amd64.deb &>/dev/null systemctl start emqx msg_ok "Installed EMQX" From 7f4efd1d8ef9237770e27c957dddf8ae04aa4db8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Sep 2022 14:51:45 -0400 Subject: [PATCH 0320/3335] Update emqx-install.sh --- setup/emqx-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 0694ad1f..dc3e224b 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -98,5 +98,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf emqx-5.0.8-debian11-amd64.deb msg_ok "Cleaned" From 2de6ed9d48a9d2fcf183ea05f2b500220d0906f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Sep 2022 17:58:46 -0400 Subject: [PATCH 0321/3335] Update paperless-ngx-install.sh fix install issue with 1.9.0 --- setup/paperless-ngx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 2f424f81..c1c2640b 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -82,6 +82,7 @@ apt-get install -y --no-install-recommends \ mime-support \ libzbar0 \ poppler-utils \ + default-libmysqlclient-dev \ sudo &>/dev/null msg_ok "Installed Paperless-ngx Dependencies" From 8a64b5728a4f6dc17fd6bc28d66c3b7063175495 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Sep 2022 20:28:39 -0400 Subject: [PATCH 0322/3335] Update paperless-ngx-update.sh Change migrate to long path --- misc/paperless-ngx-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 9d515ac3..daaecda5 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -60,8 +60,8 @@ cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless pip install -r requirements.txt &>/dev/null -cd src -python3 manage.py migrate &>/dev/null +cd /opt/paperless/src +/usr/bin/python3 manage.py migrate &>/dev/null msg_ok "Updated to ${RELEASE}" msg_info "Cleaning up" From 2252e28a6af6f4ca5fa1d2e354d41c7cbae44368 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Sep 2022 11:46:53 -0400 Subject: [PATCH 0323/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index f0948ee1..e479fc5f 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -24,7 +24,7 @@ function error_exit() { echo -en "${GN} Updating Z-wave JS UI... " systemctl stop zwave-js-ui.service -cd /opt/zwavejs2mqtt +cd /opt/zwave-js-ui curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null unzip zwave-js-ui-v*.zip zwave-js-ui &>/dev/null echo -e "${CM}${CL} \r" From 46566025aec9fab72f980f82f864117d2ebd79c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Sep 2022 12:14:20 -0400 Subject: [PATCH 0324/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24efdac7..fce222bf 100644 --- a/README.md +++ b/README.md @@ -1883,7 +1883,7 @@ ________________________________________________________________________________
- 🔸OpenMediaVault LXC + OpenMediaVault LXC

From f7a65716046972984452cfabc2c87cfdd3cae9ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Sep 2022 02:25:48 -0400 Subject: [PATCH 0325/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fce222bf..2a9ae449 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ________________________________________________________________________________
- 🔸Proxmox Backup Server Post Install + Proxmox Backup Server Post Install

@@ -982,7 +982,7 @@ ________________________________________________________________________________
- 🔸Z-Wave JS UI LXC + Z-Wave JS UI LXC

From 1e8ac7e63e4eed34fe7faefd6f10ae73ede9e3a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Sep 2022 08:16:38 -0400 Subject: [PATCH 0326/3335] maintenance (#569) update whiptail menu --- ct/adguard-v4.sh | 68 ++++++++++++---------------- ct/casaos-v4.sh | 68 ++++++++++++---------------- ct/daemonsync-v4.sh | 68 ++++++++++++---------------- ct/dashy-v4.sh | 68 ++++++++++++---------------- ct/debian-v4.sh | 68 ++++++++++++---------------- ct/deconz-v4.sh | 84 +++++++++++++---------------------- ct/docker-v4.sh | 68 ++++++++++++---------------- ct/emby-v4.sh | 74 +++++++++++++----------------- ct/emqx-v4.sh | 68 ++++++++++++---------------- ct/esphome-v4.sh | 68 ++++++++++++---------------- ct/grafana-v4.sh | 68 ++++++++++++---------------- ct/grocy-v4.sh | 68 ++++++++++++---------------- ct/heimdalldashboard-v4.sh | 68 ++++++++++++---------------- ct/homeassistant-v4.sh | 68 ++++++++++++---------------- ct/homebridge-v4.sh | 68 ++++++++++++---------------- ct/homepage-v4.sh | 68 ++++++++++++---------------- ct/influxdb-v4.sh | 68 ++++++++++++---------------- ct/iobroker-v4.sh | 68 ++++++++++++---------------- ct/jellyfin-v4.sh | 74 +++++++++++++----------------- ct/keycloak-v4.sh | 68 ++++++++++++---------------- ct/magicmirror-v4.sh | 68 ++++++++++++---------------- ct/mariadb-v4.sh | 68 ++++++++++++---------------- ct/meshcentral-v4.sh | 68 ++++++++++++---------------- ct/motioneye-v4.sh | 68 ++++++++++++---------------- ct/mqtt-v4.sh | 68 ++++++++++++---------------- ct/n8n-v4.sh | 68 ++++++++++++---------------- ct/navidrome-v4.sh | 68 ++++++++++++---------------- ct/nextcloudpi-v4.sh | 72 +++++++++++++----------------- ct/nginx-proxy-manager-v4.sh | 68 ++++++++++++---------------- ct/nocodb-v4.sh | 68 ++++++++++++---------------- ct/node-red-v4.sh | 68 ++++++++++++---------------- ct/omada-v4.sh | 74 +++++++++++++----------------- ct/omv-v4.sh | 72 +++++++++++++----------------- ct/openhab-v4.sh | 68 ++++++++++++---------------- ct/paperless-ngx-v4.sh | 68 ++++++++++++---------------- ct/photoprism-v4.sh | 68 ++++++++++++---------------- ct/pihole-v4.sh | 72 +++++++++++++----------------- ct/plex-v4.sh | 74 +++++++++++++----------------- ct/podman-homeassistant-v4.sh | 72 +++++++++++++----------------- ct/postgresql-v4.sh | 68 ++++++++++++---------------- ct/prometheus-v4.sh | 68 ++++++++++++---------------- ct/syncthing-v4.sh | 68 ++++++++++++---------------- ct/technitiumdns-v4.sh | 68 ++++++++++++---------------- ct/trilium-v4.sh | 68 ++++++++++++---------------- ct/ubuntu-v4.sh | 74 +++++++++++++----------------- ct/unifi-v4.sh | 68 ++++++++++++---------------- ct/uptimekuma-v4.sh | 68 ++++++++++++---------------- ct/vaultwarden-v4.sh | 68 ++++++++++++---------------- ct/whoogle-v4.sh | 68 ++++++++++++---------------- ct/wikijs-v4.sh | 68 ++++++++++++---------------- ct/wireguard-v4.sh | 68 ++++++++++++---------------- ct/zigbee2mqtt-v4.sh | 68 ++++++++++++---------------- ct/zwave-js-ui-v4.sh | 68 ++++++++++++---------------- 53 files changed, 1552 insertions(+), 2114 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index e54d84aa..d0f3d6a9 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 344b3534..4458f5c5 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 07334f6a..a22b3961 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 07232766..4e95a911 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index ddc48a91..c440df07 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index c7a671bf..06cc25ad 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -97,29 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -"18.04" "Bionic" OFF \ -"20.04" "Focal" ON \ -"21.10" "Impish" OFF \ -"22.04" "Jammy" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit -fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -129,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -190,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -200,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -210,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -220,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index 5534f38a..a7357282 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index db03bdfa..e90725f1 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -104,22 +104,16 @@ var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 "21.10" "Impish" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit -fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -129,58 +123,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -190,7 +176,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -200,7 +186,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -210,7 +196,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -220,7 +206,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index 4cf17014..5e7f2885 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index 9172c085..e3174370 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index d2622f59..58ce46cf 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 54755899..09972d1a 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 4c534619..4a3ce6e5 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 3b2083ad..2a521357 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index abbee6a9..7b3e7ddf 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 97df3d81..3b2d63de 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 7f9f991e..3ab809b5 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 364cf6e1..71bfa4ae 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 88334668..76421a3c 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -104,22 +104,16 @@ var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 "21.10" "Impish" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit -fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -129,58 +123,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -190,7 +176,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -200,7 +186,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -210,7 +196,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -220,7 +206,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 2c5db5a9..966edbe8 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 06aee016..cfc67cfc 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index 3187a6d1..2b4820ae 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 602a6db5..325b2b68 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 7a53e637..8069c1b0 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 899552a9..7210af65 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index d683c6fd..496e626d 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 4cb19868..446f1b22 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index 22fed957..f39b2a59 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index bea15edf..f99bb2e4 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 050e5ff9..4cdfe3f5 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 9230148b..33400099 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index f4f1a9af..3a2c7abc 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -104,22 +104,16 @@ var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 "22.04" "Jammy" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit -fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -129,58 +123,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -190,7 +176,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -200,7 +186,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -210,7 +196,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -220,7 +206,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index bff9e4db..0e84cfb6 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index e724c8e3..8e16f806 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 69f151d4..58e2a0b5 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index cbfa9b92..0b1825cf 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index d917e1f5..70252cbb 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index 0cbeeb10..eeed0cca 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -104,22 +104,16 @@ var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 "21.10" "Impish" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit -fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -129,58 +123,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -190,7 +176,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -200,7 +186,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -210,7 +196,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -220,7 +206,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 55efec47..2557a709 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -100,17 +100,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -120,58 +118,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -181,7 +171,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -191,7 +181,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -201,7 +191,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -211,7 +201,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index ef9302e0..dd29509b 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 587412e9..e8765aad 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index 27d73050..10c55f42 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -98,17 +98,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -118,58 +116,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -179,7 +169,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -189,7 +179,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -199,7 +189,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -209,7 +199,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index e7f78fd4..d23f72c2 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index 8dc66c67..c9b9baba 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index f485ca4e..fca16b27 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -104,22 +104,16 @@ var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 "22.04" "Jammy" ON \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit -fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -129,58 +123,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -190,7 +176,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -200,7 +186,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -210,7 +196,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -220,7 +206,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index d6f7b954..2f204933 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index 4f7f4e3b..4c4a2761 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index 02b0f684..cac70cf7 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 21a1ecdf..6adc5170 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -96,17 +96,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -116,58 +114,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -177,7 +167,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -187,7 +177,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -197,7 +187,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -207,7 +197,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index b41e5a4a..38c99f5a 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 564dd218..98c074ac 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -98,17 +98,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -118,58 +116,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -179,7 +169,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -189,7 +179,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -199,7 +189,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -209,7 +199,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 48fcc97f..14057e7a 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID?" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index ab9fc567..a56a065c 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -97,17 +97,15 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -117,58 +115,50 @@ else echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3) +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3) +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3) +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -else - exit fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $GATE1 ]; then GATE1="Default" GATE=""; @@ -178,7 +168,7 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then MAC1="Default" MAC=""; @@ -188,7 +178,7 @@ else echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -198,7 +188,7 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -208,7 +198,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings From 9fce615c4b260bf1e4c20505e32259abf59f0727 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Sep 2022 16:28:22 -0400 Subject: [PATCH 0327/3335] Update webmin.sh update starting version --- misc/webmin.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/webmin.sh b/misc/webmin.sh index 080b5611..d5dca0de 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -22,19 +22,19 @@ apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl unzip sh echo -e "${CM}${CL} \r" echo -en "${GN} Downloading Webmin... " -wget http://prdownloads.sourceforge.net/webadmin/webmin_1.996_all.deb &>/dev/null +wget http://prdownloads.sourceforge.net/webadmin/webmin_2.000_all.deb &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Installing Webmin... " -dpkg --install webmin_1.996_all.deb &>/dev/null +dpkg --install webmin_2.000_all.deb &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Setting Default Webmin usermame & password to root... " /usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null -rm -rf /root/webmin_1.996_all.deb +rm -rf /root/webmin_2.000_all.deb echo -e "${CM}${CL} \r" IP=$(hostname -I | cut -f1 -d ' ') -echo -e "${BL} Successfully Installed Webmin, Now Go To https://${IP}:10000 ${CL}" +echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000" # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/webmin.sh)" From 0890cfffe48642ffa9e9f17de7137f7887825cea Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Sep 2022 21:26:54 -0400 Subject: [PATCH 0328/3335] Update haos-vm-v4.sh update whiptail menu --- vm/haos-vm-v4.sh | 70 ++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 8eb97bbc..c164c30c 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -64,12 +64,12 @@ else fi function header_info { echo -e "${HA} - __ _____ ____ _____ - / / / / | / __ \/ ___/ - / /_/ / /| |/ / / /\__ \ - / __ / ___ / /_/ /___/ / -/_/ /_/_/v4|_\____//____/ - Home Assistant OS + __ __ ___ ____ _____ + / / / // |v4/ __ \/ ___/ + / /_/ // /| | / / / /\__ \ + / __ // ___ |/ /_/ /___/ / +/_/ /_//_/ |_|\____//____/ + Home Assistant OS ${CL}" } function msg_info() { @@ -107,62 +107,50 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 3 \ +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$STABLE" "Stable" ON \ "$BETA" "Beta" OFF \ "$DEV" "Dev" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" -else - exit -fi -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" +if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" 3>&1 1>&2 2>&3) +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${VM_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - MAC="$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +if [ -z $MAC1 ]; then MAC="$GEN_MAC"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"; else - exit + if [ $exitstatus = 0 ]; then MAC="$MAC1"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"; fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -179,7 +167,7 @@ else echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else clear @@ -189,7 +177,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then clear header_info echo -e "${BL}Using Default Settings${CL}" From f12c5a7923b38d4d10db41a6cbff0da816a920cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Sep 2022 21:53:17 -0400 Subject: [PATCH 0329/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a9ae449..a5966eda 100644 --- a/README.md +++ b/README.md @@ -1851,7 +1851,7 @@ ________________________________________________________________________________
- 🔸NextCloudPi LXC + NextCloudPi LXC

From 787862645e7432a126139e61142e05f9c6dec7d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 06:33:08 -0400 Subject: [PATCH 0330/3335] Update homeassistant-v4.sh --- ct/homeassistant-v4.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 2a521357..18d1c534 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -232,10 +232,22 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +if [ "$CT_TYPE" == "0" ]; then cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +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 +else +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From d900355fb0ef7b31abcc8ce0c7a62d6f0cf9c364 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 06:38:20 -0400 Subject: [PATCH 0331/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 72be5984..b6c6e341 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-09-29 + +### Changed + +- **Home Assistant Container LXC** + - If the LXC is created Privileged, the script will automatically set up USB passthrough. + ## 2022-09-23 ### Changed From 98ea1161985f0a235526633c79677cfdfbeb92c7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 06:41:39 -0400 Subject: [PATCH 0332/3335] Update homeassistant-v4.sh --- ct/homeassistant-v4.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 18d1c534..e17e476e 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -247,6 +247,7 @@ else cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: +EOF fi msg_info "Starting LXC Container" pct start $CTID From a4fea97ace7f38b9d7def2e45e24f4d4e7bebdc2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 06:57:07 -0400 Subject: [PATCH 0333/3335] Update README.md --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a5966eda..8c1276cc 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,8 @@ ________________________________________________________________________________ A standalone container-based installation of Home Assistant Core +🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* + To create a new Proxmox Home Assistant Container LXC, run the following in the Proxmox Shell. ```yaml @@ -209,16 +211,6 @@ Run in the Proxmox Shell bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data.sh)" ``` -⚙️ **To Allow USB Device Passthrough:** - -Run in the Proxmox Shell. (**replace `106` with your LXC ID**) -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/usb-passthrough.sh)" -s 106 -``` - -Reboot the LXC to apply the changes - - ⚙️ **To Install HACS:** Run in the LXC console From 0d1970977a9580fc1b0f61e4d1f1cfeb965436e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 11:00:34 -0400 Subject: [PATCH 0334/3335] Create hacs-core.sh --- misc/hacs-core.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 misc/hacs-core.sh diff --git a/misc/hacs-core.sh b/misc/hacs-core.sh new file mode 100644 index 00000000..b6374539 --- /dev/null +++ b/misc/hacs-core.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" + +while true; do + read -p "Start the HACS Install Script (y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done + +apt update &>/dev/null +apt install unzip &>/dev/null +cd .homeassistant +wget -O - https://get.hacs.xyz | bash - + +# To install HACS run the following from the container (LXC) console +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacs-core.sh)" +# Then add the integration in HA From a05231aeae1ecfbf2b238aeb2f81364ea30d895a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 11:08:00 -0400 Subject: [PATCH 0335/3335] Create homeassistant-core-v4.sh --- ct/homeassistant-core-v4.sh | 258 ++++++++++++++++++++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 ct/homeassistant-core-v4.sh diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh new file mode 100644 index 00000000..e8759185 --- /dev/null +++ b/ct/homeassistant-core-v4.sh @@ -0,0 +1,258 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Home Assistant-Core" +var_disk="8" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + __ __ ___ _ __ __ ______ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___v4________ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / __ \/ ___/ _ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /___/ /_/ / / / __/ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____/\____/_/ \___/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; +else + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable (after it's initialized) by going to the following URL. + ${BL}http://${IP}:8123${CL}" From ece1588e0e3283b6208e8267ad69436213b0aed3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 11:09:06 -0400 Subject: [PATCH 0336/3335] Create homeassistant-core-install.sh --- setup/homeassistant-core-install.sh | 137 ++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 setup/homeassistant-core-install.sh diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh new file mode 100644 index 00000000..a7b441ce --- /dev/null +++ b/setup/homeassistant-core-install.sh @@ -0,0 +1,137 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y \ + python3 \ + python3-dev \ + python3-venv \ + python3-pip \ + bluez \ + libffi-dev \ + libssl-dev \ + libjpeg-dev \ + zlib1g-dev \ + autoconf \ + build-essential \ + libopenjp2-7 \ + libtiff5 \ + libturbojpeg0-dev \ + tzdata \ + curl \ + sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Home Assistant-Core" +mkdir /srv/homeassistant +cd /srv/homeassistant +python3 -m venv . +source bin/activate +python3 -m pip install wheel &>/dev/null +pip3 install homeassistant &>/dev/null +msg_ok "Installed Home Assistant-Core" + +msg_info "Creating Service" +cat << EOF > /etc/systemd/system/homeassistant.service + +[Unit] +Description=Home Assistant +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/root/.homeassistant +ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable homeassistant &>/dev/null +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From f3ebf54ba53ee3f40dafc1c8e84f435c654daa65 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 11:29:04 -0400 Subject: [PATCH 0337/3335] Update README.md --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index 8c1276cc..0f16ed59 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,53 @@ Run in the LXC console ____________________________________________________________________________________________
+
+ Home Assistant Core LXC + +

+ +

Home Assistant Core LXC

+ +A standalone installation of Home Assistant Core + +To create a new Proxmox Home Assistant Core LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-core-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

+ +⚠️ Initialize Home Assistant-Core (Only required once)
+Run in the LXC console +```yaml +cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass +``` + +***Home Assistant Interface - IP:8123*** + +⚙️ **Edit the HA configuration.yaml**
+Run in the LXC console +```yaml +nano .homeassistant/configuration.yaml +``` +Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” + +⚙️ **Install HACS:**
+Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" +``` +After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. + +⚙️ **Update Home Assistant**
+Run in the LXC console +```yaml +systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit +``` +____________________________________________________________________________________________ +
+
Podman Home Assistant Container LXC From 869e7e29f86a7883f7b0718a2d4a24dfec713bf4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 11:30:16 -0400 Subject: [PATCH 0338/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f16ed59..f70bc7d4 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ ________________________________________________________________________________
- Home Assistant Core LXC + 🔸Home Assistant Core LXC

From a2d92cffb839b1aaab2755dbd8e5e3ba8b488cf1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 11:32:25 -0400 Subject: [PATCH 0339/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b6c6e341..3fa037e3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Home Assistant Container LXC** - If the LXC is created Privileged, the script will automatically set up USB passthrough. +- **Home Assistant Core LXC** + - NEW Script ## 2022-09-23 From 9f2119886a5feee3076a3eddd8376c6fe0c4ccf5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:11:55 -0400 Subject: [PATCH 0340/3335] Update pimox-haos-vm-v4.sh --- vm/pimox-haos-vm-v4.sh | 117 ++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 60 deletions(-) diff --git a/vm/pimox-haos-vm-v4.sh b/vm/pimox-haos-vm-v4.sh index 717300da..97dc8369 100644 --- a/vm/pimox-haos-vm-v4.sh +++ b/vm/pimox-haos-vm-v4.sh @@ -2,8 +2,9 @@ echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) -LATEST=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` HA=`echo "\033[1;34m"` @@ -15,6 +16,7 @@ CL=`echo "\033[m"` BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -46,7 +48,7 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then +if (whiptail --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then echo "User selected Yes" else clear @@ -70,83 +72,77 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - HN=haos${STABLE} - echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" - CORE_COUNT="2" - echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + HN=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 2 \ +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$STABLE" "Stable" ON \ -"$LATEST" "Latest" OFF \ +"$BETA" "Beta" OFF \ +"$DEV" "Dev" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" -else - exit -fi -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" +if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${STABLE} --title "HOSTNAME" 3>&1 1>&2 2>&3) +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${VM_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; else - exit + if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" +if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" +if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else - exit + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? -if [ $exitstatus = 0 ]; then - MAC="$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +if [ -z $MAC1 ]; then MAC="$GEN_MAC"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"; else - exit + if [ $exitstatus = 0 ]; then MAC="$MAC1"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"; fi fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; @@ -163,7 +159,7 @@ else echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else clear @@ -173,7 +169,7 @@ else fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then clear header_info echo -e "${BL}Using Default Settings${CL}" @@ -236,7 +232,7 @@ for i in {0,1}; do done msg_ok "Extracted Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ +qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null @@ -245,8 +241,9 @@ qm set $VMID \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null -qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox" >/dev/null +qm set $VMID -description "# PiMox HAOS +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" From 0a31fd03f1f7046b8cd2bb0cb639f5d0b176bcd1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:33:10 -0400 Subject: [PATCH 0341/3335] Add files via upload --- misc/images/pimox.png | Bin 0 -> 23460 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/pimox.png diff --git a/misc/images/pimox.png b/misc/images/pimox.png new file mode 100644 index 0000000000000000000000000000000000000000..a6a8baed26745f0954bc3625fdeef795d3df958a GIT binary patch literal 23460 zcmV)PK()V#P)PyA07*naRCr$PeFvCbMcM!F+_HT)n`F~N8VQ}y3B5}fq$3K5D2gZu2%iFqD13?_ zMUN}}S}}k%0LlQI0^s@0?-hIgjhvo;M6W&}2%r%_DZ&mAP4eMS130NyN3j_^Y;yy~ zVgO^q=heU&8Aj~?YLS@V&SjbpU|Rr*&0x)XwakO@qD+Jg8;El4hpD9`}!0XPsqyvJs^ zk9NE{0HX%L`oMN22%X+PMJ?<%OC*7y^^XJ)dvp^Lb6O3HIUK;$KDvfIGVIL(7+lZ; zi>@99P$wY^(L_Uj0!Y@y;q>R1x+!Xb)PU zI<>IDL0yDYBjkBq0wf8^7iS8>FVJ7IxzMC@KN{|gW%MJ0E!Ye z#o+81s<9ykXHcjE)eu=DspOB?lXd3%^8wu1)yeJ4_xE*R{0_i1DK_HIN(3A+t)d9k zFucTKE&Nw&0+E~60WD(gAW8;nHMcLXaY1A6%fR>mz+R*hMOO_2NDPdcYO@jZhK_^e zni!m+Hr22IqA7<^kC`s@_zJ+7f@Zdl-_)0Zk)+u>eAYlXTZDmRQYoD!fpp>1fQ59T zIRU4{QL=`{gxn{RsQ!>z6bBH0rxEejX1_yybileDV{M{zRUlDUU zY0*Of&MtJK3%rjq&UXN84d7$|d~a?FwhaK*0T>OS!tI~bFrMT)tku^S^yt0_j9~z- z0`Rk<%LW5wL0@19^@t{sY)mL^M4LA_Y028S{LkQmzbL>2Q!GWO29Q|Pj`(wRNNy72 z=v&&9UeILcxQRQQzMNeF91Wma(?N9`X+m)T&ft(Nd~$V6QO1A+XG9pmgDVl(q6jF0 zfI0qNGw&(^AYR1Iw!R1qstk@(8ASM(gJfb-tRzJ-Y(X@+RxP?yq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bdd99 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:38:00 -0400 Subject: [PATCH 0342/3335] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index f70bc7d4..cf431786 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,30 @@ ________________________________________________________________________________

+
+ PiMox HAOS VM + +

+ +

PiMox HAOS VM

+

Option to create VM using Stable, Beta or Dev Image

+ +The script automates the manual process of finding, downloading and extracting the aarch64 (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. + +To create a new PiMox HAOS VM, run the following in the Proxmox Shell + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/pimox-haos-vm-v4.sh)" +``` +

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

+ +After the script completes, click on the VM Console to find the Home Assistant IP. + +**Home Assistant Interface - IP:8123** + +____________________________________________________________________________________________ + +
Home Assistant Container LXC From 04f4f542c6ec611bd44e1e386fcdcdc6e75c016d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:38:47 -0400 Subject: [PATCH 0343/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf431786..3b50be5b 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ ________________________________________________________________________________

-

PiMox HAOS VM

+

🔸PiMox HAOS VM

Option to create VM using Stable, Beta or Dev Image

The script automates the manual process of finding, downloading and extracting the aarch64 (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. From 97a6651ba3ab6861f2089a1e8eebab68ec882a09 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:40:00 -0400 Subject: [PATCH 0344/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 3fa037e3..39972f0c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file. - If the LXC is created Privileged, the script will automatically set up USB passthrough. - **Home Assistant Core LXC** - NEW Script +- **PiMox HAOS VM** + - NEW Script ## 2022-09-23 From 69c11f784420fbede93ba2a5f4f0721abe86c8fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 12:46:01 -0400 Subject: [PATCH 0345/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b50be5b..c5951407 100644 --- a/README.md +++ b/README.md @@ -168,11 +168,11 @@ ________________________________________________________________________________
- PiMox HAOS VM + 🔸PiMox HAOS VM

-

🔸PiMox HAOS VM

+

PiMox HAOS VM

Option to create VM using Stable, Beta or Dev Image

The script automates the manual process of finding, downloading and extracting the aarch64 (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. From 903904d0c3626f2dace6063c07c8fb2ae1720616 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 13:06:01 -0400 Subject: [PATCH 0346/3335] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c5951407..26f2dda7 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistan

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

-⚠️ Initialize Home Assistant-Core (Only required once)
+⚠️ Initialize Home Assistant-Core (Only required once) + Run in the LXC console ```yaml cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass @@ -278,21 +279,24 @@ cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass ***Home Assistant Interface - IP:8123*** -⚙️ **Edit the HA configuration.yaml**
+⚙️ **Edit the HA configuration.yaml** + Run in the LXC console ```yaml nano .homeassistant/configuration.yaml ``` Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” -⚙️ **Install HACS:**
+⚙️ **Install HACS:** + Run in the LXC console ```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" ``` After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. -⚙️ **Update Home Assistant**
+⚙️ **Update Home Assistant** + Run in the LXC console ```yaml systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit From c3a70f55c00cf4f0201f4bbe3912422eb6b07b7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 13:14:32 -0400 Subject: [PATCH 0347/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 26f2dda7..a2d54fd8 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,7 @@ ________________________________________________________________________________
🔸Home Assistant Core LXC -

+

Home Assistant Core LXC

From 6519b05150a1813a961d2d7042ab381843390e8a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 17:19:46 -0400 Subject: [PATCH 0348/3335] Update homeassistant-core-install.sh add psycopg2-binary --- setup/homeassistant-core-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index a7b441ce..a8783e1b 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -95,6 +95,7 @@ python3 -m venv . source bin/activate python3 -m pip install wheel &>/dev/null pip3 install homeassistant &>/dev/null +pip3 install psycopg2-binary &>/dev/null msg_ok "Installed Home Assistant-Core" msg_info "Creating Service" From c9e6edb2c45ec7318dc4b4329890c0c39f31ba30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 17:31:02 -0400 Subject: [PATCH 0349/3335] Update README.md --- README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a2d54fd8..06c84a25 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,8 @@ ________________________________________________________________________________

Home Assistant Core LXC

-A standalone installation of Home Assistant Core +A standalone installation of Home Assistant Core
+🛈 If the LXC is created Privileged, the script will automatically set up USB passthrough. To create a new Proxmox Home Assistant Core LXC, run the following in the Proxmox Shell. @@ -270,8 +271,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistan

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

-⚠️ Initialize Home Assistant-Core (Only required once) - +⚠️ Initialize Home Assistant-Core (Only required once)
Run in the LXC console ```yaml cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass @@ -279,24 +279,21 @@ cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass ***Home Assistant Interface - IP:8123*** -⚙️ **Edit the HA configuration.yaml** - +⚙️ **Edit the HA configuration.yaml**
Run in the LXC console ```yaml nano .homeassistant/configuration.yaml ``` Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” -⚙️ **Install HACS:** - +⚙️ **Install HACS:**
Run in the LXC console ```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" ``` After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. -⚙️ **Update Home Assistant** - +⚙️ **Update Home Assistant**
Run in the LXC console ```yaml systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit From 570d9e1ca694c73454ef6edc275273e0e8b3f209 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 17:35:05 -0400 Subject: [PATCH 0350/3335] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 06c84a25..7795ac68 100644 --- a/README.md +++ b/README.md @@ -260,8 +260,9 @@ ________________________________________________________________________________

Home Assistant Core LXC

-A standalone installation of Home Assistant Core
-🛈 If the LXC is created Privileged, the script will automatically set up USB passthrough. +A standalone installation of Home Assistant Core + +🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* To create a new Proxmox Home Assistant Core LXC, run the following in the Proxmox Shell. @@ -271,7 +272,8 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistan

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

-⚠️ Initialize Home Assistant-Core (Only required once)
+⚠️ Initialize Home Assistant-Core (Only required once) + Run in the LXC console ```yaml cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass @@ -279,21 +281,24 @@ cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass ***Home Assistant Interface - IP:8123*** -⚙️ **Edit the HA configuration.yaml**
+⚙️ **Edit the HA configuration.yaml** + Run in the LXC console ```yaml nano .homeassistant/configuration.yaml ``` Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” -⚙️ **Install HACS:**
+⚙️ **Install HACS:** + Run in the LXC console ```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" ``` After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. -⚙️ **Update Home Assistant**
+⚙️ **Update Home Assistant** + Run in the LXC console ```yaml systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit From cce7033d8ffafaee3fcd955bdf7de4b96fc450a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 22:40:02 -0400 Subject: [PATCH 0351/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7795ac68..a20790fa 100644 --- a/README.md +++ b/README.md @@ -630,7 +630,7 @@ ________________________________________________________________________________
- 🔸EMQX LXC + EMQX LXC

From a8c195d9b453b9e05c4209bd3cda33f026c5b317 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Sep 2022 09:53:32 -0400 Subject: [PATCH 0352/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index e479fc5f..f45da0f8 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -26,7 +26,7 @@ echo -en "${GN} Updating Z-wave JS UI... " systemctl stop zwave-js-ui.service cd /opt/zwave-js-ui curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null -unzip zwave-js-ui-v*.zip zwave-js-ui &>/dev/null +unzip -o zwave-js-ui-v*.zip zwave-js-ui &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " From 25133371dc50e4ada6a955063d41b9b5e6b001a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Sep 2022 10:01:35 -0400 Subject: [PATCH 0353/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index f45da0f8..70108b55 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -21,6 +21,16 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } +clear +while true; do + read -p "This will update ZWave JS UI. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear echo -en "${GN} Updating Z-wave JS UI... " systemctl stop zwave-js-ui.service From 9e7e6ecbc2a58f4b6f2ae0634b5ef76c7ffd92bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Sep 2022 18:49:57 -0400 Subject: [PATCH 0354/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a20790fa..44d7d327 100644 --- a/README.md +++ b/README.md @@ -1760,6 +1760,7 @@ ________________________________________________________________________________
Homepage LXC +

Homepage LXC

From 06260e9bc118218f81de38c65392600162f1188d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Sep 2022 21:10:05 -0400 Subject: [PATCH 0355/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 44d7d327..b5ae53c7 100644 --- a/README.md +++ b/README.md @@ -1404,7 +1404,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v4.sh) ⚙️ **To Update Omada** -https://github.com/tteck/Proxmox/issues/402#issue-1328460983 +[#403](https://github.com/tteck/Proxmox/issues/402#issue-1328460983) ____________________________________________________________________________________________ From 5f75108ff3cdab459688c756c49a0fea21a8c0ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Sep 2022 21:52:08 -0400 Subject: [PATCH 0356/3335] Update emby-install.sh --- setup/emby-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 5a448e55..28c762ab 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -87,8 +87,8 @@ msg_ok "Set Up Hardware Acceleration" LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null -dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.6.0/emby-server-deb_4.7.6.0_amd64.deb &>/dev/null +dpkg -i emby-server-deb_4.7.6.0_amd64.deb &>/dev/null msg_ok "Installed Emby" PASS=$(grep -w "root" /etc/shadow | cut -b6); From 3d0207fbb1e0fc0ab2a2648962b3e0f10327c281 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 06:49:11 -0400 Subject: [PATCH 0357/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index daaecda5..fc737ee0 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -59,6 +59,7 @@ tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless +sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt pip install -r requirements.txt &>/dev/null cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null From 9299ca4736902df19fa6d65847374bdd30405a88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 07:45:27 -0400 Subject: [PATCH 0358/3335] Update influxdb-install.sh optional install Telegraf --- setup/influxdb-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 0dc32e13..3faa99b9 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -86,9 +86,19 @@ apt-get update &>/dev/null apt-get install -y influxdb &>/dev/null msg_ok "Installed InfluxDB" +read -r -p "Would you like to add Telegraf? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +TELEGRAF="Y" +else +TELEGRAF="N" +fi + +if [[ $TELEGRAF == "Y" ]]; then msg_info "Installing Telegraf" apt-get install -y telegraf &>/dev/null msg_ok "Installed Telegraf" +fi PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then From 04da1046bd1c1e2ba5e893263e2935aa26e4d0a4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 07:49:40 -0400 Subject: [PATCH 0359/3335] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5ae53c7..ee956ea4 100644 --- a/README.md +++ b/README.md @@ -1144,11 +1144,13 @@ ________________________________________________________________________________
- InfluxDB/Telegraf LXC + InfluxDB LXC

-

InfluxDB/Telegraf LXC

+

InfluxDB LXC

+ +

Option to Install Telegraf

[InfluxDB](https://www.influxdata.com/) is an open-source time series database developed by the company InfluxData. From 642346d366a2ae2c40270b8a05fa64b657afd890 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 11:02:23 -0400 Subject: [PATCH 0360/3335] Create hacore2hacontainer-data.sh --- misc/hacore2hacontainer-data.sh | 116 ++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 misc/hacore2hacontainer-data.sh diff --git a/misc/hacore2hacontainer-data.sh b/misc/hacore2hacontainer-data.sh new file mode 100644 index 00000000..0d0c0417 --- /dev/null +++ b/misc/hacore2hacontainer-data.sh @@ -0,0 +1,116 @@ +#!/usr/bin/env bash +while true; do + read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup() { + [ -d "${CTID_FROM_PATH:-}" ] && pct unmount $CTID_FROM + [ -d "${CTID_TO_PATH:-}" ] && pct unmount $CTID_TO + popd >/dev/null + rm -rf $TEMP_DIR +} +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null + +TITLE="Home Assistant LXC Data Copy" +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) +done < <(pct list | awk 'NR>1') +while [ -z "${CTID_FROM:+x}" ]; do + CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + "\nWhich HA Container LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done +while [ -z "${CTID_TO:+x}" ]; do + CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + "\nWhich HA Core LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done +for i in ${!CTID_MENU[@]}; do + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) +done +whiptail --defaultno --title "$TITLE" --yesno \ +"Are you sure you want to copy data between the following LXCs? +$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) +Version: 2022.10.02" 13 50 || exit +info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" +if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then + msg "Stopping '$CTID_TO'..." + pct stop $CTID_TO +fi +msg "Mounting Container Disks..." +DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data +CORE_PATH=/root/.homeassistant +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ + die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." +[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \ + die "Home Assistant directories in '$CTID_FROM' not found." +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ + die "There was a problem mounting the root disk of LXC '${CTID_TO}'." +[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \ + die "Home Assistant directories in '$CTID_TO' not found." + +msg "Copying Data..." +RSYNC_OPTIONS=( + --archive + --hard-links + --sparse + --xattrs + --no-inc-recursive + --info=progress2 +) +msg "<======== Docker Data ========>" +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DOCKER_PATH} ${CTID_TO_PATH}${DOCKER_PATH} +echo -en "\e[1A\e[0K\e[1A\e[0K" + +info "Successfully Transferred Data." + +# Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC +# run from the Proxmox Shell +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacore2hacontainer-data.sh)" From 6d9f3940383e021fc81b32e04f63c1a7ac315bbb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 11:11:43 -0400 Subject: [PATCH 0361/3335] Update hacore2hacontainer-data.sh --- misc/hacore2hacontainer-data.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/hacore2hacontainer-data.sh b/misc/hacore2hacontainer-data.sh index 0d0c0417..98fe7684 100644 --- a/misc/hacore2hacontainer-data.sh +++ b/misc/hacore2hacontainer-data.sh @@ -59,13 +59,13 @@ while read -r line; do done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Container LXC would you like to copy FROM?\n" \ + "\nWhich HA Core LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Core LXC would you like to copy TO?\n" \ + "\nWhich HA Container LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done From c6c047288a6b910a28df917b5ba5b4fe26820343 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 11:32:20 -0400 Subject: [PATCH 0362/3335] Update hacore2hacontainer-data.sh --- misc/hacore2hacontainer-data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/hacore2hacontainer-data.sh b/misc/hacore2hacontainer-data.sh index 98fe7684..8edf5b74 100644 --- a/misc/hacore2hacontainer-data.sh +++ b/misc/hacore2hacontainer-data.sh @@ -106,7 +106,7 @@ RSYNC_OPTIONS=( --info=progress2 ) msg "<======== Docker Data ========>" -rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DOCKER_PATH} ${CTID_TO_PATH}${DOCKER_PATH} +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${CORE_PATH} ${CTID_TO_PATH}${DOCKER_PATH} echo -en "\e[1A\e[0K\e[1A\e[0K" info "Successfully Transferred Data." From 9c56a846da3e48a868e86bfe6a07c037525d6125 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 11:33:50 -0400 Subject: [PATCH 0363/3335] Create hacontainer2hacore-data.sh --- misc/hacontainer2hacore-data.sh | 116 ++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 misc/hacontainer2hacore-data.sh diff --git a/misc/hacontainer2hacore-data.sh b/misc/hacontainer2hacore-data.sh new file mode 100644 index 00000000..94476e09 --- /dev/null +++ b/misc/hacontainer2hacore-data.sh @@ -0,0 +1,116 @@ +#!/usr/bin/env bash +while true; do + read -p "Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup() { + [ -d "${CTID_FROM_PATH:-}" ] && pct unmount $CTID_FROM + [ -d "${CTID_TO_PATH:-}" ] && pct unmount $CTID_TO + popd >/dev/null + rm -rf $TEMP_DIR +} +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null + +TITLE="Home Assistant LXC Data Copy" +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) +done < <(pct list | awk 'NR>1') +while [ -z "${CTID_FROM:+x}" ]; do + CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + "\nWhich HA Container LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done +while [ -z "${CTID_TO:+x}" ]; do + CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + "\nWhich HA Core LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done +for i in ${!CTID_MENU[@]}; do + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) +done +whiptail --defaultno --title "$TITLE" --yesno \ +"Are you sure you want to copy data between the following LXCs? +$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) +Version: 2022.10.02" 13 50 || exit +info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" +if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then + msg "Stopping '$CTID_TO'..." + pct stop $CTID_TO +fi +msg "Mounting Container Disks..." +DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data +CORE_PATH=/root/.homeassistant +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ + die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." +[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \ + die "Home Assistant directories in '$CTID_FROM' not found." +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ + die "There was a problem mounting the root disk of LXC '${CTID_TO}'." +[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \ + die "Home Assistant directories in '$CTID_TO' not found." + +msg "Copying Data..." +RSYNC_OPTIONS=( + --archive + --hard-links + --sparse + --xattrs + --no-inc-recursive + --info=progress2 +) +msg "<======== Docker Data ========>" +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DOCKER_PATH} ${CTID_TO_PATH}${CORE_PATH} +echo -en "\e[1A\e[0K\e[1A\e[0K" + +info "Successfully Transferred Data." + +# Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC +# run from the Proxmox Shell +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacontainer2hacore-data.sh)" From c2886904440f74c825e04005ffcf65ef35f250a0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 16:16:55 -0400 Subject: [PATCH 0364/3335] Create README_NEW.md --- README_NEW.md | 2575 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2575 insertions(+) create mode 100644 README_NEW.md diff --git a/README_NEW.md b/README_NEW.md new file mode 100644 index 00000000..ac97b90b --- /dev/null +++ b/README_NEW.md @@ -0,0 +1,2575 @@ +

Select a Proxmox Helper

+ +

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

+ + +
+ Proxmox Tools +⬇____________________________________________________________________________________________ +
+ Proxmox VE 7 Post Install + +

+ +

Proxmox VE 7 Post Install

+ +The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox VE and Reboot PVE. + +Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)" +``` + +It's recommended to answer `y` to all options. + +____________________________________________________________________________________________ + +
+ +
+ Proxmox Kernel Clean + +

+ +

Proxmox Kernel Clean

+ +Cleaning unused kernel images is not only good because of a reduced grub menu, but also gains some disk space. + +Run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Proxmox Edge Kernel Tool + +

+ +

Proxmox Edge Kernel Tool

+ +Proxmox [Edge Kernels](https://github.com/fabianishere/pve-edge-kernel) are custom Linux Kernels for Proxmox VE 7. Keeping up with new Kernel releases instead of LTS + +Run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Proxmox CPU Scaling Governor + +

+ +

Proxmox CPU Scaling Governor

+ +CPU Scaling Governor enables the operating system to scale the CPU frequency up or down in order to save power or improve performance. + +[Generic Scaling Governors](https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html?#generic-scaling-governors) + +Run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/scaling-governor.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Proxmox LXC Updater + +

+ +

Proxmox LXC Updater

+ +Update All LXC's Fast & Easy + +Run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Proxmox Dark Theme + +

+ +

Proxmox Discord Dark Theme

+ +A dark theme for the Proxmox Web UI by [Weilbyte](https://github.com/Weilbyte/PVEDiscordDark) + +Run the following in the Proxmox Shell. + +```yaml +bash <(curl -s https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh ) install +``` + +To uninstall the theme, simply run the script with the `uninstall` command. + +____________________________________________________________________________________________ + +
+ +
+ Proxmox Backup Server Post Install + +

+ +

Proxmox Backup Server Post Install

+ +The script will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS. + +Run the following in the Proxmox Shell. ⚠️ **Proxmox Backup Server ONLY** + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pbs-install.sh)" +``` + +It's recommended to answer `y` to all options. + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Home Assistant +⬇____________________________________________________________________________________________ + +
+ Home Assistant OS VM + +

+ +

Home Assistant OS VM

+

Option to create VM using Stable, Beta or Dev Image

+ +The script automates the manual process of finding, downloading and extracting the Official KVM (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. No hidden (kpartx, unzip, ect...) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. + +To create a new Proxmox Home Assistant OS VM, run the following in the Proxmox Shell + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v4.sh)" +``` +

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

+ +After the script completes, click on the VM, then on the **_Summary_** tab to find the VM IP. + +**Home Assistant Interface - IP:8123** + +____________________________________________________________________________________________ + +
+ +
+ 🔸PiMox HAOS VM + +

+ +

PiMox HAOS VM

+

Option to create VM using Stable, Beta or Dev Image

+ +The script automates the manual process of finding, downloading and extracting the aarch64 (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. + +To create a new PiMox HAOS VM, run the following in the Proxmox Shell + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/pimox-haos-vm-v4.sh)" +``` +

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

+ +After the script completes, click on the VM Console to find the Home Assistant IP. + +**Home Assistant Interface - IP:8123** + +____________________________________________________________________________________________ + +
+ +
+ Home Assistant Container LXC + +

Docker Logos | Docker +@home-assistantGitHub - portainer/portainer-docs: Portainer documentation

+ +

Home Assistant Container LXC

+ +A standalone container-based installation of Home Assistant Core + +🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* + +To create a new Proxmox Home Assistant Container LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

+ +**Home Assistant Interface - IP:8123** + +**Portainer Interface - IP:9000** + +⚙️ **Path to HA /config** +```yaml +/var/lib/docker/volumes/hass_config/_data + ``` +⚙️ **To Edit the HA configuration.yaml** (Recommend Using File Browser) + +Run in the LXC console +```yaml +nano /var/lib/docker/volumes/hass_config/_data/configuration.yaml +``` +Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” + +⚙️ **Copy Data From a Existing Home Assistant LXC to another Home Assistant LXC** + +Run in the Proxmox Shell +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data.sh)" + ``` + +⚙️ **To Install HACS:** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs.sh)" +``` +After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. + + +⚙️ [**Update Menu**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/update-menu.png) + +Run in the LXC console +```yaml +./update +``` +____________________________________________________________________________________________ +
+ +
+ 🔸Home Assistant Core LXC + +

+ +

Home Assistant Core LXC

+ +A standalone installation of Home Assistant Core + +🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* + +To create a new Proxmox Home Assistant Core LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-core-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

+ +⚠️ Initialize Home Assistant-Core (Only required once) + +Run in the LXC console +```yaml +cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass +``` + +***Home Assistant Interface - IP:8123*** + +⚙️ **Edit the HA configuration.yaml** + +Run in the LXC console +```yaml +nano .homeassistant/configuration.yaml +``` +Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” + +⚙️ **Install HACS:** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" +``` +After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. + +⚙️ **Update Home Assistant** + +Run in the LXC console +```yaml +systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit +``` +____________________________________________________________________________________________ +
+ +
+ Podman Home Assistant Container LXC + +

+@home-assistant

+ +

Podman Home Assistant Container LXC

+A standalone container-based installation of Home Assistant Core + +⚠️ Podman seems to need a privileged LXC + +To create a new Proxmox Podman Home Assistant Container LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/podman-homeassistant-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

+ +**Home Assistant Interface - IP:8123** + +**Yacht Interface - IP:8000** + +⚙️ **Path to HA /config** +```yaml +/var/lib/containers/storage/volumes/hass_config/_data + ``` +⚙️ **To edit the HA configuration.yaml** + +Run in the LXC console +```yaml +nano /var/lib/containers/storage/volumes/hass_config/_data/configuration.yaml +``` +Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” + +⚙️ **Copy Data From a Existing Home Assistant LXC to a Podman Home Assistant LXC** + +Run in the Proxmox Shell +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data-podman.sh)" + ``` + +⚙️ **To allow USB device passthrough:** + +Run in the Proxmox Shell. (**replace `106` with your LXC ID**) +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/usb-passthrough.sh)" -s 106 +``` + +Reboot the LXC to apply the changes + +⚙️ **To Install HACS:** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/podman_hacs.sh)" +``` +After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. + +⚙️ **Initial Yacht Login** + +**username** + ```yaml + admin@yacht.local + ``` + **password** + ```yaml + pass + ``` + +____________________________________________________________________________________________ +
+⬆____________________________________________________________________________________________ +
+ +
+ Automation +⬇____________________________________________________________________________________________ + +
+ ioBroker LXC + +

+ +

ioBroker LXC

+ +[ioBroker](https://www.iobroker.net/#en/intro) is an open source automation platform. + +To create a new Proxmox ioBroker LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/iobroker-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**ioBroker Interface - IP:8081** + +⚙️ **To Update ioBroker** + +```yaml +update from the ioBroker UI +``` + +____________________________________________________________________________________________ + +
+ +
+ openHAB LXC + +

+ +

openHAB LXC

+ +[openHAB](https://www.openhab.org/), a vendor and technology agnostic open source automation software for your home. + +To create a new Proxmox openHAB LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/openhab-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**openHAB Interface - IP:8080** + +⚙️ **To Update openHAB** + +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+ +
+ Homebridge LXC + +

+ +

Homebridge LXC

+ +[Homebridge](https://homebridge.io/) allows you to integrate with smart home devices that do not natively support HomeKit + +To create a new Proxmox Homebridge LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homebridge-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

+ +**Homebridge Interface - IP:8581** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + admin + ``` +Config File Path `/var/lib/homebridge/config.json` + +Storage Path `/var/lib/homebridge` + +Restart Command `sudo hb-service restart` + +Stop Command `sudo hb-service stop` + +Start Command `sudo hb-service start` + +View Logs Command `sudo hb-service logs` + +Systemd Service File `/etc/systemd/system/homebridge.service` + +Systemd Env File `/etc/default/homebridge` + +⚙️ **To Update Homebridge** + +```yaml +Update from the Homebridge UI +``` + + ___________________________________________________________________________________________ + +
+ + + +
+ ESPHome LXC + +

+ +

ESPHome LXC

+ +[ESPHome](https://esphome.io/) is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. + +To create a new Proxmox ESPHome LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/esphome-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +**ESPHome Interface - IP:6052** + +⚙️ **To Update ESPHome** + +Run in the LXC console +```yaml +pip3 install esphome --upgrade +``` + +____________________________________________________________________________________________ + +
+ +
+ Node-Red LXC + +

+ +

Node-Red LXC

+ +[Node-RED](https://nodered.org/) is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. + +To create a new Proxmox Node-RED LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/node-red-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

+ +**Node-Red Interface - IP:1880** + +⚙️ **To Restart Node-Red:** + +Run in the LXC console +```yaml +node-red-restart +``` + +⚙️ **To Update Node-Red:** + +Run in the LXC console (Restart after update) +```yaml +npm install -g --unsafe-perm node-red +``` + +⚙️ **To Install Node-Red Themes** ⚠️ **Backup your flows before running this script!!** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/node-red-themes.sh)" +``` + +____________________________________________________________________________________________ + +
+ +
+ n8n LXC + +

+ +

n8n LXC

+ +[n8n](https://n8n.io/) is an extendable workflow automation tool which enables you to connect anything to everything. + +To create a new Proxmox n8n LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/n8n-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

+ +**n8n Interface: IP:5678** + +⚙️ **To Update n8n** + +```yaml +npm update -g n8n +``` + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ MQTT +⬇____________________________________________________________________________________________ + +
+ MQTT LXC + +

+ +

MQTT LXC

+ +[Eclipse Mosquitto](https://mosquitto.org/) is an open source message broker that implements the MQTT protocol + +To create a new Proxmox MQTT LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mqtt-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +Mosquitto comes with a password file generating utility called mosquitto_passwd. +```yaml +sudo mosquitto_passwd -c /etc/mosquitto/passwd +``` +Password: < password > + +Create a configuration file for Mosquitto pointing to the password file we have just created. +```yaml +sudo nano /etc/mosquitto/conf.d/default.conf +``` +This will open an empty file. Paste the following into it. +```yaml +allow_anonymous false +persistence true +password_file /etc/mosquitto/passwd +listener 1883 +``` +Save and exit the text editor with "Ctrl+O", "Enter" and "Ctrl+X". + +Now restart Mosquitto server. +```yaml +sudo systemctl restart mosquitto +``` + +⚙️ **To Update MQTT:** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+ +
+ EMQX LXC + +

+ + +

EMQX LXC

+ +[EMQX](https://www.emqx.io/) is an Open-source MQTT broker with a high-performance real-time message processing engine, powering event streaming for IoT devices at massive scale. + +To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell. + +```yaml + bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emqx-v4.sh)" +``` +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ + +**EMQX Interface - IP:18083** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + public + ``` +⚙️ **Setup** + +Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker. + +⚙️ **To Update EMQX** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` + + ____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ + +
+ Database +⬇____________________________________________________________________________________________ + +
+ Mariadb LXC + +

MariaDB

+ +

Mariadb LXC

+

Option to Install Adminer

+ +[MariaDB](https://mariadb.org/) is a community-developed, commercially supported fork of the MySQL relational database management system. + +To create a new Proxmox Mariadb LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mariadb-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

+ +To enable MariaDB to listen to remote connections, you need to edit your defaults file. To do this, open the console in your MariaDB lxc: +```yaml +nano /etc/mysql/my.cnf +``` +Un-comment `port =3306` +Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". + +```yaml +nano /etc/mysql/mariadb.conf.d/50-server.cnf +``` +Comment `bind-address = 127.0.0.1` +Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". + +For new MariaDB installations, the next step is to run the included security script. This script changes some of the less secure default options. We will use it to block remote root logins and to remove unused database users. + +Run the security script: +```yaml +sudo mysql_secure_installation +``` +Enter current password for root (enter for none): `enter` + +Switch to unix_socket authentication [Y/n] `y` + +Change the root password? [Y/n] `n` + +Remove anonymous users? [Y/n] `y` + +Disallow root login remotely? [Y/n] `y` + +Remove test database and access to it? [Y/n] `y` + +Reload privilege tables now? [Y/n] `y` + +We will create a new account called admin with the same capabilities as the root account, but configured for password authentication. +```yaml +sudo mysql +``` +Prompt will change to ```MariaDB [(none)]>``` + +Create a new local admin (Change the username and password to match your preferences) +```yaml +CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password'; +``` +Give local admin root privileges (Change the username and password to match above) +```yaml +GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; +``` + +Now, we'll give the user admin root privileges and password-based access that can connect from anywhere on your local area network (LAN), which has addresses in the subnet 192.168.100.0/24. This is an improvement because opening a MariaDB server up to the Internet and granting access to all hosts is bad practice.. Change the **_username_**, **_password_** and **_subnet_** to match your preferences: +```yaml +GRANT ALL ON *.* TO 'admin'@'192.168.100.%' IDENTIFIED BY 'password' WITH GRANT OPTION; +``` +Flush the privileges to ensure that they are saved and available in the current session: +```yaml +FLUSH PRIVILEGES; +``` +Following this, exit the MariaDB shell: +```yaml +exit +``` +Log in as the new database user you just created: +```yaml +mysql -u admin -p +``` +Create a new database: +```yaml +CREATE DATABASE homeassistant; +``` +Following this, exit the MariaDB shell: +```yaml +exit +``` +⚠️ Reboot the lxc + +Checking status. +```yaml +sudo systemctl status mariadb +``` +Change the recorder: `db_url:` in your HA configuration.yaml + +Example: +```yaml +recorder: + db_url: mysql://admin:password@192.168.100.26:3306/homeassistant?charset=utf8mb4 +``` + +⚙️ **To Update Mariadb:** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` +⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool + + `http://your-mariadb-lxc-ip/adminer/` + +____________________________________________________________________________________________ + +
+ +
+ PostgreSQL LXC + +

+ +

PostgreSQL LXC

+

Option to Install Adminer

+ +[PostgreSQL](https://www.postgresql.org/), also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance. + +To create a new Proxmox PostgreSQL LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/postgresql-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

+ +To make sure our PostgreSQL is secured with a strong password, set a password for its system user and then change the default database admin user account + +Change user password +```yaml +passwd postgres +``` +Login using Postgres system account + +```yaml +su - postgres +``` +Now, change the Admin database password +```yaml +psql -c "ALTER USER postgres WITH PASSWORD 'your-password';" +``` +Create a new user. +```yaml +psql +``` +```yaml +CREATE USER admin WITH PASSWORD 'your-password'; +``` +Create a new database: +```yaml +CREATE DATABASE homeassistant; +``` +Grant all rights or privileges on created database to the user +```yaml +GRANT ALL ON DATABASE homeassistant TO admin; +``` +To exit psql +```yaml +\q +``` +Then type exit to get back to root + +Change the recorder: `db_url:` in your HA configuration.yaml + +Example: +```yaml +recorder: + db_url: postgresql://admin:your-password@192.168.100.20:5432/homeassistant?client_encoding=utf8 +``` +⚙️ **To Update PostgreSQL** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` +⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool + + `http://your-PostgreSQL-lxc-ip/adminer/` + +____________________________________________________________________________________________ + +
+ +
+ InfluxDB LXC + +

+ +

InfluxDB LXC

+ +

Option to Install Telegraf

+ +[InfluxDB](https://www.influxdata.com/) is an open-source time series database developed by the company InfluxData. + +[Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) is an open source plugin-driven server agent for collecting and reporting metrics. + +To create a new Proxmox InfluxDB LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/influxdb-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +⚙️ **InfluxDB Configuration** + +Run in the LXC console +```yaml +nano /etc/influxdb/influxdb.conf +``` + +⚙️ **Telegraf Configuration** + +Run in the LXC console +```yaml +nano /etc/telegraf/telegraf.conf +``` + +⚙️ **To Update InfluxDB/Telegraf** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Zigbee - Zwave +⬇____________________________________________________________________________________________ + +
+ Zigbee2MQTT LXC + +

+ + +

Zigbee2MQTT LXC

+ +[Zigbee2MQTT](https://www.zigbee2mqtt.io/) is a standalone nodejs application that connects a zigbee network to MQTT + +To create a new Proxmox Zigbee2MQTT LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt-v4.sh)" +``` +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ + +⚙️ **Determine the location of your adapter** + +Run in the LXC console +```yaml +ls -l /dev/serial/by-id +``` +Example Output: ```lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0``` + + +⚙️ ⚠️ **Before you start Zigbee2MQTT you need to edit the [configuration.yaml](https://www.zigbee2mqtt.io/guide/configuration/)** + +Run in the LXC console +```yaml +nano /opt/zigbee2mqtt/data/configuration.yaml +``` + +Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” + +Example: +```yaml +frontend: + port: 9442 +homeassistant: true +permit_join: false +mqtt: + base_topic: zigbee2mqtt + server: 'mqtt://192.168.86.224:1883' + user: usr + password: pwd + keepalive: 60 + reject_unauthorized: true + version: 4 +serial: + port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 + #adapter: deconz #(uncomment for ConBee II) +advanced: + pan_id: GENERATE + network_key: GENERATE + channel: 20 +``` +⚙️ **Zigbee2MQTT can be started after completing the configuration** + +Run in the LXC console +```yaml +cd /opt/zigbee2mqtt && npm start +``` +⚙️ **To update Zigbee2MQTT** + +Run in the LXC console + ```yaml +cd /opt/zigbee2mqtt && bash update.sh + ``` +⚙️ **Copy Data From a Existing Zigbee2MQTT LXC to another Zigbee2MQTT LXC** + +Run in the Proxmox Shell +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/z2m-copy-data.sh)" + ``` + +____________________________________________________________________________________________ + +
+ +
+ deCONZ LXC + +

+ +

deCONZ LXC

+ +[deCONZ](https://www.phoscon.de/en/conbee2/software#deconz) is used to configure, control and display Zigbee networks. + +To create a new Proxmox deCONZ LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/deconz-v4.sh)" +``` +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +**deCONZ Interface - IP:80** + +⚙️ **To Update deCONZ** + +Run in the LXC Console +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+ +
+ Z-Wave JS UI LXC + +

+ +

Z-Wave JS UI LXC

+ +[Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui#) is a fully configurable Z-Wave to MQTT Gateway and Control Panel. + +To create a new Proxmox Z-Wave JS UI LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwave-js-ui-v4.sh)" +``` +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +**Z-Wave JS UI Interface - IP:8091** + +⚙️ **Copy Data From a Existing Zwavejs2MQTT LXC to a Z-Wave JS UI LXC** + +Run in the Proxmox Shell +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-copy-data.sh)" + ``` +⚙️ **To Update Z-Wave JS UI** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-js-ui-update.sh)" +``` + +____________________________________________________________________________________________ +
+⬆____________________________________________________________________________________________ +
+ +
+ Monitoring - Analytics +⬇____________________________________________________________________________________________ + +
+ Uptime Kuma LXC + +

+ +

Uptime Kuma LXC

+ +Uptime Kuma is a self-hosted, open source, fancy uptime monitoring and alerting system. It can monitor HTTP(s) / TCP / HTTP(s) Keyword / Ping / DNS Record / Push / Steam Game Server. + +To create a new Proxmox Uptime Kuma LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 2GB Storage - 1vCPU ⚡

+ +**Uptime Kuma Interface - IP:3001** + +⚙️ **To Update Uptime Kuma** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/uptimekuma-update.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Prometheus LXC + +

+ +

Prometheus LXC

+ +[Prometheus](https://prometheus.io/) is an open-source systems monitoring and alerting toolkit + +To create a new Proxmox Prometheus LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/prometheus-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 4GB Storage - 1vCPU ⚡

+ +**Prometheus Interface - IP:9090** + +⚙️ **To Update Prometheus** + +```yaml +Working On +``` + +____________________________________________________________________________________________ + +
+ + +
+ Grafana LXC + +

+ +

Grafana LXC

+ +[Grafana](https://grafana.com/) is a multi-platform open source analytics and interactive visualization web application. + +To create a new Proxmox Grafana LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grafana-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Grafana Interface - IP:3000** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + admin + ``` + +⚙️ **To Update Grafana** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Docker +⬇____________________________________________________________________________________________ + +
+ Docker LXC + +

+ +

Docker LXC

+

Options to Install Portainer and/or Docker Compose V2

+ +[Docker](https://www.docker.com/) is an open-source project for automating the deployment of applications as portable, self-sufficient containers. + +To create a new Proxmox Docker LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 4GB Storage - 2vCPU ⚡

+ +**⚠ Run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.** + +**Portainer Interface - IP:9000** + +⚙️ **To Update** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+ +
+ CasaOS LXC + +

+ +

CasaOS LXC

+ +[CasaOS](https://www.casaos.io/) is a community-based open source software focused on delivering simple home cloud experience around Docker ecosystem. + + +To create a new Proxmox CasaOS LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/casaos-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**CasaOS Interface - IP** + +⚙️ **To Update CasaOS** + +```yaml +update from the CasaOS UI +``` + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ OS +⬇____________________________________________________________________________________________ + +
+ Debian LXC + +

Debian

+ +

Debian LXC

+

Option to select version 10 or 11

+ +To create a new Proxmox Debian (curl & sudo) LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/debian-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +⚙️ **To Update Debian** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+ + +
+ Ubuntu LXC + +

Ubuntu

+ +

Ubuntu LXC

+

Option to select version 18.04, 20.04, 21.10 or 22.04

+ +To create a new Proxmox Ubuntu (curl & sudo) LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU - 22.04 ⚡

+ +⚙️ **To Update Ubuntu** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Server - Networklng +⬇____________________________________________________________________________________________ + +
+ Nginx Proxy Manager LXC + +

hero

+ + +

Nginx Proxy Manager LXC

+ +[Nginx Proxy Manager](https://nginxproxymanager.com/) Expose your services easily and securely + +To create a new Proxmox Nginx Proxy Manager LXC Container, run the following in the Proxmox Shell. + +```yaml + bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nginx-proxy-manager-v4.sh)" +``` +

⚡ Default Settings: 1GB RAM - 3GB Storage - 1vCPU ⚡

+ +____________________________________________________________________________________ + +Forward port `80` and `443` from your router to your Nginx Proxy Manager LXC IP. + +Add the following to your `configuration.yaml` in Home Assistant. +```yaml + http: + use_x_forwarded_for: true + trusted_proxies: + - 192.168.100.27 ###(Nginx Proxy Manager LXC IP)### +``` + +**Nginx Proxy Manager Interface - IP:81** + +⚙️ **Initial Login** + +**username** + ```yaml + admin@example.com + ``` + **password** + ```yaml + changeme + ``` +⚙️ **To Update Nginx Proxy Manager** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/npm_update.sh)" +``` + +____________________________________________________________________________________________ + +
+ +
+ UniFi Network Application LXC + +

+ +

UniFi Network Application LXC

+ +

With Local Controller Option

+ +An application designed to optimize UniFi home and business networks with ease. + +To create a new Proxmox UniFi Network Application LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/unifi-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**UniFi Interface - https:// IP:8443** + +⚙️ **To Update UniFi** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/unifi-update.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Omada Controller LXC + +

+ +

Omada Controller LXC

+ +Omada Controller is software which is used to manage the EAP + +To create a new Proxmox Omada Controller LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**Omada Interface - https:// IP:8043** + +`tpeap status` show status of Omada Controller + +`tpeap start` start Omada Controller + +`tpeap stop` stop Omada Controller + +⚙️ **To Update Omada** + +[#403](https://github.com/tteck/Proxmox/issues/402#issue-1328460983) + +____________________________________________________________________________________________ + +
+ +
+ WireGuard LXC + +

+ +

WireGuard LXC

+

With WGDashboard

+ +To create a new Proxmox WireGuard LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wireguard-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**WGDashboard Interface - http:// IP:10086** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + admin + ``` + +⚙️ **Host Configuration** + +Run in the LXC console + ```yaml + nano /etc/pivpn/wireguard/setupVars.conf + ``` + ⚙️**Add Clients** + + Run in the LXC console + ```yaml + pivpn add + ``` +⚙️ **To Update WireGuard** + +Run in the LXC console + ```yaml +apt update && apt upgrade -y +``` +____________________________________________________________________________________________ + +
+ + +
+ MeshCentral LXC + +

+ +

MeshCentral LXC

+ +[MeshCentral](https://meshcentral.com/info/) is a full computer management web site. With MeshCentral, you can run your own web server to remotely manage and control computers on a local network or anywhere on the internet. + +To create a new Proxmox MeshCentral LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**MeshCentral Interface - http:// IP** + +⚙️ **To Update MeshCentral** + +```yaml +Update from the MeshCentral UI +``` +____________________________________________________________________________________________ + +
+ +
+ Tailscale + +

+ +

Tailscale

+ +[Tailscale](https://tailscale.com/) Creates a secure network between your servers, computers, and cloud instances. Even when separated by firewalls or subnets, Tailscale just works. + +To Install Talescale on an existing LXC, run the following in the Proxmox Shell (replace `106` with your LXC ID). + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/add-tailscale-lxc.sh)" -s 106 +``` +After the script finishes, reboot the LXC then run `tailscale up` in the LXC console + +[**Tailscale Login**](https://login.tailscale.com/start) + +⚙️ **To Update Tailscale** + +Run in the LXC console + ```yaml +apt update && apt upgrade -y +``` + +___________________________________________________________________________________________ + +
+ +
+ CrowdSec + +

+ +

CrowdSec

+ +To Install CrowdSec, ⚠️ run the following in the LXC console. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/crowdsec.sh)" +``` + +[CrowdSec](https://crowdsec.net/) is a free, open-source and collaborative IPS. Analyze behaviors, respond to attacks & share signals across the community. + +[**Control center for your CrowdSec machines.**](https://app.crowdsec.net/product-tour) + +___________________________________________________________________________________________ + +
+ +
+ Keycloak LXC + +

+ +

Keycloak LXC

+ +To create a new Proxmox Keycloak LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak-v4.sh)" +``` + +[Keycloak](https://www.keycloak.org/) is an Open Source Identity and Access Management solution for modern Applications and Services. + +**Keycloak Interface - http:// IP:8080** (First start can take a few minutes) + +⚙️ **Initial Login** + +The initial admin user can be added manually using the web frontend when accessed from localhost or automatically using environment variables. + +To add the initial admin user using environment variables, set `KEYCLOAK_ADMIN` for the initial admin username and `KEYCLOAK_ADMIN_PASSWORD` for the initial admin password. + +First, stop Keycloak +```yaml +systemctl stop keycloak.service +``` +then start Keycloak by coping & pasting the following (only needed once) +```yaml +cd /opt/keycloak +export KEYCLOAK_ADMIN=admin +export KEYCLOAK_ADMIN_PASSWORD=changeme + +bin/kc.sh start-dev +``` +⚙️ **To Update Keycloak** + +```yaml +working On +``` +___________________________________________________________________________________________ + +
+ +
+ Mikrotik RouterOS VM + +

+ +

Mikrotik RouterOS VM

+ +[Mikrotik RouterOS](https://wiki.mikrotik.com/wiki/Manual:TOC) can be installed on a PC and will turn it into a router with all the necessary features - routing, firewall, bandwidth management, wireless access point, backhaul link, hotspot gateway, VPN server and more. + +To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/mikrotik-routeros-v4.sh)" +``` +Setup is done via VM console. + +

⚡ Default Settings: 1GB RAM - 2GB Storage - 1CPU ⚡

+ + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Media - Photo +⬇____________________________________________________________________________________________ + +
+ Plex Media Server LXC + +

+ +

Plex Media Server LXC

+

With Hardware Acceleration Support

+To create a new Proxmox Plex Media Server LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**Plex Media Server Interface - IP:32400/web** + +⚙️ **To Update Plex Media Server:** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` +⚙️ **Copy Data From a Existing Plex Media Server LXC to another Plex Media Server LXC** + +Run in the Proxmox Shell +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/pms-copy-data.sh)" + ``` + +____________________________________________________________________________________________ + +
+ +
+ Emby Media Server LXC +

+

Emby Media Server LXC

+ +[Emby](https://emby.media/) brings together your personal videos, music, photos, and live television. + +To create a new Proxmox Emby Media Server LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**Emby Media Server Interface - IP:8096** + +⚙️ **Emby Media Server Utilizes Automatic Updates** + +____________________________________________________________________________________________ + +
+ +
+ Jellyfin Media Server LXC +

+

Jellyfin Media Server LXC

+ +[TurnKey has a LXC CT for Jellyfin](https://www.turnkeylinux.org/mediaserver) + +To create a new Proxmox Jellyfin Media Server LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/jellyfin-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**Jellyfin Media Server Interface - IP:8096** + +FFmpeg path: `/usr/lib/jellyfin-ffmpeg/ffmpeg` + +⚙️ **To Update Jellyfin Media Server** + +Run in the LXC console +```yaml +apt update && apt upgrade -y +``` +____________________________________________________________________________________________ + +
+ +
+ NextCloudPi LXC + +

+ +

NextCloudPi LXC

+ +[NextCloudPi LXC](https://github.com/nextcloud/nextcloudpi#features) is the most popular self-hosted collaboration solution. + +To create a new Proxmox NextCloudPi LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nextcloudpi-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +❗1️. Set nc trusted domains + +Run in the LXC console +``` +sudo ncp-config +``` +Go to config ➡ nc-trusted-domains, add `0.0.0.0` or a static NextCloudPi IP + +Get back to the command prompt, and restart Apache2 `sudo service apache2 restart` + +❗2. **NextCloudPi Interface - https:// IP/** + +____________________________________________________________________________________________ + +
+ +
+ OpenMediaVault LXC + +

+ +

OpenMediaVault LXC

+ +[OpenMediaVault](https://www.openmediavault.org/) is the next generation network attached storage (NAS) solution based on Debian Linux. + +To create a new Proxmox OpenMediaVault LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omv-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +**OpenMediaVault Interface - IP** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + openmediavault + ``` + +____________________________________________________________________________________________ + +
+ +
+ Navidrome LXC + +

+ +

Navidrome LXC

+ +[Navidrome](https://www.navidrome.org/) allows you to enjoy your music collection from anywhere, by making it available through a modern Web UI and through a wide range of third-party compatible mobile apps, for both iOS and Android devices. + +To create a new Proxmox Navidrome LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/navidrome-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

+ +To change Navidrome music folder path, edit: `/var/lib/navidrome/navidrome.toml` + +**Navidrome Interface - IP:4533** + +⚙️ **To Update Navidrome** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/navidrome-update.sh)" +``` + +____________________________________________________________________________________________ + +
+ +
+ PhotoPrism LXC + +

+ +

PhotoPrism LXC

+ +[PhotoPrism](https://photoprism.app/) is an AI-powered app for browsing, organizing & sharing your photo collection. + +To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**PhotoPrism Interface - IP:2342** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + changeme + ``` +[PhotoSync](https://www.photosync-app.com/home.html) + +⚙️ **To Update or Change Branch** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/photoprism-update.sh)" +``` +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Ad Blocker +⬇____________________________________________________________________________________________ + +
+ Pi-hole LXC + +

+ +

Pi-hole LXC

+ +[Pi-hole](https://pi-hole.net/) is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server. + +To create a new Proxmox Pi-hole LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v4.sh)" +``` +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +⚠️ **Reboot Pi-hole LXC after install** + +**Pi-hole Interface - http:// IP/admin** + +⚙️ **To set your password:** + +Run in the LXC console + +```yaml +pihole -a -p +``` +____________________________________________________________________________________________ + +
+ +
+ Technitium DNS LXC + +

+ +

Technitium DNS LXC

+An open source authoritative as well as recursive DNS server + +To create a new Proxmox Technitium DNS LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/technitiumdns-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Technitium DNS Interface - IP:5380** + +⚙️ **To Update Technitium DNS** + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/technitiumdns-update.sh)" +``` +__________________________________________________________________________________________ + +
+ + +
+ AdGuard Home LXC + +

+ +

AdGuard Home LXC

+ +To create a new Proxmox AdGuard Home LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/adguard-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**AdGuard Home Setup Interface - IP:3000 (After Setup use only IP)** + + (For the Home Assistant Integration, use port `80` not `3000`) + +⚙️ **To Update Adguard** + +```yaml +Update from the Adguard UI +``` +__________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Document - Notes +⬇____________________________________________________________________________________________ + +
+ Paperless-ngx LXC + +

+ +

Paperless-ngx LXC

+ +[Paperless-ngx](https://paperless-ngx.readthedocs.io/en/latest/#) is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper. + +To create a new Proxmox Paperless-ngx LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/paperless-ngx-v4.sh)" +``` + +

⚡ Default Settings: 2048MiB RAM - 4GB Storage - 2vCPU ⚡

+ +**Paperless-ngx Interface - IP:8000** + +🛈 A paperless.creds file is in root home directory that contains the usernames and passwords. + +Run in the LXC Console +```yaml +cat paperless.creds +``` + +⚙️ **To Update Paperless-ngx** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/paperless-ngx-update.sh)" +``` +____________________________________________________________________________________________ + +
+ +
+ Trilium LXC + +

+ +

Trilium LXC

+ +[Trilium](https://github.com/zadam/trilium#trilium-notes) is a hierarchical note taking application with focus on building large personal knowledge bases. + +To create a new Proxmox Trilium LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/trilium-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Trilium Interface - IP:8080** + +⚙️ **To Update Trilium** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/trilium-update.sh)" +``` + +____________________________________________________________________________________________ + +
+ +
+ Wiki.js LXC + +

+ +

Wiki.js LXC

+ +[Wiki.js](https://js.wiki/) is a modern, lightweight and powerful wiki app built on NodeJS. + +To create a new Proxmox Wiki.js LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wikijs-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Wiki.js Interface - IP:3000** + +____________________________________________________________________________________________ + +
+ +
+ NocoDB LXC + +

+ +

NocoDB LXC

+ +[NocoDB](https://www.nocodb.com/) is an open source #NoCode platform that turns any database into a smart spreadsheet. Airtable Alternative. + +To create a new Proxmox NocoDB LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nocodb-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

+ +**NocoDB Interface - IP:8080/dashboard** + +⚙️ **To Update NocoDB** + +Run in the LXC console +```yaml +cd /opt/nocodb && npm run upgrade +``` + +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ +
+ Dashboards +⬇____________________________________________________________________________________________ + +
+ Heimdall Dashboard LXC + +

+ +

Heimdall Dashboard LXC

+ +[Heimdall Application Dashboard](https://camo.githubusercontent.com/bcfd4f74c93b25bea7b14eacbafd649206bf754a3d4b596329968f0ee569cf3c/68747470733a2f2f692e696d6775722e636f6d2f4d72433451704e2e676966) is a dashboard for all your web applications. It doesn't need to be limited to applications though, you can add links to anything you like. + +To create a new Proxmox Heimdall Dashboard LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/heimdalldashboard-v4.sh)" +``` +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Heimdall Dashboard Interface - IP:7990** + +⚙️ **To Update Heimdall Dashboard** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/heimdalldashboard-all-update.sh)" +``` + +__________________________________________________________________________________________ + +
+ +
+ Homepage LXC + +

+ +

Homepage LXC

+ +[Homepage](https://github.com/benphelps/homepage) is a self-hosted dashboard. + +To create a new Proxmox Homepage LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4.sh)" +``` + +

⚡ Default Settings: 1GB RAM - 3GB Storage - 2vCPU ⚡

+ +[Configuration](https://github.com/benphelps/homepage/wiki) (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/` + +**Homepage Interface - IP:3000** + +⚙️ **To Update Homepage** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/homepage-update.sh)" +``` + +____________________________________________________________________________________________ + +
+ +
+ Dashy LXC + +

+ +

Dashy LXC

+ +Dashy helps you organize your self-hosted services by making them accessible from a single place + +To create a new Proxmox Dashy LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/dashy-v4.sh)" +``` +

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

+ +**Dashy Interface - IP:4000** + +After getting everything setup the way you want in interactive mode and saved to disk, you have to go into update configuration and rebuild application. + +⚙️ **To Update Dashy** + +Run in the LXC Console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/dashy-update.sh)" +``` + +__________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ +
+ + +
+ File Working +⬇____________________________________________________________________________________________ +
+ File Browser + +

+ +

File Browser

+ +To Install File Browser, ⚠️ run the following in the LXC console. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/filebrowser.sh)" +``` + +[File Browser](https://filebrowser.org/features) is a create-your-own-cloud-kind of software where you can install it on a server, direct it to a path and then access your files through a nice web interface. Many available features! + + + +**File Browser Interface - http:// IP:8080** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + changeme + ``` + +⚙️ **To Update File Browser** + +```yaml +curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash +``` +___________________________________________________________________________________________ + +
+ +
+ VS Code Server + +

+ +

VS Code Server

+ +To Install VS Code Server, ⚠️ run the following in the LXC console. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/code-server.sh)" +``` + +[VS Code Server](https://code.visualstudio.com/docs/remote/vscode-server) is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH. + + + +**VS Code Server Interface - http:// IP:8680** + +___________________________________________________________________________________________ + +
+ +
+ Webmin System Administration + +

+ +

Webmin System Administration

+ +To Install Webmin System Administration [(Screenshot)](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/file-manager.png), ⚠️ run the following in the LXC console. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/webmin.sh)" +``` + +If you prefer to manage all aspects of your Proxmox LXC from a graphical interface instead of the command line interface, Webmin might be right for you. + +Benefits include automatic daily security updates, backup and restore, file manager with editor, web control panel, and preconfigured system monitoring with optional email alerts. + + + +**Webmin Interface - https:// IP:10000 (https)** + +⚙️ **Initial Login** + +**username** + ```yaml + root + ``` + **password** + ```yaml + root + ``` + +⚙️ **To Update Webmin** + +```yaml +Update from the Webmin UI +``` +⚙️ **To Uninstall Webmin** + +Run in the LXC console +```yaml +bash /etc/webmin/uninstall.sh +``` +___________________________________________________________________________________________ + +
+ +
+ Syncthing LXC + +

+ +

Syncthing LXC

+ +[Syncthing](https://syncthing.net/) is a continuous file synchronization program. It synchronizes files between two or more computers. + +To create a new Proxmox Syncthing LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/syncthing-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +⚙️ For the initial start, run `syncthing --gui-address=0.0.0.0:8384` in the LXC console, then go to the LXC IP:8384 In settings set the LXC IP address under the GUI (also set the GUI Authentication User and GUI Authentication Password) and Connections tab's and save. Reboot the LXC. + +**Syncthing Interface - IP:8384** + +⚙️ **To Update Syncthing** + +```yaml +apt update && apt upgrade -y +``` + +____________________________________________________________________________________________ + +
+ +
+ Daemon Sync Server LXC + +

+ +

Daemon Sync Server LXC

+ +Sync files from app to server, share photos & videos, back up your data and stay secure inside local network. + +To create a new Proxmox Daemon Sync Server LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/daemonsync-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 8GB Storage - 1vCPU ⚡

+ +**Daemon Sync Server Interface - IP:8084** + +Search: `DAEMON Sync` in your favorite app store + +__________________________________________________________________________________________ + +
+⬆__________________________________________________________________________________________ + +
+ +
+ Misc. +⬇__________________________________________________________________________________________ + +
+ Vaultwarden LXC + +

+ +

Vaultwarden LXC

+ +Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream [Bitwarden clients](https://bitwarden.com/download/), perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. + +To create a new Proxmox Vaultwarden LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden-v4.sh)" +``` +⚠️ Vaultwarden needs to be behind a proxy (Nginx Proxy Manager) to obtain HTTPS and to allow clients to connect. + +The script builds from source, which takes time and resources. After the build, the script will automatically set resources to Normal Settings. + +Expect 30+ minute install time. +

⚡ Build Settings: 2048Mib RAM - 6GB Storage - 2vCPU ⚡

+

⚡ Normal Settings: 512Mib RAM - 6GB Storage - 1vCPU ⚡

+ +**Vaultwarden Interface: CTIP:8000** + +⚙️ **Path to Vaultwarden .env file** (to find the `ADMIN_TOKEN`) +```yaml +/opt/vaultwarden/.env +``` + +⚙️ **To Update Vaultwarden (post 2022-05-29 installs only)** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/vaultwarden-update.sh)" +``` +⚙️ **To Update Web-vault (any)** + +Run in the LXC console +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/web-vault-update.sh)" +``` + +____________________________________________________________________________________________ + +
+ +
+ grocy LXC + +

+ +

grocy LXC

+ +[grocy](https://grocy.info/) is a web-based self-hosted groceries & household management solution for your home. + +To create a new Proxmox grocy LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grocy-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**grocy Interface: http:// IP** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + admin + ``` + +⚙️ **To Update grocy** + +Run in the LXC console + ```yaml +bash /var/www/html/update.sh +``` +____________________________________________________________________________________________ + +
+ +
+ MagicMirror Server LXC + +

+ +

MagicMirror Server LXC

+ +[MagicMirror²](https://docs.magicmirror.builders/) is an open source modular smart mirror platform. + +To create a new MagicMirror Server LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 3GB Storage - 1vCPU ⚡

+ +**MagicMirror Interface - IP:8080** + +⚙️ **[Configuration](https://docs.magicmirror.builders/configuration/introduction.html#configuring-your-magicmirror)** +```yaml +/opt/magicmirror/config/config.js +``` +⚙️ **[Update MagicMirror](https://docs.magicmirror.builders/getting-started/upgrade-guide.html#upgrade-guide)** + +Run in the LXC Console +```yaml +cd /opt/magicmirror && git pull && npm install --only=prod --omit=dev +``` +____________________________________________________________________________________________ + +
+ +
+ Whoogle LXC + +

+ +

Whoogle LXC

+ +Get Google search results, but without any ads, javascript, AMP links, cookies, or IP address tracking. + +To create a new Proxmox Whoogle LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/whoogle-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ +**Whoogle Interface - IP:5000** + +⚙️ **To Update Whoogle** + +Run in the LXC console +```yaml +pip3 install whoogle-search --upgrade +``` +____________________________________________________________________________________________ + +
+ +
+ MotionEye VMS LXC + +

+ +

MotionEye VMS LXC

+ +To create a new Proxmox MotionEye VMS LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**MotionEye Interface - IP:8765** + +⚙️ **Initial Login** + +**username** + ```yaml + admin + ``` + **password** + ```yaml + + ``` + +⚙️ **To Update MotionEye** + +Run in the LXC console + ```yaml +pip install motioneye --upgrade +``` +____________________________________________________________________________________________ + +
+⬆____________________________________________________________________________________________ + +
From e2b17148938735619d9e25b064b7788f1768ab48 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 16:28:23 -0400 Subject: [PATCH 0365/3335] Rename README.md to README_OLD.md --- README.md => README_OLD.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => README_OLD.md (100%) diff --git a/README.md b/README_OLD.md similarity index 100% rename from README.md rename to README_OLD.md From 87461ec0669250e6ead68f04098930e380c9fd50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 16:28:51 -0400 Subject: [PATCH 0366/3335] Rename README_NEW.md to README.md --- README_NEW.md => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README_NEW.md => README.md (100%) diff --git a/README_NEW.md b/README.md similarity index 100% rename from README_NEW.md rename to README.md From 9c64633731c8ed486e51fde0d9e3e90b6f9a3d12 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 16:42:20 -0400 Subject: [PATCH 0367/3335] Update README.md --- README.md | 64 +++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index ac97b90b..b0c56e7a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ href="https://ko-fi.com/D1D7EP4GF">
Proxmox Tools -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Proxmox VE 7 Post Install @@ -143,12 +143,12 @@ It's recommended to answer `y` to all options. ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Home Assistant -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Home Assistant OS VM @@ -385,12 +385,12 @@ After install, reboot Home Assistant and **clear browser cache** then Add HACS i ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Automation -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
ioBroker LXC @@ -609,12 +609,12 @@ npm update -g n8n ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
MQTT -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
MQTT LXC @@ -712,13 +712,13 @@ apt update && apt upgrade -y ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Database -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Mariadb LXC @@ -958,12 +958,12 @@ apt update && apt upgrade -y ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Zigbee - Zwave -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Zigbee2MQTT LXC @@ -1108,12 +1108,12 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-js-u ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Monitoring - Analytics -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Uptime Kuma LXC @@ -1213,12 +1213,12 @@ apt update && apt upgrade -y ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Docker -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Docker LXC @@ -1282,12 +1282,12 @@ update from the CasaOS UI ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
OS -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Debian LXC @@ -1343,12 +1343,12 @@ apt update && apt upgrade -y ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Server - Networklng -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Nginx Proxy Manager LXC @@ -1662,12 +1662,12 @@ Setup is done via VM console. ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Media - Photo -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Plex Media Server LXC @@ -1890,12 +1890,12 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/photoprism ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Ad Blocker -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Pi-hole LXC @@ -1983,12 +1983,12 @@ Update from the Adguard UI __________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Document - Notes -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Paperless-ngx LXC @@ -2108,12 +2108,12 @@ cd /opt/nocodb && npm run upgrade ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
Dashboards -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
Heimdall Dashboard LXC @@ -2206,13 +2206,13 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/dashy-upda __________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
File Working -⬇____________________________________________________________________________________________ +⬇__________________________________________________________________________________________
File Browser @@ -2377,13 +2377,13 @@ Search: `DAEMON Sync` in your favorite app store __________________________________________________________________________________________
-⬆__________________________________________________________________________________________ +⬆________________________________________________________________________________________
Misc. -⬇__________________________________________________________________________________________ +⬇________________________________________________________________________________________
Vaultwarden LXC @@ -2570,6 +2570,6 @@ pip install motioneye --upgrade ____________________________________________________________________________________________
-⬆____________________________________________________________________________________________ +⬆__________________________________________________________________________________________
From d46ce6a1146de477b35facc42b2552b8b9dd8bcf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 17:49:27 -0400 Subject: [PATCH 0368/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0c56e7a..c91421b4 100644 --- a/README.md +++ b/README.md @@ -1347,7 +1347,7 @@ ________________________________________________________________________________
- Server - Networklng + Server - Networking ⬇__________________________________________________________________________________________
From 84a4c26b2d27cf68fc97778ef9487bd948f6dc32 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 20:19:43 -0400 Subject: [PATCH 0369/3335] Update homeassistant-core-install.sh --- setup/homeassistant-core-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index a8783e1b..3749faa2 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -108,7 +108,7 @@ After=network-online.target Type=simple WorkingDirectory=/root/.homeassistant ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" - +RestartForceExitStatus=100 [Install] WantedBy=multi-user.target EOF From abec4b0fa7dbd3d385ad6fdfa154130b09b8edf0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 20:46:25 -0400 Subject: [PATCH 0370/3335] Update influxdb-install.sh --- setup/influxdb-install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 3faa99b9..ec96f9d1 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -81,9 +81,21 @@ wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - &>/dev/ echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list &>/dev/null msg_ok "Set up InfluxDB Repository" +read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt +if [[ $prompt == "2" ]] +then +INFLUX="2" +else +INFLUX="1" +fi + msg_info "Installing InfluxDB" apt-get update &>/dev/null +if [[ $INFLUX == "2" ]]; then +apt-get install -y influxdb2 &>/dev/null +else apt-get install -y influxdb &>/dev/null +fi msg_ok "Installed InfluxDB" read -r -p "Would you like to add Telegraf? " prompt From dfc40d04ab67cf378ac1b9e1a221e1e20499c8e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Oct 2022 20:49:09 -0400 Subject: [PATCH 0371/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c91421b4..807fa149 100644 --- a/README.md +++ b/README.md @@ -920,7 +920,7 @@ ________________________________________________________________________________

InfluxDB LXC

-

Option to Install Telegraf

+

Options to Install InfluxDB v1 or v2 and Telegraf

[InfluxDB](https://www.influxdata.com/) is an open-source time series database developed by the company InfluxData. From 26566524a88f0d183b38f2f4aa221f7ffe366a38 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 3 Oct 2022 03:09:08 -0400 Subject: [PATCH 0372/3335] Create hacore2hacore-data.sh --- misc/hacore2hacore-data.sh | 112 +++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 misc/hacore2hacore-data.sh diff --git a/misc/hacore2hacore-data.sh b/misc/hacore2hacore-data.sh new file mode 100644 index 00000000..44c67f6f --- /dev/null +++ b/misc/hacore2hacore-data.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +clear +while true; do + read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" + exit $EXIT +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup() { + [ -d "${CTID_FROM_PATH:-}" ] && pct unmount $CTID_FROM + [ -d "${CTID_TO_PATH:-}" ] && pct unmount $CTID_TO + popd >/dev/null + rm -rf $TEMP_DIR +} +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null + +TITLE="Home Assistant LXC Data Copy" +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) +done < <(pct list | awk 'NR>1') +while [ -z "${CTID_FROM:+x}" ]; do + CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + "\nWhich HA Core LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done +while [ -z "${CTID_TO:+x}" ]; do + CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + "\nWhich HA Core LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done +for i in ${!CTID_MENU[@]}; do + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) +done +whiptail --defaultno --title "$TITLE" --yesno \ +"Are you sure you want to copy data between the following LXCs? +$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) +Version: 2022.10.03" 13 50 || exit +info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" +if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then + msg "Stopping '$CTID_TO'..." + pct stop $CTID_TO +fi +msg "Mounting Container Disks..." +DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data +CORE_PATH=/root/.homeassistant +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ + die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." +[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \ + die "Home Assistant directories in '$CTID_FROM' not found." +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ + die "There was a problem mounting the root disk of LXC '${CTID_TO}'." +[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \ + die "Home Assistant directories in '$CTID_TO' not found." + +msg "Copying Data..." +RSYNC_OPTIONS=( + --archive + --hard-links + --sparse + --xattrs + --no-inc-recursive + --info=progress2 +) +msg "<======== Docker Data ========>" +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${CORE_PATH} ${CTID_TO_PATH}${CORE_PATH} +echo -en "\e[1A\e[0K\e[1A\e[0K" + +info "Successfully Transferred Data." + +# Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC +# run from the Proxmox Shell +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacore2hacore-data.sh)" From 8b6561d6b46f546d25987a55581f97e2fcd66e6f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 3 Oct 2022 06:08:14 -0400 Subject: [PATCH 0373/3335] Update homeassistant-core-install.sh --- setup/homeassistant-core-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 3749faa2..783ac845 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -77,6 +77,7 @@ apt-get install -y \ libffi-dev \ libssl-dev \ libjpeg-dev \ + libpcap-dev \ zlib1g-dev \ autoconf \ build-essential \ @@ -95,6 +96,8 @@ python3 -m venv . source bin/activate python3 -m pip install wheel &>/dev/null pip3 install homeassistant &>/dev/null +pip3 install Cython &>/dev/null +pip3 install python-libpcap &>/dev/null pip3 install psycopg2-binary &>/dev/null msg_ok "Installed Home Assistant-Core" From 5d47b17d407174e5c7093e158d20fb9f7d89a602 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 3 Oct 2022 12:29:01 -0400 Subject: [PATCH 0374/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 807fa149..6b0a3868 100644 --- a/README.md +++ b/README.md @@ -2211,7 +2211,7 @@ ________________________________________________________________________________
- File Working + File - Code ⬇__________________________________________________________________________________________
File Browser From 8c619bcf7f1b4cba7ca7ef53dc89735fbaeb3cd0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Oct 2022 13:38:23 -0400 Subject: [PATCH 0375/3335] Update zigbee2mqtt-install.sh --- setup/zigbee2mqtt-install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 944e2981..a7fe1668 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -86,11 +86,22 @@ apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Setting up Zigbee2MQTT Repository" -sudo git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null +git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null msg_ok "Set up Zigbee2MQTT Repository" +read -r -p "Switch to Edge/dev branch? (y/N) " prompt +if [[ $prompt == "y" ]] +then +DEV="y" +else +DEV="n" +fi + msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt &>/dev/null +if [[ $DEV == "y" ]]; then +git checkout dev &>/dev/null +fi npm ci &>/dev/null msg_ok "Installed Zigbee2MQTT" From 65a0024c9b0a228e971539615adc8777146895a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Oct 2022 13:44:36 -0400 Subject: [PATCH 0376/3335] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6b0a3868..4590b39d 100644 --- a/README.md +++ b/README.md @@ -973,6 +973,8 @@ ________________________________________________________________________________

Zigbee2MQTT LXC

+

Option to switch to Edge/dev branch

+ [Zigbee2MQTT](https://www.zigbee2mqtt.io/) is a standalone nodejs application that connects a zigbee network to MQTT To create a new Proxmox Zigbee2MQTT LXC, run the following in the Proxmox Shell. From 3309c8465b8a181d2eaee88ac2055eca93c6470e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Oct 2022 19:03:47 -0400 Subject: [PATCH 0377/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4590b39d..8add1099 100644 --- a/README.md +++ b/README.md @@ -1896,7 +1896,7 @@ ________________________________________________________________________________
- Ad Blocker + Ad Blocker - DNS ⬇__________________________________________________________________________________________
From 287e1b7047d29cf615a248a7eac7bf78c312aca9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 06:56:41 -0400 Subject: [PATCH 0378/3335] Create umbrel-v4.sh --- ct/umbrel-v4.sh | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 ct/umbrel-v4.sh diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh new file mode 100644 index 00000000..5935bc2e --- /dev/null +++ b/ct/umbrel-v4.sh @@ -0,0 +1,250 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Umbrel" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + __ __ __ __ + / / / /___ ___v4/ /_ ________ / / + / / / / __ `__ \/ __ \/ ___/ _ \/ / +/ /_/ / / / / / / /_/ / / / __/ / +\____/_/ /_/ /_/_.___/_/ \___/_/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; +else + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP} ${CL} \n" From bc80b2d9f2047c2658132f2f6e8fccdddf3a4f6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 06:57:39 -0400 Subject: [PATCH 0379/3335] Create umbrel-install.sh --- setup/umbrel-install.sh | 109 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 setup/umbrel-install.sh diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh new file mode 100644 index 00000000..bd6c5a7b --- /dev/null +++ b/setup/umbrel-install.sh @@ -0,0 +1,109 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +cat >$DOCKER_CONFIG_PATH <<'EOF' +{ + "log-driver": "journald" +} +EOF + +msg_info "Installing Umbrel (Patience)" +curl -sL https://umbrel.sh | bash &>/dev/null +msg_ok "Installed Umbrel" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +rm /etc/motd +rm /etc/update-motd.d/10-uname +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 778f76b7efc839b8c9bbe3c46062323b12366607 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 07:04:49 -0400 Subject: [PATCH 0380/3335] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 8add1099..f6b0cdaf 100644 --- a/README.md +++ b/README.md @@ -1255,6 +1255,36 @@ ________________________________________________________________________________
+
+ Umbrel LXC + +

+ +

Umbrel LXC

+ +[Umbrel](https://umbrel.com/) is a beautiful personal server OS for self-hosting. + + +To create a new Proxmox Umbrel LXC, run the following in the Proxmox Shell. + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/umbrel-v4.sh)" +``` + +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +**Umbrel Interface - IP** + +⚙️ **To Update Umbrel** + +```yaml +update from the Umbrel UI +``` + +____________________________________________________________________________________________ + +
+
CasaOS LXC From 4e57cde91ea91f71c49add913866be0177b254dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 07:08:38 -0400 Subject: [PATCH 0381/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6b0cdaf..e6a79a2f 100644 --- a/README.md +++ b/README.md @@ -1256,7 +1256,7 @@ ________________________________________________________________________________
- Umbrel LXC + 🔸Umbrel LXC

From 50c0c77a6d3b9e9665b7965754f644e5edabb8cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 07:09:50 -0400 Subject: [PATCH 0382/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 39972f0c..2ed7b887 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-10-05 + +### Changed + +- **Umbrel LXC** + - NEW Script + ## 2022-09-29 ### Changed From 77e813ab64a75a19a802884460b12f67836144d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 07:11:22 -0400 Subject: [PATCH 0383/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2ed7b887..d8647143 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Changed -- **Umbrel LXC** +- **Umbrel LXC** (Docker) - NEW Script ## 2022-09-29 From a962aaaab2e7ba39fed8d2297af02fcf19e56280 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 07:29:16 -0400 Subject: [PATCH 0384/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index d8647143..0a0eee2b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,8 +7,8 @@ All notable changes to this project will be documented in this file. ### Changed -- **Umbrel LXC** (Docker) - - NEW Script +- **Umbrel LXC** + - NEW Script (Docker) ## 2022-09-29 From 23da0e4655ea2b3b506e2d926c4ea52e5c004f3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 11:24:46 -0400 Subject: [PATCH 0385/3335] Create blocky-v4.sh --- ct/blocky-v4.sh | 243 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 ct/blocky-v4.sh diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh new file mode 100644 index 00000000..dd6e1821 --- /dev/null +++ b/ct/blocky-v4.sh @@ -0,0 +1,243 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Blocky" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat << "EOF" + ____ __ __ + / __ )/ /___v4_____/ /____ __ + / __ / / __ \/ ___/ //_/ / / / + / /_/ / / /_/ / /__/ ,< / /_/ / +/_____/_/\____/\___/_/|_|\__, / + /____/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) +if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"1" "Unprivileged" ON \ +"0" "Privileged" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +fi +PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi +fi +CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; +fi +CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; +else + if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; +fi +DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; + if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; +fi +NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; +fi +GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then GATE1="Default" GATE=""; + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi +fi +MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then MAC1="Default" MAC=""; + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" +else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From b658f5fcde0cc7ac99a09589d3e59c8322931531 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 11:25:50 -0400 Subject: [PATCH 0386/3335] Create blocky-install.sh --- setup/blocky-install.sh | 355 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 setup/blocky-install.sh diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh new file mode 100644 index 00000000..33330ff0 --- /dev/null +++ b/setup/blocky-install.sh @@ -0,0 +1,355 @@ +#!/usr/bin/env bash +YW=`echo "\033[33m"` +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + 1>&2 echo -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ] + then + 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Blocky" +RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz &>/dev/null +mkdir -p /opt/blocky +tar -xf blocky_0.19_Linux_x86_64.tar.gz -C /opt/blocky +rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz +cat << EOF > /opt/blocky/config.yml +upstream: + # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query + # format for resolver: [net:]host:[port][/path]. net could be empty (default, shortcut for tcp+udp), tcp+udp, tcp, udp, tcp-tls or https (DoH). If port is empty, default port will be used (53 for udp and tcp, 853 for tcp-tls, 443 for https (Doh)) + # this configuration is mandatory, please define at least one external DNS resolver + default: + # example for tcp+udp IPv4 server (https://digitalcourage.de/) + #- 5.9.164.112 + # Cloudflare + - 1.1.1.1 + # example for DNS-over-TLS server (DoT) + #- tcp-tls:fdns1.dismail.de:853 + # example for DNS-over-HTTPS (DoH) + #- https://dns.digitale-gesellschaft.ch/dns-query + # optional: use client name (with wildcard support: * - sequence of any characters, [0-9] - range) + # or single ip address / client subnet as CIDR notation + #laptop*: + #- 123.123.123.123 + +# optional: timeout to query the upstream resolver. Default: 2s +#upstreamTimeout: 2s + +# optional: If true, blocky will fail to start unless at least one upstream server per group is reachable. Default: false +#startVerifyUpstream: true + +# optional: Determines how blocky will create outgoing connections. This impacts both upstreams, and lists. +# accepted: dual, v4, v6 +# default: dual +#connectIPVersion: dual + +# optional: custom IP address(es) for domain name (with all sub-domains). Multiple addresses must be separated by a comma +# example: query "printer.lan" or "my.printer.lan" will return 192.168.178.3 +#customDNS: + #customTTL: 1h + # optional: if true (default), return empty result for unmapped query types (for example TXT, MX or AAAA if only IPv4 address is defined). + # if false, queries with unmapped types will be forwarded to the upstream resolver + #filterUnmappedTypes: true + # optional: replace domain in the query with other domain before resolver lookup in the mapping + #rewrite: + #example.com: printer.lan + #mapping: + #printer.lan: 192.168.178.3,2001:0db8:85a3:08d3:1319:8a2e:0370:7344 + +# optional: definition, which DNS resolver(s) should be used for queries to the domain (with all sub-domains). Multiple resolvers must be separated by a comma +# Example: Query client.fritz.box will ask DNS server 192.168.178.1. This is necessary for local network, to resolve clients by host name +#conditional: + # optional: if false (default), return empty result if after rewrite, the mapped resolver returned an empty answer. If true, the original query will be sent to the upstream resolver + # Example: The query "blog.example.com" will be rewritten to "blog.fritz.box" and also redirected to the resolver at 192.168.178.1. If not found and if was set to , the original query "blog.example.com" will be sent upstream. + # Usage: One usecase when having split DNS for internal and external (internet facing) users, but not all subdomains are listed in the internal domain. + #fallbackUpstream: false + # optional: replace domain in the query with other domain before resolver lookup in the mapping + #rewrite: + #example.com: fritz.box + #mapping: + #fritz.box: 192.168.178.1 + #lan.net: 192.168.178.1,192.168.178.2 + +# optional: use black and white lists to block queries (for example ads, trackers, adult pages etc.) +blocking: + # definition of blacklist groups. Can be external link (http/https) or local file + blackLists: + ads: + - https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt + - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts + - http://sysctl.org/cameleon/hosts + - https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt + - | + # inline definition with YAML literal block scalar style + # hosts format + someadsdomain.com + special: + - https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts + # definition of whitelist groups. Attention: if the same group has black and whitelists, whitelists will be used to disable particular blacklist entries. If a group has only whitelist entries -> this means only domains from this list are allowed, all other domains will be blocked + whiteLists: + ads: + - whitelist.txt + - | + # inline definition with YAML literal block scalar style + # hosts format + whitelistdomain.com + # this is a regex + /^banners?[_.-]/ + # definition: which groups should be applied for which client + clientGroupsBlock: + # default will be used, if no special definition for a client name exists + default: + - ads + - special + # use client name (with wildcard support: * - sequence of any characters, [0-9] - range) + # or single ip address / client subnet as CIDR notation + #laptop*: + #- ads + #192.168.178.1/24: + #- special + # which response will be sent, if query is blocked: + # zeroIp: 0.0.0.0 will be returned (default) + # nxDomain: return NXDOMAIN as return code + # comma separated list of destination IP addresses (for example: 192.100.100.15, 2001:0db8:85a3:08d3:1319:8a2e:0370:7344). Should contain ipv4 and ipv6 to cover all query types. Useful with running web server on this address to display the "blocked" page. + blockType: zeroIp + # optional: TTL for answers to blocked domains + # default: 6h + blockTTL: 1m + # optional: automatically list refresh period (in duration format). Default: 4h. + # Negative value -> deactivate automatically refresh. + # 0 value -> use default + refreshPeriod: 4h + # optional: timeout for list download (each url). Default: 60s. Use large values for big lists or slow internet connections + downloadTimeout: 4m + # optional: Download attempt timeout. Default: 60s + downloadAttempts: 5 + # optional: Time between the download attempts. Default: 1s + downloadCooldown: 10s + # optional: if failOnError, application startup will fail if at least one list can't be downloaded / opened. Default: blocking + #startStrategy: failOnError + +# optional: configuration for caching of DNS responses +caching: + # duration how long a response must be cached (min value). + # If <=0, use response's TTL, if >0 use this value, if TTL is smaller + # Default: 0 + minTime: 5m + # duration how long a response must be cached (max value). + # If <0, do not cache responses + # If 0, use TTL + # If > 0, use this value, if TTL is greater + # Default: 0 + maxTime: 30m + # Max number of cache entries (responses) to be kept in cache (soft limit). Useful on systems with limited amount of RAM. + # Default (0): unlimited + maxItemsCount: 0 + # if true, will preload DNS results for often used queries (default: names queried more than 5 times in a 2-hour time window) + # this improves the response time for often used queries, but significantly increases external traffic + # default: false + prefetching: true + # prefetch track time window (in duration format) + # default: 120 + prefetchExpires: 2h + # name queries threshold for prefetch + # default: 5 + prefetchThreshold: 5 + # Max number of domains to be kept in cache for prefetching (soft limit). Useful on systems with limited amount of RAM. + # Default (0): unlimited + #prefetchMaxItemsCount: 0 + +# optional: configuration of client name resolution +clientLookup: + # optional: this DNS resolver will be used to perform reverse DNS lookup (typically local router) + #upstream: 192.168.178.1 + # optional: some routers return multiple names for client (host name and user defined name). Define which single name should be used. + # Example: take second name if present, if not take first name + #singleNameOrder: + #- 2 + #- 1 + # optional: custom mapping of client name to IP addresses. Useful if reverse DNS does not work properly or just to have custom client names. + #clients: + #laptop: + #- 192.168.178.29 +# optional: configuration for prometheus metrics endpoint +prometheus: + # enabled if true + #enable: true + # url path, optional (default '/metrics') + #path: /metrics + +# optional: write query information (question, answer, client, duration etc.) to daily csv file +queryLog: + # optional one of: mysql, postgresql, csv, csv-client. If empty, log to console + #type: mysql + # directory (should be mounted as volume in docker) for csv, db connection string for mysql/postgresql + #target: db_user:db_password@tcp(db_host_or_ip:3306)/db_name?charset=utf8mb4&parseTime=True&loc=Local + #postgresql target: postgres://user:password@db_host_or_ip:5432/db_name + # if > 0, deletes log files which are older than ... days + #logRetentionDays: 7 + # optional: Max attempts to create specific query log writer, default: 3 + #creationAttempts: 1 + # optional: Time between the creation attempts, default: 2s + #creationCooldown: 2s + +# optional: Blocky can synchronize its cache and blocking state between multiple instances through redis. +redis: + # Server address and port + #address: redis:6379 + # Password if necessary + #password: passwd + # Database, default: 0 + #database: 2 + # Connection is required for blocky to start. Default: false + #required: true + # Max connection attempts, default: 3 + #connectionAttempts: 10 + # Time between the connection attempts, default: 1s + #connectionCooldown: 3s + +# optional: DNS listener port(s) and bind ip address(es), default 53 (UDP and TCP). Example: 53, :53, "127.0.0.1:5353,[::1]:5353" +port: 553 +# optional: Port(s) and bind ip address(es) for DoT (DNS-over-TLS) listener. Example: 853, 127.0.0.1:853 +#tlsPort: 853 +# optional: HTTPS listener port(s) and bind ip address(es), default empty = no http listener. If > 0, will be used for prometheus metrics, pprof, REST API, DoH... Example: 443, :443, 127.0.0.1:443 +#httpPort: 4000 +#httpsPort: 443 +# optional: Mininal TLS version that the DoH and DoT server will use +#minTlsServeVersion: 1.3 +# if https port > 0: path to cert and key file for SSL encryption. if not set, self-signed certificate will be generated +#certFile: server.crt +#keyFile: server.key +# optional: use this DNS server to resolve blacklist urls and upstream DNS servers. Useful if no DNS resolver is configured and blocky needs to resolve a host name. Format net:IP:port, net must be udp or tcp +#bootstrapDns: tcp+udp:1.1.1.1 + +filtering: +# optional: drop all queries with following query types. Default: empty + #queryTypes: + #- AAAA + +# optional: if path defined, use this file for query resolution (A, AAAA and rDNS). Default: empty +hostsFile: + # optional: Path to hosts file (e.g. /etc/hosts on Linux) + #filePath: /etc/hosts + # optional: TTL, default: 1h + #hostsTTL: 60m + # optional: Time between hosts file refresh, default: 1h + #refreshPeriod: 30m + # optional: Whether loopback hosts addresses (127.0.0.0/8 and ::1) should be filtered or not, default: false + #filterLoopback: true +# optional: Log level (one from debug, info, warn, error). Default: info +#logLevel: info +# optional: Log format (text or json). Default: text +#logFormat: text +# optional: log timestamps. Default: true +#logTimestamp: true +# optional: obfuscate log output (replace all alphanumeric characters with *) for user sensitive data like request domains or responses to increase privacy. Default: false +#logPrivacy: false + +# optional: add EDE error codes to dns response +#ede: + # enabled if true, Default: false + #enable: true +EOF +msg_ok "Installed Blocky" + +msg_info "Creating Service" +cat << EOF > /etc/systemd/system/blocky.service +[Unit] +Description=Blocky +After=network.target +[Service] +User=root +WorkingDirectory=/opt/blocky +ExecStart=/opt/blocky/./blocky --config config.yml +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now blocky +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6); + if [[ $PASS != $ ]]; then +msg_info "Customizing Container" +chmod -x /etc/update-motd.d/* +touch ~/.hushlogin +GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" +mkdir -p $(dirname $GETTY_OVERRIDE) +cat << EOF > $GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF +systemctl daemon-reload +systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') +msg_ok "Customized Container" + fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From db23eec00c81710dfc7ede7ae4c2c10120083488 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 11:38:18 -0400 Subject: [PATCH 0387/3335] Update README.md --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index e6a79a2f..c502db0a 100644 --- a/README.md +++ b/README.md @@ -2015,6 +2015,34 @@ Update from the Adguard UI __________________________________________________________________________________________
+ +
+ 🔸Blocky LXC + +

+ +

Blocky LXC

+ +[Blocky](https://0xerr0r.github.io/blocky/) is a DNS proxy and ad-blocker for the local network written in Go. + +To create a new Proxmox Blocky LXC, run the following in the Proxmox Shell. + +```yaml +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/blocky-v4.sh)" +``` + +

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

+ + +⚙️ **To Update Blocky** + +```yaml +Working On +``` +__________________________________________________________________________________________ + +
+ ⬆__________________________________________________________________________________________
From e4c9b4e30228a6c747e45e6983e2f7787339426f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 11:39:29 -0400 Subject: [PATCH 0388/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0a0eee2b..09ad5b90 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Umbrel LXC** - NEW Script (Docker) +- **Blocky LXC** + - NEW Script (Adblocker - DNS) ## 2022-09-29 From e0b32a8c0d43266ac0a1bb1913f23b50465bcfad Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 12:06:50 -0400 Subject: [PATCH 0389/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c502db0a..8df1118b 100644 --- a/README.md +++ b/README.md @@ -2019,7 +2019,7 @@ ________________________________________________________________________________
🔸Blocky LXC -

+

Blocky LXC

From 21cb6734a4f9c2029c0cab22daf574bfe80e91b3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 13:24:05 -0400 Subject: [PATCH 0390/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8df1118b..46cd880b 100644 --- a/README.md +++ b/README.md @@ -2034,10 +2034,10 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/blocky-v4.sh

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

-⚙️ **To Update Blocky** +⚙️ **Blocky Config Path** ```yaml -Working On +/opt/blocky/config.yml ``` __________________________________________________________________________________________ From 4da3ea90b173d2ad1791a428153b775d4a77f33a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 13:30:40 -0400 Subject: [PATCH 0391/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46cd880b..1c87629d 100644 --- a/README.md +++ b/README.md @@ -2023,7 +2023,7 @@ ________________________________________________________________________________

Blocky LXC

-[Blocky](https://0xerr0r.github.io/blocky/) is a DNS proxy and ad-blocker for the local network written in Go. +[Blocky](https://0xerr0r.github.io/blocky/) is a DNS proxy and ad-blocker for the local network written in Go. 🚨 For Advanced Users. No UI. To create a new Proxmox Blocky LXC, run the following in the Proxmox Shell. From a025cf15514405cddc506d86c484aa34ce24f7c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 18:19:39 -0400 Subject: [PATCH 0392/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1c87629d..b0db91c1 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ ________________________________________________________________________________
- 🔸PiMox HAOS VM + PiMox HAOS VM

@@ -262,7 +262,7 @@ ________________________________________________________________________________
- 🔸Home Assistant Core LXC + Home Assistant Core LXC

From d90b2fbac3df2cc48e5ff13c17ec3573f671d952 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 20:31:09 -0400 Subject: [PATCH 0393/3335] Update zwave-js-ui-install.sh --- setup/zwave-js-ui-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 8948e19b..e30bfdd7 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -78,8 +78,9 @@ msg_info "Installing Z-Wave JS UI" mkdir /opt/zwave-js-ui cd /opt/zwave-js-ui mkdir store -curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null -unzip zwave-js-ui-v*.zip zwave-js-ui &>/dev/null +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null +unzip zwave-js-ui-${RELEASE}.zip zwave-js-ui &>/dev/null msg_ok "Installed Z-Wave JS UI" msg_info "Creating Service" From 89c85f829017ea1d1a237243785b1e4e2851c716 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 20:37:33 -0400 Subject: [PATCH 0394/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 70108b55..53168069 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -35,8 +35,9 @@ clear echo -en "${GN} Updating Z-wave JS UI... " systemctl stop zwave-js-ui.service cd /opt/zwave-js-ui -curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -i - &>/dev/null -unzip -o zwave-js-ui-v*.zip zwave-js-ui &>/dev/null +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null +unzip zwave-js-ui-${RELEASE}.zip zwave-js-ui &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " From 4ed405ee60400ec6e89baf41e16c7286107c08ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 20:46:41 -0400 Subject: [PATCH 0395/3335] Update zwave-js-ui-install.sh --- setup/zwave-js-ui-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index e30bfdd7..613a10ad 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -80,7 +80,7 @@ cd /opt/zwave-js-ui mkdir store RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}.zip zwave-js-ui &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui &>/dev/null msg_ok "Installed Z-Wave JS UI" msg_info "Creating Service" From e74ec49a55801f5897a2c66d68c80d8b53a91cbc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 20:47:49 -0400 Subject: [PATCH 0396/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 53168069..645145d3 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -37,11 +37,11 @@ systemctl stop zwave-js-ui.service cd /opt/zwave-js-ui RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}.zip zwave-js-ui &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " -rm zwave-js-ui-v*.zip +rm zwave-js-ui-${RELEASE}-linux.zip systemctl --system daemon-reload systemctl start zwave-js-ui.service echo -e "${CM}${CL} \n" From 5d5809c78c0f402756b375dac3841217e2182a09 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 20:48:44 -0400 Subject: [PATCH 0397/3335] Update zwave-js-ui-install.sh --- setup/zwave-js-ui-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 613a10ad..71025daf 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -118,7 +118,7 @@ msg_ok "Customized Container" fi msg_info "Cleaning up" -rm zwave-js-ui-v*.zip +rm zwave-js-ui-${RELEASE}-linux.zip apt-get autoremove >/dev/null apt-get autoclean >/dev/null msg_ok "Cleaned" From 342ce1229042ebd3cc62bb73095046b73ac2fe69 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 20:54:32 -0400 Subject: [PATCH 0398/3335] Update zwave-js-ui-install.sh --- setup/zwave-js-ui-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 71025daf..fd41363e 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -80,7 +80,7 @@ cd /opt/zwave-js-ui mkdir store RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null msg_ok "Installed Z-Wave JS UI" msg_info "Creating Service" @@ -92,7 +92,7 @@ After=network-online.target [Service] User=root WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] WantedBy=multi-user.target" > $service_path systemctl start zwave-js-ui From a28f172757e0c6f69737b672abb2c2c5659d6b0d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:01:16 -0400 Subject: [PATCH 0399/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 645145d3..0a1d48c3 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -37,7 +37,7 @@ systemctl stop zwave-js-ui.service cd /opt/zwave-js-ui RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " From cf49c462a7dd4c368e8bb6090803db33f36e3bda Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:09:02 -0400 Subject: [PATCH 0400/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 0a1d48c3..9276e3ff 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -38,12 +38,25 @@ cd /opt/zwave-js-ui RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null + +cat << EOF > /etc/systemd/system/zwave-js-ui.service +[Unit] +Description=zwave-js-ui +Wants=network-online.target +After=network-online.target +[Service] +User=root +WorkingDirectory=/opt/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux +[Install] +WantedBy=multi-user.target +EOF echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " -rm zwave-js-ui-${RELEASE}-linux.zip -systemctl --system daemon-reload -systemctl start zwave-js-ui.service +rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui +systemctl daemon-reload +systemctl enable --now zwave-js-ui.service echo -e "${CM}${CL} \n" echo -e "${GN} Finished ${CL}" From 5419f8fa229f1951b5cd0210c7b4698d7cf85f05 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:29:02 -0400 Subject: [PATCH 0401/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 9276e3ff..f80c638b 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -34,10 +34,10 @@ clear echo -en "${GN} Updating Z-wave JS UI... " systemctl stop zwave-js-ui.service -cd /opt/zwave-js-ui RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null +cp -R zwave-js-ui-linux /opt/zwave-js-ui cat << EOF > /etc/systemd/system/zwave-js-ui.service [Unit] @@ -54,7 +54,7 @@ EOF echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " -rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui +rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux systemctl daemon-reload systemctl enable --now zwave-js-ui.service echo -e "${CM}${CL} \n" From bf259b4b9d5350062fd736c9d4a44b6cc34b56b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:39:18 -0400 Subject: [PATCH 0402/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index f80c638b..75ed1a9a 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -37,7 +37,7 @@ systemctl stop zwave-js-ui.service RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null -cp -R zwave-js-ui-linux /opt/zwave-js-ui +\cp -R zwave-js-ui-linux /opt/zwave-js-ui cat << EOF > /etc/systemd/system/zwave-js-ui.service [Unit] @@ -54,7 +54,7 @@ EOF echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " -rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux +rm -rf zwave-js-ui-${RELEASE}-linux.zip store systemctl daemon-reload systemctl enable --now zwave-js-ui.service echo -e "${CM}${CL} \n" From 658954654db14bcdb7911edea1580c128987b6e9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:42:11 -0400 Subject: [PATCH 0403/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 75ed1a9a..f7ef7e67 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -54,7 +54,7 @@ EOF echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " -rm -rf zwave-js-ui-${RELEASE}-linux.zip store +rm -rf zwave-js-ui-${RELEASE}-linux.zip store zwave-js-ui-linux systemctl daemon-reload systemctl enable --now zwave-js-ui.service echo -e "${CM}${CL} \n" From a2d8aa3cd2421e998d1e8f73f152f69066673ca1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:52:35 -0400 Subject: [PATCH 0404/3335] Update zwave-js-ui-update.sh --- misc/zwave-js-ui-update.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index f7ef7e67..514b5664 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -36,7 +36,7 @@ echo -en "${GN} Updating Z-wave JS UI... " systemctl stop zwave-js-ui.service RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null \cp -R zwave-js-ui-linux /opt/zwave-js-ui cat << EOF > /etc/systemd/system/zwave-js-ui.service @@ -54,10 +54,9 @@ EOF echo -e "${CM}${CL} \r" echo -en "${GN} Cleanup... " -rm -rf zwave-js-ui-${RELEASE}-linux.zip store zwave-js-ui-linux +rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store systemctl daemon-reload systemctl enable --now zwave-js-ui.service echo -e "${CM}${CL} \n" echo -e "${GN} Finished ${CL}" - From 97579693943877f2312f84856e71b517f963b3dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Oct 2022 21:58:52 -0400 Subject: [PATCH 0405/3335] Update zwave-js-ui-install.sh --- setup/zwave-js-ui-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index fd41363e..15da4574 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -77,10 +77,9 @@ msg_ok "Installed Dependencies" msg_info "Installing Z-Wave JS UI" mkdir /opt/zwave-js-ui cd /opt/zwave-js-ui -mkdir store RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null msg_ok "Installed Z-Wave JS UI" msg_info "Creating Service" From 16307254d4318344efdaee18f7d80001afc41684 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Oct 2022 06:46:15 -0400 Subject: [PATCH 0406/3335] Update zwave-js-ui-v4.sh --- ct/zwave-js-ui-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index a56a065c..0890a2f0 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else From a67a9138f69011f96d28c2e668f3a2fd35da5ac7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Oct 2022 07:05:29 -0400 Subject: [PATCH 0407/3335] maintenance (#606) --- ct/adguard-v4.sh | 2 +- ct/blocky-v4.sh | 2 +- ct/casaos-v4.sh | 2 +- ct/daemonsync-v4.sh | 2 +- ct/dashy-v4.sh | 2 +- ct/debian-v4.sh | 2 +- ct/deconz-v4.sh | 2 +- ct/docker-v4.sh | 2 +- ct/emby-v4.sh | 2 +- ct/emqx-v4.sh | 2 +- ct/esphome-v4.sh | 2 +- ct/grafana-v4.sh | 2 +- ct/grocy-v4.sh | 2 +- ct/heimdalldashboard-v4.sh | 2 +- ct/homeassistant-core-v4.sh | 2 +- ct/homeassistant-v4.sh | 2 +- ct/homebridge-v4.sh | 2 +- ct/homepage-v4.sh | 2 +- ct/influxdb-v4.sh | 2 +- ct/iobroker-v4.sh | 2 +- ct/jellyfin-v4.sh | 2 +- ct/keycloak-v4.sh | 2 +- ct/magicmirror-v4.sh | 2 +- ct/mariadb-v4.sh | 2 +- ct/meshcentral-v4.sh | 2 +- ct/motioneye-v4.sh | 2 +- ct/mqtt-v4.sh | 2 +- ct/n8n-v4.sh | 2 +- ct/navidrome-v4.sh | 2 +- ct/nextcloudpi-v4.sh | 2 +- ct/nginx-proxy-manager-v4.sh | 2 +- ct/nocodb-v4.sh | 2 +- ct/node-red-v4.sh | 2 +- ct/omada-v4.sh | 2 +- ct/omv-v4.sh | 2 +- ct/openhab-v4.sh | 2 +- ct/paperless-ngx-v4.sh | 2 +- ct/photoprism-v4.sh | 2 +- ct/pihole-v4.sh | 2 +- ct/plex-v4.sh | 2 +- ct/podman-homeassistant-v4.sh | 2 +- ct/postgresql-v4.sh | 2 +- ct/prometheus-v4.sh | 2 +- ct/syncthing-v4.sh | 2 +- ct/technitiumdns-v4.sh | 2 +- ct/trilium-v4.sh | 2 +- ct/ubuntu-v4.sh | 2 +- ct/umbrel-v4.sh | 2 +- ct/unifi-v4.sh | 2 +- ct/uptimekuma-v4.sh | 2 +- ct/vaultwarden-v4.sh | 2 +- ct/whoogle-v4.sh | 2 +- ct/wikijs-v4.sh | 2 +- ct/wireguard-v4.sh | 2 +- ct/zigbee2mqtt-v4.sh | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index d0f3d6a9..1a8fe6cc 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index dd6e1821..a2e79c5f 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 4458f5c5..73d38b3c 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index a22b3961..1eacbab4 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 4e95a911..8eaaf93d 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index c440df07..3a7f61ae 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 06cc25ad..8225b32d 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index a7357282..a5e4b72a 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index e90725f1..66ddb644 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -154,7 +154,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index 5e7f2885..f43d6508 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index e3174370..d3cc16e3 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 58ce46cf..fc40f4ff 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 09972d1a..21f73bb1 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 4a3ce6e5..de568b9b 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index e8759185..c6b1ba10 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index e17e476e..767a5bb8 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 7b3e7ddf..508bc15d 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 3b2d63de..4d28a5f2 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 3ab809b5..b931f6b5 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 71bfa4ae..d2d8c6b0 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 76421a3c..bf006c52 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -154,7 +154,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 966edbe8..f8172987 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index cfc67cfc..12fc6bee 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index 2b4820ae..bb162f47 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 325b2b68..20b01de8 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 8069c1b0..ca5ba0e2 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 7210af65..c9b3cfe6 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index 496e626d..b12a26ac 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 446f1b22..52940afc 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index f39b2a59..feb45833 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index f99bb2e4..68dbbf6e 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 4cdfe3f5..a4eccffb 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 33400099..0c356ee0 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 3a2c7abc..51b2f592 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -154,7 +154,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index 0e84cfb6..322e0373 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index 8e16f806..28aa3454 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 58e2a0b5..7092b27b 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index 0b1825cf..d7f06465 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 70252cbb..3fced599 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index eeed0cca..b4ca8385 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -154,7 +154,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 2557a709..9bbac839 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -149,7 +149,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index dd29509b..6f89483a 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index e8765aad..db1ce80e 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index 10c55f42..50ef405c 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -147,7 +147,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index d23f72c2..3c1fe3a9 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index c9b9baba..bd121dd9 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index fca16b27..40997d2b 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -154,7 +154,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 5935bc2e..1a7c38b1 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index 2f204933..cdbb1a9d 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index 4c4a2761..fcd9fc30 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index cac70cf7..8e08604e 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 6adc5170..644b5a3f 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -145,7 +145,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 38c99f5a..7f6965ee 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 98c074ac..c594abc2 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -147,7 +147,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 14057e7a..84b4b06e 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -146,7 +146,7 @@ if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${B else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE"--cancel-button Exit-Script 3>&1 1>&2 2>&3) +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; else From b90315fac1348754ec26a2698088fc70e1ad56ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Oct 2022 12:29:34 -0400 Subject: [PATCH 0408/3335] Update zwave-js-ui-update.sh clean up --- misc/zwave-js-ui-update.sh | 63 ++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 514b5664..7b749018 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -1,10 +1,18 @@ #!/usr/bin/env bash +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') set -e +YW=`echo "\033[33m"` RD=`echo "\033[01;31m"` BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' GN=`echo "\033[1;92m"` CL=`echo "\033[m"` +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" set -o errexit set -o errtrace set -o nounset @@ -21,24 +29,52 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} clear +cat << "EOF" + _____ _______ __ ______ +/__ /_ ______ __ _____ / / ___/ / / / / _/ + / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / + / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / +/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ + UPDATE + +EOF + while true; do - read -p "This will update ZWave JS UI. Proceed(y/n)?" yn + read -p "This will update ZWave JS UI to $RELEASE. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; * ) echo "Please answer yes or no.";; esac done -clear +if [ ! -d /opt/zwave-js-ui ]; then msg_error "No Zwave JS UI Install Detected!"; exit; fi -echo -en "${GN} Updating Z-wave JS UI... " +msg_info "Stopping Z-wave JS UI" systemctl stop zwave-js-ui.service -RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +msg_ok "Stopped Z-wave JS UI" + +msg_info "Updating Z-wave JS UI" wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null \cp -R zwave-js-ui-linux /opt/zwave-js-ui +msg_ok "Updated Z-wave JS UI" +msg_info "Updating Z-wave JS UI service file" cat << EOF > /etc/systemd/system/zwave-js-ui.service [Unit] Description=zwave-js-ui @@ -51,12 +87,15 @@ ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] WantedBy=multi-user.target EOF -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleanup... " -rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store systemctl daemon-reload -systemctl enable --now zwave-js-ui.service -echo -e "${CM}${CL} \n" +msg_ok "Updated Z-wave JS UI service file" -echo -e "${GN} Finished ${CL}" +msg_info "Cleanup" +rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store +msg_ok "Cleaned" + +msg_info "Starting Z-wave JS UI" +systemctl enable --now zwave-js-ui.service +msg_info "Started Z-wave JS UI" + +msg_ok "Completed Successfully!\n" From d9bb820ae95b6050e1bb948abb943ad9b3579fb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 08:19:45 -0400 Subject: [PATCH 0409/3335] Update haos-vm-v4.sh add "Latest" --- vm/haos-vm-v4.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index c164c30c..36ee3afa 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -5,6 +5,7 @@ NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` HA=`echo "\033[1;34m"` @@ -107,10 +108,11 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 4 \ "$STABLE" "Stable" ON \ "$BETA" "Beta" OFF \ "$DEV" "Dev" OFF \ +"$LATEST" "Latest" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi From 2690a6f2489c5c53ad5b5e283e892a15c72eefe5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 08:21:08 -0400 Subject: [PATCH 0410/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0db91c1..a324dc59 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ ________________________________________________________________________________

Home Assistant OS VM

-

Option to create VM using Stable, Beta or Dev Image

+

Option to create VM using Stable, Beta, Dev or Latest Image

The script automates the manual process of finding, downloading and extracting the Official KVM (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. No hidden (kpartx, unzip, ect...) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. From 256b71703121373df51756e7b2b0379489c8df9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 08:23:21 -0400 Subject: [PATCH 0411/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 09ad5b90..209bfa8f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-10-07 + +### Changed + +- **Home Assistant OS VM** + - Add "Latest" Image + ## 2022-10-05 ### Changed From 48e8952168ee727ee12f7b830880a16fdea6d51e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 15:17:49 -0400 Subject: [PATCH 0412/3335] Update zwave-js-ui-v4.sh add dev/ttyUSB1 --- ct/zwave-js-ui-v4.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 0890a2f0..646773a0 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -240,6 +240,7 @@ lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file 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 From ed758e9d8d725b2899f46ee025757987faac6128 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 15:20:20 -0400 Subject: [PATCH 0413/3335] Update zigbee2mqtt-v4.sh add /dev/ttyUSB1 & /dev/ttyACM1 --- ct/zigbee2mqtt-v4.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 84b4b06e..703b7fde 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -240,7 +240,9 @@ lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file 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 msg_info "Starting LXC Container" pct start $CTID From 606d825c5761ccab3207ee6b13e7bbb6776a968f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 15:26:16 -0400 Subject: [PATCH 0414/3335] Update crowdsec.sh add curl install --- misc/crowdsec.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index b250e765..e7981523 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -62,6 +62,7 @@ function msg_ok() { msg_info "Setting up ${APP} Repository" apt-get update &>/dev/null +apt-get install -y curl &>/dev/null apt-get install -y gnupg &>/dev/null curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash &>/dev/null msg_ok "Setup ${APP} Repository" From 9adfd34f3a58f5ff4fb127381028811d23bf7db8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 15:42:10 -0400 Subject: [PATCH 0415/3335] Update crowdsec.sh remove sudo command --- misc/crowdsec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index e7981523..c4cf3d2d 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -64,7 +64,7 @@ msg_info "Setting up ${APP} Repository" apt-get update &>/dev/null apt-get install -y curl &>/dev/null apt-get install -y gnupg &>/dev/null -curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash &>/dev/null +curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | bash &>/dev/null msg_ok "Setup ${APP} Repository" msg_info "Installing ${APP}" From bb3ace78f4ac0cfe66e3e1b9d39c03622470fb38 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Oct 2022 07:22:09 -0400 Subject: [PATCH 0416/3335] Update uptimekuma-update.sh --- misc/uptimekuma-update.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/uptimekuma-update.sh b/misc/uptimekuma-update.sh index 70e77dcb..bee3f2de 100644 --- a/misc/uptimekuma-update.sh +++ b/misc/uptimekuma-update.sh @@ -53,13 +53,14 @@ msg_ok "Stopped ${APP}" cd /opt/uptime-kuma msg_info "Pulling ${APP} ${LATEST}" -git fetch &>/dev/null -git checkout $LATEST &>/dev/null +git fetch --all &>/dev/null +git checkout $LATEST --force &>/dev/null git pull &>/dev/null msg_ok "Pulled ${APP} ${LATEST}" -msg_info "Updating ${APP} to ${LATEST} (Patience)" -npm ci &>/dev/null +msg_info "Updating ${APP} to ${LATEST}" +npm install --production &>/dev/null +npm run download-dist &>/dev/null msg_ok "Updated ${APP}" msg_info "Starting ${APP}" From 56e1f905ce5174f2f3ac0e1e1a046fa77bfbb12a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Oct 2022 10:24:44 -0400 Subject: [PATCH 0417/3335] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a324dc59..daf45a42 100644 --- a/README.md +++ b/README.md @@ -1256,7 +1256,7 @@ ________________________________________________________________________________
- 🔸Umbrel LXC + Umbrel LXC

@@ -2017,7 +2017,7 @@ ________________________________________________________________________________
- 🔸Blocky LXC + Blocky LXC

From 6b1e4466988d301ab0ad79e8deee2b74533fc877 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Oct 2022 15:03:36 -0400 Subject: [PATCH 0418/3335] Update photoprism-install.sh up go version --- setup/photoprism-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 38e53a3e..c709699e 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -92,8 +92,8 @@ apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Golang (Patience)" -wget https://golang.org/dl/go1.19.linux-amd64.tar.gz &>/dev/null -tar -xzf go1.19.linux-amd64.tar.gz -C /usr/local &>/dev/null +wget https://golang.org/dl/go1.19.2.linux-amd64.tar.gz &>/dev/null +tar -xzf go1.19.2.linux-amd64.tar.gz -C /usr/local &>/dev/null ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null go install github.com/tianon/gosu@latest &>/dev/null go install golang.org/x/tools/cmd/goimports@latest &>/dev/null From b0481d605f621c52c1fc44bd28287c3a323c65a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Oct 2022 13:41:14 -0400 Subject: [PATCH 0419/3335] Update zwave-js-ui-update.sh clean up --- misc/zwave-js-ui-update.sh | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 7b749018..1d669dcf 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -6,29 +6,10 @@ RD=`echo "\033[01;31m"` BL=`echo "\033[36m"` GN=`echo "\033[1;92m"` CL=`echo "\033[m"` -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." From 21b62610b5bbaa180349059ac5b3bf028654f1cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Oct 2022 09:24:33 -0400 Subject: [PATCH 0420/3335] Update kernel-clean.sh --- misc/kernel-clean.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 212ad8e0..8a337672 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -68,14 +68,11 @@ function edge_kernel() { } function kernel_info() { - latest_kernel=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | tac | head -n 1) if [[ "$MODE" != "PBS" ]]; then echo -e "${YW}PVE Version: ${BL}$(pveversion)\n${CL}" fi if [[ "$current_kernel" == *"pve"* ]]; then - if [[ "$latest_kernel" != *"$current_kernel"* ]]; then - echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}" - fi + echo -e "${YW}Current Kernel: ${BL}$current_kernel\n${CL}" else echo -e "\n${CROSS} ${RD}ERROR: No PVE Kernel Found\n${CL}" exit 1 From 452938f975f895e0b1e6d1e819681e9b74d51ff6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Oct 2022 11:20:54 -0400 Subject: [PATCH 0421/3335] Update photoprism-install.sh --- setup/photoprism-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index c709699e..e75d91b0 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -190,7 +190,7 @@ apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* \ /photoprism \ -/go1.19.linux-amd64.tar.gz \ +/go1.19.2.linux-amd64.tar.gz \ /libtensorflow-linux-avx2-1.15.2.tar.gz \ /libtensorflow-linux-avx-1.15.2.tar.gz \ /libtensorflow-linux-cpu-1.15.2.tar.gz From c97a5d57258fe320d5b2903adbec29d3e892d091 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Oct 2022 11:51:45 -0400 Subject: [PATCH 0422/3335] Update post-pve-install.sh mention to delete browser cache --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 21654ffd..efd4945d 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -107,7 +107,7 @@ then msg_info "Disabling Subscription Nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null -msg_ok "Disabled Subscription Nag" +msg_ok "Disabled Subscription Nag (Delete browser cache)" fi read -r -p "Update Proxmox VE 7 now? " prompt From da5e0dbd40b923928c4ab05b9a35ba323e4c7fa8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Oct 2022 12:36:31 -0400 Subject: [PATCH 0423/3335] Update blocky-install.sh disable systemd-resolved --- setup/blocky-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index 33330ff0..f632bc54 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -73,6 +73,8 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Blocky" +systemctl stop systemd-resolved &>/dev/null +systemctl disable systemd-resolved.service &>/dev/null RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz &>/dev/null mkdir -p /opt/blocky From bfeb4105e91b82027820e7931d515596359ed570 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 16 Oct 2022 09:28:21 -0400 Subject: [PATCH 0424/3335] Update postgresql-install.sh update .conf files for version 15 --- setup/postgresql-install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 7d68b81d..d97f9e0e 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -84,7 +84,7 @@ msg_info "Installing PostgreSQL" apt-get update &>/dev/null apt-get install -y postgresql &>/dev/null -cat < /etc/postgresql/14/main/pg_hba.conf +cat < /etc/postgresql/15/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File # =================================================== # @@ -186,7 +186,7 @@ host all all ::1/128 scram-sha-256 host all all 0.0.0.0/0 md5 EOF -cat < /etc/postgresql/14/main/postgresql.conf +cat < /etc/postgresql/15/main/postgresql.conf # ----------------------------- # PostgreSQL configuration file # ----------------------------- @@ -228,15 +228,15 @@ cat < /etc/postgresql/14/main/postgresql.conf # The default values of these variables are driven from the -D command-line # option or PGDATA environment variable, represented here as ConfigDir. -data_directory = '/var/lib/postgresql/14/main' # use data in another directory +data_directory = '/var/lib/postgresql/15/main' # use data in another directory # (change requires restart) -hba_file = '/etc/postgresql/14/main/pg_hba.conf' # host-based authentication file +hba_file = '/etc/postgresql/15/main/pg_hba.conf' # host-based authentication file # (change requires restart) -ident_file = '/etc/postgresql/14/main/pg_ident.conf' # ident configuration file +ident_file = '/etc/postgresql/15/main/pg_ident.conf' # ident configuration file # (change requires restart) # If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '/var/run/postgresql/14-main.pid' # write an extra PID file +external_pid_file = '/var/run/postgresql/15-main.pid' # write an extra PID file # (change requires restart) @@ -755,7 +755,7 @@ log_timezone = 'Etc/UTC' # PROCESS TITLE #------------------------------------------------------------------------------ -cluster_name = '14/main' # added to process titles if nonempty +cluster_name = '15/main' # added to process titles if nonempty # (change requires restart) #update_process_title = on @@ -771,7 +771,7 @@ cluster_name = '14/main' # added to process titles if non #track_io_timing = off #track_functions = none # none, pl, all #track_activity_query_size = 1024 # (change requires restart) -stats_temp_directory = '/var/run/postgresql/14-main.pg_stat_tmp' +stats_temp_directory = '/var/run/postgresql/15-main.pg_stat_tmp' # - Monitoring - From a291719a709db4ce56c0dafe42dbc17997fb7f72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 16 Oct 2022 11:03:11 -0400 Subject: [PATCH 0425/3335] Update postgresql-install.sh revert installing version 15 until all commands are known --- setup/postgresql-install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index d97f9e0e..7d1582f4 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -82,9 +82,9 @@ msg_ok "Setup PostgreSQL Repository" msg_info "Installing PostgreSQL" apt-get update &>/dev/null -apt-get install -y postgresql &>/dev/null +apt-get install -y postgresql-14 &>/dev/null -cat < /etc/postgresql/15/main/pg_hba.conf +cat < /etc/postgresql/14/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File # =================================================== # @@ -186,7 +186,7 @@ host all all ::1/128 scram-sha-256 host all all 0.0.0.0/0 md5 EOF -cat < /etc/postgresql/15/main/postgresql.conf +cat < /etc/postgresql/14/main/postgresql.conf # ----------------------------- # PostgreSQL configuration file # ----------------------------- @@ -228,15 +228,15 @@ cat < /etc/postgresql/15/main/postgresql.conf # The default values of these variables are driven from the -D command-line # option or PGDATA environment variable, represented here as ConfigDir. -data_directory = '/var/lib/postgresql/15/main' # use data in another directory +data_directory = '/var/lib/postgresql/14/main' # use data in another directory # (change requires restart) -hba_file = '/etc/postgresql/15/main/pg_hba.conf' # host-based authentication file +hba_file = '/etc/postgresql/14/main/pg_hba.conf' # host-based authentication file # (change requires restart) -ident_file = '/etc/postgresql/15/main/pg_ident.conf' # ident configuration file +ident_file = '/etc/postgresql/14/main/pg_ident.conf' # ident configuration file # (change requires restart) # If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '/var/run/postgresql/15-main.pid' # write an extra PID file +external_pid_file = '/var/run/postgresql/14-main.pid' # write an extra PID file # (change requires restart) @@ -755,7 +755,7 @@ log_timezone = 'Etc/UTC' # PROCESS TITLE #------------------------------------------------------------------------------ -cluster_name = '15/main' # added to process titles if nonempty +cluster_name = '14/main' # added to process titles if nonempty # (change requires restart) #update_process_title = on @@ -771,7 +771,7 @@ cluster_name = '15/main' # added to process titles if non #track_io_timing = off #track_functions = none # none, pl, all #track_activity_query_size = 1024 # (change requires restart) -stats_temp_directory = '/var/run/postgresql/15-main.pg_stat_tmp' +stats_temp_directory = '/var/run/postgresql/14-main.pg_stat_tmp' # - Monitoring - From 77ae43b07cb76cf6674e8b5b74937aea517a36ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 16 Oct 2022 13:16:57 -0400 Subject: [PATCH 0426/3335] Update postgresql-install.sh update to version 15 --- setup/postgresql-install.sh | 844 ++---------------------------------- 1 file changed, 30 insertions(+), 814 deletions(-) diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 7d1582f4..1468ce34 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -82,163 +82,40 @@ msg_ok "Setup PostgreSQL Repository" msg_info "Installing PostgreSQL" apt-get update &>/dev/null -apt-get install -y postgresql-14 &>/dev/null +apt-get install -y postgresql &>/dev/null -cat < /etc/postgresql/14/main/pg_hba.conf +cat < /etc/postgresql/15/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File -# =================================================== -# -# Refer to the "Client Authentication" section in the PostgreSQL -# documentation for a complete description of this file. A short -# synopsis follows. -# -# This file controls: which hosts are allowed to connect, how clients -# are authenticated, which PostgreSQL user names they can use, which -# databases they can access. Records take one of these forms: -# -# local DATABASE USER METHOD [OPTIONS] -# host DATABASE USER ADDRESS METHOD [OPTIONS] -# hostssl DATABASE USER ADDRESS METHOD [OPTIONS] -# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] -# hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS] -# hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS] -# -# (The uppercase items must be replaced by actual values.) -# -# The first field is the connection type: "local" is a Unix-domain -# socket, "host" is either a plain or SSL-encrypted TCP/IP socket, -# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a -# non-SSL TCP/IP socket. Similarly, "hostgssenc" uses a -# GSSAPI-encrypted TCP/IP socket, while "hostnogssenc" uses a -# non-GSSAPI socket. -# -# DATABASE can be "all", "sameuser", "samerole", "replication", a -# database name, or a comma-separated list thereof. The "all" -# keyword does not match "replication". Access to replication -# must be enabled in a separate record (see example below). -# -# USER can be "all", a user name, a group name prefixed with "+", or a -# comma-separated list thereof. In both the DATABASE and USER fields -# you can also write a file name prefixed with "@" to include names -# from a separate file. -# -# ADDRESS specifies the set of hosts the record matches. It can be a -# host name, or it is made up of an IP address and a CIDR mask that is -# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that -# specifies the number of significant bits in the mask. A host name -# that starts with a dot (.) matches a suffix of the actual host name. -# Alternatively, you can write an IP address and netmask in separate -# columns to specify the set of hosts. Instead of a CIDR-address, you -# can write "samehost" to match any of the server's own IP addresses, -# or "samenet" to match any address in any subnet that the server is -# directly connected to. -# -# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256", -# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert". -# Note that "password" sends passwords in clear text; "md5" or -# "scram-sha-256" are preferred since they send encrypted passwords. -# -# OPTIONS are a set of options for the authentication in the format -# NAME=VALUE. The available options depend on the different -# authentication methods -- refer to the "Client Authentication" -# section in the documentation for a list of which options are -# available for which authentication methods. -# -# Database and user names containing spaces, commas, quotes and other -# special characters must be quoted. Quoting one of the keywords -# "all", "sameuser", "samerole" or "replication" makes the name lose -# its special character, and just match a database or username with -# that name. -# -# This file is read on server startup and when the server receives a -# SIGHUP signal. If you edit the file on a running system, you have to -# SIGHUP the server for the changes to take effect, run "pg_ctl reload", -# or execute "SELECT pg_reload_conf()". -# -# Put your actual configuration here -# ---------------------------------- -# -# If you want to allow non-local connections, you need to add more -# "host" records. In that case you will also need to make PostgreSQL -# listen on a non-local interface via the listen_addresses -# configuration parameter, or via the -i or -h command line switches. - - - - -# DO NOT DISABLE! -# If you change this first entry you will need to make sure that the -# database superuser can access the database using some other method. -# Noninteractive access to all databases is required during automatic -# maintenance (custom daily cronjobs, replication, and similar tasks). -# -# Database administrative login by Unix domain socket -local all postgres trust +local all postgres peer # TYPE DATABASE USER ADDRESS METHOD - # "local" is for Unix domain socket connections only -local all all trust +local all all peer # IPv4 local connections: host all all 127.0.0.1/32 scram-sha-256 host all all 0.0.0.0/24 md5 # IPv6 local connections: host all all ::1/128 scram-sha-256 host all all 0.0.0.0/0 md5 +# Allow replication connections from localhost, by a user with the +# replication privilege. +local replication all peer +host replication all 127.0.0.1/32 scram-sha-256 +host replication all ::1/128 scram-sha-256 EOF -cat < /etc/postgresql/14/main/postgresql.conf +cat < /etc/postgresql/15/main/postgresql.conf # ----------------------------- # PostgreSQL configuration file # ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, run "pg_ctl reload", or execute -# "SELECT pg_reload_conf()". Some parameters, which are marked below, -# require a server shutdown and restart to take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: B = bytes Time units: us = microseconds -# kB = kilobytes ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - #------------------------------------------------------------------------------ # FILE LOCATIONS #------------------------------------------------------------------------------ -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -data_directory = '/var/lib/postgresql/14/main' # use data in another directory - # (change requires restart) -hba_file = '/etc/postgresql/14/main/pg_hba.conf' # host-based authentication file - # (change requires restart) -ident_file = '/etc/postgresql/14/main/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '/var/run/postgresql/14-main.pid' # write an extra PID file - # (change requires restart) - +data_directory = '/var/lib/postgresql/15/main' +hba_file = '/etc/postgresql/15/main/pg_hba.conf' +ident_file = '/etc/postgresql/15/main/pg_ident.conf' +external_pid_file = '/var/run/postgresql/15-main.pid' #------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION @@ -246,726 +123,65 @@ external_pid_file = '/var/run/postgresql/14-main.pid' # write # - Connection Settings - -listen_addresses = '*' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -port = 5432 # (change requires restart) -max_connections = 100 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - TCP settings - -# see "man tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default -#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; - # 0 selects the system default - -# - Authentication - - -#authentication_timeout = 1min # 1s-600s -#password_encryption = md5 # md5 or scram-sha-256 -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_caseins_users = off +listen_addresses = '*' +port = 5432 +max_connections = 100 +unix_socket_directories = '/var/run/postgresql' # - SSL - -#ssl = on -#ssl_ca_file = '' -#ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' -#ssl_crl_file = '' -#ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers -#ssl_prefer_server_ciphers = on -#ssl_ecdh_curve = 'prime256v1' -#ssl_min_protocol_version = 'TLSv1.2' -#ssl_max_protocol_version = '' -#ssl_dh_params_file = '' -#ssl_passphrase_command = '' -#ssl_passphrase_command_supports_reload = off - +ssl = on +ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' +ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' #------------------------------------------------------------------------------ # RESOURCE USAGE (except WAL) #------------------------------------------------------------------------------ -# - Memory - - -shared_buffers = 128MB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -#work_mem = 4MB # min 64kB -#hash_mem_multiplier = 1.0 # 1-1000.0 multiplier on hash table work_mem -#maintenance_work_mem = 64MB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#logical_decoding_work_mem = 64MB # min 64kB -#max_stack_depth = 2MB # min 100kB -#shared_memory_type = mmap # the default is the first option - # supported by the operating system: - # mmap - # sysv - # windows - # (change requires restart) -dynamic_shared_memory_type = posix # the default is the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # (change requires restart) - -# - Disk - - -#temp_file_limit = -1 # limits per-process temp file space - # in kilobytes, or -1 for no limit - -# - Kernel Resources - - -#max_files_per_process = 1000 # min 64 - # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round -#bgwriter_flush_after = 512kB # measured in pages, 0 disables - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching -#max_worker_processes = 8 # (change requires restart) -#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers -#max_parallel_workers_per_gather = 2 # taken from max_parallel_workers -#parallel_leader_participation = on -#max_parallel_workers = 8 # maximum number of max_worker_processes that - # can be used in parallel operations -#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate - # (change requires restart) -#backend_flush_after = 0 # measured in pages, 0 disables - +shared_buffers = 128MB +dynamic_shared_memory_type = posix #------------------------------------------------------------------------------ # WRITE-AHEAD LOG #------------------------------------------------------------------------------ -# - Settings - - -#wal_level = replica # minimal, replica, or logical - # (change requires restart) -#fsync = on # flush data to disk for crash safety - # (turning this off can cause - # unrecoverable data corruption) -#synchronous_commit = on # synchronization level; - # off, local, remote_write, remote_apply, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux and FreeBSD) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_compression = off # enable compression of full-page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_init_zero = on # zero-fill new WAL files -#wal_recycle = on # recycle WAL files -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds -#wal_writer_flush_after = 1MB # measured in pages, 0 disables -#wal_skip_threshold = 2MB - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_timeout = 5min # range 30s-1d max_wal_size = 1GB min_wal_size = 80MB -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_flush_after = 256kB # measured in pages, 0 disables -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # enables archiving; off, on, or always - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - -# - Archive Recovery - - -# These are only used in recovery mode. - -#restore_command = '' # command to use to restore an archived logfile segment - # placeholders: %p = path of file to restore - # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' - # (change requires restart) -#archive_cleanup_command = '' # command to execute at every restartpoint -#recovery_end_command = '' # command to execute at completion of recovery - -# - Recovery Target - - -# Set these only when performing a targeted recovery. - -#recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached - # (change requires restart) -#recovery_target_name = '' # the named restore point to which recovery will proceed - # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed - # (change requires restart) -#recovery_target_xid = '' # the transaction ID up to which recovery will proceed - # (change requires restart) -#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed - # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: - # just after the specified recovery target (on) - # just before the recovery target (off) - # (change requires restart) -#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) -#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Servers - - -# Set these on the master and on any standby that will send replication data. - -#max_wal_senders = 10 # max number of walsender processes - # (change requires restart) -#wal_keep_size = 0 # in megabytes; 0 disables -#max_slot_wal_keep_size = -1 # in megabytes; -1 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables - -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Master Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # method to choose sync standbys, number of sync standbys, - # and comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -#primary_conninfo = '' # connection string to sending server -#primary_slot_name = '' # replication slot on sending server -#promote_trigger_file = '' # file name whose presence ends recovery -#hot_standby = on # "off" disallows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name - # is not set -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from master - # in milliseconds; 0 disables -#wal_retrieve_retry_interval = 5s # time to wait before retrying to - # retrieve WAL after a failed attempt -#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery - -# - Subscribers - - -# These settings are ignored on a publisher. - -#max_logical_replication_workers = 4 # taken from max_worker_processes - # (change requires restart) -#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_parallel_append = on -#enable_seqscan = on -#enable_sort = on -#enable_incremental_sort = on -#enable_tidscan = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_parallel_hash = on -#enable_partition_pruning = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above - -#jit_above_cost = 100000 # perform JIT compilation if available - # and query more expensive than this; - # -1 disables -#jit_inline_above_cost = 500000 # inline small functions if query is - # more expensive than this; -1 disables -#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if - # query is more expensive than this; - # -1 disables - -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -#effective_cache_size = 4GB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses -#force_parallel_mode = off -#jit = on # allow JIT compilation -#plan_cache_mode = auto # auto, force_generic_plan or - # force_custom_plan - #------------------------------------------------------------------------------ # REPORTING AND LOGGING #------------------------------------------------------------------------------ -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' -#syslog_sequence_numbers = on -#syslog_split_messages = on - -# This is only relevant when logging to eventlog (win32): -# (change requires restart) -#event_source = 'PostgreSQL' - -# - When to Log - - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - -#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements - # and their durations, > 0 logs only a sample of - # statements running at least this number - # of milliseconds; - # sample fraction is determined by log_statement_sample_rate - -#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding - # log_min_duration_sample to be logged; - # 1.0 logs all such statements, 0.0 never logs - - -#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements - # are logged regardless of their duration; 1.0 logs all - # statements from all transactions, 0.0 never logs - # - What to Log - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -log_line_prefix = '%m [%p] %q%u@%d ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %b = backend type - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %n = timestamp with milliseconds (as a Unix epoch) - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_parameter_max_length = -1 # when logging statements, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_parameter_max_length_on_error = 0 # when logging an error, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_statement = 'none' # none, ddl, mod, all -#log_replication_commands = off -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files +log_line_prefix = '%m [%p] %q%u@%d ' log_timezone = 'Etc/UTC' #------------------------------------------------------------------------------ # PROCESS TITLE #------------------------------------------------------------------------------ -cluster_name = '14/main' # added to process titles if nonempty - # (change requires restart) -#update_process_title = on - - -#------------------------------------------------------------------------------ -# STATISTICS -#------------------------------------------------------------------------------ - -# - Query and Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_io_timing = off -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -stats_temp_directory = '/var/run/postgresql/14-main.pg_stat_tmp' - - -# - Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - +cluster_name = '15/main' #------------------------------------------------------------------------------ # CLIENT CONNECTION DEFAULTS #------------------------------------------------------------------------------ -# - Statement Behavior - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error -#row_security = on -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#default_table_access_method = 'heap' -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_freeze_table_age = 150000000 -#vacuum_cleanup_index_scale_factor = 0.1 # fraction of total number of tuples - # before index cleanup, 0 always performs - # index cleanup -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_fuzzy_search_limit = 0 -#gin_pending_list_limit = 4MB - # - Locale and Formatting - datestyle = 'iso, mdy' -#intervalstyle = 'postgres' timezone = 'Etc/UTC' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 1 # min -15, max 3; any value >0 actually - # selects precise output mode -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = 'C' # locale for system error message - # strings -lc_monetary = 'C' # locale for monetary formatting -lc_numeric = 'C' # locale for number formatting -lc_time = 'C' # locale for time formatting - -# default configuration for text search +lc_messages = 'C' +lc_monetary = 'C' +lc_numeric = 'C' +lc_time = 'C' default_text_search_config = 'pg_catalog.english' -# - Shared Library Preloading - - -#shared_preload_libraries = '' # (change requires restart) -#local_preload_libraries = '' -#session_preload_libraries = '' -#jit_provider = 'llvmjit' # JIT library to use - -# - Other Defaults - - -#extension_destdir = '' # prepend path when loading extensions - # and shared objects (added by Debian) - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_relation = -2 # negative values mean - # (max_pred_locks_per_transaction - # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 - - -#------------------------------------------------------------------------------ -# VERSION AND PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#escape_string_warning = on -#lo_compat_privileges = off -#operator_precedence_warning = off -#quote_all_identifiers = off -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? -#data_sync_retry = off # retry or panic on failure to fsync - # data? - # (change requires restart) - - #------------------------------------------------------------------------------ # CONFIG FILE INCLUDES #------------------------------------------------------------------------------ -# These options allow settings to be loaded from files other than the -# default postgresql.conf. Note that these are directives, not variable -# assignments, so they can usefully be given more than once. - -include_dir = 'conf.d' # include files ending in '.conf' from - # a directory, e.g., 'conf.d' -#include_if_exists = '...' # include file only if it exists -#include = '...' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here +include_dir = 'conf.d' EOF sudo systemctl restart postgresql From 40724f6434c25bbf0af79f0ed467c6c3a773e907 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Oct 2022 15:18:27 -0400 Subject: [PATCH 0427/3335] Update pull_request_template.md --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ef2d9b8f..ad7ef3fc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -# Pull Request Template +# All Pull Requests should be made to the `pull-requests` branch ## Description From e6d2cbc8122c34306129ed6b665c779ccd8eaf30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Oct 2022 16:23:11 -0400 Subject: [PATCH 0428/3335] Update plex-install.sh hardware acceleration - check for privileged/unprivileged --- setup/plex-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 90e21271..3d8a1cb0 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -74,6 +74,7 @@ apt-get install -y sudo &>/dev/null apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_info "Setting Up Hardware Acceleration" apt-get -y install \ va-driver-all \ @@ -84,6 +85,7 @@ apt-get -y install \ /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* msg_ok "Set Up Hardware Acceleration" +fi msg_info "Setting Up Plex Media Server Repository" wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add - &>/dev/null From 6d0ba55c8393e04be2cdf79c1ae26ad7d43d52d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Oct 2022 16:40:04 -0400 Subject: [PATCH 0429/3335] Update emby-install.sh hardware acceleration - check for privileged/unprivileged --- setup/emby-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 28c762ab..39919c87 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -73,6 +73,7 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_info "Setting Up Hardware Acceleration" apt-get -y install \ va-driver-all \ @@ -83,6 +84,7 @@ apt-get -y install \ /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* msg_ok "Set Up Hardware Acceleration" +fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) From 28ac44926ceb0a39f5431fce0cdc91a06ea62ffc Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Oct 2022 16:41:03 -0400 Subject: [PATCH 0430/3335] Update jellyfin-install.sh hardware acceleration - check for privileged/unprivileged --- setup/jellyfin-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index f7f3576e..c8d0e63d 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -75,6 +75,7 @@ apt-get install -y apt-transport-https &>/dev/null apt-get install -y software-properties-common &>/dev/null msg_ok "Installed Dependencies" +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_info "Setting Up Hardware Acceleration" apt-get -y install \ va-driver-all \ @@ -85,6 +86,7 @@ apt-get -y install \ /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* msg_ok "Set Up Hardware Acceleration" +fi msg_info "Setting Up Jellyfin Repository" sudo add-apt-repository universe -y &>/dev/null From 0beaa20971301c255a7a4ba2661afcb1af49c6c8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Oct 2022 05:52:33 -0400 Subject: [PATCH 0431/3335] Maintenance (#662) --- README.md | 2 +- ct/vaultwarden-v4.sh | 2 +- setup/adguard-install.sh | 4 ++++ setup/blocky-install.sh | 4 ++++ setup/casaos-install.sh | 4 ++++ setup/daemonsync-install.sh | 4 ++++ setup/dashy-install.sh | 4 ++++ setup/debian-install.sh | 4 ++++ setup/deconz-install.sh | 4 ++++ setup/docker-install.sh | 4 ++++ setup/emby-install.sh | 4 ++++ setup/emqx-install.sh | 4 ++++ setup/esphome-install.sh | 4 ++++ setup/grafana-install.sh | 4 ++++ setup/grocy-install.sh | 4 ++++ setup/heimdalldashboard-install.sh | 4 ++++ setup/homeassistant-core-install.sh | 4 ++++ setup/homeassistant-install.sh | 4 ++++ setup/homebridge-install.sh | 4 ++++ setup/homepage-install.sh | 4 ++++ setup/influxdb-install.sh | 4 ++++ setup/iobroker-install.sh | 4 ++++ setup/jellyfin-install.sh | 4 ++++ setup/keycloak-install.sh | 4 ++++ setup/magicmirror-install.sh | 4 ++++ setup/mariadb-install.sh | 4 ++++ setup/meshcentral-install.sh | 4 ++++ setup/motioneye-install.sh | 4 ++++ setup/mqtt-install.sh | 4 ++++ setup/n8n-install.sh | 4 ++++ setup/navidrome-install.sh | 4 ++++ setup/nextcloudpi-install.sh | 4 ++++ setup/nginx-proxy-manager-install.sh | 4 ++++ setup/nocodb-install.sh | 4 ++++ setup/node-red-install.sh | 4 ++++ setup/omada-install.sh | 4 ++++ setup/omv-install.sh | 4 ++++ setup/openhab-install.sh | 4 ++++ setup/paperless-ngx-install.sh | 4 ++++ setup/photoprism-install.sh | 4 ++++ setup/pihole-install.sh | 4 ++++ setup/plex-install.sh | 4 ++++ setup/podman-homeassistant-install.sh | 4 ++++ setup/postgresql-install.sh | 4 ++++ setup/prometheus-install.sh | 4 ++++ setup/syncthing-install.sh | 4 ++++ setup/technitiumdns-install.sh | 4 ++++ setup/trilium-install.sh | 4 ++++ setup/ubuntu-install.sh | 4 ++++ setup/umbrel-install.sh | 4 ++++ setup/unifi-install.sh | 4 ++++ setup/uptimekuma-install.sh | 4 ++++ setup/vaultwarden-install.sh | 4 ++++ setup/whoogle-install.sh | 4 ++++ setup/wikijs-install.sh | 4 ++++ setup/wireguard-install.sh | 4 ++++ setup/zigbee2mqtt-install.sh | 4 ++++ setup/zwave-js-ui-install.sh | 4 ++++ 58 files changed, 226 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index daf45a42..35db7d24 100644 --- a/README.md +++ b/README.md @@ -2464,7 +2464,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden- The script builds from source, which takes time and resources. After the build, the script will automatically set resources to Normal Settings. Expect 30+ minute install time. -

⚡ Build Settings: 2048Mib RAM - 6GB Storage - 2vCPU ⚡

+

⚡ Build Settings: 3072Mib RAM - 6GB Storage - 2vCPU ⚡

⚡ Normal Settings: 512Mib RAM - 6GB Storage - 1vCPU ⚡

**Vaultwarden Interface: CTIP:8000** diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index 8e08604e..1e403439 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -3,7 +3,7 @@ echo -e "Loading..." APP="Vaultwarden" var_disk="6" var_cpu="2" -var_ram="2048" +var_ram="3072" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index 080e2cff..8b34a502 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index f632bc54..e66fbd27 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index 8ee90a70..4e582f0e 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index e3bd458d..bd9e8b13 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 7485178e..0029e8a7 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/debian-install.sh b/setup/debian-install.sh index bc9f39cb..db18f9b2 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index bc6f0c0c..ee6d8795 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/docker-install.sh b/setup/docker-install.sh index c4234aed..e70dd50c 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 39919c87..42373035 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index dc3e224b..6303f7b7 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 8d0aab4e..625ea8b2 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 6503d3f1..4b270cf6 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 32ca846b..6342b1a2 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index d4b509f7..02c3a90a 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 783ac845..6602f5ad 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 35617ab0..0d0d8952 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 033a52b5..4fad6168 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 8adb85c9..31ff0c7a 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index ec96f9d1..e2a082fe 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index ab65830e..2cbe7067 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index c8d0e63d..82acbffa 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index 0c86f4fa..9397fa7a 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 64dce914..4d3cd89f 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index 15acb821..53b8c955 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index eb2e219f..6c6b0149 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index ff8afa47..08d80adc 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index db9331d9..f39c7fcc 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 322064c0..21fd5f49 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index 6a50e363..b04cdda9 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index 5d8d1555..c38cef27 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 4861405e..37cd3c92 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 57083bb8..37e2fb97 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index f9d90389..6e0843f2 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 6c2dde53..9a3705aa 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/omv-install.sh b/setup/omv-install.sh index 0f553a62..073653af 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 1dec802f..65a811d4 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index c1c2640b..db0a2ff6 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index e75d91b0..a2027d0e 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -60,9 +60,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 3d6a0e4d..572f70b5 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -60,9 +60,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 3d8a1cb0..a1ea5f33 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 9a885507..e192c86e 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 1468ce34..e4cd0a20 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 378a8ab5..f9b176d0 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index a9d942bc..ced965d4 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 907c7e2f..887ad747 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index 8b259725..9478d2f4 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -58,9 +58,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 4abacf6d..4ee2e1ea 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index bd6c5a7b..5c8138f6 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 49ebf87d..2c0a32c4 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -60,9 +60,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index f8663bfc..7777f05a 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 2f9e90c7..d3afc43f 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 0a653770..ef22a09a 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index db684221..0b54cd7f 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index f9af0201..ed1aab09 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e OPTIONS_PATH='/options.conf' cat >$OPTIONS_PATH <<'EOF' diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index a7fe1668..538e109f 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 15da4574..c0137e07 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -59,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null From 79c8e8d5d042757f5b948931f9cf611859537082 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Oct 2022 07:15:58 -0400 Subject: [PATCH 0432/3335] Update photoprism-v4.sh increase ram for building binary --- ct/photoprism-v4.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index d7f06465..b0ffd76c 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -3,7 +3,7 @@ echo -e "Loading..." APP="PhotoPrism" var_disk="8" var_cpu="2" -var_ram="2048" +var_ram="3072" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') @@ -239,6 +239,9 @@ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2 pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:2342${CL} \n" From fd7c812ffe254e073423420dd9c14e936b39438d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Oct 2022 07:21:45 -0400 Subject: [PATCH 0433/3335] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35db7d24..00df7159 100644 --- a/README.md +++ b/README.md @@ -1896,8 +1896,9 @@ To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. ``` bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" ``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+The script builds from source, which takes time and resources. After the build, the script will automatically set resources to Normal Settings. +

⚡ Build Settings: 3GB RAM - 8GB Storage - 2vCPU ⚡

+

⚡ Normal Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

**PhotoPrism Interface - IP:2342** From bb469a2b3e1bb39a2f73df9730dc764cf8c09d71 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Oct 2022 11:26:07 -0400 Subject: [PATCH 0434/3335] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00df7159..69332856 100644 --- a/README.md +++ b/README.md @@ -2468,11 +2468,13 @@ Expect 30+ minute install time.

⚡ Build Settings: 3072Mib RAM - 6GB Storage - 2vCPU ⚡

⚡ Normal Settings: 512Mib RAM - 6GB Storage - 1vCPU ⚡

-**Vaultwarden Interface: CTIP:8000** +**Vaultwarden Interface: IP:8000** -⚙️ **Path to Vaultwarden .env file** (to find the `ADMIN_TOKEN`) +**Vaultwarden Admin Interface: IP:8000/admin** + +⚙️ **Vaultwarden .env file** (to find the `ADMIN_TOKEN`) ```yaml -/opt/vaultwarden/.env +cat /opt/vaultwarden/.env ``` ⚙️ **To Update Vaultwarden (post 2022-05-29 installs only)** From 94a29252301d583cb24606097a6b37c338a90580 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 10:50:26 -0400 Subject: [PATCH 0435/3335] Update node-red-install.sh fix install --- setup/node-red-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 6e0843f2..2193abd3 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -78,9 +78,8 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Node-Red" -bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi &>/dev/nul -sudo systemctl enable nodered.service &>/dev/null -sudo systemctl start nodered.service &>/dev/null +bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi --node18 --no-init &>/dev/nul +systemctl enable --now nodered.service &>/dev/null msg_ok "Installed Node-Red" PASS=$(grep -w "root" /etc/shadow | cut -b6); From 7b92d8ddb0f0647c180206f30df2a2ee53d78eda Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 11:27:07 -0400 Subject: [PATCH 0436/3335] Update node-red-install.sh --- setup/node-red-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 2193abd3..a9b742da 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -75,6 +75,8 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null +apt-get install -y git &>/dev/null +apt-get install -y build-essential &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Node-Red" From f99b7649b54bc7439e4c3853a48d178173a1767a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 12:14:12 -0400 Subject: [PATCH 0437/3335] Update node-red-install.sh --- setup/node-red-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index a9b742da..babd4099 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -80,7 +80,7 @@ apt-get install -y build-essential &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Node-Red" -bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi --node18 --no-init &>/dev/nul +bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi --node18 --no-init &>/dev/null systemctl enable --now nodered.service &>/dev/null msg_ok "Installed Node-Red" From bfb6c36b330478ae654eba31e36481b17d69480a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 14:45:07 -0400 Subject: [PATCH 0438/3335] Update node-red-install.sh --- setup/node-red-install.sh | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index babd4099..69c9a1b4 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -11,22 +11,6 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} function msg_info() { local msg="$1" @@ -59,13 +43,9 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" -set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e msg_info "Updating Container OS" apt-get update &>/dev/null @@ -75,12 +55,10 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -apt-get install -y build-essential &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Node-Red" -bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi --node18 --no-init &>/dev/null +bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi --no-init &>/dev/null systemctl enable --now nodered.service &>/dev/null msg_ok "Installed Node-Red" From 283c328917e4ca80841b654e4df99aa1b436b690 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 15:35:17 -0400 Subject: [PATCH 0439/3335] Update node-red-install.sh move away from node-red github install script --- setup/node-red-install.sh | 54 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 69c9a1b4..ea9a4998 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -11,6 +11,22 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} function msg_info() { local msg="$1" @@ -43,9 +59,13 @@ done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" +set +e +alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e msg_info "Updating Container OS" apt-get update &>/dev/null @@ -57,11 +77,41 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + msg_info "Installing Node-Red" -bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi --no-init &>/dev/null -systemctl enable --now nodered.service &>/dev/null +npm install -g --unsafe-perm node-red &>/dev/null msg_ok "Installed Node-Red" +msg_info "Creating Service" +service_path="/etc/systemd/system/nodered.service" +echo "[Unit] +Description=Node-RED +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/node-red --max-old-space-size=128 -v +Restart=on-failure +KillSignal=SIGINT + +SyslogIdentifier=node-red +StandardOutput=syslog + +WorkingDirectory=/root/ +User=root +Group=root + +[Install] +WantedBy=multi-user.target" > $service_path +systemctl enable --now nodered.service &>/dev/null +msg_ok "Created Service" + PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then msg_info "Customizing Container" From fc807bed6a5f8a2805d3cc20860d51b5ebbb0fae Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 15:36:16 -0400 Subject: [PATCH 0440/3335] Update node-red-themes.sh --- misc/node-red-themes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/node-red-themes.sh b/misc/node-red-themes.sh index 5f8738b1..7795f8cb 100644 --- a/misc/node-red-themes.sh +++ b/misc/node-red-themes.sh @@ -132,6 +132,6 @@ echo -e "${CM}${CL} \r" echo -en "${GN} Restarting Node-Red... " echo -e "${CM}${CL} \r" -node-red-restart +systemctl restart nodered echo -en "${GN} Finished... ${CL} \n" exit From 1af219c48b0a7d6de0ec89011899dc65bd3fd20c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Oct 2022 15:37:44 -0400 Subject: [PATCH 0441/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69332856..0944a4a3 100644 --- a/README.md +++ b/README.md @@ -560,7 +560,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/node-red-v4. Run in the LXC console ```yaml -node-red-restart +systemctl restart nodered ``` ⚙️ **To Update Node-Red:** From e0c380b54b332823744f98cecf91342ca0fe5fda Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Oct 2022 05:30:11 -0400 Subject: [PATCH 0442/3335] Update emqx-install.sh 5.0.9 --- setup/emqx-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 6303f7b7..6a613a80 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -78,7 +78,7 @@ msg_ok "Installed Dependencies" msg_info "Installing EMQX" curl -s https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh | bash &>/dev/null -sudo apt-get install -y emqx=5.0.8 &>/dev/null +sudo apt-get install -y emqx=5.0.9 &>/dev/null systemctl start emqx msg_ok "Installed EMQX" From 35ea3211078016a347083109ab883a4038832aad Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Oct 2022 17:24:31 -0400 Subject: [PATCH 0443/3335] Create emby-update.sh --- misc/emby-update.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 misc/emby-update.sh diff --git a/misc/emby-update.sh b/misc/emby-update.sh new file mode 100644 index 00000000..fd947d03 --- /dev/null +++ b/misc/emby-update.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +APP="Emby" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +while true; do + read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear +function header_info { +cat << "EOF" + ______ __ + / ____/___ ___ / /_ __ __ + / __/ / __ __ \/ __ \/ / / / + / /___/ / / / / / /_/ / /_/ / +/_____/_/ /_/ /_/_.___/\__, / + UPDATE /____/ +EOF +} + +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Updating ${APP}" +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null +systemctl stop emby-server +dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null +systemctl start emby-server +rm emby-server-deb_${LATEST}_amd64.deb +msg_ok "Updated ${APP}" From 02f32c59535e51ae74e2dd5fa70976850c74be83 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Oct 2022 17:35:59 -0400 Subject: [PATCH 0444/3335] Update emby-update.sh --- misc/emby-update.sh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/misc/emby-update.sh b/misc/emby-update.sh index fd947d03..86a67a9e 100644 --- a/misc/emby-update.sh +++ b/misc/emby-update.sh @@ -11,23 +11,6 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" APP="Emby" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - while true; do read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn case $yn in From 54a273f579888b2d8a0f7ef0be516dddc7175321 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Oct 2022 17:47:32 -0400 Subject: [PATCH 0445/3335] Update emby-install.sh 4.7.8.0 --- setup/emby-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 42373035..59cb2d64 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -93,8 +93,8 @@ fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.6.0/emby-server-deb_4.7.6.0_amd64.deb &>/dev/null -dpkg -i emby-server-deb_4.7.6.0_amd64.deb &>/dev/null +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.6.0/emby-server-deb_4.7.8.0_amd64.deb &>/dev/null +dpkg -i emby-server-deb_4.7.8.0_amd64.deb &>/dev/null msg_ok "Installed Emby" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -117,4 +117,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null +rm emby-server-deb_4.7.8.0_amd64.deb msg_ok "Cleaned" From beab1ba98de380f49bb6e0d04b4d794e18aeff93 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Oct 2022 17:56:37 -0400 Subject: [PATCH 0446/3335] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0944a4a3..1f89bf5c 100644 --- a/README.md +++ b/README.md @@ -1750,7 +1750,11 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" **Emby Media Server Interface - IP:8096** -⚙️ **Emby Media Server Utilizes Automatic Updates** +⚙️ **To Update Emby** + +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/emby-update.sh)" +``` ____________________________________________________________________________________________ @@ -2208,7 +2212,7 @@ ________________________________________________________________________________
Homepage LXC -

+

Homepage LXC

From d57251ac1668dbae726f63b326286ec293e0ae23 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Oct 2022 17:59:24 -0400 Subject: [PATCH 0447/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f89bf5c..b3b0da86 100644 --- a/README.md +++ b/README.md @@ -1752,7 +1752,7 @@ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" ⚙️ **To Update Emby** -``` +```yaml bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/emby-update.sh)" ``` From 4e82e8ae613a8e407de438e504cf952068f0d97d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Oct 2022 03:26:17 -0400 Subject: [PATCH 0448/3335] Update create_lxc.sh --- ct/create_lxc.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index f82768a5..48a7d513 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -5,7 +5,6 @@ RD=`echo "\033[01;31m"` GN=`echo "\033[1;92m"` CL=`echo "\033[m"` CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" set -o errexit @@ -34,14 +33,6 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Validating Storage" -VALID=$(pvesm status -content rootdir | awk 'NR>1') -if [ -z "$VALID" ]; then msg_error "Unable to detect a valid storage location."; exit 1; fi; function select_storage() { local CLASS=$1 @@ -66,7 +57,10 @@ function select_storage() { MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content $CONTENT | awk 'NR>1') - if [ $((${#MENU[@]}/3)) -eq 1 ]; then + if [ $((${#MENU[@]}/3)) -eq 0 ]; then + echo -e "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then printf ${MENU[0]} else local STORAGE From 3c89ba2b56f5fdaac3a5da007fcc31ccd1fdfcd2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Oct 2022 03:43:46 -0400 Subject: [PATCH 0449/3335] Update create_lxc.sh --- ct/create_lxc.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 48a7d513..f82768a5 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -5,6 +5,7 @@ RD=`echo "\033[01;31m"` GN=`echo "\033[1;92m"` CL=`echo "\033[m"` CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" set -o errexit @@ -33,6 +34,14 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Validating Storage" +VALID=$(pvesm status -content rootdir | awk 'NR>1') +if [ -z "$VALID" ]; then msg_error "Unable to detect a valid storage location."; exit 1; fi; function select_storage() { local CLASS=$1 @@ -57,10 +66,7 @@ function select_storage() { MENU+=( "$TAG" "$ITEM" "OFF" ) done < <(pvesm status -content $CONTENT | awk 'NR>1') - if [ $((${#MENU[@]}/3)) -eq 0 ]; then - echo -e "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then + if [ $((${#MENU[@]}/3)) -eq 1 ]; then printf ${MENU[0]} else local STORAGE From f1b76b3949af6ec16ac3f625e50f4b7410faf5b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Oct 2022 04:43:15 -0400 Subject: [PATCH 0450/3335] Update create_lxc.sh update validate storage check --- ct/create_lxc.sh | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index f82768a5..1ac3ae44 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -8,22 +8,6 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} function msg_info() { local msg="$1" @@ -40,8 +24,27 @@ function msg_error() { } msg_info "Validating Storage" -VALID=$(pvesm status -content rootdir | awk 'NR>1') -if [ -z "$VALID" ]; then msg_error "Unable to detect a valid storage location."; exit 1; fi; +VALIDCT=$(pvesm status -content rootdir | awk 'NR>1') +if [ -z "$VALIDCT" ]; then msg_error "Unable to detect a valid Container Storage location."; exit 1; fi; +VALIDTMP=$(pvesm status -content vztmpl | awk 'NR>1') +if [ -z "$VALIDTMP" ]; then msg_error "Unable to detect a valid Template Storage location."; exit 1; fi; + +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} function select_storage() { local CLASS=$1 From 4044d501b057d35f5851ad032a9bb21d41e4c537 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 05:31:49 -0400 Subject: [PATCH 0451/3335] Update emqx-install.sh --- setup/emqx-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 6a613a80..543648a8 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -78,7 +78,7 @@ msg_ok "Installed Dependencies" msg_info "Installing EMQX" curl -s https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh | bash &>/dev/null -sudo apt-get install -y emqx=5.0.9 &>/dev/null +sudo apt-get install -y emqx >/dev/null systemctl start emqx msg_ok "Installed EMQX" From 672b97dc523b47947f747db6a65d8656ed6c19e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 10:51:39 -0400 Subject: [PATCH 0452/3335] Create core-restore-from-backup.sh --- misc/core-restore-from-backup.sh | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 misc/core-restore-from-backup.sh diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh new file mode 100644 index 00000000..fe5b1738 --- /dev/null +++ b/misc/core-restore-from-backup.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +clear +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +APP="Home Assistant Core" +while true; do + read -p "This will restore ${APP} from a backup. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear +function header_info { +cat << "EOF" + __ __ ___ _ __ __ ______ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___ ________ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / __ \/ ___/ _ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /___/ /_/ / / / __/ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____/\____/_/ \___/ + RESTORE FROM BACKUP +EOF +} + +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +DIR=/root/.restore +if [ -d "$DIR" ]; +then + msg_ok "Restore Directory Exists." +else + mkdir -p /root/.restore + msg_ok "Created Restore Directory." +fi + +cd /root/.homeassistant/backups/ +PS3="Please enter your choice: " +files="$(ls -A .)" +select filename in ${files}; do msg_ok "You selected ${filename}"; break; done +msg_info "Stopping Home Assistant" +sudo service homeassistant stop +msg_ok "Stopped Home Assistant" + +msg_info "Restoring Home Assistant using ${filename}" +tar xvf ${filename} -C /root/.restore &>/dev/null +cd /root/.restore +tar -xvf homeassistant.tar.gz &>/dev/null +if ! command -v rsync >/dev/null 2>&1; then + apt-get install -y rsync &>/dev/null +fi +rsync -a /root/.restore/data/ /root/.homeassistant + +rm -rf /root/.restore/* +msg_ok "Restore Complete" +msg_ok "Starting Home Assistant" +sudo service homeassistant start From aa18221a45f9b7bfc8e73318897ff889f15034d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 12:07:03 -0400 Subject: [PATCH 0453/3335] Update core-restore-from-backup.sh --- misc/core-restore-from-backup.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index fe5b1738..40b40425 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -37,39 +37,33 @@ function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } - function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } - -DIR=/root/.restore +DIR=/root/.homeassistant/restore if [ -d "$DIR" ]; then msg_ok "Restore Directory Exists." else - mkdir -p /root/.restore - msg_ok "Created Restore Directory." + mkdir -p /root/.homeassistant/restore + msg_ok "Created Restore Directory." fi - +if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then echo -e "${RD}No backups found!${CL} \n"; exit 1; fi cd /root/.homeassistant/backups/ PS3="Please enter your choice: " files="$(ls -A .)" -select filename in ${files}; do msg_ok "You selected ${filename}"; break; done +select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done msg_info "Stopping Home Assistant" sudo service homeassistant stop msg_ok "Stopped Home Assistant" - msg_info "Restoring Home Assistant using ${filename}" -tar xvf ${filename} -C /root/.restore &>/dev/null -cd /root/.restore +tar xvf ${filename} -C /root/.homeassistant/restore &>/dev/null +cd /root/.homeassistant/restore tar -xvf homeassistant.tar.gz &>/dev/null -if ! command -v rsync >/dev/null 2>&1; then - apt-get install -y rsync &>/dev/null -fi -rsync -a /root/.restore/data/ /root/.homeassistant - -rm -rf /root/.restore/* +if ! command -v rsync >/dev/null 2>&1; then apt-get install -y rsync &>/dev/null; fi +rsync -a /root/.homeassistant/restore/data/ /root/.homeassistant +rm -rf /root/.homeassistant/restore/* msg_ok "Restore Complete" -msg_ok "Starting Home Assistant" +msg_ok "Starting Home Assistant \n" sudo service homeassistant start From b029f3ef3ad99c1fd077740edeb430043a303b52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 12:21:53 -0400 Subject: [PATCH 0454/3335] Update core-restore-from-backup.sh --- misc/core-restore-from-backup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index 40b40425..ece2d0bf 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -10,6 +10,7 @@ CL=`echo "\033[m"` BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" APP="Home Assistant Core" while true; do read -p "This will restore ${APP} from a backup. Proceed(y/n)?" yn @@ -41,6 +42,10 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} DIR=/root/.homeassistant/restore if [ -d "$DIR" ]; then @@ -49,7 +54,7 @@ else mkdir -p /root/.homeassistant/restore msg_ok "Created Restore Directory." fi -if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then echo -e "${RD}No backups found!${CL} \n"; exit 1; fi +if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi cd /root/.homeassistant/backups/ PS3="Please enter your choice: " files="$(ls -A .)" From 76a9d00a640258d8259d605f5420cd64015a75f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 12:33:50 -0400 Subject: [PATCH 0455/3335] Create container-restore-from-backup.sh --- misc/container-restore-from-backup.sh | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 misc/container-restore-from-backup.sh diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh new file mode 100644 index 00000000..d85478d5 --- /dev/null +++ b/misc/container-restore-from-backup.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +clear +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +APP="Home Assistant Container" +while true; do + read -p "This will restore ${APP} from a backup. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear +function header_info { +cat << "EOF" + __ __ ___ _ __ __ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + RESTORE FROM BACKUP +EOF +} + +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} +if [ -z "$(ls -A /var/lib/docker/volumes/hass_config/_data/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi +DIR=/var/lib/docker/volumes/hass_config/_data/restore +if [ -d "$DIR" ]; +then + msg_ok "Restore Directory Exists." +else + mkdir -p /var/lib/docker/volumes/hass_config/_data/restore + msg_ok "Created Restore Directory." +fi +cd /var/lib/docker/volumes/hass_config/_data/backups/ +PS3="Please enter your choice: " +files="$(ls -A .)" +select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done +msg_info "Stopping Home Assistant" +docker stop homeassistant +msg_ok "Stopped Home Assistant" +msg_info "Restoring Home Assistant using ${filename}" +tar xvf ${filename} -C /var/lib/docker/volumes/hass_config/_data/restore &>/dev/null +cd /var/lib/docker/volumes/hass_config/_data/restore +tar -xvf homeassistant.tar.gz &>/dev/null +if ! command -v rsync >/dev/null 2>&1; then apt-get install -y rsync &>/dev/null; fi +rsync -a /var/lib/docker/volumes/hass_config/_data/restore/data/ /var/lib/docker/volumes/hass_config/_data +rm -rf /var/lib/docker/volumes/hass_config/_data/restore/* +msg_ok "Restore Complete" +msg_ok "Starting Home Assistant \n" +docker start homeassistant From ca08e20253af1858b027ee577f62609fb05aeef3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 12:34:51 -0400 Subject: [PATCH 0456/3335] Update core-restore-from-backup.sh --- misc/core-restore-from-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index ece2d0bf..e603cc6d 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -46,6 +46,7 @@ function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi DIR=/root/.homeassistant/restore if [ -d "$DIR" ]; then @@ -54,7 +55,6 @@ else mkdir -p /root/.homeassistant/restore msg_ok "Created Restore Directory." fi -if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi cd /root/.homeassistant/backups/ PS3="Please enter your choice: " files="$(ls -A .)" From ba31094dbc0f18cec8a5d92fc297f2ca6ba96001 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 15:05:30 -0400 Subject: [PATCH 0457/3335] Update emby-install.sh --- setup/emby-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 59cb2d64..a673c2c9 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -93,8 +93,8 @@ fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.6.0/emby-server-deb_4.7.8.0_amd64.deb &>/dev/null -dpkg -i emby-server-deb_4.7.8.0_amd64.deb &>/dev/null +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null +dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null msg_ok "Installed Emby" PASS=$(grep -w "root" /etc/shadow | cut -b6); @@ -117,5 +117,5 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm emby-server-deb_4.7.8.0_amd64.deb +rm emby-server-deb_${LATEST}_amd64.deb msg_ok "Cleaned" From b3939463589c2ff261505428989badc1dfdc7ddd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Oct 2022 07:07:54 -0400 Subject: [PATCH 0458/3335] Update container-restore-from-backup.sh --- misc/container-restore-from-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh index d85478d5..a70370ea 100644 --- a/misc/container-restore-from-backup.sh +++ b/misc/container-restore-from-backup.sh @@ -60,7 +60,7 @@ PS3="Please enter your choice: " files="$(ls -A .)" select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done msg_info "Stopping Home Assistant" -docker stop homeassistant +docker stop homeassistant &>/dev/null msg_ok "Stopped Home Assistant" msg_info "Restoring Home Assistant using ${filename}" tar xvf ${filename} -C /var/lib/docker/volumes/hass_config/_data/restore &>/dev/null From 54abd811797c86a130b22f028f3aa8a7e058b83f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Oct 2022 07:50:39 -0400 Subject: [PATCH 0459/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 209bfa8f..c94872fd 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-10-27 + +### Changed + +- **Container & Core Restore from Backup** + - NEW Scripts https://github.com/tteck/Proxmox/discussions/674 + ## 2022-10-07 ### Changed From 4e025f460b3af9ed5a15a7240359be858bf93a2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Oct 2022 14:53:01 -0400 Subject: [PATCH 0460/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3b0da86..d5c4254d 100644 --- a/README.md +++ b/README.md @@ -916,7 +916,7 @@ ________________________________________________________________________________
InfluxDB LXC -

+

InfluxDB LXC

From e36b17de130d07bcd5003fbc29b85bf17b6a7e58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Oct 2022 15:20:49 -0400 Subject: [PATCH 0461/3335] Update uptimekuma-update.sh add directory check --- misc/uptimekuma-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/uptimekuma-update.sh b/misc/uptimekuma-update.sh index bee3f2de..acccf4b2 100644 --- a/misc/uptimekuma-update.sh +++ b/misc/uptimekuma-update.sh @@ -45,6 +45,7 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +if [ ! -d "/opt/uptime-kuma" ]; then echo -e "No Uptime Kuma Directory Found."; exit; fi msg_info "Stopping ${APP}" sudo systemctl stop uptime-kuma &>/dev/null From 56228b67ee569da88dd7253bb18850bf87186ab8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Oct 2022 20:09:41 -0400 Subject: [PATCH 0462/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5c4254d..c6cff4fe 100644 --- a/README.md +++ b/README.md @@ -916,7 +916,7 @@ ________________________________________________________________________________
InfluxDB LXC -

+

InfluxDB LXC

From 32cbe55b374c5bdf8bf1f48cd4d588dc7181a72d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Oct 2022 10:47:31 -0400 Subject: [PATCH 0463/3335] Update emqx-install.sh add systemctl enable --now emqx --- setup/emqx-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 543648a8..601fd5d2 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -79,7 +79,7 @@ msg_ok "Installed Dependencies" msg_info "Installing EMQX" curl -s https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh | bash &>/dev/null sudo apt-get install -y emqx >/dev/null -systemctl start emqx +systemctl enable --now emqx msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6); From e7ec3d02757960b61702a91026468481ce79ee36 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Oct 2022 20:08:41 -0400 Subject: [PATCH 0464/3335] Maintenance (#680) --- ct/create_lxc.sh | 64 +++++---- ct/debian-v4.sh | 336 +++++++++++++++++++++++++---------------------- 2 files changed, 218 insertions(+), 182 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 1ac3ae44..43aea538 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -1,33 +1,39 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Validating Storage" VALIDCT=$(pvesm status -content rootdir | awk 'NR>1') -if [ -z "$VALIDCT" ]; then msg_error "Unable to detect a valid Container Storage location."; exit 1; fi; +if [ -z "$VALIDCT" ]; then + msg_error "Unable to detect a valid Container Storage location." + exit 1 +fi VALIDTMP=$(pvesm status -content vztmpl | awk 'NR>1') -if [ -z "$VALIDTMP" ]; then msg_error "Unable to detect a valid Template Storage location."; exit 1; fi; +if [ -z "$VALIDTMP" ]; then + msg_error "Unable to detect a valid Template Storage location." + exit 1 +fi set -o errexit set -o errtrace @@ -51,9 +57,15 @@ function select_storage() { local CONTENT local CONTENT_LABEL case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; + container) + CONTENT='rootdir' + CONTENT_LABEL='Container' + ;; + template) + CONTENT='vztmpl' + CONTENT_LABEL='Container template' + ;; + *) false || die "Invalid storage class." ;; esac local -a MENU @@ -66,18 +78,18 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') - if [ $((${#MENU[@]}/3)) -eq 1 ]; then + if [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -118,9 +130,9 @@ fi DEFAULT_PCT_OPTIONS=( -arch $(dpkg --print-architecture)) - -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) msg_info "Creating LXC Container" pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 3a7f61ae..443d577a 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ____ __________ _______ _ __ / __ \/ ____/ __ )/ _/ | / | / / / / / / __/ / __ |/ // /| | / |/ / @@ -52,168 +52,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID From 8e331fcbff94c660cc906bfa95704290e76a196f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Oct 2022 21:04:45 -0400 Subject: [PATCH 0465/3335] Maintenance (#681) * Maintenance --- ct/adguard-v4.sh | 336 +++++++++++++----------- ct/blocky-v4.sh | 336 +++++++++++++----------- ct/casaos-v4.sh | 338 ++++++++++++------------ ct/daemonsync-v4.sh | 336 +++++++++++++----------- ct/dashy-v4.sh | 336 +++++++++++++----------- ct/deconz-v4.sh | 340 ++++++++++++------------ ct/docker-v4.sh | 338 ++++++++++++------------ ct/emby-v4.sh | 354 +++++++++++++------------ ct/emqx-v4.sh | 336 +++++++++++++----------- ct/esphome-v4.sh | 336 +++++++++++++----------- ct/grafana-v4.sh | 336 +++++++++++++----------- ct/grocy-v4.sh | 336 +++++++++++++----------- ct/heimdalldashboard-v4.sh | 336 +++++++++++++----------- ct/homeassistant-core-v4.sh | 340 ++++++++++++------------ ct/homeassistant-v4.sh | 340 ++++++++++++------------ ct/homebridge-v4.sh | 336 +++++++++++++----------- ct/homepage-v4.sh | 336 +++++++++++++----------- ct/influxdb-v4.sh | 336 +++++++++++++----------- ct/iobroker-v4.sh | 336 +++++++++++++----------- ct/jellyfin-v4.sh | 356 ++++++++++++++------------ ct/keycloak-v4.sh | 336 +++++++++++++----------- ct/magicmirror-v4.sh | 336 +++++++++++++----------- ct/mariadb-v4.sh | 336 +++++++++++++----------- ct/meshcentral-v4.sh | 336 +++++++++++++----------- ct/motioneye-v4.sh | 336 +++++++++++++----------- ct/n8n-v4.sh | 336 +++++++++++++----------- ct/navidrome-v4.sh | 336 +++++++++++++----------- ct/nextcloudpi-v4.sh | 336 +++++++++++++----------- ct/nginx-proxy-manager-v4.sh | 336 +++++++++++++----------- ct/nocodb-v4.sh | 336 +++++++++++++----------- ct/node-red-v4.sh | 336 +++++++++++++----------- ct/omada-v4.sh | 354 +++++++++++++------------ ct/omv-v4.sh | 338 ++++++++++++------------ ct/openhab-v4.sh | 336 +++++++++++++----------- ct/paperless-ngx-v4.sh | 336 +++++++++++++----------- ct/photoprism-v4.sh | 336 +++++++++++++----------- ct/pihole-v4.sh | 336 +++++++++++++----------- ct/plex-v4.sh | 356 ++++++++++++++------------ ct/podman-homeassistant-v4.sh | 338 ++++++++++++------------ ct/postgresql-v4.sh | 336 +++++++++++++----------- ct/prometheus-v4.sh | 336 +++++++++++++----------- ct/syncthing-v4.sh | 336 +++++++++++++----------- ct/technitiumdns-v4.sh | 336 +++++++++++++----------- ct/trilium-v4.sh | 336 +++++++++++++----------- ct/ubuntu-v4.sh | 354 +++++++++++++------------ ct/umbrel-v4.sh | 338 ++++++++++++------------ ct/unifi-v4.sh | 336 +++++++++++++----------- ct/uptimekuma-v4.sh | 336 +++++++++++++----------- ct/vaultwarden-v4.sh | 336 +++++++++++++----------- ct/whoogle-v4.sh | 336 +++++++++++++----------- ct/wikijs-v4.sh | 336 +++++++++++++----------- ct/wireguard-v4.sh | 336 +++++++++++++----------- ct/zigbee2mqtt-v4.sh | 338 ++++++++++++------------ ct/zwave-js-ui-v4.sh | 338 ++++++++++++------------ misc/add-tailscale-lxc.sh | 14 +- misc/code-server.sh | 42 +-- misc/container-restore-from-backup.sh | 35 +-- misc/core-restore-from-backup.sh | 35 +-- misc/crowdsec.sh | 34 +-- misc/dashy-update.sh | 18 +- misc/edge-kernel.sh | 189 +++++++------- misc/emby-update.sh | 22 +- misc/filebrowser.sh | 36 +-- misc/frigate-support.sh | 16 +- misc/ha-copy-data-podman.sh | 44 ++-- misc/ha-copy-data.sh | 44 ++-- misc/hacontainer2hacore-data.sh | 44 ++-- misc/hacore2hacontainer-data.sh | 44 ++-- misc/hacore2hacore-data.sh | 44 ++-- misc/hacs-core.sh | 6 +- misc/hacs.sh | 6 +- misc/heimdalldashboard-all-update.sh | 47 ++-- misc/homepage-update.sh | 40 +-- misc/kernel-clean.sh | 103 ++++---- misc/latest-update-menu.sh | 22 +- misc/navidrome-update.sh | 22 +- misc/nocodb-update.sh | 47 ++-- misc/node-red-themes.sh | 137 +++++----- misc/npm_update.sh | 100 ++++---- misc/paperless-ngx-update.sh | 18 +- misc/photoprism-update.sh | 76 +++--- misc/pms-copy-data.sh | 44 ++-- misc/podman-copy-data-docker.sh | 44 ++-- misc/podman_hacs.sh | 6 +- misc/post-pbs-install.sh | 103 ++++---- misc/post-pve-install.sh | 115 ++++----- misc/scaling-governor.sh | 84 +++--- misc/technitiumdns-update.sh | 67 +++-- misc/trilium-update.sh | 22 +- misc/unifi-update.sh | 19 +- misc/update-lxcs.sh | 71 +++-- misc/uptimekuma-update.sh | 27 +- misc/usb-passthrough.sh | 16 +- misc/vaultwarden-update.sh | 22 +- misc/web-vault-update.sh | 28 +- misc/webmin.sh | 19 +- misc/z2m-copy-data.sh | 44 ++-- misc/zwave-copy-data.sh | 45 ++-- misc/zwave-js-ui-update.sh | 27 +- setup/adguard-install.sh | 64 ++--- setup/blocky-install.sh | 66 ++--- setup/casaos-install.sh | 64 ++--- setup/daemonsync-install.sh | 64 ++--- setup/dashy-install.sh | 68 ++--- setup/debian-install.sh | 62 ++--- setup/deconz-install.sh | 64 ++--- setup/docker-install.sh | 108 ++++---- setup/emby-install.sh | 76 +++--- setup/emqx-install.sh | 62 ++--- setup/esphome-install.sh | 64 ++--- setup/grafana-install.sh | 64 ++--- setup/grocy-install.sh | 64 ++--- setup/heimdalldashboard-install.sh | 72 +++--- setup/homeassistant-core-install.sh | 104 ++++---- setup/homeassistant-install.sh | 64 ++--- setup/homebridge-install.sh | 64 ++--- setup/homepage-install.sh | 64 ++--- setup/influxdb-install.sh | 88 +++---- setup/iobroker-install.sh | 64 ++--- setup/jellyfin-install.sh | 80 +++--- setup/keycloak-install.sh | 70 ++--- setup/magicmirror-install.sh | 86 ++++--- setup/mariadb-install.sh | 79 +++--- setup/meshcentral-install.sh | 64 ++--- setup/motioneye-install.sh | 108 ++++---- setup/mqtt-install.sh | 64 ++--- setup/n8n-install.sh | 64 ++--- setup/navidrome-install.sh | 74 +++--- setup/nextcloudpi-install.sh | 62 ++--- setup/nginx-proxy-manager-install.sh | 150 +++++------ setup/nocodb-install.sh | 66 ++--- setup/node-red-install.sh | 66 ++--- setup/omada-install.sh | 62 ++--- setup/omv-install.sh | 64 ++--- setup/openhab-install.sh | 68 ++--- setup/paperless-ngx-install.sh | 130 +++++----- setup/photoprism-install.sh | 82 +++--- setup/pihole-install.sh | 66 ++--- setup/plex-install.sh | 79 +++--- setup/podman-homeassistant-install.sh | 113 ++++---- setup/postgresql-install.sh | 83 +++--- setup/prometheus-install.sh | 66 ++--- setup/syncthing-install.sh | 62 ++--- setup/technitiumdns-install.sh | 64 ++--- setup/trilium-install.sh | 70 ++--- setup/ubuntu-install.sh | 62 ++--- setup/umbrel-install.sh | 64 ++--- setup/unifi-install.sh | 71 ++--- setup/uptimekuma-install.sh | 66 ++--- setup/vaultwarden-install.sh | 98 +++---- setup/whoogle-install.sh | 64 ++--- setup/wikijs-install.sh | 70 ++--- setup/wireguard-install.sh | 74 +++--- setup/zigbee2mqtt-install.sh | 75 +++--- setup/zwave-js-ui-install.sh | 66 ++--- 155 files changed, 12962 insertions(+), 11552 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index 1a8fe6cc..60b4e089 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${GN} + echo -e "${GN} ___ __ __ / | ____/ /___ ___ ______ __________/ / / /| |/ __ / __ / / / / __ / ___/ __ / @@ -53,168 +53,192 @@ echo -e "${GN} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index a2e79c5f..ff4f3475 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" ____ __ __ / __ )/ /___v4_____/ /____ __ / __ / / __ \/ ___/ //_/ / / / @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 73d38b3c..e1e701f6 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" ______ ____ _____ / ____/___ __v4______ _/ __ \/ ___/ / / / __ `/ ___/ __ `/ / / /\__ \ @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 1eacbab4..820267f4 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} ____ _____ / __ \____ ____ ____ ___ ____ ____ / ___/__ ______ _____ / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ @@ -53,168 +53,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 8eaaf93d..fa6e0ad6 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ____ __ / __ \____ ______/ /_ __ __ / / / / __ / ___/ __ \/ / / / @@ -53,168 +53,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 8225b32d..ab9a868b 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} __ __________ _ _______ ____/ /v4 / ____/ __ \/ | / /__ / / __ / _ \/ / / / / / |/ / / / @@ -52,169 +52,193 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index a5e4b72a..1e598396 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} ____ __ / __ \____ _____/ /_v4__ _____ / / / / __ \/ ___/ //_/ _ \/ ___/ @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -232,7 +256,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 66ddb644..3a3096f4 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${DGN} + echo -e "${DGN} ______ __ / ____/___ v4_ / /_ __ __ / __/ / __ __ \/ __ \/ / / / @@ -53,176 +53,200 @@ echo -e "${DGN} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ -"18.04" "Bionic" OFF \ -"20.04" "Focal" ON \ -"21.10" "Impish" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "21.10" "Impish" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -241,7 +265,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index f43d6508..0a79efcf 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" ________ _______v4 _ __ / ____/ |/ / __ \ | |/ / / __/ / /|_/ / / / / | / @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index d3cc16e3..95c5b25e 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${CL} + echo -e "${CL} ___________ ____ __ ______ __ _________ / ____/ ___// __ \/ / / / __ \/ |/ / ____/ / __/ \__ \/ /_/ / /_/ / / / / /|_/ / __/ @@ -52,168 +52,192 @@ echo -e "${CL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index fc40f4ff..6762da87 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} ______ ____ / ____/________ _/ __/___ _____ ____ _ / / __/ ___/ __ / /_/ __ / __ \/ __ / @@ -52,168 +52,192 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 21f73bb1..f1ed2e1d 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} ____ __________ _______ __ / __ / ___/ __ \/ ___/ / / / / /_/ / / / /_/ / /__/ /_/ / @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index de568b9b..7912b71b 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ __ _ __ ____ ____ __ __ __ / / / /__ (_)___ ___ ____/ /_v4 _/ / / / __ \____ ______/ /_ / /_ ____ ____ __________/ / / /_/ / _ \/ / __ __ \/ __ / __ / / / / / / / __ / ___/ __ \/ __ \/ __ \/ __ / ___/ __ / @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index c6b1ba10..11373448 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" __ __ ___ _ __ __ ______ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___v4________ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / __ \/ ___/ _ \ @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,8 +257,8 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit if [ "$CT_TYPE" == "0" ]; then -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 767a5bb8..8d8b9464 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ __ ___ _ __ __ / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then -cat <> $LXC_CONFIG + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm @@ -244,7 +268,7 @@ lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create= lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF else -cat <> $LXC_CONFIG + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 508bc15d..861bc448 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} __ ______ __ _____________ ____ ________ ____________ / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ @@ -52,168 +52,192 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 4d28a5f2..9c92edc8 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" __ __ / / / /___ ____ ___ ___ ____ ____ _____ ____ / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index b931f6b5..74121380 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} ____ ______ ____ ____ / _/_v4 / __/ /_ ___ __/ __ \/ __ ) / // __ \/ /_/ / / / / |/_/ / / / __ | @@ -52,168 +52,192 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index d2d8c6b0..43436724 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} _ ____ __ (_)___ / __ )_________ / /_____ _____ / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index bf006c52..3f49d1e7 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${DGN} + echo -e "${DGN} __________ ____ _____________ __ / / ____/ / / /\ \/ / ____/ _/ | / / __ / / __/ / / / / \ / /_ / // |/ / @@ -52,177 +52,201 @@ echo -e "${DGN} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ -"18.04" "Bionic" OFF \ -"20.04" "Focal" ON \ -"21.10" "Impish" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "21.10" "Impish" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -241,7 +265,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index f8172987..63d553f5 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} __ __ __ __ / //_/__ __ _______/ /___ ____ _/ /__ / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ @@ -53,168 +53,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 12fc6bee..5a52a4de 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ ___ _ __ ____ / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ @@ -53,168 +53,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index bb162f47..b2db3d31 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ ___ _ ____ ____ / |/ /___ ______(_)___ _/ __ \/ __ ) / /|_/ / __ / ___/ / __ / / / / __ | @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 20b01de8..a7b6767c 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ ___ __ ______ __ __ / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index ca5ba0e2..4834b42e 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ ___ __ _ ________ ________ / |/ /___ / /_(_)___ ____ / ____/\ \/ / ____/ / /|_/ / __ \/ __/ / __ \/ __ \/ __/ \ / __/ @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index b12a26ac..c1f88353 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ___ / _ \ _ __ | (_) |_v4_ @@ -53,168 +53,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 52940afc..57bfe2a0 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" _ __ _ __ / | / /___ __ v4__(_)___/ /________ ____ ___ ___ / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ @@ -52,168 +52,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index feb45833..68e5aed5 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" _ __ __ ________ ______ _ / | / /__ _ __/ /_/ ____/ /___ __v4______/ / __ \(_) / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 68dbbf6e..326d353c 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} _ __ _ ____ __ ___ / | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____ / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ @@ -53,168 +53,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index a4eccffb..8c58f846 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} _ __ ____ ____ / | / /___ ____v4___ / __ \/ __ ) / |/ / __ \/ ___/ __ \/ / / / __ | @@ -52,168 +52,192 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 0c356ee0..434bd642 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} _ __ __ ____ __ / | / /___ ____/ /__ v4 / __ \___ ____/ / / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / @@ -52,168 +52,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 51b2f592..6cea6f85 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} ____ __ / __ \____ ___v4____ _____/ /___ _ / / / / __ __ \/ __ / __ / __ / @@ -52,177 +52,201 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -"18.04" "Bionic" OFF \ -"20.04" "Focal" ON \ -"21.10" "Impish" OFF \ -"22.04" "Jammy" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "21.10" "Impish" OFF \ + "22.04" "Jammy" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index 322e0373..2d58a0ad 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" ____ __ ___ ___ _ __ ____ / __ \____v4___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index 28aa3454..fb07b1fd 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} __ _____ ____ ____v4____ ___ ____ / / / / | / __ ) / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | @@ -53,168 +53,192 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 7092b27b..f735b822 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" ____ __ / __ \____ _____ ___ _____/ /__v4__________ ____ ____ __ __ / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index b0ffd76c..69b2fd5e 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ____ __ ______ __________ ____ ____ _________ __ ___ / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / @@ -52,168 +52,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 3fced599..65b1df79 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ____ ____ __ ______ __ ______ / __ \/ _/ / / / / __ \/ / / ____/ / /_/ // /___/ /_/ / / / / / / __/ @@ -52,168 +52,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index b4ca8385..d9c4b619 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} ____ __ / __ \/ /__ _ __ / /_/ / / _ \| |/_/ @@ -52,177 +52,201 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ -"18.04" "Bionic" OFF \ -"20.04" "Focal" ON \ -"21.10" "Impish" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "21.10" "Impish" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -241,7 +265,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 9bbac839..df926cb6 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} ____ __ / __ \____ ____/ /___ ___ ____ _____ v4 / /_/ / __ \/ __ / __ __ \/ __ / __ \ @@ -56,168 +56,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -236,7 +260,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index 6f89483a..9fc542d3 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} ____ __ _____ ____ __ / __ \____ _____/ /_____ _________ / ___// __ \ / / / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / @@ -53,168 +53,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index db1ce80e..f17864ae 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ____ __ __ / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ @@ -52,168 +52,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index 50ef405c..e20ee8df 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" _____ __ __ _ / ___/__ ______v4_____/ /_/ /_ (_)___ ____ _ \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ @@ -54,168 +54,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index 3c1fe3a9..7d36387e 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ______ __ _ __ _ ____ _ _______ /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ v4 / __ \/ | / / ___/ / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ @@ -52,168 +52,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index bd121dd9..b64d1333 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" ______ _ ___ /_ __/_v4_(_) (_)_ ______ ___ / / / ___/ / / / / / / __ `__ \ @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 40997d2b..ce011c0a 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} __ ____ __ / / / / /_v4__ ______ / /___ __ / / / / __ \/ / / / __ \/ __/ / / / @@ -52,177 +52,201 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ -"18.04" "Bionic" OFF \ -"20.04" "Focal" OFF \ -"21.10" "Impish" OFF \ -"22.04" "Jammy" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" OFF \ + "21.10" "Impish" OFF \ + "22.04" "Jammy" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 1a7c38b1..8d02a0a6 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" __ __ __ __ / / / /___ ___v4/ /_ ________ / / / / / / __ `__ \/ __ \/ ___/ _ \/ / @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index cdbb1a9d..0051f6a5 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} __ __ _ _____ / / / /_v4 (_) __(_) / / / / __ \/ / /_/ / @@ -52,168 +52,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index fcd9fc30..f1779f12 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${DGN} + echo -e "${DGN} __ __ __ _ __ __ / / / /___ / /_(_)___ ___ ___ v4 / //_/_ ______ ___ ____ _ / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / @@ -53,168 +53,192 @@ echo -e "${DGN} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index 1e403439..1de5fc5d 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${CL} + echo -e "${CL} _ _____ __ ____ _______ _____ ____ ____ _______ __ | | / / | / / / / / /_ __/ | / / | / __ \/ __ \/ ____/ | / / | | / / /| |/ / / / / / / | | /| / / /| | / /_/ / / / / __/ / |/ / @@ -52,168 +52,192 @@ echo -e "${CL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 644b5a3f..9527d486 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${GN} + echo -e "${GN} _ ____ ______ ____ ________ ______ | | v4 / / / / / __ \/ __ \/ ____/ / / ____/ | | /| / / /_/ / / / / / / / / __/ / / __/ @@ -52,168 +52,192 @@ echo -e "${GN} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 7f6965ee..b4b50eff 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${BL} + echo -e "${BL} _ ___ __ _ _ | | / (_) /__(_) (_)____ | | /| / / / //_/ / / / ___/ @@ -53,168 +53,192 @@ echo -e "${BL} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index c594abc2..38e82951 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} __ ___ _____ _ \ \ / (_) / ____| | | \ \ /\ / / _ _ __ ___| | __ _ _ __ _ _ __ __| | @@ -54,168 +54,192 @@ echo -e "${RD} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 703b7fde..2c1881a5 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -echo -e "${YW} + echo -e "${YW} _____ _ __ ___ __ _______ ____________ /__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / @@ -53,168 +53,192 @@ echo -e "${YW} ${CL}" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 646773a0..45dd790c 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -36,14 +36,14 @@ function error_exit() { exit $EXIT } if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function header_info { -cat << "EOF" + cat <<"EOF" _____ _______ __ ______ /__ /_ ______ __v4 _____ / / ___/ / / / / _/ / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / @@ -53,168 +53,192 @@ cat << "EOF" EOF } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ -"1" "Unprivileged" OFF \ -"0" "Privileged" ON \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi fi -fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export CTID=$CT_ID @@ -233,7 +257,7 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index ba0e37a2..e9a54a2d 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash echo -e "\e[1;33mThis script will add Tailscale to an existing LXC Container ONLY\e[0m" while true; do - read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit @@ -32,7 +32,7 @@ function msg() { CTID=$1 CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf -cat <> $CTID_CONFIG_PATH +cat <>$CTID_CONFIG_PATH lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF diff --git a/misc/code-server.sh b/misc/code-server.sh index 2fcade90..dfadd067 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash IP=$(hostname -I | awk '{print $1}') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -21,25 +21,25 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${BL} + echo -e "${BL} ______ __ _____ / ____/___ ____/ /__ / ___/___ ______ _____ _____ / / / __ \/ __ / _ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ @@ -66,9 +66,9 @@ apt-get install -y sudo &>/dev/null apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" -VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') \ +VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Code-Server v${VERSION}" curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb &>/dev/null @@ -76,7 +76,7 @@ sudo dpkg -i code-server_${VERSION}_amd64.deb &>/dev/null rm -rf code-server_${VERSION}_amd64.deb mkdir -p ~/.config/code-server/ sudo systemctl enable --now code-server@$USER &>/dev/null -cat < ~/.config/code-server/config.yaml +cat <~/.config/code-server/config.yaml bind-addr: 0.0.0.0:8680 auth: none password: diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh index a70370ea..f1526ec5 100644 --- a/misc/container-restore-from-backup.sh +++ b/misc/container-restore-from-backup.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash clear -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -15,14 +15,14 @@ APP="Home Assistant Container" while true; do read -p "This will restore ${APP} from a backup. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -cat << "EOF" + cat <<"EOF" __ __ ___ _ __ __ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ @@ -46,10 +46,12 @@ function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -if [ -z "$(ls -A /var/lib/docker/volumes/hass_config/_data/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi +if [ -z "$(ls -A /var/lib/docker/volumes/hass_config/_data/backups/)" ]; then + msg_error "No backups found! \n" + exit 1 +fi DIR=/var/lib/docker/volumes/hass_config/_data/restore -if [ -d "$DIR" ]; -then +if [ -d "$DIR" ]; then msg_ok "Restore Directory Exists." else mkdir -p /var/lib/docker/volumes/hass_config/_data/restore @@ -58,7 +60,10 @@ fi cd /var/lib/docker/volumes/hass_config/_data/backups/ PS3="Please enter your choice: " files="$(ls -A .)" -select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done +select filename in ${files}; do + msg_ok "You selected ${BL}${filename}${CL}" + break +done msg_info "Stopping Home Assistant" docker stop homeassistant &>/dev/null msg_ok "Stopped Home Assistant" diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index e603cc6d..afa664ee 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash clear -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -15,14 +15,14 @@ APP="Home Assistant Core" while true; do read -p "This will restore ${APP} from a backup. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -cat << "EOF" + cat <<"EOF" __ __ ___ _ __ __ ______ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___ ________ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / __ \/ ___/ _ \ @@ -46,10 +46,12 @@ function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi +if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then + msg_error "No backups found! \n" + exit 1 +fi DIR=/root/.homeassistant/restore -if [ -d "$DIR" ]; -then +if [ -d "$DIR" ]; then msg_ok "Restore Directory Exists." else mkdir -p /root/.homeassistant/restore @@ -58,7 +60,10 @@ fi cd /root/.homeassistant/backups/ PS3="Please enter your choice: " files="$(ls -A .)" -select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done +select filename in ${files}; do + msg_ok "You selected ${BL}${filename}${CL}" + break +done msg_info "Stopping Home Assistant" sudo service homeassistant stop msg_ok "Stopped Home Assistant" diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index c4cf3d2d..63d3645e 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -20,25 +20,25 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${BL} + echo -e "${BL} _____ _ _____ / ____| | |/ ____| | | _ __ _____ ____| | (___ ___ ___ diff --git a/misc/dashy-update.sh b/misc/dashy-update.sh index 6e7151de..d9c3826f 100644 --- a/misc/dashy-update.sh +++ b/misc/dashy-update.sh @@ -1,23 +1,23 @@ #!/usr/bin/env bash set -e clear -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") while true; do read -p "This will Update Dashy LXC. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${RD} + echo -e "${RD} _____ _ | __ \ | | | | | | __ _ ___| |__ _ _ diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 69d58d40..74867e89 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -2,26 +2,26 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" set -e KERNEL_ON=$(uname -r) -PVE_KERNEL=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) -EDGE_KERNEL=$(dpkg --list| grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) +PVE_KERNEL=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) +EDGE_KERNEL=$(dpkg --list | grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) clear while true; do read -p "This is a Proxmox Edge Kernel Tool, USE AT YOUR OWN RISK. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear -show_menu(){ - normal=`echo "\033[m"` - safe=`echo "\033[32m"` - menu=`echo "\033[36m"` - number=`echo "\033[33m"` - bgred=`echo "\033[41m"` - fgred=`echo "\033[31m"` +show_menu() { + normal=$(echo "\033[m") + safe=$(echo "\033[32m") + menu=$(echo "\033[36m") + number=$(echo "\033[33m") + bgred=$(echo "\033[41m") + fgred=$(echo "\033[31m") proxmox-boot-tool kernel list echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}" printf "\n${menu}*********************************************${normal}\n" @@ -34,106 +34,113 @@ show_menu(){ printf "Please choose an option from the menu and enter or ${fgred}x${normal} to exit." read opt } -option_picked(){ - msgcolor=`echo "\033[01;31m"` - normal=`echo "\033[00;00m"` +option_picked() { + msgcolor=$(echo "\033[01;31m") + normal=$(echo "\033[00;00m") message=${@:-"${normal}Error: No message passed"} printf "${msgcolor}${message}${normal}\n" } clear show_menu -while [ $opt != '' ] - do +while [ $opt != '' ]; do if [ $opt = '' ]; then - exit; + exit else - case $opt in - 1) while true; do - read -p "Are you sure you want to Install Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Installing Proxmox Edge Kernel & Rebooting"; + case $opt in + 1) + while true; do + read -p "Are you sure you want to Install Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + clear + option_picked "Installing Proxmox Edge Kernel & Rebooting" apt-get install -y gnupg curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add - - echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" > /etc/apt/sources.list.d/pve-edge-kernel.list + echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" >/etc/apt/sources.list.d/pve-edge-kernel.list apt-get -y update apt-get -y install pve-kernel-5.19-edge reboot - break; - ;; - 2) while true; do - read -p "Are you sure you want to Switch to Proxmox VE 7 ${PVE_KERNEL} Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Switching to Proxmox VE 7 Kernel & Rebooting"; + break + ;; + 2) + while true; do + read -p "Are you sure you want to Switch to Proxmox VE 7 ${PVE_KERNEL} Kernel & Reboot? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + clear + option_picked "Switching to Proxmox VE 7 Kernel & Rebooting" proxmox-boot-tool kernel pin ${PVE_KERNEL} reboot - break; - ;; - 3) while true; do - read -p "Are you sure you want to Switch to Proxmox ${EDGE_KERNEL} Edge Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Switching to Proxmox Edge Kernel & Rebooting"; + break + ;; + 3) + while true; do + read -p "Are you sure you want to Switch to Proxmox ${EDGE_KERNEL} Edge Kernel & Reboot? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + clear + option_picked "Switching to Proxmox Edge Kernel & Rebooting" proxmox-boot-tool kernel pin ${EDGE_KERNEL} reboot - break; - ;; - 4) while true; do - read -p "Are you sure you want to Unpin the Current Kernel? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Unpinning Current Kernel"; + break + ;; + 4) + while true; do + read -p "Are you sure you want to Unpin the Current Kernel? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + clear + option_picked "Unpinning Current Kernel" proxmox-boot-tool kernel unpin - clear; - break; - ;; - 5) while true; do - read -p "Are you sure you want to Remove Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Removing Proxmox Edge Kernel & Rebooting"; + clear + break + ;; + 5) + while true; do + read -p "Are you sure you want to Remove Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + clear + option_picked "Removing Proxmox Edge Kernel & Rebooting" apt-get purge -y ${EDGE_KERNEL} rm -rf /etc/apt/sources.list.d/pve-edge-kernel.list proxmox-boot-tool kernel unpin reboot - break; - ;; - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose an option from the menu"; - show_menu; - ;; - esac + break + ;; + x) + exit + ;; + \n) + exit + ;; + *) + clear + option_picked "Please choose an option from the menu" + show_menu + ;; + esac fi - done +done show_menu diff --git a/misc/emby-update.sh b/misc/emby-update.sh index 86a67a9e..85f7bc83 100644 --- a/misc/emby-update.sh +++ b/misc/emby-update.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -14,14 +14,14 @@ APP="Emby" while true; do read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -cat << "EOF" + cat <<"EOF" ______ __ / ____/___ ___ / /_ __ __ / __/ / __ __ \/ __ \/ / / / diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index 6a11c514..dc322299 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash IP=$(hostname -I | awk '{print $1}') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -21,25 +21,25 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${DGN} + echo -e "${DGN} ______ _ _ ____ | ____(_) | | _ \ @@ -81,7 +81,7 @@ WorkingDirectory=/root/ ExecStart=/usr/local/bin/filebrowser -r / [Install] -WantedBy=default.target" > $service_path +WantedBy=default.target" >$service_path systemctl enable --now filebrowser.service &>/dev/null msg_ok "Created Service" diff --git a/misc/frigate-support.sh b/misc/frigate-support.sh index 18c80d18..0341c2cd 100644 --- a/misc/frigate-support.sh +++ b/misc/frigate-support.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash echo -e "\e[1;33m This script will Prepare a LXC Container for Frigate \e[0m" while true; do - read -p "Did you replace 106 with your LXC ID? Proceed (y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Did you replace 106 with your LXC ID? Proceed (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -48,7 +48,7 @@ for char_dev in ${CHAR_DEVS[@]}; do CHAR_DEV_STRING+=" -regex \".*/${char_dev}\"" done -read -r -d '' HOOK_SCRIPT <<- EOF || true +read -r -d '' HOOK_SCRIPT <<-EOF || true for char_dev in \$(find /sys/dev/char -regextype sed $CHAR_DEV_STRING); do dev="/dev/\$(sed -n "/DEVNAME/ s/^.*=\(.*\)$/\1/p" \${char_dev}/uevent)"; mkdir -p \$(dirname \${LXC_ROOTFS_MOUNT}\${dev}); @@ -66,7 +66,7 @@ CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf sed '/autodev/d' $CTID_CONFIG_PATH >CTID.conf cat CTID.conf >$CTID_CONFIG_PATH -cat <> $CTID_CONFIG_PATH +cat <>$CTID_CONFIG_PATH lxc.autodev: 1 lxc.hook.autodev: bash -c '$HOOK_SCRIPT' EOF diff --git a/misc/ha-copy-data-podman.sh b/misc/ha-copy-data-podman.sh index a37c9779..7296519c 100644 --- a/misc/ha-copy-data-podman.sh +++ b/misc/ha-copy-data-podman.sh @@ -3,12 +3,12 @@ # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data-podman.sh)" while true; do - read -p "Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -58,28 +58,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Podman LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Podman LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.02.12" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" @@ -90,13 +90,13 @@ fi msg "Mounting Container Disks..." DOCKER_PATH=/var/lib/docker/volumes/hass_config/ PODMAN_PATH=/var/lib/containers/storage/volumes/hass_config/ -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${PODMAN_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${PODMAN_PATH}" ] || die "Home Assistant directories in '$CTID_TO' not found." rm -rf ${CTID_TO_PATH}${PODMAN_PATH} diff --git a/misc/ha-copy-data.sh b/misc/ha-copy-data.sh index dfc67d12..83f26a19 100644 --- a/misc/ha-copy-data.sh +++ b/misc/ha-copy-data.sh @@ -3,12 +3,12 @@ # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data.sh)" while true; do - read -p "Use to copy all data from one Home Assistant LXC to another. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from one Home Assistant LXC to another. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -58,28 +58,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.23" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" @@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then fi msg "Mounting Container Disks..." DOCKER_PATH=/var/lib/docker/volumes/hass_config/ -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || die "Home Assistant directories in '$CTID_TO' not found." rm -rf ${CTID_TO_PATH}${DOCKER_PATH} diff --git a/misc/hacontainer2hacore-data.sh b/misc/hacontainer2hacore-data.sh index 94476e09..e6563275 100644 --- a/misc/hacontainer2hacore-data.sh +++ b/misc/hacontainer2hacore-data.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash while true; do - read -p "Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -55,28 +55,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Container LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Container LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Core LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Core LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.02" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" @@ -87,13 +87,13 @@ fi msg "Mounting Container Disks..." DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data CORE_PATH=/root/.homeassistant -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || die "Home Assistant directories in '$CTID_TO' not found." msg "Copying Data..." diff --git a/misc/hacore2hacontainer-data.sh b/misc/hacore2hacontainer-data.sh index 8edf5b74..ec40b43c 100644 --- a/misc/hacore2hacontainer-data.sh +++ b/misc/hacore2hacontainer-data.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash while true; do - read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -55,28 +55,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Core LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Core LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Container LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Container LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.02" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" @@ -87,13 +87,13 @@ fi msg "Mounting Container Disks..." DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data CORE_PATH=/root/.homeassistant -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || die "Home Assistant directories in '$CTID_TO' not found." msg "Copying Data..." diff --git a/misc/hacore2hacore-data.sh b/misc/hacore2hacore-data.sh index 44c67f6f..1faff32c 100644 --- a/misc/hacore2hacore-data.sh +++ b/misc/hacore2hacore-data.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash clear while true; do - read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -51,28 +51,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Core LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Core LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Core LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Core LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.03" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" @@ -83,13 +83,13 @@ fi msg "Mounting Container Disks..." DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data CORE_PATH=/root/.homeassistant -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || die "Home Assistant directories in '$CTID_TO' not found." msg "Copying Data..." diff --git a/misc/hacs-core.sh b/misc/hacs-core.sh index b6374539..71a9524f 100644 --- a/misc/hacs-core.sh +++ b/misc/hacs-core.sh @@ -4,9 +4,9 @@ echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) while true; do read -p "Start the HACS Install Script (y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done diff --git a/misc/hacs.sh b/misc/hacs.sh index ed476b0d..0c3cd2ad 100644 --- a/misc/hacs.sh +++ b/misc/hacs.sh @@ -4,9 +4,9 @@ echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) while true; do read -p "Start the HACS Install Script (y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done diff --git a/misc/heimdalldashboard-all-update.sh b/misc/heimdalldashboard-all-update.sh index 66539ed6..e7b1de62 100644 --- a/misc/heimdalldashboard-all-update.sh +++ b/misc/heimdalldashboard-all-update.sh @@ -1,22 +1,22 @@ #!/usr/bin/env bash set -e -PP=`echo "\e[1;35m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +PP=$(echo "\e[1;35m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") while true; do - read -p "This will Update Heimdall Dashboard. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "This will Update Heimdall Dashboard. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done clear function header_info { -echo -e "${PP} + echo -e "${PP} _ _ _ _ _ _ _____ _ _ _ | | | | (_) | | | | | | __ \ | | | | | | | |__| | ___ _ _ __ ___ __| | __ _| | | | | | | __ _ ___| |__ | |__ ___ __ _ _ __ __| | @@ -39,13 +39,13 @@ echo -en "${GN} Backing up Data... " if [ -d "/opt/Heimdall-2.4.6" ]; then cp -R /opt/Heimdall-2.4.6/database database-backup cp -R /opt/Heimdall-2.4.6/public public-backup - elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then +elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then cp -R /opt/Heimdall-2.4.7b/database database-backup cp -R /opt/Heimdall-2.4.7b/public public-backup - elif [[ -d "/opt/Heimdall-2.4.8" ]]; then +elif [[ -d "/opt/Heimdall-2.4.8" ]]; then cp -R /opt/Heimdall-2.4.8/database database-backup cp -R /opt/Heimdall-2.4.8/public public-backup - else +else cp -R /opt/Heimdall/database database-backup cp -R /opt/Heimdall/public public-backup fi @@ -56,13 +56,13 @@ RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releas echo -en "${GN} Updating Heimdall Dashboard to ${RELEASE}... " curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') if [ ! -d "/opt/Heimdall" ]; then - mv Heimdall-${VER} /opt/Heimdall - else + mv Heimdall-${VER} /opt/Heimdall +else cp -R Heimdall-${VER}/* /opt/Heimdall fi echo -e "${CM}${CL} \r" @@ -82,7 +82,7 @@ ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 TimeoutStopSec=30 [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path echo -en "${GN} Restoring Data... " cp -R database-backup/* /opt/Heimdall/database @@ -94,10 +94,10 @@ echo -en "${GN} Cleanup... " if [ -d "/opt/Heimdall-2.4.6" ]; then rm -rf /opt/Heimdall-2.4.6 rm -rf /opt/v2.4.6.tar.gz - elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then +elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then rm -rf /opt/Heimdall-2.4.7b rm -rf /opt/v2.4.7b.tar.gz - elif [[ -d "/opt/Heimdall-2.4.8" ]]; then +elif [[ -d "/opt/Heimdall-2.4.8" ]]; then rm -rf /opt/Heimdall-2.4.8 rm -rf /opt/v2.4.8.tar.gz fi @@ -116,4 +116,3 @@ sleep 2 echo -e "${CM}${CL} \r" echo -en "${GN} Finished! ${CL}\n" - diff --git a/misc/homepage-update.sh b/misc/homepage-update.sh index 7b8ac4c6..49a65168 100644 --- a/misc/homepage-update.sh +++ b/misc/homepage-update.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -19,25 +19,25 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } while true; do read -p "This will Update ${APP}. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -cat << "EOF" + cat <<"EOF" __ __ / / / /___ ____ ___ ___ ____ ____ _____ ____ / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ @@ -61,10 +61,10 @@ function msg_ok() { msg_info "Updating ${APP}" if ! command -v pnpm >/dev/null 2>&1; then - npm install -g pnpm &>/dev/null + npm install -g pnpm &>/dev/null fi -cd /opt/homepage -systemctl stop homepage +cd /opt/homepage +systemctl stop homepage git pull --force &>/dev/null pnpm install &>/dev/null pnpm build &>/dev/null diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 8a337672..a7b6319d 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -ex set -euo pipefail shopt -s inherit_errexit nullglob -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -18,15 +18,15 @@ current_kernel=$(uname -r) while true; do read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo -e "${RD}Please answer y/n${CL}";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo -e "${RD}Please answer y/n${CL}" ;; esac done clear function header_info { -echo -e "${RD} + echo -e "${RD} _ __ _ _____ _ | |/ / | | / ____| | | / ___ _ __ _ __ ___| | | | | | ___ __ _ _ __ @@ -48,29 +48,29 @@ function msg_ok() { } function check_root() { - if [[ $EUID -ne 0 ]]; then - echo -e "${CROSS}${RD}Error: This script must be ran as the root user.\n${CL}" - exit 1 - else - header_info - edge_kernel - kernel_info - kernel_clean - fi + if [[ $EUID -ne 0 ]]; then + echo -e "${CROSS}${RD}Error: This script must be ran as the root user.\n${CL}" + exit 1 + else + header_info + edge_kernel + kernel_info + kernel_clean + fi } function edge_kernel() { if [[ "$current_kernel" == *"edge"* ]]; then - echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" - echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" - exit 1 + echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" + echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" + exit 1 fi } function kernel_info() { - if [[ "$MODE" != "PBS" ]]; then - echo -e "${YW}PVE Version: ${BL}$(pveversion)\n${CL}" - fi + if [[ "$MODE" != "PBS" ]]; then + echo -e "${YW}PVE Version: ${BL}$(pveversion)\n${CL}" + fi if [[ "$current_kernel" == *"pve"* ]]; then echo -e "${YW}Current Kernel: ${BL}$current_kernel\n${CL}" else @@ -80,50 +80,49 @@ function kernel_info() { } function kernel_clean() { - kernels=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | sort -V) + kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | sort -V) remove_kernels="" - for kernel in $kernels - do + for kernel in $kernels; do if [ "$(echo $kernel | grep $current_kernel)" ]; then break else echo -e "${BL}'$kernel' ${CL}${YW}has been added to the remove Kernel list\n${CL}" - remove_kernels+=" $kernel" + remove_kernels+=" $kernel" fi done -msg_ok "Kernel Search Completed\n" + msg_ok "Kernel Search Completed\n" if [[ "$remove_kernels" != *"pve"* ]]; then echo -e "${PARTY} ${GN}It appears there are no old Kernels on your system. \n${CL}" msg_info "Exiting" sleep 2 msg_ok "Done" else - read -p "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') selected Kernels listed above? [y/n]: " -n 1 -r + read -p "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') selected Kernels listed above? [y/n]: " -n 1 -r echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" - /usr/bin/apt purge -y $remove_kernels > /dev/null 2>&1 - msg_ok "Successfully Removed Kernels" - msg_info "Updating GRUB" - /usr/sbin/update-grub > /dev/null 2>&1 - msg_ok "Successfully Updated GRUB" - msg_info "Exiting" - sleep 2 - msg_ok "Done" - else - msg_info "Exiting" - sleep 2 - msg_ok "Done" - fi + if [[ $REPLY =~ ^[Yy]$ ]]; then + msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" + /usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 + msg_ok "Successfully Removed Kernels" + msg_info "Updating GRUB" + /usr/sbin/update-grub >/dev/null 2>&1 + msg_ok "Successfully Updated GRUB" + msg_info "Exiting" + sleep 2 + msg_ok "Done" + else + msg_info "Exiting" + sleep 2 + msg_ok "Done" + fi fi } if ! command -v pveversion >/dev/null 2>&1; then - echo -e " Switching to PBS mode" - MODE="PBS" - sleep 2 - else - MODE="PVE" + echo -e " Switching to PBS mode" + MODE="PBS" + sleep 2 +else + MODE="PVE" fi check_root diff --git a/misc/latest-update-menu.sh b/misc/latest-update-menu.sh index 2d23b5f7..90d6f25b 100644 --- a/misc/latest-update-menu.sh +++ b/misc/latest-update-menu.sh @@ -3,9 +3,9 @@ while true; do read -p "This will create a New Update Menu for Home Assistant Container LXC. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear @@ -13,19 +13,19 @@ set -o errexit rm -rf /root/update.sh update update-containers.sh echo -e "\e[1;92m Creating New Update Menu Script... \e[0m" if [ -f /usr/local/lib/python3.9/dist-packages/runlike/runlike.py ]; then -echo -e "\e[1;92m pip3/runlike Already Installed! \e[0m" + echo -e "\e[1;92m pip3/runlike Already Installed! \e[0m" else -apt-get update &>/dev/null -echo -e "\e[1;92m Installing pip3... \e[0m" -apt-get install -y python3-pip &>/dev/null -echo -e "\e[1;92m Installing runlike... \e[0m" -pip3 install runlike &>/dev/null + apt-get update &>/dev/null + echo -e "\e[1;92m Installing pip3... \e[0m" + apt-get install -y python3-pip &>/dev/null + echo -e "\e[1;92m Installing runlike... \e[0m" + pip3 install runlike &>/dev/null fi echo -e "\e[1;92m Creating Update Script... \e[0m" if [ -d /root/hass_config ]; then -echo -e "\e[1;92m There's Already (hass_config) Folder! \e[0m" + echo -e "\e[1;92m There's Already (hass_config) Folder! \e[0m" else -mkdir /root/hass_config + mkdir /root/hass_config fi UPDATE_PATH='/root/update' UPDATE_CONTAINERS_PATH='/root/update-containers.sh' diff --git a/misc/navidrome-update.sh b/misc/navidrome-update.sh index c3ecded7..333632cc 100644 --- a/misc/navidrome-update.sh +++ b/misc/navidrome-update.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") function update_info { -cat << "EOF" + cat <<"EOF" _ __ _ __ / | / /___ __ __(_)___/ /________ ____ ___ ___ / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ @@ -23,9 +23,9 @@ update_info while true; do read -p "This will Update Navidrome to v$RELEASE. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done sleep 2 diff --git a/misc/nocodb-update.sh b/misc/nocodb-update.sh index 9a4e0399..3cc7494c 100644 --- a/misc/nocodb-update.sh +++ b/misc/nocodb-update.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -19,25 +19,25 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } while true; do read -p "This will Update ${APP}. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${YW} + echo -e "${YW} _ _ _____ ____ | \ | | | __ \| _ \ | \| | ___ v3___ ___ | | | | |_) | @@ -68,18 +68,17 @@ msg_ok "Updated ${APP}" read -p "${APP} LXC needs to reboot to apply the update. Reboot now? " -n 1 -r echo -if [[ $REPLY =~ ^[Yy]$ ]] -then +if [[ $REPLY =~ ^[Yy]$ ]]; then reboot=yes else reboot=no fi -if [ "$reboot" == "yes" ]; then -msg_info "Rebooting ${APP} LXC" -reboot +if [ "$reboot" == "yes" ]; then + msg_info "Rebooting ${APP} LXC" + reboot fi -if [ "$reboot" == "no" ]; then -msg_ok "Finished Updating ${APP}. Reboot to apply the update." +if [ "$reboot" == "no" ]; then + msg_ok "Finished Updating ${APP}. Reboot to apply the update." fi diff --git a/misc/node-red-themes.sh b/misc/node-red-themes.sh index 7795f8cb..1a813bc1 100644 --- a/misc/node-red-themes.sh +++ b/misc/node-red-themes.sh @@ -1,24 +1,24 @@ #!/usr/bin/env bash # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/node-red-themes.sh)" set -o errexit -show_menu(){ - YW=`echo "\033[33m"` - RD=`echo "\033[01;31m"` - BL=`echo "\033[36m"` +show_menu() { + YW=$(echo "\033[33m") + RD=$(echo "\033[01;31m") + BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' - GN=`echo "\033[1;92m"` - CL=`echo "\033[m"` -echo -e "${RD} Backup your Node-Red flows before running this script!!${CL} \n " -while true; do - read -p "This will Install Node-Red Themes. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -echo -e "${RD} Backup your Node-Red flows before installing any theme!!${CL} \n " + GN=$(echo "\033[1;92m") + CL=$(echo "\033[m") + echo -e "${RD} Backup your Node-Red flows before running this script!!${CL} \n " + while true; do + read -p "This will Install Node-Red Themes. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + clear + echo -e "${RD} Backup your Node-Red flows before installing any theme!!${CL} \n " printf "\n${BL}*********************************************${CL}\n" printf "${BL}**${YW} 1)${GN} Default Theme ${CL}\n" printf "${BL}**${YW} 2)${GN} Dark Theme ${CL}\n" @@ -32,75 +32,84 @@ echo -e "${RD} Backup your Node-Red flows before installing any theme!!${CL} \n read opt } -option_picked(){ - msgcolor=`echo "\033[01;31m"` - normal=`echo "\033[00;00m"` +option_picked() { + msgcolor=$(echo "\033[01;31m") + normal=$(echo "\033[00;00m") message=${@:-"${CL}Error: No message passed"} printf "${RD}${message}${CL}\n" } clear show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - option_picked "Installing Default Theme"; - THEME= - JS=// - break; +while [ "$opt" != " " ]; do + case $opt in + 1) + clear + option_picked "Installing Default Theme" + THEME= + JS=// + break ;; - 2) clear; - option_picked "Installing Dark Theme"; - THEME=dark - break; + 2) + clear + option_picked "Installing Dark Theme" + THEME=dark + break ;; - 3) clear; - option_picked "Installing Dracula Theme"; - THEME=dracula - break; + 3) + clear + option_picked "Installing Dracula Theme" + THEME=dracula + break ;; - 4) clear; - option_picked "Installing Midnight-Red Theme"; - THEME=midnight-red - break; + 4) + clear + option_picked "Installing Midnight-Red Theme" + THEME=midnight-red + break ;; - 5) clear; - option_picked "Installing Oled Theme"; - THEME=oled - break; + 5) + clear + option_picked "Installing Oled Theme" + THEME=oled + break ;; - 6) clear; - option_picked "Installing Solarized-Dark Theme"; - THEME=solarized-dark - break; + 6) + clear + option_picked "Installing Solarized-Dark Theme" + THEME=solarized-dark + break ;; - 7) clear; - option_picked "Installing Solarized-Light Theme"; - THEME=solarized-light - break; + 7) + clear + option_picked "Installing Solarized-Light Theme" + THEME=solarized-light + break ;; - x)exit; + x) + exit ;; - \n)exit; + \n) + exit ;; - *)clear; - option_picked "Please choose a theme from the menu"; - show_menu; + *) + clear + option_picked "Please choose a theme from the menu" + show_menu ;; - esac - done + esac +done echo -en "${GN} Installing ${THEME} Theme... " cd /root/.node-red if [ "${THEME}" = "" ]; then - echo -e "${CM}${CL} \r" - else -npm install @node-red-contrib-themes/${THEME} &>/dev/null -echo -e "${CM}${CL} \r" + echo -e "${CM}${CL} \r" +else + npm install @node-red-contrib-themes/${THEME} &>/dev/null + echo -e "${CM}${CL} \r" fi echo -en "${GN} Writing Settings... " -cat < /root/.node-red/settings.js +cat </root/.node-red/settings.js module.exports = { uiPort: process.env.PORT || 1880, mqttReconnectTime: 15000, serialReconnectTime: 15000, diff --git a/misc/npm_update.sh b/misc/npm_update.sh index 4289e892..ca817b59 100644 --- a/misc/npm_update.sh +++ b/misc/npm_update.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') \ +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") function update_info { -echo -e "${RD} + echo -e "${RD} _ _ _____ __ __ | \ | | | __ \ | \/ | | \| | | |__) | | \ / | @@ -24,19 +24,19 @@ ${CL}" update_info while true; do - read -p "This will update Nginx Proxy Manager to v${RELEASE}. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "This will update Nginx Proxy Manager to v${RELEASE}. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done clear update_info -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -57,23 +57,23 @@ function msg() { T="$(date +%M)" if [ -f /lib/systemd/system/npm.service ]; then -echo -en "${GN} Prep For Update... " -sleep 2 -echo -e "${CM}${CL} \r" -echo -en "${GN} Stopping Services... " + echo -en "${GN} Prep For Update... " + sleep 2 + echo -e "${CM}${CL} \r" + echo -en "${GN} Stopping Services... " systemctl stop openresty systemctl stop npm -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleaning Old Files... " - rm -rf /app \ - /var/www/html \ - /etc/nginx \ - /var/log/nginx \ - /var/lib/nginx \ - /var/cache/nginx &>/dev/null echo -e "${CM}${CL} \r" - else + + echo -en "${GN} Cleaning Old Files... " + rm -rf /app \ + /var/www/html \ + /etc/nginx \ + /var/log/nginx \ + /var/lib/nginx \ + /var/cache/nginx &>/dev/null + echo -e "${CM}${CL} \r" +else echo -en "${RD} No NPM to Update! ${CL}" exit fi @@ -103,24 +103,24 @@ cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-prox ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf rm -f /etc/nginx/conf.d/dev.conf mkdir -p /tmp/nginx/body \ -/run/nginx \ -/data/nginx \ -/data/custom_ssl \ -/data/logs \ -/data/access \ -/data/nginx/default_host \ -/data/nginx/default_www \ -/data/nginx/proxy_host \ -/data/nginx/redirection_host \ -/data/nginx/stream \ -/data/nginx/dead_host \ -/data/nginx/temp \ -/var/lib/nginx/cache/public \ -/var/lib/nginx/cache/private \ -/var/cache/nginx/proxy_temp + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp chmod -R 777 /var/cache/nginx chown root /tmp/nginx -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" > /etc/nginx/conf.d/include/resolvers.conf +echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf echo -e "${CM}${CL} \r" if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then @@ -144,7 +144,7 @@ echo -e "${CM}${CL} \r" echo -en "${GN} Initializing Backend... " rm -rf /app/config/default.json &>/dev/null if [ ! -f /app/config/production.json ]; then -cat << 'EOF' > /app/config/production.json + cat <<'EOF' >/app/config/production.json { "database": { "engine": "knex-native", @@ -168,7 +168,7 @@ systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm echo -e "${CM}${CL} \r" -TS="$(($(date +%M)-T))" +TS="$(($(date +%M) - T))" IP=$(hostname -I | cut -f1 -d ' ') echo -e "${GN}Successfully Updated Nginx Proxy Manager to ${RD}${RELEASE}${CL} and it took ${RD}${TS} minutes.${CL} diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index fc737ee0..87cbf03f 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash clear RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -30,7 +30,7 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -cat << "EOF" +cat <<"EOF" ____ __ / __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __ / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ @@ -42,9 +42,9 @@ EOF while true; do read -p "This will Update Paperless-ngx to $RELEASE. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done sleep 2 diff --git a/misc/photoprism-update.sh b/misc/photoprism-update.sh index 7ab7f8f6..f6e99980 100644 --- a/misc/photoprism-update.sh +++ b/misc/photoprism-update.sh @@ -1,28 +1,28 @@ #!/usr/bin/env bash set -e -RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-4) }') \ +RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-4) }') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -PP=`echo "\e[1;35m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +PP=$(echo "\e[1;35m") while true; do read -p "Update PhotoPrism LXC. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${PP} + echo -e "${PP} _____ _ _ _____ _ | __ \| | | | | __ \ (_) | |__) | |__ ___ | |_ ___ | |__) | __ _ ___ _ __ ___ @@ -34,7 +34,7 @@ ${CL}" } header_info -show_menu(){ +show_menu() { printf " ${YW} 1)${GN} Release Branch ${CL}\n" printf " ${YW} 2)${YW} Develop Branch ${CL}\n" @@ -42,37 +42,41 @@ show_menu(){ read opt } -option_picked(){ +option_picked() { message1=${@:-"${CL}Error: No message passed"} printf " ${YW}${message1}${CL}\n" } show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Release Branch"; - BR="release" - break; +while [ "$opt" != " " ]; do + case $opt in + 1) + clear + header_info + option_picked "Using Release Branch" + BR="release" + break ;; - 2) clear; - header_info; - option_picked "Using Develop Branch"; - BR="develop" - break; + 2) + clear + header_info + option_picked "Using Develop Branch" + BR="develop" + break ;; - x)exit; + x) + exit ;; - \n)exit; + \n) + exit ;; - *)clear; - option_picked "Please choose a Install Branch from the menu"; - show_menu; + *) + clear + option_picked "Please choose a Install Branch from the menu" + show_menu ;; - esac - done + esac +done echo -en "${GN} Stopping PhotoPrism... " sudo systemctl stop photoprism @@ -100,5 +104,3 @@ sudo systemctl start photoprism echo -e "${CM}${CL} \n" echo -e "${GN} Finished ${CL} \n " - - diff --git a/misc/pms-copy-data.sh b/misc/pms-copy-data.sh index ffa2340f..60812f67 100644 --- a/misc/pms-copy-data.sh +++ b/misc/pms-copy-data.sh @@ -3,12 +3,12 @@ # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/pms-copy-data.sh)" while true; do - read -p "Use to copy all data from one Plex Media Server LXC to another. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from one Plex Media Server LXC to another. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -58,28 +58,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Plex Media Server LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich Plex Media Server LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Plex Media Server LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich Plex Media Server LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.24" 13 50 || exit info "Plex Media Server Data from '$CTID_FROM' to '$CTID_TO'" @@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then fi msg "Mounting Container Disks..." DATA_PATH=/var/lib/plexmediaserver/Library/ -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || die "Plex Media Server directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || die "Plex Media Server directories in '$CTID_TO' not found." #rm -rf ${CTID_TO_PATH}${DATA_PATH} diff --git a/misc/podman-copy-data-docker.sh b/misc/podman-copy-data-docker.sh index de5e0b1a..5b5bea9e 100644 --- a/misc/podman-copy-data-docker.sh +++ b/misc/podman-copy-data-docker.sh @@ -3,12 +3,12 @@ # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/podman-copy-data-docker.sh)" while true; do - read -p "Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -58,28 +58,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA Podman LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA Podman LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich HA LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich HA LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.03.31" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" @@ -90,13 +90,13 @@ fi msg "Mounting Container Disks..." DOCKER_PATH=/var/lib/docker/volumes/hass_config/ PODMAN_PATH=/var/lib/containers/storage/volumes/hass_config/ -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${PODMAN_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${PODMAN_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || die "Home Assistant directories in '$CTID_TO' not found." rm -rf ${CTID_TO_PATH}${DOCKER_PATH} diff --git a/misc/podman_hacs.sh b/misc/podman_hacs.sh index d85ad7da..6936b066 100644 --- a/misc/podman_hacs.sh +++ b/misc/podman_hacs.sh @@ -4,9 +4,9 @@ echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) while true; do read -p "Start the HACS Install Script (y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index c73c1cfb..b96dbb93 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -ex set -euo pipefail shopt -s inherit_errexit nullglob -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -17,19 +17,19 @@ echo -e "${BL}This script will Perform Post Install Routines.${CL}" while true; do read -p "Start the PBS Post Install Script (y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done if command -v pveversion >/dev/null 2>&1; then - echo -e "\n🛑 PVE Detected, Wrong Script!\n" - exit 1 + echo -e "\n🛑 PVE Detected, Wrong Script!\n" + exit 1 fi function header_info { -cat << "EOF" + cat <<"EOF" ____ ____ _____ ____ __ ____ __ ____ / __ \/ __ ) ___/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / / /_/ / __ \__ \ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / @@ -52,74 +52,67 @@ function msg_ok() { clear header_info read -r -p "Disable Enterprise Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Disabling Enterprise Repository" -sleep 2 -sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list -msg_ok "Disabled Enterprise Repository" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Disabling Enterprise Repository" + sleep 2 + sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list + msg_ok "Disabled Enterprise Repository" fi read -r -p "Add/Correct PBS Sources (sources.list)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Adding or Correcting PBS Sources" -cat < /etc/apt/sources.list +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Adding or Correcting PBS Sources" + cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib deb http://ftp.debian.org/debian bullseye-updates main contrib deb http://security.debian.org/debian-security bullseye-security main contrib EOF -sleep 2 -msg_ok "Added or Corrected PBS Sources" + sleep 2 + msg_ok "Added or Corrected PBS Sources" fi read -r -p "Enable No-Subscription Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Enabling No-Subscription Repository" -cat <> /etc/apt/sources.list +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Enabling No-Subscription Repository" + cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription EOF -sleep 2 -msg_ok "Enabled No-Subscription Repository" + sleep 2 + msg_ok "Enabled No-Subscription Repository" fi read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Adding Beta/Test Repository and set disabled" -cat <> /etc/apt/sources.list +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Adding Beta/Test Repository and set disabled" + cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pbs bullseye pbstest EOF -sleep 2 -msg_ok "Added Beta/Test Repository" + sleep 2 + msg_ok "Added Beta/Test Repository" fi read -r -p "Disable Subscription Nag? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Disabling Subscription Nag" -echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script -apt --reinstall install proxmox-widget-toolkit &>/dev/null -msg_ok "Disabled Subscription Nag" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Disabling Subscription Nag" + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + apt --reinstall install proxmox-widget-toolkit &>/dev/null + msg_ok "Disabled Subscription Nag" fi read -r -p "Update Proxmox Backup Server now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Updating Proxmox Backup Server (Patience)" -apt-get update &>/dev/null -apt-get -y dist-upgrade &>/dev/null -msg_ok "Updated Proxmox Backup Server (⚠ Reboot Recommended)" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Updating Proxmox Backup Server (Patience)" + apt-get update &>/dev/null + apt-get -y dist-upgrade &>/dev/null + msg_ok "Updated Proxmox Backup Server (⚠ Reboot Recommended)" fi read -r -p "Reboot Proxmox Backup Server now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Rebooting Proxmox Backup Server" -sleep 2 -msg_ok "Completed Post Install Routines" -reboot +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Rebooting Proxmox Backup Server" + sleep 2 + msg_ok "Completed Post Install Routines" + reboot fi sleep 2 diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index efd4945d..7fb7bd7b 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -ex set -euo pipefail shopt -s inherit_errexit nullglob -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -17,26 +17,26 @@ echo -e "${BL}This script will Perform Post Install Routines.${CL}" while true; do read -p "Start the PVE7 Post Install Script (y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done if ! command -v pveversion >/dev/null 2>&1; then - echo -e "\n🛑 No PVE Detected, Wrong Script!\n" - exit 1 + echo -e "\n🛑 No PVE Detected, Wrong Script!\n" + exit 1 fi -if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version: 7.XX${CL}" - echo -e "\nExiting..." - sleep 3 - exit +if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then + echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version: 7.XX${CL}" + echo -e "\nExiting..." + sleep 3 + exit fi function header_info { -echo -e "${RD} + echo -e "${RD} ____ _ _____________ ____ __ ____ __ ____ / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / @@ -58,74 +58,67 @@ function msg_ok() { clear header_info read -r -p "Disable Enterprise Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Disabling Enterprise Repository" -sleep 2 -sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list -msg_ok "Disabled Enterprise Repository" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Disabling Enterprise Repository" + sleep 2 + sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list + msg_ok "Disabled Enterprise Repository" fi read -r -p "Add/Correct PVE7 Sources (sources.list)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Adding or Correcting PVE7 Sources" -cat < /etc/apt/sources.list +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Adding or Correcting PVE7 Sources" + cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib deb http://ftp.debian.org/debian bullseye-updates main contrib deb http://security.debian.org/debian-security bullseye-security main contrib EOF -sleep 2 -msg_ok "Added or Corrected PVE7 Sources" + sleep 2 + msg_ok "Added or Corrected PVE7 Sources" fi read -r -p "Enable No-Subscription Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Enabling No-Subscription Repository" -cat <> /etc/apt/sources.list +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Enabling No-Subscription Repository" + cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription EOF -sleep 2 -msg_ok "Enabled No-Subscription Repository" + sleep 2 + msg_ok "Enabled No-Subscription Repository" fi read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Adding Beta/Test Repository and set disabled" -cat <> /etc/apt/sources.list +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Adding Beta/Test Repository and set disabled" + cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pve bullseye pvetest EOF -sleep 2 -msg_ok "Added Beta/Test Repository" + sleep 2 + msg_ok "Added Beta/Test Repository" fi read -r -p "Disable Subscription Nag? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Disabling Subscription Nag" -echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script -apt --reinstall install proxmox-widget-toolkit &>/dev/null -msg_ok "Disabled Subscription Nag (Delete browser cache)" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Disabling Subscription Nag" + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + apt --reinstall install proxmox-widget-toolkit &>/dev/null + msg_ok "Disabled Subscription Nag (Delete browser cache)" fi read -r -p "Update Proxmox VE 7 now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Updating Proxmox VE 7 (Patience)" -apt-get update &>/dev/null -apt-get -y dist-upgrade &>/dev/null -msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Updating Proxmox VE 7 (Patience)" + apt-get update &>/dev/null + apt-get -y dist-upgrade &>/dev/null + msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)" fi read -r -p "Reboot Proxmox VE 7 now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -msg_info "Rebooting Proxmox VE 7" -sleep 2 -msg_ok "Completed Post Install Routines" -reboot +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + msg_info "Rebooting Proxmox VE 7" + sleep 2 + msg_ok "Completed Post Install Routines" + reboot fi sleep 2 diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 8eace5bd..4a5821b2 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -4,14 +4,14 @@ set -e while true; do read -p "View CPU Scaling Governors. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e " + echo -e " _____ _____ _ _ / ____| __ \| | | | | | | |__) | | | | @@ -21,16 +21,16 @@ echo -e " Scaling Governors " } -show_menu(){ - CL=`echo "\033[m"` - GN=`echo "\033[32m"` - BL=`echo "\033[36m"` - YW=`echo "\033[33m"` - fgred=`echo "\033[31m"` -header_info +show_menu() { + CL=$(echo "\033[m") + GN=$(echo "\033[32m") + BL=$(echo "\033[36m") + YW=$(echo "\033[33m") + fgred=$(echo "\033[31m") + header_info CK=$(uname -r) IP=$(hostname -I) -# MAC=$(cat /sys/class/net/eno1/address) + # MAC=$(cat /sys/class/net/eno1/address) ACSG=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors) CCSG=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) echo -e "${YW}Proxmox IP ${BL}${IP}${CL}" @@ -41,7 +41,7 @@ header_info echo -e "\n${YW}Available CPU Scaling Governors ${BL}${ACSG}${CL}" - + echo -e "\n${YW}Current CPU Scaling Governor ${BL}${CCSG}${CL}" printf "\n ${fgred}Only Select Available CPU Scaling Governors From Above${CL}\n \n" @@ -57,43 +57,51 @@ header_info } clear show_menu -while [ $opt != '' ] - do +while [ $opt != '' ]; do if [ $opt = '' ]; then - exit; + exit else - case $opt in - 1) echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + case $opt in + 1) + echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 2) echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 2) + echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 3) echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 3) + echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 4) echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 4) + echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 5) echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 5) + echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 6) echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 6) + echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - x)exit; - ;; - \n)exit; - ;; - *)clear; - show_menu; - ;; - esac + ;; + x) + exit + ;; + \n) + exit + ;; + *) + clear + show_menu + ;; + esac fi - done +done diff --git a/misc/technitiumdns-update.sh b/misc/technitiumdns-update.sh index 3cb30e42..0cfbd7f8 100644 --- a/misc/technitiumdns-update.sh +++ b/misc/technitiumdns-update.sh @@ -7,61 +7,52 @@ dnsUrl="https://download.technitium.com/dns/DnsServerPortable.tar.gz" mkdir -p $dnsDir installLog="$dnsDir/install.log" -echo "" > $installLog +echo "" >$installLog echo "" echo "===============================" echo "Technitium DNS Server Update" echo "===============================" -if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0."; -then +if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then dotnetFound="yes" else dotnetFound="no" fi - if [ -d $dotnetDir ] - then - dotnetUpdate="yes" - echo "Updating .NET 6 Runtime..." +if [ -d $dotnetDir ]; then + dotnetUpdate="yes" + echo "Updating .NET 6 Runtime..." +fi + +curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1 + +if [ ! -f "/usr/bin/dotnet" ]; then + ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1 +fi + +if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then + if [ "$dotnetUpdate" = "yes" ]; then + echo ".NET 6 Runtime was updated successfully!" fi +else + echo "Failed to update .NET 6 Runtime. Please try again." + exit 1 +fi - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >> $installLog 2>&1 - - if [ ! -f "/usr/bin/dotnet" ] - then - ln -s $dotnetDir/dotnet /usr/bin >> $installLog 2>&1 - fi - - if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0."; - then - if [ "$dotnetUpdate" = "yes" ] - then - echo ".NET 6 Runtime was updated successfully!" - fi - else - echo "Failed to update .NET 6 Runtime. Please try again." - exit 1 - fi - -if curl -o $dnsTar --fail $dnsUrl >> $installLog 2>&1 -then - if [ -d $dnsDir ] - then +if curl -o $dnsTar --fail $dnsUrl >>$installLog 2>&1; then + if [ -d $dnsDir ]; then echo "Updating Technitium DNS Server..." fi - - tar -zxf $dnsTar -C $dnsDir >> $installLog 2>&1 - - if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ] - then - if [ -f "/etc/systemd/system/dns.service" ] - then + + tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1 + + if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]; then + if [ -f "/etc/systemd/system/dns.service" ]; then echo "Restarting systemd service..." - systemctl restart dns.service >> $installLog 2>&1 + systemctl restart dns.service >>$installLog 2>&1 fi - + echo "" echo "Technitium DNS Server was updated successfully!" else diff --git a/misc/trilium-update.sh b/misc/trilium-update.sh index eb9a1d88..5670c49e 100644 --- a/misc/trilium-update.sh +++ b/misc/trilium-update.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") function update_info { -cat << "EOF" + cat <<"EOF" ______ _ ___ /_ __/____(_) (_)_ ______ ___ / / / ___/ / / / / / / __ `__ \ @@ -23,9 +23,9 @@ update_info while true; do read -p "This will Update Trilium to v$RELEASE. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done sleep 2 diff --git a/misc/unifi-update.sh b/misc/unifi-update.sh index a7a19aae..6befdb24 100644 --- a/misc/unifi-update.sh +++ b/misc/unifi-update.sh @@ -1,22 +1,22 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") APP="UniFi Update" while true; do read -p "This will run ${APP}. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${RD} + echo -e "${RD} _ _ _ ______ _ | | | | (_) ____(_) | | | |_ __ _| |__ _ @@ -30,4 +30,3 @@ ${CL}" header_info sleep 3 wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh && bash unifi-update.sh - diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 369631f4..3c0a4f27 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,22 +1,22 @@ #!/bin/bash set -e -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") while true; do - read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done clear function header_info { -echo -e "${BL} + echo -e "${BL} _ _ _____ _____ _______ ______ | | | | __ \| __ \ /\|__ __| ____| | | | | |__) | | | | / \ | | | |__ @@ -39,34 +39,33 @@ function update_container() { } read -p "Skip stopped containers? " -n 1 -r echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - skip=no +if [[ ! $REPLY =~ ^[Yy]$ ]]; then + skip=no else - skip=yes + skip=yes fi -for container in $containers -do - status=`pct status $container` - if [ "$skip" == "no" ]; then - if [ "$status" == "status: stopped" ]; then - echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" - pct start $container - echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" - sleep 5 - update_container $container - echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" - pct shutdown $container & - elif [ "$status" == "status: running" ]; then - update_container $container +for container in $containers; do + status=$(pct status $container) + if [ "$skip" == "no" ]; then + if [ "$status" == "status: stopped" ]; then + echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" + pct start $container + echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" + sleep 5 + update_container $container + echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" + pct shutdown $container & + elif [ "$status" == "status: running" ]; then + update_container $container + fi fi - fi - if [ "$skip" == "yes" ]; then - if [ "$status" == "status: running" ]; then - update_container $container + if [ "$skip" == "yes" ]; then + if [ "$status" == "status: running" ]; then + update_container $container + fi fi - fi -done; wait +done +wait echo -e "${GN} Finished, All Containers Updated. ${CL} \n" diff --git a/misc/uptimekuma-update.sh b/misc/uptimekuma-update.sh index acccf4b2..be946ea7 100644 --- a/misc/uptimekuma-update.sh +++ b/misc/uptimekuma-update.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -ex LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -14,14 +14,14 @@ APP="Uptime Kuma" while true; do read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e "${DGN} + echo -e "${DGN} _ _ _ _ _ __ | | | | | | (_) | |/ / | | | |_v3_ | |_ _ _ __ ___ ___ | ' /_ _ _ __ ___ __ _ @@ -45,7 +45,10 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -if [ ! -d "/opt/uptime-kuma" ]; then echo -e "No Uptime Kuma Directory Found."; exit; fi +if [ ! -d "/opt/uptime-kuma" ]; then + echo -e "No Uptime Kuma Directory Found." + exit +fi msg_info "Stopping ${APP}" sudo systemctl stop uptime-kuma &>/dev/null diff --git a/misc/usb-passthrough.sh b/misc/usb-passthrough.sh index 8b75c792..b8623d3b 100644 --- a/misc/usb-passthrough.sh +++ b/misc/usb-passthrough.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash echo -e "\e[1;33m This script will allow USB passthrough to a PRIVILEGED LXC Container ONLY\e[0m" while true; do - read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit @@ -45,7 +45,7 @@ for char_dev in ${CHAR_DEVS[@]}; do CHAR_DEV_STRING+=" -regex \".*/${char_dev}\"" done -read -r -d '' HOOK_SCRIPT <<- EOF || true +read -r -d '' HOOK_SCRIPT <<-EOF || true for char_dev in \$(find /sys/dev/char -regextype sed $CHAR_DEV_STRING); do dev="/dev/\$(sed -n "/DEVNAME/ s/^.*=\(.*\)$/\1/p" \${char_dev}/uevent)"; mkdir -p \$(dirname \${LXC_ROOTFS_MOUNT}\${dev}); @@ -63,7 +63,7 @@ CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf sed '/autodev/d' $CTID_CONFIG_PATH >CTID.conf cat CTID.conf >$CTID_CONFIG_PATH -cat <> $CTID_CONFIG_PATH +cat <>$CTID_CONFIG_PATH lxc.autodev: 1 lxc.hook.autodev: bash -c '$HOOK_SCRIPT' EOF diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 91159e1b..43bfa368 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') +VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") function update_info { -echo -e "${BL} + echo -e "${BL} __ __ _ _ _ \ \ / / | | | | | \ \ / /_ _ _ _| | |___ ____ _ _ __ __| | ___ _ __ @@ -24,9 +24,9 @@ update_info while true; do read -p "This will Update Vaultwarden to $VAULT (set 2vCPU 2048MiB RAM Min.). Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done sleep 2 diff --git a/misc/web-vault-update.sh b/misc/web-vault-update.sh index a6b5eaf8..5b2e61b9 100644 --- a/misc/web-vault-update.sh +++ b/misc/web-vault-update.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') +VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") function update_info { -echo -e "${BL} + echo -e "${BL} __ __ _ _ _ \ \ / / | | | | | \ \ /\ / /__| |__ ________ ____ _ _ _| | |_ @@ -23,9 +23,9 @@ update_info while true; do read -p "This will Update Web-Vault to $VWRELEASE. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done sleep 2 @@ -36,9 +36,9 @@ sleep 1 echo -e "${GN} Updating to ${VWRELEASE}... ${CL}" curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null if [ -d "/var/lib/vaultwarden" ]; then -tar -xzf bw_web_$VWRELEASE.tar.gz -C /var/lib/vaultwarden/ &>/dev/null -else -tar -zxf bw_web_$VWRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null + tar -xzf bw_web_$VWRELEASE.tar.gz -C /var/lib/vaultwarden/ &>/dev/null +else + tar -zxf bw_web_$VWRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null fi echo -e "${GN} Cleaning up... ${CL}" diff --git a/misc/webmin.sh b/misc/webmin.sh index d5dca0de..b997df5f 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -1,17 +1,17 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") while true; do read -p "This will Install Webmin, Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear @@ -34,7 +34,6 @@ echo -en "${GN} Setting Default Webmin usermame & password to root... " rm -rf /root/webmin_2.000_all.deb echo -e "${CM}${CL} \r" IP=$(hostname -I | cut -f1 -d ' ') -echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000" - +echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000" # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/webmin.sh)" diff --git a/misc/z2m-copy-data.sh b/misc/z2m-copy-data.sh index a698ef35..ad29d1c2 100644 --- a/misc/z2m-copy-data.sh +++ b/misc/z2m-copy-data.sh @@ -3,12 +3,12 @@ # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/z2m-copy-data.sh)" while true; do - read -p "Use to copy all data from one Zigbee2MQTT LXC to another. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from one Zigbee2MQTT LXC to another. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done set -o errexit set -o errtrace @@ -58,28 +58,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.23" 13 50 || exit info "Zigbee2MQTT Data from '$CTID_FROM' to '$CTID_TO'" @@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then fi msg "Mounting Container Disks..." DATA_PATH=/opt/zigbee2mqtt/data/ -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || die "Zigbee2igbee2MQTT directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \ +[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || die "Zigbee2MQTT directories in '$CTID_TO' not found." #rm -rf ${CTID_TO_PATH}${DATA_PATH} diff --git a/misc/zwave-copy-data.sh b/misc/zwave-copy-data.sh index 4b6de0d1..193a027e 100644 --- a/misc/zwave-copy-data.sh +++ b/misc/zwave-copy-data.sh @@ -3,12 +3,12 @@ # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/zwave-copy-data.sh)" while true; do - read -p "Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac + read -p "Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done clear set -o errexit @@ -59,28 +59,28 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - CTID_MENU+=( "$TAG" "$ITEM " "OFF" ) + CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do CTID_TO=$(whiptail --title "$TITLE" --radiolist \ - "\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done for i in ${!CTID_MENU[@]}; do - [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \ - CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) - [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \ - CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i+1]}) + [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && + CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) + [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && + CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done whiptail --defaultno --title "$TITLE" --yesno \ -"Are you sure you want to copy data between the following LXCs? + "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.09.21" 13 50 || exit info "Zwavejs2MQTT Data from '$CTID_FROM' to '$CTID_TO'" @@ -91,13 +91,13 @@ fi msg "Mounting Container Disks..." DATA_PATH=/opt/zwavejs2mqtt/store/ DATA_PATH_NEW=/opt/zwave-js-ui/store/ -CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." -[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \ +[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || die "Zwavejs2MQTT directories in '$CTID_FROM' not found." -CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \ +CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] || \ +[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] || die "Zwavejs2MQTT directories in '$CTID_TO' not found." #rm -rf ${CTID_TO_PATH}${DATA_PATH} @@ -117,4 +117,3 @@ rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DATA_PATH} ${CTID_TO_PATH}${DATA_PA echo -en "\e[1A\e[0K\e[1A\e[0K" info "Successfully Transferred Data." - diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh index 1d669dcf..e52fad51 100644 --- a/misc/zwave-js-ui-update.sh +++ b/misc/zwave-js-ui-update.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') set -e -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" @@ -25,7 +25,7 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } clear -cat << "EOF" +cat <<"EOF" _____ _______ __ ______ /__ /_ ______ __ _____ / / ___/ / / / / _/ / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / @@ -38,12 +38,15 @@ EOF while true; do read -p "This will update ZWave JS UI to $RELEASE. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done -if [ ! -d /opt/zwave-js-ui ]; then msg_error "No Zwave JS UI Install Detected!"; exit; fi +if [ ! -d /opt/zwave-js-ui ]; then + msg_error "No Zwave JS UI Install Detected!" + exit +fi msg_info "Stopping Z-wave JS UI" systemctl stop zwave-js-ui.service @@ -56,7 +59,7 @@ unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null msg_ok "Updated Z-wave JS UI" msg_info "Updating Z-wave JS UI service file" -cat << EOF > /etc/systemd/system/zwave-js-ui.service +cat </etc/systemd/system/zwave-js-ui.service [Unit] Description=zwave-js-ui Wants=network-online.target diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index 8b34a502..e610ca68 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -81,24 +83,24 @@ msg_info "Installing AdGuard Home" curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh &>/dev/null msg_ok "Installed AdGuard Home" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index e66fbd27..0f063c0b 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -84,7 +86,7 @@ wget https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELE mkdir -p /opt/blocky tar -xf blocky_0.19_Linux_x86_64.tar.gz -C /opt/blocky rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz -cat << EOF > /opt/blocky/config.yml +cat </opt/blocky/config.yml upstream: # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query # format for resolver: [net:]host:[port][/path]. net could be empty (default, shortcut for tcp+udp), tcp+udp, tcp, udp, tcp-tls or https (DoH). If port is empty, default port will be used (53 for udp and tcp, 853 for tcp-tls, 443 for https (Doh)) @@ -324,7 +326,7 @@ EOF msg_ok "Installed Blocky" msg_info "Creating Service" -cat << EOF > /etc/systemd/system/blocky.service +cat </etc/systemd/system/blocky.service [Unit] Description=Blocky After=network.target @@ -338,23 +340,23 @@ EOF systemctl enable --now blocky msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index 4e582f0e..f5eaa998 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -90,24 +92,24 @@ msg_info "Installing CasaOS (Patience)" wget -qO- https://get.casaos.io | bash &>/dev/null msg_ok "Installed CasaOS" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index bd9e8b13..d635a284 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -83,24 +85,24 @@ wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_am sudo dpkg -i daemonsync_2.2.0.0059_amd64.deb &>/dev/null msg_ok "Installed Daemon Sync Server" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 0029e8a7..76f44974 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -85,7 +87,7 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" sudo apt-get install -y nodejs git make g++ gcc &>/dev/null msg_ok "Installed Node.js" - + msg_info "Installing Yarn" npm install --global yarn &>/dev/null msg_ok "Installed Yarn" @@ -99,7 +101,7 @@ yarn build &>/dev/null msg_ok "Installed Dashy" msg_info "Creating Service" -cat < /etc/systemd/system/dashy.service +cat </etc/systemd/system/dashy.service [Unit] Description=dashy @@ -114,24 +116,24 @@ sudo systemctl start dashy &>/dev/null sudo systemctl enable dashy &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/debian-install.sh b/setup/debian-install.sh index db18f9b2..1f8c6a20 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -76,23 +78,23 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index ee6d8795..9b16f561 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -103,28 +105,28 @@ RestartSec=30 AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl start deconz systemctl enable deconz &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/docker-install.sh b/setup/docker-install.sh index e70dd50c..d28872cb 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -78,7 +80,7 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 } DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") @@ -97,62 +99,60 @@ sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" read -r -p "Would you like to add Portainer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -PORTAINER="Y" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + PORTAINER="Y" else -PORTAINER="N" + PORTAINER="N" fi if [[ $PORTAINER == "Y" ]]; then -msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" -docker volume create portainer_data >/dev/null -docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest &>/dev/null -msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + docker volume create portainer_data >/dev/null + docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest &>/dev/null + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" fi read -r -p "Would you like to add Docker Compose? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -DOCKER_COMPOSE="Y" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + DOCKER_COMPOSE="Y" else -DOCKER_COMPOSE="N" + DOCKER_COMPOSE="N" fi if [[ $DOCKER_COMPOSE == "Y" ]]; then -msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins - curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose -msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/emby-install.sh b/setup/emby-install.sh index a673c2c9..9377cfb0 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -78,16 +80,16 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then -msg_info "Setting Up Hardware Acceleration" -apt-get -y install \ + msg_info "Setting Up Hardware Acceleration" + apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 \ beignet-opencl-icd &>/dev/null - -/bin/chgrp video /dev/dri -/bin/chmod 755 /dev/dri -/bin/chmod 660 /dev/dri/* -msg_ok "Set Up Hardware Acceleration" + + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) @@ -97,23 +99,23 @@ wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/e dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null msg_ok "Installed Emby" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 601fd5d2..33c85add 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -82,23 +84,23 @@ sudo apt-get install -y emqx >/dev/null systemctl enable --now emqx msg_ok "Installed EMQX" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 625ea8b2..7c73b3e3 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -98,28 +100,28 @@ ExecStart=/usr/local/bin/esphome /root/config/ dashboard Restart=always User=root [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable esphomeDashboard.service &>/dev/null systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 4b270cf6..fb212972 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -89,24 +91,24 @@ msg_info "Installing Grafana" apt-get update &>/dev/null apt-get install -y grafana &>/dev/null msg_ok "Installed Grafana" - -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi systemctl start grafana-server systemctl enable grafana-server.service &>/dev/null diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 6342b1a2..d01878f5 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -92,7 +94,7 @@ chown -R www-data:www-data /var/www/html cp /var/www/html/config-dist.php /var/www/html/data/config.php chmod +x /var/www/html/update.sh -cat < /etc/apache2/sites-available/grocy.conf +cat </etc/apache2/sites-available/grocy.conf ServerAdmin webmaster@localhost DocumentRoot /var/www/html/public @@ -112,23 +114,23 @@ a2enmod rewrite &>/dev/null systemctl reload apache2 msg_ok "Installed grocy" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 02c3a90a..3b63a1fb 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -87,9 +89,9 @@ RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releas msg_info "Installing Heimdall Dashboard ${RELEASE}" curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') rm -rf ${RELEASE}.tar.gz mv Heimdall-${VER} /opt/Heimdall msg_ok "Installed Heimdall Dashboard ${RELEASE}" @@ -110,28 +112,28 @@ ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 TimeoutStopSec=30 [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path sudo systemctl enable --now heimdall.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 6602f5ad..5f24cdc9 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -73,31 +75,31 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get install -y \ - python3 \ - python3-dev \ - python3-venv \ - python3-pip \ - bluez \ - libffi-dev \ - libssl-dev \ - libjpeg-dev \ - libpcap-dev \ - zlib1g-dev \ - autoconf \ - build-essential \ - libopenjp2-7 \ - libtiff5 \ - libturbojpeg0-dev \ - tzdata \ - curl \ - sudo &>/dev/null + python3 \ + python3-dev \ + python3-venv \ + python3-pip \ + bluez \ + libffi-dev \ + libssl-dev \ + libjpeg-dev \ + libpcap-dev \ + zlib1g-dev \ + autoconf \ + build-essential \ + libopenjp2-7 \ + libtiff5 \ + libturbojpeg0-dev \ + tzdata \ + curl \ + sudo &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Home Assistant-Core" -mkdir /srv/homeassistant +mkdir /srv/homeassistant cd /srv/homeassistant python3 -m venv . -source bin/activate +source bin/activate python3 -m pip install wheel &>/dev/null pip3 install homeassistant &>/dev/null pip3 install Cython &>/dev/null @@ -106,7 +108,7 @@ pip3 install psycopg2-binary &>/dev/null msg_ok "Installed Home Assistant-Core" msg_info "Creating Service" -cat << EOF > /etc/systemd/system/homeassistant.service +cat </etc/systemd/system/homeassistant.service [Unit] Description=Home Assistant @@ -122,23 +124,23 @@ EOF systemctl enable homeassistant &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 0d0d8952..ade97b6d 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -82,7 +84,7 @@ apt-get install -y python3-pip &>/dev/null msg_ok "Installed pip3" get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 } DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") @@ -317,23 +319,23 @@ EOF sudo chmod +x /root/update-containers.sh msg_ok "Created Update Menu Script" mkdir /root/hass_config -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 4fad6168..c363270c 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -93,24 +95,24 @@ msg_info "Creating Service" sudo hb-service install --user homebridge &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 31ff0c7a..294dccde 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -108,27 +110,27 @@ User=root WorkingDirectory=/opt/homepage/ ExecStart=pnpm start [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now homepage &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index e2a082fe..30a1d886 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -86,54 +88,52 @@ echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo msg_ok "Set up InfluxDB Repository" read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt -if [[ $prompt == "2" ]] -then -INFLUX="2" +if [[ $prompt == "2" ]]; then + INFLUX="2" else -INFLUX="1" + INFLUX="1" fi msg_info "Installing InfluxDB" apt-get update &>/dev/null if [[ $INFLUX == "2" ]]; then -apt-get install -y influxdb2 &>/dev/null + apt-get install -y influxdb2 &>/dev/null else -apt-get install -y influxdb &>/dev/null + apt-get install -y influxdb &>/dev/null fi msg_ok "Installed InfluxDB" read -r -p "Would you like to add Telegraf? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -TELEGRAF="Y" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + TELEGRAF="Y" else -TELEGRAF="N" + TELEGRAF="N" fi if [[ $TELEGRAF == "Y" ]]; then -msg_info "Installing Telegraf" -apt-get install -y telegraf &>/dev/null -msg_ok "Installed Telegraf" + msg_info "Installing Telegraf" + apt-get install -y telegraf &>/dev/null + msg_ok "Installed Telegraf" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 2cbe7067..46e2eae6 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -81,24 +83,24 @@ msg_info "Installing ioBroker (10 min)" curl -sLf https://iobroker.net/install.sh | bash - &>/dev/null msg_ok "Installed ioBroker" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index 82acbffa..ba151b5d 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -80,22 +82,22 @@ apt-get install -y software-properties-common &>/dev/null msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then -msg_info "Setting Up Hardware Acceleration" -apt-get -y install \ + msg_info "Setting Up Hardware Acceleration" + apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 \ beignet-opencl-icd &>/dev/null - -/bin/chgrp video /dev/dri -/bin/chmod 755 /dev/dri -/bin/chmod 660 /dev/dri/* -msg_ok "Set Up Hardware Acceleration" + + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" fi msg_info "Setting Up Jellyfin Repository" sudo add-apt-repository universe -y &>/dev/null wget -q -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add - &>/dev/null -echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list &>/dev/null +echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list &>/dev/null msg_ok "Set Up Jellyfin Repository" msg_info "Installing Jellyfin" @@ -105,7 +107,7 @@ apt install jellyfin-ffmpeg -y &>/dev/null msg_ok "Installed Jellyfin" msg_info "Creating Service" -cat << 'EOF' > /lib/systemd/system/jellyfin.service +cat <<'EOF' >/lib/systemd/system/jellyfin.service [Unit] Description = Jellyfin Media Server After = network.target @@ -122,23 +124,23 @@ EOF ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index 9397fa7a..d7fdb4c0 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -78,9 +80,9 @@ apt-get install -y sudo &>/dev/null apt-get install -y openjdk-11-jdk &>/dev/null 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) }') \ +RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') msg_info "Installing Keycloak v$RELEASE" cd /opt @@ -99,27 +101,27 @@ User=root WorkingDirectory=/opt/keycloak ExecStart=/opt/keycloak/bin/kc.sh start-dev [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now keycloak.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 4d3cd89f..cf71719d 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -20,50 +20,52 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -94,7 +96,7 @@ msg_info "Installing MagicMirror" cd /opt/magicmirror &>/dev/null npm install --only=prod --omit=dev &>/dev/null -cat < /opt/magicmirror/config/config.js +cat </opt/magicmirror/config/config.js let config = { address: "0.0.0.0", port: 8080, @@ -201,27 +203,27 @@ WorkingDirectory=/opt/magicmirror/ ExecStart=/usr/bin/node serveronly [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now magicmirror &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index 53b8c955..1aa22a35 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -84,38 +86,37 @@ apt-get install -y mariadb-server &>/dev/null msg_ok "Installed MariaDB" read -r -p "Would you like to add Adminer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -ADMINER="Y" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ADMINER="Y" else -ADMINER="N" + ADMINER="N" fi if [[ $ADMINER == "Y" ]]; then -msg_info "Installing Adminer" -sudo apt install adminer -y &>/dev/null -sudo a2enconf adminer &>/dev/null -sudo systemctl reload apache2 &>/dev/null -msg_ok "Installed Adminer" + msg_info "Installing Adminer" + sudo apt install adminer -y &>/dev/null + sudo a2enconf adminer &>/dev/null + sudo systemctl reload apache2 &>/dev/null + msg_ok "Installed Adminer" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 6c6b0149..8f7a4095 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -92,24 +94,24 @@ npm install meshcentral &>/dev/null node node_modules/meshcentral --install &>/dev/null msg_ok "Installed MeshCentral" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index 08d80adc..6fb9e71c 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -79,56 +81,56 @@ apt-get install -y cifs-utils &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Motion" - apt-get install motion -y &>/dev/null - systemctl stop motion &>/dev/null - systemctl disable motion &>/dev/null +apt-get install motion -y &>/dev/null +systemctl stop motion &>/dev/null +systemctl disable motion &>/dev/null msg_ok "Installed Motion" msg_info "Installing FFmpeg" - apt-get install ffmpeg v4l-utils -y &>/dev/null +apt-get install ffmpeg v4l-utils -y &>/dev/null msg_ok "Installed FFmpeg" msg_info "Installing Python" - apt-get update &>/dev/null - apt-get install python2 -y &>/dev/null - curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py &>/dev/null - python2 get-pip.py &>/dev/null - apt-get install libffi-dev libzbar-dev libzbar0 -y &>/dev/null - apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -y &>/dev/null - msg_ok "Installed Python" - +apt-get update &>/dev/null +apt-get install python2 -y &>/dev/null +curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py &>/dev/null +python2 get-pip.py &>/dev/null +apt-get install libffi-dev libzbar-dev libzbar0 -y &>/dev/null +apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -y &>/dev/null +msg_ok "Installed Python" + msg_info "Installing MotionEye" - apt-get update &>/dev/null - sudo pip install motioneye &>/dev/null - mkdir -p /etc/motioneye - cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf - mkdir -p /var/lib/motioneye +apt-get update &>/dev/null +sudo pip install motioneye &>/dev/null +mkdir -p /etc/motioneye +cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf +mkdir -p /var/lib/motioneye msg_ok "Installed MotionEye" -msg_info "Creating Service" - cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service &>/dev/null - systemctl enable motioneye &>/dev/null - systemctl start motioneye -msg_ok "Created Service" +msg_info "Creating Service" +cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service &>/dev/null +systemctl enable motioneye &>/dev/null +systemctl start motioneye +msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index f39c7fcc..225e6bd8 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -88,24 +90,24 @@ apt-get -y install mosquitto &>/dev/null apt-get -y install mosquitto-clients &>/dev/null msg_ok "Installed Mosquitto MQTT Broker" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 21fd5f49..00e48f8b 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -90,7 +92,7 @@ npm install --global n8n &>/dev/null msg_ok "Installed n8n" msg_info "Creating Service" -cat < /etc/systemd/system/n8n.service +cat </etc/systemd/system/n8n.service [Unit] Description=n8n @@ -104,23 +106,23 @@ sudo systemctl start n8n &>/dev/null sudo systemctl enable n8n &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index b04cdda9..dabdf703 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -77,18 +79,18 @@ apt-get install -y sudo &>/dev/null apt-get install -y ffmpeg &>/dev/null msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Navidrome" sudo install -d -o root -g root /opt/navidrome sudo install -d -o root -g root /var/lib/navidrome wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null -sudo chown -R root:root /opt/navidrome +sudo chown -R root:root /opt/navidrome mkdir -p /music -cat < /var/lib/navidrome/navidrome.toml +cat </var/lib/navidrome/navidrome.toml MusicFolder = '/music' EOF msg_ok "Installed Navidrome" @@ -125,29 +127,29 @@ ReadWritePaths=/var/lib/navidrome ProtectSystem=full [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl daemon-reload systemctl enable --now navidrome.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index c38cef27..195dbc05 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -80,23 +82,23 @@ msg_info "Installing NextCloudPi (Patience)" curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null msg_ok "Installed NextCloudPi" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 37cd3c92..a790811d 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -75,35 +77,35 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get update &>/dev/null apt-get -y install \ - sudo \ - curl \ - gnupg \ - make \ - g++ \ - gcc \ - ca-certificates \ - apache2-utils \ - logrotate \ - build-essential \ - python3-dev \ - git \ - lsb-release &>/dev/null + sudo \ + curl \ + gnupg \ + make \ + g++ \ + gcc \ + ca-certificates \ + apache2-utils \ + logrotate \ + build-essential \ + python3-dev \ + git \ + lsb-release &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Python" - apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv &>/dev/null - pip3 install --upgrade setuptools &>/dev/null - pip3 install --upgrade pip &>/dev/null - python3 -m venv /opt/certbot/ &>/dev/null - if [ "$(getconf LONG_BIT)" = "32" ]; then - python3 -m pip install --no-cache-dir -U cryptography==3.3.2 &>/dev/null - fi - python3 -m pip install --no-cache-dir cffi certbot &>/dev/null +apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv &>/dev/null +pip3 install --upgrade setuptools &>/dev/null +pip3 install --upgrade pip &>/dev/null +python3 -m venv /opt/certbot/ &>/dev/null +if [ "$(getconf LONG_BIT)" = "32" ]; then + python3 -m pip install --no-cache-dir -U cryptography==3.3.2 &>/dev/null +fi +python3 -m pip install --no-cache-dir cffi certbot &>/dev/null msg_ok "Installed Python" msg_info "Installing Openresty" wget -q -O - https://openresty.org/package/pubkey.gpg | apt-key add - &>/dev/null -codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release` &>/dev/null +codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) &>/dev/null echo "deb http://openresty.org/package/debian $codename openresty" | tee /etc/apt/sources.list.d/openresty.list &>/dev/null apt-get -y update &>/dev/null apt-get -y install --no-install-recommends openresty &>/dev/null @@ -116,14 +118,14 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" - + msg_info "Installing Yarn" npm install --global yarn &>/dev/null msg_ok "Installed Yarn" -RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') \ +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') msg_info "Downloading Nginx Proxy Manager v${RELEASE}" wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null @@ -154,26 +156,26 @@ ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf rm -f /etc/nginx/conf.d/dev.conf mkdir -p /tmp/nginx/body \ -/run/nginx \ -/data/nginx \ -/data/custom_ssl \ -/data/logs \ -/data/access \ -/data/nginx/default_host \ -/data/nginx/default_www \ -/data/nginx/proxy_host \ -/data/nginx/redirection_host \ -/data/nginx/stream \ -/data/nginx/dead_host \ -/data/nginx/temp \ -/var/lib/nginx/cache/public \ -/var/lib/nginx/cache/private \ -/var/cache/nginx/proxy_temp + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp chmod -R 777 /var/cache/nginx chown root /tmp/nginx -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" > /etc/nginx/conf.d/include/resolvers.conf +echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then echo -en "${GN} Generating dummy SSL Certificate... " @@ -197,7 +199,7 @@ msg_ok "Built Frontend" msg_info "Initializing Backend" rm -rf /app/config/default.json &>/dev/null if [ ! -f /app/config/production.json ]; then -cat << 'EOF' > /app/config/production.json + cat <<'EOF' >/app/config/production.json { "database": { "engine": "knex-native", @@ -217,7 +219,7 @@ yarn install --network-timeout=30000 &>/dev/null msg_ok "Initialized Backend" msg_info "Creating Service" -cat << 'EOF' > /lib/systemd/system/npm.service +cat <<'EOF' >/lib/systemd/system/npm.service [Unit] Description=Nginx Proxy Manager After=network.target @@ -236,23 +238,23 @@ WantedBy=multi-user.target EOF msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Starting Services" systemctl enable npm &>/dev/null diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 37e2fb97..6d29b402 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -106,28 +108,28 @@ WorkingDirectory=/opt/nocodb ExecStart=/usr/bin/npm start [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index ea9a4998..1b382cf1 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -108,28 +110,28 @@ User=root Group=root [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now nodered.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 9a3705aa..5cdb3b12 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -87,23 +89,23 @@ wget -qL https://static.tp-link.com/upload/software/2022/202208/20220822/Omada_S sudo dpkg -i Omada_SDN_Controller_v5.5.6_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/omv-install.sh b/setup/omv-install.sh index 073653af..e6b6b839 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -30,29 +30,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -82,7 +84,7 @@ msg_info "Installing OpenMediaVault (Patience)" wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key &>/dev/null apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null -cat <> /etc/apt/sources.list.d/openmediavault.list +cat <>/etc/apt/sources.list.d/openmediavault.list deb https://packages.openmediavault.org/public shaitan main # deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main ## Uncomment the following line to add software from the proposed repository. @@ -99,23 +101,23 @@ apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-he omv-confdbadm populate msg_ok "Installed OpenMediaVault" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 65a811d4..02ef935f 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -88,9 +90,9 @@ apt-get -y install zulu11-jdk &>/dev/null msg_ok "Installed Azul Zulu" msg_info "Installing openHAB" -curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor > openhab.gpg -mv openhab.gpg /usr/share/keyrings -chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg +curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg +mv openhab.gpg /usr/share/keyrings +chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | tee /etc/apt/sources.list.d/openhab.list &>/dev/null apt update &>/dev/null apt-get -y install openhab &>/dev/null @@ -99,23 +101,23 @@ systemctl enable openhab.service &>/dev/null systemctl start openhab.service msg_ok "Installed openHAB" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index db0a2ff6..01f85926 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -20,50 +20,52 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi done msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -126,19 +128,19 @@ apt-get install -y --no-install-recommends \ git clone https://github.com/agl/jbig2enc /opt/jbig2enc &>/dev/null cd /opt/jbig2enc -/bin/bash -c "./autogen.sh" &>/dev/null && \ -/bin/bash -c "./configure && make" &>/dev/null && \ -/bin/bash -c "make install" &>/dev/null -rm -rf /opt/jbig2enc +/bin/bash -c "./autogen.sh" &>/dev/null && + /bin/bash -c "./configure && make" &>/dev/null && + /bin/bash -c "make install" &>/dev/null +rm -rf /opt/jbig2enc msg_ok "Installed JBIG2" msg_info "Downloading Paperless-ngx" Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) -cd /opt && \ -wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && \ -tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && \ -mv paperless-ngx paperless && \ -rm paperless-ngx-$Paperlessngx.tar.xz +cd /opt && + wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && + tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && + mv paperless-ngx paperless && + rm paperless-ngx-$Paperlessngx.tar.xz cd /opt/paperless ## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file @@ -156,12 +158,12 @@ DB_NAME=paperlessdb sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" &>/dev/null sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" &>/dev/null -echo "Paperless-ngx Database User" >> ~/paperless.creds -echo $DB_USER >> ~/paperless.creds -echo "Paperless-ngx Database Password" >> ~/paperless.creds -echo $DB_PASS >> ~/paperless.creds -echo "Paperless-ngx Database Name" >> ~/paperless.creds -echo $DB_NAME >> ~/paperless.creds +echo "Paperless-ngx Database User" >>~/paperless.creds +echo $DB_USER >>~/paperless.creds +echo "Paperless-ngx Database Password" >>~/paperless.creds +echo $DB_PASS >>~/paperless.creds +echo "Paperless-ngx Database Name" >>~/paperless.creds +echo $DB_NAME >>~/paperless.creds /bin/bash -c "mkdir -p {consume,media}" @@ -176,7 +178,7 @@ msg_ok "Set up database" msg_info "Setting up admin Paperless-ngx User & Password" ## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations -cat << EOF | python3 /opt/paperless/src/manage.py shell +cat <> ~/paperless.creds -echo "Paperless-ngx WebUI User" >> ~/paperless.creds -echo admin >> ~/paperless.creds -echo "Paperless-ngx WebUI Password" >> ~/paperless.creds -echo $DB_PASS >> ~/paperless.creds +echo "" >>~/paperless.creds +echo "Paperless-ngx WebUI User" >>~/paperless.creds +echo admin >>~/paperless.creds +echo "Paperless-ngx WebUI Password" >>~/paperless.creds +echo $DB_PASS >>~/paperless.creds msg_ok "Set up admin Paperless-ngx User & Password" -cat << EOF > /etc/systemd/system/paperless-scheduler.service +cat </etc/systemd/system/paperless-scheduler.service [Unit] Description=Paperless consumer Requires=redis.service @@ -205,7 +207,7 @@ ExecStart=python3 manage.py qcluster WantedBy=multi-user.target EOF -cat << EOF > /etc/systemd/system/paperless-consumer.service +cat </etc/systemd/system/paperless-consumer.service [Unit] Description=Paperless consumer Requires=redis.service @@ -218,7 +220,7 @@ ExecStart=python3 manage.py document_consumer WantedBy=multi-user.target EOF -cat << EOF > /etc/systemd/system/paperless-webserver.service +cat </etc/systemd/system/paperless-webserver.service [Unit] Description=Paperless webserver After=network.target @@ -240,23 +242,23 @@ systemctl enable --now paperless-consumer paperless-webserver paperless-schedule msg_ok "Finished installing Paperless-ngx" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index a2027d0e..67015a34 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -30,30 +30,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -62,9 +61,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -116,10 +118,10 @@ msg_info "Installing Tensorflow" if [[ "$AVX" =~ avx2 ]]; then wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null - elif [[ "$AVX" =~ avx ]]; then +elif [[ "$AVX" =~ avx ]]; then wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null - else +else wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null fi @@ -150,7 +152,7 @@ PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' -" > $env_path +" >$env_path msg_info "Creating Service" service_path="/etc/systemd/system/photoprism.service" @@ -168,36 +170,36 @@ ExecStart=/opt/photoprism/bin/photoprism up -d ExecStop=/opt/photoprism/bin/photoprism down [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* \ -/photoprism \ -/go1.19.2.linux-amd64.tar.gz \ -/libtensorflow-linux-avx2-1.15.2.tar.gz \ -/libtensorflow-linux-avx-1.15.2.tar.gz \ -/libtensorflow-linux-cpu-1.15.2.tar.gz + /photoprism \ + /go1.19.2.linux-amd64.tar.gz \ + /libtensorflow-linux-avx2-1.15.2.tar.gz \ + /libtensorflow-linux-avx-1.15.2.tar.gz \ + /libtensorflow-linux-cpu-1.15.2.tar.gz msg_ok "Cleaned" msg_info "Starting PhotoPrism" diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 572f70b5..c64f26db 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -30,30 +30,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -62,9 +61,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -82,7 +84,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Pi-hole" mkdir -p /etc/pihole/ -cat < /etc/pihole/setupVars.conf +cat </etc/pihole/setupVars.conf PIHOLE_INTERFACE=eth0 PIHOLE_DNS_1=8.8.8.8 PIHOLE_DNS_2=8.8.4.4 @@ -101,24 +103,24 @@ EOF curl -sSL https://install.pi-hole.net | bash /dev/stdin --unattended &>/dev/null msg_ok "Installed Pi-hole" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/plex-install.sh b/setup/plex-install.sh index a1ea5f33..3cef5ed5 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -79,21 +81,21 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then -msg_info "Setting Up Hardware Acceleration" -apt-get -y install \ + msg_info "Setting Up Hardware Acceleration" + apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 \ beignet-opencl-icd &>/dev/null - -/bin/chgrp video /dev/dri -/bin/chmod 755 /dev/dri -/bin/chmod 660 /dev/dri/* -msg_ok "Set Up Hardware Acceleration" + + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" fi msg_info "Setting Up Plex Media Server Repository" wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add - &>/dev/null -echo "deb [arch=$( dpkg --print-architecture )] https://downloads.plex.tv/repo/deb/ public main" | tee /etc/apt/sources.list.d/plexmediaserver.list &>/dev/null +echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" | tee /etc/apt/sources.list.d/plexmediaserver.list &>/dev/null msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" @@ -101,25 +103,24 @@ apt-get update &>/dev/null apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver &>/dev/null msg_ok "Installed Plex Media Server" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null msg_ok "Cleaned" - diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index e192c86e..2900c446 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -83,35 +85,34 @@ systemctl enable --now podman.socket &>/dev/null msg_ok "Installed Podman" read -r -p "Would you like to add Yacht (Semifunctional)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -YACHT="Y" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + YACHT="Y" else -YACHT="N" + YACHT="N" fi if [[ $YACHT == "Y" ]]; then -msg_info "Pulling Yacht Image" -podman pull docker.io/selfhostedpro/yacht:latest &>/dev/null -msg_ok "Pulled Yacht Image" + msg_info "Pulling Yacht Image" + podman pull docker.io/selfhostedpro/yacht:latest &>/dev/null + msg_ok "Pulled Yacht Image" -msg_info "Installing Yacht" -podman volume create yacht >/dev/null -podman run -d \ - --privileged \ - --name yacht \ - --restart always \ - -v /var/run/podman/podman.sock:/var/run/docker.sock \ - -v yacht:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - -p 8000:8000 \ - selfhostedpro/yacht:latest &>/dev/null -podman generate systemd \ + msg_info "Installing Yacht" + podman volume create yacht >/dev/null + podman run -d \ + --privileged \ + --name yacht \ + --restart always \ + -v /var/run/podman/podman.sock:/var/run/docker.sock \ + -v yacht:/config \ + -v /etc/localtime:/etc/localtime:ro \ + -v /etc/timezone:/etc/timezone:ro \ + -p 8000:8000 \ + selfhostedpro/yacht:latest &>/dev/null + podman generate systemd \ --new --name yacht \ - > /etc/systemd/system/yacht.service -systemctl enable yacht &>/dev/null -msg_ok "Installed Yacht" + >/etc/systemd/system/yacht.service + systemctl enable yacht &>/dev/null + msg_ok "Installed Yacht" fi msg_info "Pulling Home Assistant Image" podman pull docker.io/homeassistant/home-assistant:stable &>/dev/null @@ -130,29 +131,29 @@ podman run -d \ --net=host \ homeassistant/home-assistant:stable &>/dev/null podman generate systemd \ - --new --name homeassistant \ - > /etc/systemd/system/homeassistant.service + --new --name homeassistant \ + >/etc/systemd/system/homeassistant.service systemctl enable homeassistant &>/dev/null msg_ok "Installed Home Assistant" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index e4cd0a20..7fa9dc77 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -88,7 +90,7 @@ msg_info "Installing PostgreSQL" apt-get update &>/dev/null apt-get install -y postgresql &>/dev/null -cat < /etc/postgresql/15/main/pg_hba.conf +cat </etc/postgresql/15/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File local all postgres peer # TYPE DATABASE USER ADDRESS METHOD @@ -107,7 +109,7 @@ host replication all 127.0.0.1/32 scram-sha-256 host replication all ::1/128 scram-sha-256 EOF -cat < /etc/postgresql/15/main/postgresql.conf +cat </etc/postgresql/15/main/postgresql.conf # ----------------------------- # PostgreSQL configuration file # ----------------------------- @@ -192,38 +194,37 @@ sudo systemctl restart postgresql msg_ok "Installed PostgreSQL" read -r -p "Would you like to add Adminer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -ADMINER="Y" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ADMINER="Y" else -ADMINER="N" + ADMINER="N" fi if [[ $ADMINER == "Y" ]]; then -msg_info "Installing Adminer" -sudo apt install adminer -y &>/dev/null -sudo a2enconf adminer &>/dev/null -sudo systemctl reload apache2 &>/dev/null -msg_ok "Installed Adminer" + msg_info "Installing Adminer" + sudo apt install adminer -y &>/dev/null + sudo a2enconf adminer &>/dev/null + sudo systemctl reload apache2 &>/dev/null + msg_ok "Installed Adminer" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index f9b176d0..ba9b453e 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -107,29 +109,29 @@ ExecStart=/usr/local/bin/prometheus \ --web.listen-address=0.0.0.0:9090 [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path sudo systemctl enable --now prometheus &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /root/prometheus-2.36.2.linux-amd64 /root/prometheus-2.36.2.linux-amd64.tar.gz +rm -rf /root/prometheus-2.36.2.linux-amd64 /root/prometheus-2.36.2.linux-amd64.tar.gz msg_ok "Cleaned" diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index ced965d4..0a435c4d 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -85,23 +87,23 @@ apt-get install -y syncthing &>/dev/null systemctl enable syncthing@root.service &>/dev/null msg_ok "Installed Syncthing" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 887ad747..f97b40cd 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -81,24 +83,24 @@ msg_info "Installing Technitium DNS" curl -sSL https://download.technitium.com/dns/install.sh | sudo bash &>/dev/null msg_ok "Installed Technitium DNS" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index 9478d2f4..a6aab029 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,29 +29,28 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -76,9 +78,9 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Trilium" wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz @@ -102,27 +104,27 @@ TimeoutStopSec=20 Restart=always [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now -q trilium msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 4ee2e1ea..c7010188 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -77,23 +79,23 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index 5c8138f6..4da3411c 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -89,24 +91,24 @@ msg_info "Installing Umbrel (Patience)" curl -sL https://umbrel.sh | bash &>/dev/null msg_ok "Installed Umbrel" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 2c0a32c4..94100a0c 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash #https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -30,30 +30,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -62,9 +61,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -79,35 +81,34 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" read -r -p "Local Controller? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] -then -LOCAL="--local-controller" +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + LOCAL="--local-controller" else -LOCAL="" + LOCAL="" fi msg_info "Installing UniFi Network Application (Patience)" wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh && bash unifi-latest.sh --skip --add-repository $LOCAL &>/dev/null msg_ok "Installed UniFi Network Application" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index 7777f05a..83c31b6c 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -106,28 +108,28 @@ WorkingDirectory=/opt/uptime-kuma ExecStart=/usr/bin/npm start [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now uptime-kuma.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index d3afc43f..c5736db9 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -75,27 +77,27 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" apt-get update &>/dev/null apt-get -qqy install \ - git \ - build-essential \ - pkgconf \ - libssl-dev \ - libmariadb-dev-compat \ - libpq-dev \ - curl \ - sudo &>/dev/null + git \ + build-essential \ + pkgconf \ + libssl-dev \ + libmariadb-dev-compat \ + libpq-dev \ + curl \ + sudo &>/dev/null msg_ok "Installed Dependencies" -WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') +WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') -VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') +VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') msg_info "Installing Rust" curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal &>/dev/null -echo 'export PATH=~/.cargo/bin:$PATH' >> ~/.bashrc &>/dev/null +echo 'export PATH=~/.cargo/bin:$PATH' >>~/.bashrc &>/dev/null export PATH=~/.cargo/bin:$PATH &>/dev/null which rustc &>/dev/null msg_ok "Installed Rust" @@ -117,7 +119,7 @@ curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBV tar -xzf bw_web_$WEBVAULT.tar.gz -C /opt/vaultwarden/ &>/dev/null msg_ok "Downloaded Web-Vault ${WEBVAULT}" -cat < /opt/vaultwarden/.env +cat </opt/vaultwarden/.env ADMIN_TOKEN=$(openssl rand -base64 48) ROCKET_ADDRESS=0.0.0.0 DATA_FOLDER=/opt/vaultwarden/data @@ -161,29 +163,29 @@ WorkingDirectory=/opt/vaultwarden ReadWriteDirectories=/opt/vaultwarden/data AmbientCapabilities=CAP_NET_BIND_SERVICE [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl daemon-reload systemctl enable --now vaultwarden.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index ef22a09a..3085e59b 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -93,28 +95,28 @@ ExecStart=/usr/local/bin/whoogle-search --host 0.0.0.0 Restart=always User=root [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now whoogle.service &>/dev/null msg_ok "Installed Whoogle" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 0b54cd7f..31f2ef9f 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -89,11 +91,11 @@ msg_ok "Installed Node.js" msg_info "Installing Wiki.js" mkdir -p /opt/wikijs cd /opt/wikijs -wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null +wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null tar xzf wiki-js.tar.gz rm wiki-js.tar.gz -cat < /opt/wikijs/config.yml +cat </opt/wikijs/config.yml bindIP: 0.0.0.0 port: 3000 db: @@ -104,7 +106,7 @@ logFormat: default dataPath: /opt/wikijs/data bodyParserLimit: 5mb EOF -npm rebuild sqlite3 &>/dev/null +npm rebuild sqlite3 &>/dev/null msg_ok "Installed Wiki.js" msg_info "Creating Service" @@ -123,27 +125,27 @@ Environment=NODE_ENV=production WorkingDirectory=/opt/wikijs [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable --now wikijs &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index ed1aab09..9dde9a1d 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -96,7 +98,7 @@ apt-get install -y gunicorn &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing WireGuard (using pivpn.io)" -curl -s -L https://install.pivpn.io > install.sh +curl -s -L https://install.pivpn.io >install.sh chmod +x install.sh ./install.sh --unattended options.conf &>/dev/null msg_ok "Installed WireGuard" @@ -110,9 +112,9 @@ pip install icmplib &>/dev/null msg_ok "Installed pip3" msg_info "Installing WGDashboard" -WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest \ -| grep "tag_name" \ -| awk '{print substr($2, 2, length($2)-3) }') \ +WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null cd /etc/wgdashboard/src @@ -133,31 +135,31 @@ Restart=always [Install] -WantedBy=default.target" > $service_path +WantedBy=default.target" >$service_path sudo chmod 664 /etc/systemd/system/wg-dashboard.service sudo systemctl daemon-reload sudo systemctl enable wg-dashboard.service &>/dev/null sudo systemctl start wg-dashboard.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi - + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 538e109f..8631ec2a 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -88,23 +90,22 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" - + msg_info "Setting up Zigbee2MQTT Repository" git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null msg_ok "Set up Zigbee2MQTT Repository" read -r -p "Switch to Edge/dev branch? (y/N) " prompt -if [[ $prompt == "y" ]] -then -DEV="y" +if [[ $prompt == "y" ]]; then + DEV="y" else -DEV="n" + DEV="n" fi msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt &>/dev/null if [[ $DEV == "y" ]]; then -git checkout dev &>/dev/null + git checkout dev &>/dev/null fi npm ci &>/dev/null msg_ok "Installed Zigbee2MQTT" @@ -122,27 +123,27 @@ StandardError=inherit Restart=always User=root [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl enable zigbee2mqtt.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index c0137e07..d8dbaead 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -YW=`echo "\033[33m"` -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 NUM=$RETRY_NUM @@ -29,30 +29,29 @@ function error_exit() { } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " + echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" exit 1 fi done @@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected"; exit 1; fi; +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi; +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -97,31 +99,31 @@ User=root WorkingDirectory=/opt/zwave-js-ui ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] -WantedBy=multi-user.target" > $service_path +WantedBy=multi-user.target" >$service_path systemctl start zwave-js-ui systemctl enable zwave-js-ui &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6); - if [[ $PASS != $ ]]; then -msg_info "Customizing Container" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -msg_ok "Customized Container" - fi + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi msg_info "Cleaning up" rm zwave-js-ui-${RELEASE}-linux.zip apt-get autoremove >/dev/null apt-get autoclean >/dev/null -msg_ok "Cleaned" +msg_ok "Cleaned" From f777a968ea6f782fc51d23cad82b17b8094d6d70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Oct 2022 23:21:13 -0400 Subject: [PATCH 0466/3335] Update scaling-governor.sh revert changes --- misc/scaling-governor.sh | 84 ++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 46 deletions(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 4a5821b2..8eace5bd 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -4,14 +4,14 @@ set -e while true; do read -p "View CPU Scaling Governors. Proceed(y/n)?" yn case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; esac done clear function header_info { - echo -e " +echo -e " _____ _____ _ _ / ____| __ \| | | | | | | |__) | | | | @@ -21,16 +21,16 @@ function header_info { Scaling Governors " } -show_menu() { - CL=$(echo "\033[m") - GN=$(echo "\033[32m") - BL=$(echo "\033[36m") - YW=$(echo "\033[33m") - fgred=$(echo "\033[31m") - header_info +show_menu(){ + CL=`echo "\033[m"` + GN=`echo "\033[32m"` + BL=`echo "\033[36m"` + YW=`echo "\033[33m"` + fgred=`echo "\033[31m"` +header_info CK=$(uname -r) IP=$(hostname -I) - # MAC=$(cat /sys/class/net/eno1/address) +# MAC=$(cat /sys/class/net/eno1/address) ACSG=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors) CCSG=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) echo -e "${YW}Proxmox IP ${BL}${IP}${CL}" @@ -41,7 +41,7 @@ show_menu() { echo -e "\n${YW}Available CPU Scaling Governors ${BL}${ACSG}${CL}" - + echo -e "\n${YW}Current CPU Scaling Governor ${BL}${CCSG}${CL}" printf "\n ${fgred}Only Select Available CPU Scaling Governors From Above${CL}\n \n" @@ -57,51 +57,43 @@ show_menu() { } clear show_menu -while [ $opt != '' ]; do +while [ $opt != '' ] + do if [ $opt = '' ]; then - exit + exit; else - case $opt in - 1) - echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + case $opt in + 1) echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 2) - echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 2) echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 3) - echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 3) echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 4) - echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 4) echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 5) - echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 5) echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 6) - echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 6) echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - x) - exit - ;; - \n) - exit - ;; - *) - clear - show_menu - ;; - esac + ;; + x)exit; + ;; + \n)exit; + ;; + *)clear; + show_menu; + ;; + esac fi -done + done From cf1f174174ffa4d3bc817bd00dd63965cbb6810b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Oct 2022 23:45:14 -0400 Subject: [PATCH 0467/3335] Update scaling-governor.sh revert the revert --- misc/scaling-governor.sh | 84 ++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 8eace5bd..4a5821b2 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -4,14 +4,14 @@ set -e while true; do read -p "View CPU Scaling Governors. Proceed(y/n)?" yn case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; esac done clear function header_info { -echo -e " + echo -e " _____ _____ _ _ / ____| __ \| | | | | | | |__) | | | | @@ -21,16 +21,16 @@ echo -e " Scaling Governors " } -show_menu(){ - CL=`echo "\033[m"` - GN=`echo "\033[32m"` - BL=`echo "\033[36m"` - YW=`echo "\033[33m"` - fgred=`echo "\033[31m"` -header_info +show_menu() { + CL=$(echo "\033[m") + GN=$(echo "\033[32m") + BL=$(echo "\033[36m") + YW=$(echo "\033[33m") + fgred=$(echo "\033[31m") + header_info CK=$(uname -r) IP=$(hostname -I) -# MAC=$(cat /sys/class/net/eno1/address) + # MAC=$(cat /sys/class/net/eno1/address) ACSG=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors) CCSG=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) echo -e "${YW}Proxmox IP ${BL}${IP}${CL}" @@ -41,7 +41,7 @@ header_info echo -e "\n${YW}Available CPU Scaling Governors ${BL}${ACSG}${CL}" - + echo -e "\n${YW}Current CPU Scaling Governor ${BL}${CCSG}${CL}" printf "\n ${fgred}Only Select Available CPU Scaling Governors From Above${CL}\n \n" @@ -57,43 +57,51 @@ header_info } clear show_menu -while [ $opt != '' ] - do +while [ $opt != '' ]; do if [ $opt = '' ]; then - exit; + exit else - case $opt in - 1) echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + case $opt in + 1) + echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 2) echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 2) + echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 3) echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 3) + echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 4) echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 4) + echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 5) echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 5) + echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - 6) echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ;; + 6) + echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor clear show_menu - ;; - x)exit; - ;; - \n)exit; - ;; - *)clear; - show_menu; - ;; - esac + ;; + x) + exit + ;; + \n) + exit + ;; + *) + clear + show_menu + ;; + esac fi - done +done From bfadcb1c090a189fe94c368c6b96d3792a11d1c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Oct 2022 00:19:48 -0400 Subject: [PATCH 0468/3335] Update scaling-governor.sh --- misc/scaling-governor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 4a5821b2..1d0774c2 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -57,8 +57,8 @@ show_menu() { } clear show_menu -while [ $opt != '' ]; do - if [ $opt = '' ]; then +while [ "$opt" != "" ]; do + if [ "$opt" = "" ]; then exit else case $opt in From 1c685da6a5d2f2788935be296aedd458b6d6d494 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Oct 2022 08:56:13 -0400 Subject: [PATCH 0469/3335] Rename README.md to README_NEW.md --- README.md => README_NEW.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => README_NEW.md (100%) diff --git a/README.md b/README_NEW.md similarity index 100% rename from README.md rename to README_NEW.md From 4dc0ad8df76b255df0a897916c665fdbc7bf5491 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Oct 2022 08:57:09 -0400 Subject: [PATCH 0470/3335] Create README.md --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..fe325970 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +

https://tteck.github.io/Proxmox/

From bbd664af7c8a9e4a1e4bc7aee917692229947da4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Oct 2022 09:01:06 -0400 Subject: [PATCH 0471/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fe325970..716b1e65 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@

https://tteck.github.io/Proxmox/

+

A big thank you to @mkaatman

From 65bc3db7b4f7afffa6ec3d3d6b8f5674f4a772d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Oct 2022 16:41:08 -0400 Subject: [PATCH 0472/3335] Update omada-install.sh v5.6.3 --- setup/omada-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 5cdb3b12..2bdf2f1f 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -84,9 +84,9 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv sudo dpkg -i mongodb-org-server_3.6.23_amd64.deb &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing Omada Controller v5.5.6" -wget -qL https://static.tp-link.com/upload/software/2022/202208/20220822/Omada_SDN_Controller_v5.5.6_Linux_x64.deb -sudo dpkg -i Omada_SDN_Controller_v5.5.6_Linux_x64.deb &>/dev/null +msg_info "Installing Omada Controller v5.6.3" +wget -qL https://static.tp-link.com/upload/software/2022/202210/20221024/Omada_SDN_Controller_v5.6.3_Linux_x64.deb +sudo dpkg -i Omada_SDN_Controller_v5.6.3_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" PASS=$(grep -w "root" /etc/shadow | cut -b6) From bca5ff7566c625dd4ed74b60f3097f9d6779df77 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Oct 2022 17:11:36 -0400 Subject: [PATCH 0473/3335] Add files via upload --- misc/images/github-icon.png | Bin 0 -> 604 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/github-icon.png diff --git a/misc/images/github-icon.png b/misc/images/github-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cb9a01d02698d509569c02df327273f464ca8e8a GIT binary patch literal 604 zcmV-i0;BzjP)Px%7D+@wR9Hvtm%nbpFc8MSzycdcEU>Y*V=HC`W=s}XBf(?v4v2{fiIEMAgcuoE z+p&FvsslwZ@<-sx5k_Ea$AMJs(2U9X?ss>eFSdhUew<&9kI(@1dY$d}dpM4R^?L2| zClU!T#t@Ik(d~9a`Ls6nJdZ7xORIvV(`od2JuBaVMqvWWbT%MH073|}N;$xYQmT!k z{SZ}f!KQ;y0z@6$1aSpWtJRoLcNFD6_mNB{(eL*!VqO8Lvfu4?7>~!kuS%s7$Tb`e zPd2i>+=>eTUFpvq21b_*RKVvDe+Qt^Xt4Qwu1s*TSYS4rg-u@DvP>p(nwX~wn3NxN z3pkl*Lm)stpGT|Jx+#0H$fScnfP1q42Z*Es*=!b_PUq(};JPk591hAr_voNdC?J>1 zUHFZ~Vi*htzW)BsAmTJp&w_Hf44$q0Xh$)C2SUi3SRhI-_VH@9LbKUKsZ=s*qF5{< zl}agXD5Z}8-o;1b-;ir!G#V*Ks!A8r=@jjD+X!d;8y;8Y2q7QB%Vx8|WHLduTE%v| z^%IXfo%|u)4mlJ60000 Date: Mon, 31 Oct 2022 17:58:12 -0400 Subject: [PATCH 0474/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 716b1e65..c770cf76 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@

https://tteck.github.io/Proxmox/

+
Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

A big thank you to @mkaatman

From dc933dcb0912bf50a2dffe73ffa7bc3ccb7870fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 31 Oct 2022 22:22:59 -0400 Subject: [PATCH 0475/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c770cf76..0b72e4da 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@

https://tteck.github.io/Proxmox/

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
-

A big thank you to @mkaatman

+ From f8d100f852ba91f65fb0bf2ea124adfa3b8b7328 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Nov 2022 06:44:51 -0400 Subject: [PATCH 0476/3335] Create alpine-v4.sh --- ct/alpine-v4.sh | 266 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 ct/alpine-v4.sh diff --git a/ct/alpine-v4.sh b/ct/alpine-v4.sh new file mode 100644 index 00000000..07b4c79d --- /dev/null +++ b/ct/alpine-v4.sh @@ -0,0 +1,266 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Alpine" +var_disk="1" +var_cpu="1" +var_ram="512" +var_os="alpine" +var_version="3.16" +NSAPP=$(echo ${APP,,} | tr -d ' ') +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + ___ v4 __ _ + / | / /___ (_)___ ___ + / /| | / / __ \/ / __ \/ _ \ + / ___ |/ / /_/ / / / / / __/ +/_/ |_/_/ .___/_/_/ /_/\___/ + /_/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + PW="-password alpine" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="alpine" PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 7f71be6dab077f9201899aaf7c7eb3a8276429f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Nov 2022 07:05:08 -0400 Subject: [PATCH 0477/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c94872fd..1a28f05f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-01 + +### Changed + +- **Alpine LXC** + - NEW Script + ## 2022-10-27 ### Changed From cb8df48b94499d21c2bb6d4c79ca1f380f2546c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Nov 2022 11:50:23 -0400 Subject: [PATCH 0478/3335] Create archlinux-v4.sh --- ct/archlinux-v4.sh | 265 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 ct/archlinux-v4.sh diff --git a/ct/archlinux-v4.sh b/ct/archlinux-v4.sh new file mode 100644 index 00000000..6d3243ca --- /dev/null +++ b/ct/archlinux-v4.sh @@ -0,0 +1,265 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Arch Linux" +var_disk="1" +var_cpu="1" +var_ram="512" +var_os="archlinux" +var_version="base" +NSAPP=$(echo ${APP,,} | tr -d ' ') +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + ___ __ __ _ + / | __________/ /_ v4 / / (_)___ __ ___ __ + / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ + / ___ |/ / / /__/ / / / / /___/ / / / / /_/ /> < +/_/ |_/_/ \___/_/ /_/ /_____/_/_/ /_/\__,_/_/|_| + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}archlinux${CL}" + PW="-password archlinux" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="archlinux" PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From b3fbc18e6ca9a2cb0b87aa41355967c39ba07429 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Nov 2022 13:51:17 -0400 Subject: [PATCH 0479/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1a28f05f..c5cd9005 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Alpine LXC** - NEW Script +- **Arch LXC** + - NEW Script ## 2022-10-27 From 6080629b25eef0a5ab1c98445ed936d2294c3139 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 09:51:11 -0400 Subject: [PATCH 0480/3335] Update nginx-proxy-manager-v4.sh increase disk --- ct/nginx-proxy-manager-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 326d353c..8e316769 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo -e "Loading..." APP="Nginx Proxy Manager" -var_disk="3" +var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" From b0e517ab74ca299d3dda83c82c86e97ac529e3a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 12:57:31 -0400 Subject: [PATCH 0481/3335] Update update-lxcs.sh added back alpine support --- misc/update-lxcs.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 3c0a4f27..84a59274 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -16,15 +16,15 @@ while true; do done clear function header_info { - echo -e "${BL} - _ _ _____ _____ _______ ______ - | | | | __ \| __ \ /\|__ __| ____| - | | | | |__) | | | | / \ | | | |__ - | | | | ___/| | | |/ /\ \ | | | __| - | |__| | | | |__| / ____ \| | | |____ - \____/|_| |_____/_/ \_\_| |______| + cat <<"EOF" + __ __ __ __ __ _ ________ + / / / /___ ____/ /___ _/ /____ / / | |/ / ____/ + / / / / __ \/ __ / __ `/ __/ _ \ / / | / / +/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___ +\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/ + /_/ -${CL}" +EOF } header_info @@ -35,7 +35,14 @@ function update_container() { clear header_info echo -e "${BL}[Info]${GN} Updating${BL} $container ${CL} \n" - pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y" + pct config $container > temp + os=`awk '/^ostype/' temp | cut -d' ' -f2` + if [ "$os" == "alpine" ] + then + pct exec $container -- ash -c "apk update && apk upgrade" + else + pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y" + fi } read -p "Skip stopped containers? " -n 1 -r echo @@ -67,5 +74,5 @@ for container in $containers; do fi done wait - +rm -rf temp echo -e "${GN} Finished, All Containers Updated. ${CL} \n" From 3ed93239dc928942fccf1b4bfd91003118832450 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 20:17:37 -0400 Subject: [PATCH 0482/3335] Update homeassistant-core-v4.sh add dev/ttyUSB1 --- ct/homeassistant-core-v4.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index 11373448..4098d9c0 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -265,6 +265,7 @@ lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file 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 From 5daca675cf34ab56e6a9ab17a88cce4081261e73 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 20:21:13 -0400 Subject: [PATCH 0483/3335] Update homeassistant-v4.sh add /dev/ttyUSB1 --- ct/homeassistant-v4.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 8d8b9464..77b128df 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -264,6 +264,7 @@ lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file 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 From 809af179fa3c03d475f710757aef9748100085a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 20:27:03 -0400 Subject: [PATCH 0484/3335] Update zwave-js-ui-v4.sh If the LXC is created Privileged, the script will automatically set up USB passthrough. --- ct/zwave-js-ui-v4.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 45dd790c..0f2af7ab 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -256,8 +256,9 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm @@ -268,6 +269,7 @@ 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 msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From d6ef841b9b47d4798158007c6cc73fff2bc98671 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 20:29:04 -0400 Subject: [PATCH 0485/3335] Update zigbee2mqtt-v4.sh If the LXC is created Privileged, the script will automatically set up USB passthrough. --- ct/zigbee2mqtt-v4.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 2c1881a5..d19c5a03 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -256,10 +256,11 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a -lxc.cap.drop: +lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir @@ -268,6 +269,7 @@ 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 msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From dc5728dced0db83318a0980ef40cc42adfba571b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Nov 2022 20:41:46 -0400 Subject: [PATCH 0486/3335] Update deconz-v4.sh If the LXC is created Privileged, the script will automatically set up USB passthrough. --- ct/deconz-v4.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index ab9a868b..2605ceae 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -256,17 +256,20 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file 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 msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From e21aa0fc3bbf4dc5be2b35c910615f9c28922bde Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 3 Nov 2022 06:40:09 -0400 Subject: [PATCH 0487/3335] Update alpine-v4.sh set default disk 100 MiB --- ct/alpine-v4.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ct/alpine-v4.sh b/ct/alpine-v4.sh index 07b4c79d..11f8f2e7 100644 --- a/ct/alpine-v4.sh +++ b/ct/alpine-v4.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo -e "Loading..." APP="Alpine" -var_disk="1" +var_disk="0.1" var_cpu="1" var_ram="512" var_os="alpine" @@ -78,7 +78,7 @@ function default_settings() { CT_ID=$NEXTID echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" DISK_SIZE="$var_disk" echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" CORE_COUNT="$var_cpu" @@ -142,10 +142,6 @@ function advanced_settings() { echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" else if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi fi CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? From ade6c5a90528bfee343fb1da3ff5d0099a1aed64 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 05:27:17 -0400 Subject: [PATCH 0488/3335] Update podman-homeassistant-v4.sh If the LXC is created Privileged, the script will automatically set up USB passthrough. --- ct/podman-homeassistant-v4.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index df926cb6..87bf6dea 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -259,11 +259,26 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +if [ "$CT_TYPE" == "0" ]; then LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +else + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From 789086b47c41aea8a793b1889bc4f3c34cb05dde Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 05:37:31 -0400 Subject: [PATCH 0489/3335] Delete README_OLD.md --- README_OLD.md | 2484 ------------------------------------------------- 1 file changed, 2484 deletions(-) delete mode 100644 README_OLD.md diff --git a/README_OLD.md b/README_OLD.md deleted file mode 100644 index ee956ea4..00000000 --- a/README_OLD.md +++ /dev/null @@ -1,2484 +0,0 @@ -

Select a Proxmox Helper

- -

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

- - - -
- Proxmox VE 7 Post Install - -

- -

Proxmox VE 7 Post Install

- -The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox VE and Reboot PVE. - -Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)" -``` - -It's recommended to answer `y` to all options. - -____________________________________________________________________________________________ - -
- -
- Proxmox Kernel Clean - -

- -

Proxmox Kernel Clean

- -Cleaning unused kernel images is not only good because of a reduced grub menu, but also gains some disk space. - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox Edge Kernel Tool - -

- -

Proxmox Edge Kernel Tool

- -Proxmox [Edge Kernels](https://github.com/fabianishere/pve-edge-kernel) are custom Linux Kernels for Proxmox VE 7. Keeping up with new Kernel releases instead of LTS - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox CPU Scaling Governor - -

- -

Proxmox CPU Scaling Governor

- -CPU Scaling Governor enables the operating system to scale the CPU frequency up or down in order to save power or improve performance. - -[Generic Scaling Governors](https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html?#generic-scaling-governors) - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/scaling-governor.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox LXC Updater - -

- -

Proxmox LXC Updater

- -Update All LXC's Fast & Easy - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox Dark Theme - -

- -

Proxmox Discord Dark Theme

- -A dark theme for the Proxmox Web UI by [Weilbyte](https://github.com/Weilbyte/PVEDiscordDark) - -Run the following in the Proxmox Shell. - -```yaml -bash <(curl -s https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh ) install -``` - -To uninstall the theme, simply run the script with the `uninstall` command. - -____________________________________________________________________________________________ - -
- -
- Proxmox Backup Server Post Install - -

- -

Proxmox Backup Server Post Install

- -The script will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS. - -Run the following in the Proxmox Shell. ⚠️ **Proxmox Backup Server ONLY** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pbs-install.sh)" -``` - -It's recommended to answer `y` to all options. - -____________________________________________________________________________________________ - -
- -
- Home Assistant OS VM - -

- -

Home Assistant OS VM

-

Option to create VM using Stable, Beta or Dev Image

- -The script automates the manual process of finding, downloading and extracting the Official KVM (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. No hidden (kpartx, unzip, ect...) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. - -To create a new Proxmox Home Assistant OS VM, run the following in the Proxmox Shell - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v4.sh)" -``` -

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

- -After the script completes, click on the VM, then on the **_Summary_** tab to find the VM IP. - -**Home Assistant Interface - IP:8123** - -____________________________________________________________________________________________ - -
- -
- 🔸PiMox HAOS VM - -

- -

PiMox HAOS VM

-

Option to create VM using Stable, Beta or Dev Image

- -The script automates the manual process of finding, downloading and extracting the aarch64 (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. - -To create a new PiMox HAOS VM, run the following in the Proxmox Shell - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/pimox-haos-vm-v4.sh)" -``` -

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

- -After the script completes, click on the VM Console to find the Home Assistant IP. - -**Home Assistant Interface - IP:8123** - -____________________________________________________________________________________________ - -
- -
- Home Assistant Container LXC - -

Docker Logos | Docker -@home-assistantGitHub - portainer/portainer-docs: Portainer documentation

- -

Home Assistant Container LXC

- -A standalone container-based installation of Home Assistant Core - -🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* - -To create a new Proxmox Home Assistant Container LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

- -**Home Assistant Interface - IP:8123** - -**Portainer Interface - IP:9000** - -⚙️ **Path to HA /config** -```yaml -/var/lib/docker/volumes/hass_config/_data - ``` -⚙️ **To Edit the HA configuration.yaml** (Recommend Using File Browser) - -Run in the LXC console -```yaml -nano /var/lib/docker/volumes/hass_config/_data/configuration.yaml -``` -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -⚙️ **Copy Data From a Existing Home Assistant LXC to another Home Assistant LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data.sh)" - ``` - -⚙️ **To Install HACS:** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs.sh)" -``` -After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. - - -⚙️ [**Update Menu**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/update-menu.png) - -Run in the LXC console -```yaml -./update -``` -____________________________________________________________________________________________ -
- -
- 🔸Home Assistant Core LXC - -

- -

Home Assistant Core LXC

- -A standalone installation of Home Assistant Core - -🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* - -To create a new Proxmox Home Assistant Core LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-core-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

- -⚠️ Initialize Home Assistant-Core (Only required once) - -Run in the LXC console -```yaml -cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass -``` - -***Home Assistant Interface - IP:8123*** - -⚙️ **Edit the HA configuration.yaml** - -Run in the LXC console -```yaml -nano .homeassistant/configuration.yaml -``` -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -⚙️ **Install HACS:** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" -``` -After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. - -⚙️ **Update Home Assistant** - -Run in the LXC console -```yaml -systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit -``` -____________________________________________________________________________________________ -
- -
- Podman Home Assistant Container LXC - -

-@home-assistant

- -

Podman Home Assistant Container LXC

-A standalone container-based installation of Home Assistant Core - -⚠️ Podman seems to need a privileged LXC - -To create a new Proxmox Podman Home Assistant Container LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/podman-homeassistant-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

- -**Home Assistant Interface - IP:8123** - -**Yacht Interface - IP:8000** - -⚙️ **Path to HA /config** -```yaml -/var/lib/containers/storage/volumes/hass_config/_data - ``` -⚙️ **To edit the HA configuration.yaml** - -Run in the LXC console -```yaml -nano /var/lib/containers/storage/volumes/hass_config/_data/configuration.yaml -``` -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -⚙️ **Copy Data From a Existing Home Assistant LXC to a Podman Home Assistant LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data-podman.sh)" - ``` - -⚙️ **To allow USB device passthrough:** - -Run in the Proxmox Shell. (**replace `106` with your LXC ID**) -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/usb-passthrough.sh)" -s 106 -``` - -Reboot the LXC to apply the changes - -⚙️ **To Install HACS:** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/podman_hacs.sh)" -``` -After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. - -⚙️ **Initial Yacht Login** - -**username** - ```yaml - admin@yacht.local - ``` - **password** - ```yaml - pass - ``` - -____________________________________________________________________________________________ -
- -
- ioBroker LXC - -

- -

ioBroker LXC

- -[ioBroker](https://www.iobroker.net/#en/intro) is an open source automation platform. - -To create a new Proxmox ioBroker LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/iobroker-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**ioBroker Interface - IP:8081** - -⚙️ **To Update ioBroker** - -```yaml -update from the ioBroker UI -``` - -____________________________________________________________________________________________ - -
- -
- openHAB LXC - -

- -

openHAB LXC

- -[openHAB](https://www.openhab.org/), a vendor and technology agnostic open source automation software for your home. - -To create a new Proxmox openHAB LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/openhab-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**openHAB Interface - IP:8080** - -⚙️ **To Update openHAB** - -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Homebridge LXC - -

- -

Homebridge LXC

- -[Homebridge](https://homebridge.io/) allows you to integrate with smart home devices that do not natively support HomeKit - -To create a new Proxmox Homebridge LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homebridge-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -**Homebridge Interface - IP:8581** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` -Config File Path `/var/lib/homebridge/config.json` - -Storage Path `/var/lib/homebridge` - -Restart Command `sudo hb-service restart` - -Stop Command `sudo hb-service stop` - -Start Command `sudo hb-service start` - -View Logs Command `sudo hb-service logs` - -Systemd Service File `/etc/systemd/system/homebridge.service` - -Systemd Env File `/etc/default/homebridge` - -⚙️ **To Update Homebridge** - -```yaml -Update from the Homebridge UI -``` - - ___________________________________________________________________________________________ - -
- - - -
- ESPHome LXC - -

- -

ESPHome LXC

- -[ESPHome](https://esphome.io/) is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. - -To create a new Proxmox ESPHome LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/esphome-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**ESPHome Interface - IP:6052** - -⚙️ **To Update ESPHome** - -Run in the LXC console -```yaml -pip3 install esphome --upgrade -``` - -____________________________________________________________________________________________ - -
- - - -
- Nginx Proxy Manager LXC - -

hero

- - -

Nginx Proxy Manager LXC

- -[Nginx Proxy Manager](https://nginxproxymanager.com/) Expose your services easily and securely - -To create a new Proxmox Nginx Proxy Manager LXC Container, run the following in the Proxmox Shell. - -```yaml - bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nginx-proxy-manager-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 3GB Storage - 1vCPU ⚡

- -____________________________________________________________________________________ - -Forward port `80` and `443` from your router to your Nginx Proxy Manager LXC IP. - -Add the following to your `configuration.yaml` in Home Assistant. -```yaml - http: - use_x_forwarded_for: true - trusted_proxies: - - 192.168.100.27 ###(Nginx Proxy Manager LXC IP)### -``` - -**Nginx Proxy Manager Interface - IP:81** - -⚙️ **Initial Login** - -**username** - ```yaml - admin@example.com - ``` - **password** - ```yaml - changeme - ``` -⚙️ **To Update Nginx Proxy Manager** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/npm_update.sh)" -``` - - ____________________________________________________________________________________________ - -
- -
- MQTT LXC - -

- -

MQTT LXC

- -[Eclipse Mosquitto](https://mosquitto.org/) is an open source message broker that implements the MQTT protocol - -To create a new Proxmox MQTT LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mqtt-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -Mosquitto comes with a password file generating utility called mosquitto_passwd. -```yaml -sudo mosquitto_passwd -c /etc/mosquitto/passwd -``` -Password: < password > - -Create a configuration file for Mosquitto pointing to the password file we have just created. -```yaml -sudo nano /etc/mosquitto/conf.d/default.conf -``` -This will open an empty file. Paste the following into it. -```yaml -allow_anonymous false -persistence true -password_file /etc/mosquitto/passwd -listener 1883 -``` -Save and exit the text editor with "Ctrl+O", "Enter" and "Ctrl+X". - -Now restart Mosquitto server. -```yaml -sudo systemctl restart mosquitto -``` - -⚙️ **To Update MQTT:** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- EMQX LXC - -

- - -

EMQX LXC

- -[EMQX](https://www.emqx.io/) is an Open-source MQTT broker with a high-performance real-time message processing engine, powering event streaming for IoT devices at massive scale. - -To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell. - -```yaml - bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emqx-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- - -**EMQX Interface - IP:18083** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - public - ``` -⚙️ **Setup** - -Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker. - -⚙️ **To Update EMQX** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - - ____________________________________________________________________________________________ - -
- -
- Node-Red LXC - -

- -

Node-Red LXC

- -[Node-RED](https://nodered.org/) is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. - -To create a new Proxmox Node-RED LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/node-red-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -**Node-Red Interface - IP:1880** - -⚙️ **To Restart Node-Red:** - -Run in the LXC console -```yaml -node-red-restart -``` - -⚙️ **To Update Node-Red:** - -Run in the LXC console (Restart after update) -```yaml -npm install -g --unsafe-perm node-red -``` - -⚙️ **To Install Node-Red Themes** ⚠️ **Backup your flows before running this script!!** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/node-red-themes.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- n8n LXC - -

- -

n8n LXC

- -[n8n](https://n8n.io/) is an extendable workflow automation tool which enables you to connect anything to everything. - -To create a new Proxmox n8n LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/n8n-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

- -**n8n Interface: IP:5678** - -⚙️ **To Update n8n** - -```yaml -npm update -g n8n -``` - -____________________________________________________________________________________________ - -
- -
- Mariadb LXC - -

MariaDB

- -

Mariadb LXC

-

Option to Install Adminer

- -[MariaDB](https://mariadb.org/) is a community-developed, commercially supported fork of the MySQL relational database management system. - -To create a new Proxmox Mariadb LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mariadb-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -To enable MariaDB to listen to remote connections, you need to edit your defaults file. To do this, open the console in your MariaDB lxc: -```yaml -nano /etc/mysql/my.cnf -``` -Un-comment `port =3306` -Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". - -```yaml -nano /etc/mysql/mariadb.conf.d/50-server.cnf -``` -Comment `bind-address = 127.0.0.1` -Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". - -For new MariaDB installations, the next step is to run the included security script. This script changes some of the less secure default options. We will use it to block remote root logins and to remove unused database users. - -Run the security script: -```yaml -sudo mysql_secure_installation -``` -Enter current password for root (enter for none): `enter` - -Switch to unix_socket authentication [Y/n] `y` - -Change the root password? [Y/n] `n` - -Remove anonymous users? [Y/n] `y` - -Disallow root login remotely? [Y/n] `y` - -Remove test database and access to it? [Y/n] `y` - -Reload privilege tables now? [Y/n] `y` - -We will create a new account called admin with the same capabilities as the root account, but configured for password authentication. -```yaml -sudo mysql -``` -Prompt will change to ```MariaDB [(none)]>``` - -Create a new local admin (Change the username and password to match your preferences) -```yaml -CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password'; -``` -Give local admin root privileges (Change the username and password to match above) -```yaml -GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; -``` - -Now, we'll give the user admin root privileges and password-based access that can connect from anywhere on your local area network (LAN), which has addresses in the subnet 192.168.100.0/24. This is an improvement because opening a MariaDB server up to the Internet and granting access to all hosts is bad practice.. Change the **_username_**, **_password_** and **_subnet_** to match your preferences: -```yaml -GRANT ALL ON *.* TO 'admin'@'192.168.100.%' IDENTIFIED BY 'password' WITH GRANT OPTION; -``` -Flush the privileges to ensure that they are saved and available in the current session: -```yaml -FLUSH PRIVILEGES; -``` -Following this, exit the MariaDB shell: -```yaml -exit -``` -Log in as the new database user you just created: -```yaml -mysql -u admin -p -``` -Create a new database: -```yaml -CREATE DATABASE homeassistant; -``` -Following this, exit the MariaDB shell: -```yaml -exit -``` -⚠️ Reboot the lxc - -Checking status. -```yaml -sudo systemctl status mariadb -``` -Change the recorder: `db_url:` in your HA configuration.yaml - -Example: -```yaml -recorder: - db_url: mysql://admin:password@192.168.100.26:3306/homeassistant?charset=utf8mb4 -``` - -⚙️ **To Update Mariadb:** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool - - `http://your-mariadb-lxc-ip/adminer/` - -____________________________________________________________________________________________ - -
- -
- PostgreSQL LXC - -

- -

PostgreSQL LXC

-

Option to Install Adminer

- -[PostgreSQL](https://www.postgresql.org/), also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance. - -To create a new Proxmox PostgreSQL LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/postgresql-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -To make sure our PostgreSQL is secured with a strong password, set a password for its system user and then change the default database admin user account - -Change user password -```yaml -passwd postgres -``` -Login using Postgres system account - -```yaml -su - postgres -``` -Now, change the Admin database password -```yaml -psql -c "ALTER USER postgres WITH PASSWORD 'your-password';" -``` -Create a new user. -```yaml -psql -``` -```yaml -CREATE USER admin WITH PASSWORD 'your-password'; -``` -Create a new database: -```yaml -CREATE DATABASE homeassistant; -``` -Grant all rights or privileges on created database to the user -```yaml -GRANT ALL ON DATABASE homeassistant TO admin; -``` -To exit psql -```yaml -\q -``` -Then type exit to get back to root - -Change the recorder: `db_url:` in your HA configuration.yaml - -Example: -```yaml -recorder: - db_url: postgresql://admin:your-password@192.168.100.20:5432/homeassistant?client_encoding=utf8 -``` -⚙️ **To Update PostgreSQL** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool - - `http://your-PostgreSQL-lxc-ip/adminer/` - -____________________________________________________________________________________________ - -
- -
- Zigbee2MQTT LXC - -

- - -

Zigbee2MQTT LXC

- -[Zigbee2MQTT](https://www.zigbee2mqtt.io/) is a standalone nodejs application that connects a zigbee network to MQTT - -To create a new Proxmox Zigbee2MQTT LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- - -⚙️ **Determine the location of your adapter** - -Run in the LXC console -```yaml -ls -l /dev/serial/by-id -``` -Example Output: ```lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0``` - - -⚙️ ⚠️ **Before you start Zigbee2MQTT you need to edit the [configuration.yaml](https://www.zigbee2mqtt.io/guide/configuration/)** - -Run in the LXC console -```yaml -nano /opt/zigbee2mqtt/data/configuration.yaml -``` - -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -Example: -```yaml -frontend: - port: 9442 -homeassistant: true -permit_join: false -mqtt: - base_topic: zigbee2mqtt - server: 'mqtt://192.168.86.224:1883' - user: usr - password: pwd - keepalive: 60 - reject_unauthorized: true - version: 4 -serial: - port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 - #adapter: deconz #(uncomment for ConBee II) -advanced: - pan_id: GENERATE - network_key: GENERATE - channel: 20 -``` -⚙️ **Zigbee2MQTT can be started after completing the configuration** - -Run in the LXC console -```yaml -cd /opt/zigbee2mqtt && npm start -``` -⚙️ **To update Zigbee2MQTT** - -Run in the LXC console - ```yaml -cd /opt/zigbee2mqtt && bash update.sh - ``` -⚙️ **Copy Data From a Existing Zigbee2MQTT LXC to another Zigbee2MQTT LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/z2m-copy-data.sh)" - ``` - -____________________________________________________________________________________________ - -
- -
- deCONZ LXC - -

- -

deCONZ LXC

- -[deCONZ](https://www.phoscon.de/en/conbee2/software#deconz) is used to configure, control and display Zigbee networks. - -To create a new Proxmox deCONZ LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/deconz-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**deCONZ Interface - IP:80** - -⚙️ **To Update deCONZ** - -Run in the LXC Console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Z-Wave JS UI LXC - -

- -

Z-Wave JS UI LXC

- -[Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui#) is a fully configurable Z-Wave to MQTT Gateway and Control Panel. - -To create a new Proxmox Z-Wave JS UI LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwave-js-ui-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**Z-Wave JS UI Interface - IP:8091** - -⚙️ **Copy Data From a Existing Zwavejs2MQTT LXC to a Z-Wave JS UI LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-copy-data.sh)" - ``` -⚙️ **To Update Z-Wave JS UI** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-js-ui-update.sh)" -``` - -____________________________________________________________________________________________ -
- -
- NocoDB LXC - -

- -

NocoDB LXC

- -[NocoDB](https://www.nocodb.com/) is an open source #NoCode platform that turns any database into a smart spreadsheet. Airtable Alternative. - -To create a new Proxmox NocoDB LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nocodb-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -**NocoDB Interface - IP:8080/dashboard** - -⚙️ **To Update NocoDB** - -Run in the LXC console -```yaml -cd /opt/nocodb && npm run upgrade -``` - -____________________________________________________________________________________________ - -
- -
- Prometheus LXC - -

- -

Prometheus LXC

- -[Prometheus](https://prometheus.io/) is an open-source systems monitoring and alerting toolkit - -To create a new Proxmox Prometheus LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/prometheus-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 4GB Storage - 1vCPU ⚡

- -**Prometheus Interface - IP:9090** - -⚙️ **To Update Prometheus** - -```yaml -Working On -``` - -____________________________________________________________________________________________ - -
- -
- InfluxDB LXC - -

- -

InfluxDB LXC

- -

Option to Install Telegraf

- -[InfluxDB](https://www.influxdata.com/) is an open-source time series database developed by the company InfluxData. - -[Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) is an open source plugin-driven server agent for collecting and reporting metrics. - -To create a new Proxmox InfluxDB LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/influxdb-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -⚙️ **InfluxDB Configuration** - -Run in the LXC console -```yaml -nano /etc/influxdb/influxdb.conf -``` - -⚙️ **Telegraf Configuration** - -Run in the LXC console -```yaml -nano /etc/telegraf/telegraf.conf -``` - -⚙️ **To Update InfluxDB/Telegraf** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Grafana LXC - -

- -

Grafana LXC

- -[Grafana](https://grafana.com/) is a multi-platform open source analytics and interactive visualization web application. - -To create a new Proxmox Grafana LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grafana-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Grafana Interface - IP:3000** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` - -⚙️ **To Update Grafana** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Docker LXC - -

- -

Docker LXC

-

Options to Install Portainer and/or Docker Compose V2

- -[Docker](https://www.docker.com/) is an open-source project for automating the deployment of applications as portable, self-sufficient containers. - -To create a new Proxmox Docker LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 4GB Storage - 2vCPU ⚡

- -**⚠ Run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.** - -**Portainer Interface - IP:9000** - -⚙️ **To Update** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- CasaOS LXC - -

- -

CasaOS LXC

- -[CasaOS](https://www.casaos.io/) is a community-based open source software focused on delivering simple home cloud experience around Docker ecosystem. - - -To create a new Proxmox CasaOS LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/casaos-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**CasaOS Interface - IP** - -⚙️ **To Update CasaOS** - -```yaml -update from the CasaOS UI -``` - -____________________________________________________________________________________________ - -
- -
- Debian LXC - -

Debian

- -

Debian LXC

-

Option to select version 10 or 11

- -To create a new Proxmox Debian (curl & sudo) LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/debian-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -⚙️ **To Update Debian** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- - -
- Ubuntu LXC - -

Ubuntu

- -

Ubuntu LXC

-

Option to select version 18.04, 20.04, 21.10 or 22.04

- -To create a new Proxmox Ubuntu (curl & sudo) LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU - 22.04 ⚡

- -⚙️ **To Update Ubuntu** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- UniFi Network Application LXC - -

- -

UniFi Network Application LXC

- -

With Local Controller Option

- -An application designed to optimize UniFi home and business networks with ease. - -To create a new Proxmox UniFi Network Application LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/unifi-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**UniFi Interface - https:// IP:8443** - -⚙️ **To Update UniFi** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/unifi-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Omada Controller LXC - -

- -

Omada Controller LXC

- -Omada Controller is software which is used to manage the EAP - -To create a new Proxmox Omada Controller LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Omada Interface - https:// IP:8043** - -`tpeap status` show status of Omada Controller - -`tpeap start` start Omada Controller - -`tpeap stop` stop Omada Controller - -⚙️ **To Update Omada** - -[#403](https://github.com/tteck/Proxmox/issues/402#issue-1328460983) - -____________________________________________________________________________________________ - -
- -
- Plex Media Server LXC - -

- -

Plex Media Server LXC

-

With Hardware Acceleration Support

-To create a new Proxmox Plex Media Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Plex Media Server Interface - IP:32400/web** - -⚙️ **To Update Plex Media Server:** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -⚙️ **Copy Data From a Existing Plex Media Server LXC to another Plex Media Server LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/pms-copy-data.sh)" - ``` - -____________________________________________________________________________________________ - -
- -
- Emby Media Server LXC -

-

Emby Media Server LXC

- -[Emby](https://emby.media/) brings together your personal videos, music, photos, and live television. - -To create a new Proxmox Emby Media Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Emby Media Server Interface - IP:8096** - -⚙️ **Emby Media Server Utilizes Automatic Updates** - -____________________________________________________________________________________________ - -
- -
- Jellyfin Media Server LXC -

-

Jellyfin Media Server LXC

- -[TurnKey has a LXC CT for Jellyfin](https://www.turnkeylinux.org/mediaserver) - -To create a new Proxmox Jellyfin Media Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/jellyfin-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Jellyfin Media Server Interface - IP:8096** - -FFmpeg path: `/usr/lib/jellyfin-ffmpeg/ffmpeg` - -⚙️ **To Update Jellyfin Media Server** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -____________________________________________________________________________________________ - -
- -
- Pi-hole LXC - -

- -

Pi-hole LXC

- -[Pi-hole](https://pi-hole.net/) is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server. - -To create a new Proxmox Pi-hole LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v4.sh)" -``` -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -⚠️ **Reboot Pi-hole LXC after install** - -**Pi-hole Interface - http:// IP/admin** - -⚙️ **To set your password:** - -Run in the LXC console - -```yaml -pihole -a -p -``` -____________________________________________________________________________________________ - -
- -
- Technitium DNS LXC - -

- -

Technitium DNS LXC

-An open source authoritative as well as recursive DNS server - -To create a new Proxmox Technitium DNS LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/technitiumdns-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Technitium DNS Interface - IP:5380** - -⚙️ **To Update Technitium DNS** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/technitiumdns-update.sh)" -``` -__________________________________________________________________________________________ - -
- - -
- AdGuard Home LXC - -

- -

AdGuard Home LXC

- -To create a new Proxmox AdGuard Home LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/adguard-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**AdGuard Home Setup Interface - IP:3000 (After Setup use only IP)** - - (For the Home Assistant Integration, use port `80` not `3000`) - -⚙️ **To Update Adguard** - -```yaml -Update from the Adguard UI -``` -__________________________________________________________________________________________ - -
- -
- Uptime Kuma LXC - -

- -

Uptime Kuma LXC

- -Uptime Kuma is a self-hosted, open source, fancy uptime monitoring and alerting system. It can monitor HTTP(s) / TCP / HTTP(s) Keyword / Ping / DNS Record / Push / Steam Game Server. - -To create a new Proxmox Uptime Kuma LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 2GB Storage - 1vCPU ⚡

- -**Uptime Kuma Interface - IP:3001** - -⚙️ **To Update Uptime Kuma** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/uptimekuma-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Whoogle LXC - -

- -

Whoogle LXC

- -Get Google search results, but without any ads, javascript, AMP links, cookies, or IP address tracking. - -To create a new Proxmox Whoogle LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/whoogle-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Whoogle Interface - IP:5000** - -⚙️ **To Update Whoogle** - -Run in the LXC console -```yaml -pip3 install whoogle-search --upgrade -``` -____________________________________________________________________________________________ - -
- - -
- Paperless-ngx LXC - -

- -

Paperless-ngx LXC

- -[Paperless-ngx](https://paperless-ngx.readthedocs.io/en/latest/#) is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper. - -To create a new Proxmox Paperless-ngx LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/paperless-ngx-v4.sh)" -``` - -

⚡ Default Settings: 2048MiB RAM - 4GB Storage - 2vCPU ⚡

- -**Paperless-ngx Interface - IP:8000** - -🛈 A paperless.creds file is in root home directory that contains the usernames and passwords. - -Run in the LXC Console -```yaml -cat paperless.creds -``` - -⚙️ **To Update Paperless-ngx** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/paperless-ngx-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Trilium LXC - -

- -

Trilium LXC

- -[Trilium](https://github.com/zadam/trilium#trilium-notes) is a hierarchical note taking application with focus on building large personal knowledge bases. - -To create a new Proxmox Trilium LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/trilium-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Trilium Interface - IP:8080** - -⚙️ **To Update Trilium** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/trilium-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- Wiki.js LXC - -

- -

Wiki.js LXC

- -[Wiki.js](https://js.wiki/) is a modern, lightweight and powerful wiki app built on NodeJS. - -To create a new Proxmox Wiki.js LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wikijs-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Wiki.js Interface - IP:3000** - -____________________________________________________________________________________________ - -
- -
- Heimdall Dashboard LXC - -

- -

Heimdall Dashboard LXC

- -[Heimdall Application Dashboard](https://camo.githubusercontent.com/bcfd4f74c93b25bea7b14eacbafd649206bf754a3d4b596329968f0ee569cf3c/68747470733a2f2f692e696d6775722e636f6d2f4d72433451704e2e676966) is a dashboard for all your web applications. It doesn't need to be limited to applications though, you can add links to anything you like. - -To create a new Proxmox Heimdall Dashboard LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/heimdalldashboard-v4.sh)" -``` -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Heimdall Dashboard Interface - IP:7990** - -⚙️ **To Update Heimdall Dashboard** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/heimdalldashboard-all-update.sh)" -``` - -__________________________________________________________________________________________ - -
- -
- Homepage LXC - -

- -

Homepage LXC

- -[Homepage](https://github.com/benphelps/homepage) is a self-hosted dashboard. - -To create a new Proxmox Homepage LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 3GB Storage - 2vCPU ⚡

- -[Configuration](https://github.com/benphelps/homepage/wiki) (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/` - -**Homepage Interface - IP:3000** - -⚙️ **To Update Homepage** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/homepage-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- Dashy LXC - -

- -

Dashy LXC

- -Dashy helps you organize your self-hosted services by making them accessible from a single place - -To create a new Proxmox Dashy LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/dashy-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

- -**Dashy Interface - IP:4000** - -After getting everything setup the way you want in interactive mode and saved to disk, you have to go into update configuration and rebuild application. - -⚙️ **To Update Dashy** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/dashy-update.sh)" -``` - -__________________________________________________________________________________________ - -
- -
- grocy LXC - -

- -

grocy LXC

- -[grocy](https://grocy.info/) is a web-based self-hosted groceries & household management solution for your home. - -To create a new Proxmox grocy LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grocy-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**grocy Interface: http:// IP** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` - -⚙️ **To Update grocy** - -Run in the LXC console - ```yaml -bash /var/www/html/update.sh -``` -____________________________________________________________________________________________ - -
- -
- MagicMirror Server LXC - -

- -

MagicMirror Server LXC

- -[MagicMirror²](https://docs.magicmirror.builders/) is an open source modular smart mirror platform. - -To create a new MagicMirror Server LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 3GB Storage - 1vCPU ⚡

- -**MagicMirror Interface - IP:8080** - -⚙️ **[Configuration](https://docs.magicmirror.builders/configuration/introduction.html#configuring-your-magicmirror)** -```yaml -/opt/magicmirror/config/config.js -``` -⚙️ **[Update MagicMirror](https://docs.magicmirror.builders/getting-started/upgrade-guide.html#upgrade-guide)** - -Run in the LXC Console -```yaml -cd /opt/magicmirror && git pull && npm install --only=prod --omit=dev -``` - - -____________________________________________________________________________________________ - -
- -
- Daemon Sync Server LXC - -

- -

Daemon Sync Server LXC

- -Sync files from app to server, share photos & videos, back up your data and stay secure inside local network. - -To create a new Proxmox Daemon Sync Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/daemonsync-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 8GB Storage - 1vCPU ⚡

- -**Daemon Sync Server Interface - IP:8084** - -Search: `DAEMON Sync` in your favorite app store - -__________________________________________________________________________________________ - -
- -
- NextCloudPi LXC - -

- -

NextCloudPi LXC

- -[NextCloudPi LXC](https://github.com/nextcloud/nextcloudpi#features) is the most popular self-hosted collaboration solution. - -To create a new Proxmox NextCloudPi LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nextcloudpi-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -❗1️. Set nc trusted domains - -Run in the LXC console -``` -sudo ncp-config -``` -Go to config ➡ nc-trusted-domains, add `0.0.0.0` or a static NextCloudPi IP - -Get back to the command prompt, and restart Apache2 `sudo service apache2 restart` - -❗2. **NextCloudPi Interface - https:// IP/** - -____________________________________________________________________________________________ - -
- -
- OpenMediaVault LXC - -

- -

OpenMediaVault LXC

- -[OpenMediaVault](https://www.openmediavault.org/) is the next generation network attached storage (NAS) solution based on Debian Linux. - -To create a new Proxmox OpenMediaVault LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omv-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**OpenMediaVault Interface - IP** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - openmediavault - ``` - -____________________________________________________________________________________________ - -
- -
- Navidrome LXC - -

- -

Navidrome LXC

- -[Navidrome](https://www.navidrome.org/) allows you to enjoy your music collection from anywhere, by making it available through a modern Web UI and through a wide range of third-party compatible mobile apps, for both iOS and Android devices. - -To create a new Proxmox Navidrome LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/navidrome-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -To change Navidrome music folder path, edit: `/var/lib/navidrome/navidrome.toml` - -**Navidrome Interface - IP:4533** - -⚙️ **To Update Navidrome** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/navidrome-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- PhotoPrism LXC - -

- -

PhotoPrism LXC

- -[PhotoPrism](https://photoprism.app/) is an AI-powered app for browsing, organizing & sharing your photo collection. - -To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**PhotoPrism Interface - IP:2342** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - changeme - ``` -[PhotoSync](https://www.photosync-app.com/home.html) - -⚙️ **To Update or Change Branch** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/photoprism-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- MotionEye VMS LXC - -

- -

MotionEye VMS LXC

- -To create a new Proxmox MotionEye VMS LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**MotionEye Interface - IP:8765** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - - ``` - -⚙️ **To Update MotionEye** - -Run in the LXC console - ```yaml -pip install motioneye --upgrade -``` - -____________________________________________________________________________________________ - -
- -
- File Browser - -

- -

File Browser

- -To Install File Browser, ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/filebrowser.sh)" -``` - -[File Browser](https://filebrowser.org/features) is a create-your-own-cloud-kind of software where you can install it on a server, direct it to a path and then access your files through a nice web interface. Many available features! - - - -**File Browser Interface - http:// IP:8080** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - changeme - ``` - -⚙️ **To Update File Browser** - -```yaml -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash -``` -___________________________________________________________________________________________ - -
- -
- VS Code Server - -

- -

VS Code Server

- -To Install VS Code Server, ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/code-server.sh)" -``` - -[VS Code Server](https://code.visualstudio.com/docs/remote/vscode-server) is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH. - - - -**VS Code Server Interface - http:// IP:8680** - -___________________________________________________________________________________________ - -
- -
- Webmin System Administration - -

- -

Webmin System Administration

- -To Install Webmin System Administration [(Screenshot)](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/file-manager.png), ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/webmin.sh)" -``` - -If you prefer to manage all aspects of your Proxmox LXC from a graphical interface instead of the command line interface, Webmin might be right for you. - -Benefits include automatic daily security updates, backup and restore, file manager with editor, web control panel, and preconfigured system monitoring with optional email alerts. - - - -**Webmin Interface - https:// IP:10000 (https)** - -⚙️ **Initial Login** - -**username** - ```yaml - root - ``` - **password** - ```yaml - root - ``` - -⚙️ **To Update Webmin** - -```yaml -Update from the Webmin UI -``` -⚙️ **To Uninstall Webmin** - -Run in the LXC console -```yaml -bash /etc/webmin/uninstall.sh -``` -___________________________________________________________________________________________ - -
- -
- Syncthing LXC - -

- -

Syncthing LXC

- -[Syncthing](https://syncthing.net/) is a continuous file synchronization program. It synchronizes files between two or more computers. - -To create a new Proxmox Syncthing LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/syncthing-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -⚙️ For the initial start, run `syncthing --gui-address=0.0.0.0:8384` in the LXC console, then go to the LXC IP:8384 In settings set the LXC IP address under the GUI (also set the GUI Authentication User and GUI Authentication Password) and Connections tab's and save. Reboot the LXC. - -**Syncthing Interface - IP:8384** - -⚙️ **To Update Syncthing** - -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- WireGuard LXC - -

- -

WireGuard LXC

-

With WGDashboard

- -To create a new Proxmox WireGuard LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wireguard-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**WGDashboard Interface - http:// IP:10086** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` - -⚙️ **Host Configuration** - -Run in the LXC console - ```yaml - nano /etc/pivpn/wireguard/setupVars.conf - ``` - ⚙️**Add Clients** - - Run in the LXC console - ```yaml - pivpn add - ``` -⚙️ **To Update WireGuard** - -Run in the LXC console - ```yaml -apt update && apt upgrade -y -``` -____________________________________________________________________________________________ - -
- - -
- MeshCentral LXC - -

- -

MeshCentral LXC

- -[MeshCentral](https://meshcentral.com/info/) is a full computer management web site. With MeshCentral, you can run your own web server to remotely manage and control computers on a local network or anywhere on the internet. - -To create a new Proxmox MeshCentral LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**MeshCentral Interface - http:// IP** - -⚙️ **To Update MeshCentral** - -```yaml -Update from the MeshCentral UI -``` -____________________________________________________________________________________________ - -
- -
- Tailscale - -

- -

Tailscale

- -[Tailscale](https://tailscale.com/) Creates a secure network between your servers, computers, and cloud instances. Even when separated by firewalls or subnets, Tailscale just works. - -To Install Talescale on an existing LXC, run the following in the Proxmox Shell (replace `106` with your LXC ID). - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/add-tailscale-lxc.sh)" -s 106 -``` -After the script finishes, reboot the LXC then run `tailscale up` in the LXC console - -[**Tailscale Login**](https://login.tailscale.com/start) - -⚙️ **To Update Tailscale** - -Run in the LXC console - ```yaml -apt update && apt upgrade -y -``` - -___________________________________________________________________________________________ - -
- -
- CrowdSec - -

- -

CrowdSec

- -To Install CrowdSec, ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/crowdsec.sh)" -``` - -[CrowdSec](https://crowdsec.net/) is a free, open-source and collaborative IPS. Analyze behaviors, respond to attacks & share signals across the community. - -[**Control center for your CrowdSec machines.**](https://app.crowdsec.net/product-tour) - -___________________________________________________________________________________________ - -
- -
- Keycloak LXC - -

- -

Keycloak LXC

- -To create a new Proxmox Keycloak LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak-v4.sh)" -``` - -[Keycloak](https://www.keycloak.org/) is an Open Source Identity and Access Management solution for modern Applications and Services. - -**Keycloak Interface - http:// IP:8080** (First start can take a few minutes) - -⚙️ **Initial Login** - -The initial admin user can be added manually using the web frontend when accessed from localhost or automatically using environment variables. - -To add the initial admin user using environment variables, set `KEYCLOAK_ADMIN` for the initial admin username and `KEYCLOAK_ADMIN_PASSWORD` for the initial admin password. - -First, stop Keycloak -```yaml -systemctl stop keycloak.service -``` -then start Keycloak by coping & pasting the following (only needed once) -```yaml -cd /opt/keycloak -export KEYCLOAK_ADMIN=admin -export KEYCLOAK_ADMIN_PASSWORD=changeme - -bin/kc.sh start-dev -``` -⚙️ **To Update Keycloak** - -```yaml -working On -``` -___________________________________________________________________________________________ - -
- -
- Mikrotik RouterOS VM - -

- -

Mikrotik RouterOS VM

- -[Mikrotik RouterOS](https://wiki.mikrotik.com/wiki/Manual:TOC) can be installed on a PC and will turn it into a router with all the necessary features - routing, firewall, bandwidth management, wireless access point, backhaul link, hotspot gateway, VPN server and more. - -To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/mikrotik-routeros-v4.sh)" -``` -Setup is done via VM console. - -

⚡ Default Settings: 1GB RAM - 2GB Storage - 1CPU ⚡

- - -____________________________________________________________________________________________ - -
- -
- Vaultwarden LXC - -

- -

Vaultwarden LXC

- -Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream [Bitwarden clients](https://bitwarden.com/download/), perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. - -To create a new Proxmox Vaultwarden LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden-v4.sh)" -``` -⚠️ Vaultwarden needs to be behind a proxy (Nginx Proxy Manager) to obtain HTTPS and to allow clients to connect. - -The script builds from source, which takes time and resources. After the build, the script will automatically set resources to Normal Settings. - -Expect 30+ minute install time. -

⚡ Build Settings: 2048Mib RAM - 6GB Storage - 2vCPU ⚡

-

⚡ Normal Settings: 512Mib RAM - 6GB Storage - 1vCPU ⚡

- -**Vaultwarden Interface: CTIP:8000** - -⚙️ **Path to Vaultwarden .env file** (to find the `ADMIN_TOKEN`) -```yaml -/opt/vaultwarden/.env -``` - -⚙️ **To Update Vaultwarden (post 2022-05-29 installs only)** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/vaultwarden-update.sh)" -``` -⚙️ **To Update Web-vault (any)** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/web-vault-update.sh)" -``` - -____________________________________________________________________________________________ - -
From fcb6baf8d45d68de2fc86c84bdfd370a33ed2d4d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 05:38:27 -0400 Subject: [PATCH 0490/3335] Delete README_NEW.md --- README_NEW.md | 2642 ------------------------------------------------- 1 file changed, 2642 deletions(-) delete mode 100644 README_NEW.md diff --git a/README_NEW.md b/README_NEW.md deleted file mode 100644 index c6cff4fe..00000000 --- a/README_NEW.md +++ /dev/null @@ -1,2642 +0,0 @@ -

Select a Proxmox Helper

- -

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

- - -
- Proxmox Tools -⬇__________________________________________________________________________________________ -
- Proxmox VE 7 Post Install - -

- -

Proxmox VE 7 Post Install

- -The script will give options to Disable the Enterprise Repo, Add/Correct PVE7 Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox VE and Reboot PVE. - -Run the following in the Proxmox Shell. ⚠️ **PVE7 ONLY** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)" -``` - -It's recommended to answer `y` to all options. - -____________________________________________________________________________________________ - -
- -
- Proxmox Kernel Clean - -

- -

Proxmox Kernel Clean

- -Cleaning unused kernel images is not only good because of a reduced grub menu, but also gains some disk space. - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox Edge Kernel Tool - -

- -

Proxmox Edge Kernel Tool

- -Proxmox [Edge Kernels](https://github.com/fabianishere/pve-edge-kernel) are custom Linux Kernels for Proxmox VE 7. Keeping up with new Kernel releases instead of LTS - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox CPU Scaling Governor - -

- -

Proxmox CPU Scaling Governor

- -CPU Scaling Governor enables the operating system to scale the CPU frequency up or down in order to save power or improve performance. - -[Generic Scaling Governors](https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html?#generic-scaling-governors) - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/scaling-governor.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox LXC Updater - -

- -

Proxmox LXC Updater

- -Update All LXC's Fast & Easy - -Run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Proxmox Dark Theme - -

- -

Proxmox Discord Dark Theme

- -A dark theme for the Proxmox Web UI by [Weilbyte](https://github.com/Weilbyte/PVEDiscordDark) - -Run the following in the Proxmox Shell. - -```yaml -bash <(curl -s https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh ) install -``` - -To uninstall the theme, simply run the script with the `uninstall` command. - -____________________________________________________________________________________________ - -
- -
- Proxmox Backup Server Post Install - -

- -

Proxmox Backup Server Post Install

- -The script will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS. - -Run the following in the Proxmox Shell. ⚠️ **Proxmox Backup Server ONLY** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pbs-install.sh)" -``` - -It's recommended to answer `y` to all options. - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Home Assistant -⬇__________________________________________________________________________________________ - -
- Home Assistant OS VM - -

- -

Home Assistant OS VM

-

Option to create VM using Stable, Beta, Dev or Latest Image

- -The script automates the manual process of finding, downloading and extracting the Official KVM (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. No hidden (kpartx, unzip, ect...) installs of any kind. Supports lvmthin, zfspool, nfs, dir and btrfs storage types. - -To create a new Proxmox Home Assistant OS VM, run the following in the Proxmox Shell - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v4.sh)" -``` -

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

- -After the script completes, click on the VM, then on the **_Summary_** tab to find the VM IP. - -**Home Assistant Interface - IP:8123** - -____________________________________________________________________________________________ - -
- -
- PiMox HAOS VM - -

- -

PiMox HAOS VM

-

Option to create VM using Stable, Beta or Dev Image

- -The script automates the manual process of finding, downloading and extracting the aarch64 (qcow2) disk image provided by the Home Assistant Team, creating a VM with user defined settings, importing and attaching the disk, setting the boot order and starting the VM. - -To create a new PiMox HAOS VM, run the following in the Proxmox Shell - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/pimox-haos-vm-v4.sh)" -``` -

⚡ Default Settings: 4GB RAM - 32GB Storage - 2vCPU - Stable Image⚡

- -After the script completes, click on the VM Console to find the Home Assistant IP. - -**Home Assistant Interface - IP:8123** - -____________________________________________________________________________________________ - -
- -
- Home Assistant Container LXC - -

Docker Logos | Docker -@home-assistantGitHub - portainer/portainer-docs: Portainer documentation

- -

Home Assistant Container LXC

- -A standalone container-based installation of Home Assistant Core - -🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* - -To create a new Proxmox Home Assistant Container LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

- -**Home Assistant Interface - IP:8123** - -**Portainer Interface - IP:9000** - -⚙️ **Path to HA /config** -```yaml -/var/lib/docker/volumes/hass_config/_data - ``` -⚙️ **To Edit the HA configuration.yaml** (Recommend Using File Browser) - -Run in the LXC console -```yaml -nano /var/lib/docker/volumes/hass_config/_data/configuration.yaml -``` -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -⚙️ **Copy Data From a Existing Home Assistant LXC to another Home Assistant LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data.sh)" - ``` - -⚙️ **To Install HACS:** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs.sh)" -``` -After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. - - -⚙️ [**Update Menu**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/update-menu.png) - -Run in the LXC console -```yaml -./update -``` -____________________________________________________________________________________________ -
- -
- Home Assistant Core LXC - -

- -

Home Assistant Core LXC

- -A standalone installation of Home Assistant Core - -🛈 *If the LXC is created Privileged, the script will automatically set up USB passthrough.* - -To create a new Proxmox Home Assistant Core LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-core-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 8GB Storage - 2vCPU ⚡

- -⚠️ Initialize Home Assistant-Core (Only required once) - -Run in the LXC console -```yaml -cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass -``` - -***Home Assistant Interface - IP:8123*** - -⚙️ **Edit the HA configuration.yaml** - -Run in the LXC console -```yaml -nano .homeassistant/configuration.yaml -``` -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -⚙️ **Install HACS:** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hacs-core.sh)" -``` -After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. - -⚙️ **Update Home Assistant** - -Run in the LXC console -```yaml -systemctl stop homeassistant.service && source /srv/homeassistant/bin/activate && pip3 install --upgrade homeassistant && systemctl start homeassistant.service && exit -``` -____________________________________________________________________________________________ -
- -
- Podman Home Assistant Container LXC - -

-@home-assistant

- -

Podman Home Assistant Container LXC

-A standalone container-based installation of Home Assistant Core - -⚠️ Podman seems to need a privileged LXC - -To create a new Proxmox Podman Home Assistant Container LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/podman-homeassistant-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 16GB Storage - 2vCPU ⚡

- -**Home Assistant Interface - IP:8123** - -**Yacht Interface - IP:8000** - -⚙️ **Path to HA /config** -```yaml -/var/lib/containers/storage/volumes/hass_config/_data - ``` -⚙️ **To edit the HA configuration.yaml** - -Run in the LXC console -```yaml -nano /var/lib/containers/storage/volumes/hass_config/_data/configuration.yaml -``` -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -⚙️ **Copy Data From a Existing Home Assistant LXC to a Podman Home Assistant LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/ha-copy-data-podman.sh)" - ``` - -⚙️ **To allow USB device passthrough:** - -Run in the Proxmox Shell. (**replace `106` with your LXC ID**) -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/usb-passthrough.sh)" -s 106 -``` - -Reboot the LXC to apply the changes - -⚙️ **To Install HACS:** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/podman_hacs.sh)" -``` -After install, reboot Home Assistant and **clear browser cache** then Add HACS integration. - -⚙️ **Initial Yacht Login** - -**username** - ```yaml - admin@yacht.local - ``` - **password** - ```yaml - pass - ``` - -____________________________________________________________________________________________ -
-⬆__________________________________________________________________________________________ -
- -
- Automation -⬇__________________________________________________________________________________________ - -
- ioBroker LXC - -

- -

ioBroker LXC

- -[ioBroker](https://www.iobroker.net/#en/intro) is an open source automation platform. - -To create a new Proxmox ioBroker LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/iobroker-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**ioBroker Interface - IP:8081** - -⚙️ **To Update ioBroker** - -```yaml -update from the ioBroker UI -``` - -____________________________________________________________________________________________ - -
- -
- openHAB LXC - -

- -

openHAB LXC

- -[openHAB](https://www.openhab.org/), a vendor and technology agnostic open source automation software for your home. - -To create a new Proxmox openHAB LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/openhab-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**openHAB Interface - IP:8080** - -⚙️ **To Update openHAB** - -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Homebridge LXC - -

- -

Homebridge LXC

- -[Homebridge](https://homebridge.io/) allows you to integrate with smart home devices that do not natively support HomeKit - -To create a new Proxmox Homebridge LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homebridge-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -**Homebridge Interface - IP:8581** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` -Config File Path `/var/lib/homebridge/config.json` - -Storage Path `/var/lib/homebridge` - -Restart Command `sudo hb-service restart` - -Stop Command `sudo hb-service stop` - -Start Command `sudo hb-service start` - -View Logs Command `sudo hb-service logs` - -Systemd Service File `/etc/systemd/system/homebridge.service` - -Systemd Env File `/etc/default/homebridge` - -⚙️ **To Update Homebridge** - -```yaml -Update from the Homebridge UI -``` - - ___________________________________________________________________________________________ - -
- - - -
- ESPHome LXC - -

- -

ESPHome LXC

- -[ESPHome](https://esphome.io/) is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. - -To create a new Proxmox ESPHome LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/esphome-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**ESPHome Interface - IP:6052** - -⚙️ **To Update ESPHome** - -Run in the LXC console -```yaml -pip3 install esphome --upgrade -``` - -____________________________________________________________________________________________ - -
- -
- Node-Red LXC - -

- -

Node-Red LXC

- -[Node-RED](https://nodered.org/) is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. - -To create a new Proxmox Node-RED LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/node-red-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -**Node-Red Interface - IP:1880** - -⚙️ **To Restart Node-Red:** - -Run in the LXC console -```yaml -systemctl restart nodered -``` - -⚙️ **To Update Node-Red:** - -Run in the LXC console (Restart after update) -```yaml -npm install -g --unsafe-perm node-red -``` - -⚙️ **To Install Node-Red Themes** ⚠️ **Backup your flows before running this script!!** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/node-red-themes.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- n8n LXC - -

- -

n8n LXC

- -[n8n](https://n8n.io/) is an extendable workflow automation tool which enables you to connect anything to everything. - -To create a new Proxmox n8n LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/n8n-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

- -**n8n Interface: IP:5678** - -⚙️ **To Update n8n** - -```yaml -npm update -g n8n -``` - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- MQTT -⬇__________________________________________________________________________________________ - -
- MQTT LXC - -

- -

MQTT LXC

- -[Eclipse Mosquitto](https://mosquitto.org/) is an open source message broker that implements the MQTT protocol - -To create a new Proxmox MQTT LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mqtt-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -Mosquitto comes with a password file generating utility called mosquitto_passwd. -```yaml -sudo mosquitto_passwd -c /etc/mosquitto/passwd -``` -Password: < password > - -Create a configuration file for Mosquitto pointing to the password file we have just created. -```yaml -sudo nano /etc/mosquitto/conf.d/default.conf -``` -This will open an empty file. Paste the following into it. -```yaml -allow_anonymous false -persistence true -password_file /etc/mosquitto/passwd -listener 1883 -``` -Save and exit the text editor with "Ctrl+O", "Enter" and "Ctrl+X". - -Now restart Mosquitto server. -```yaml -sudo systemctl restart mosquitto -``` - -⚙️ **To Update MQTT:** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- EMQX LXC - -

- - -

EMQX LXC

- -[EMQX](https://www.emqx.io/) is an Open-source MQTT broker with a high-performance real-time message processing engine, powering event streaming for IoT devices at massive scale. - -To create a new Proxmox EMQX LXC, run the following in the Proxmox Shell. - -```yaml - bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emqx-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- - -**EMQX Interface - IP:18083** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - public - ``` -⚙️ **Setup** - -Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker. - -⚙️ **To Update EMQX** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - - ____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- - -
- Database -⬇__________________________________________________________________________________________ - -
- Mariadb LXC - -

MariaDB

- -

Mariadb LXC

-

Option to Install Adminer

- -[MariaDB](https://mariadb.org/) is a community-developed, commercially supported fork of the MySQL relational database management system. - -To create a new Proxmox Mariadb LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mariadb-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -To enable MariaDB to listen to remote connections, you need to edit your defaults file. To do this, open the console in your MariaDB lxc: -```yaml -nano /etc/mysql/my.cnf -``` -Un-comment `port =3306` -Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". - -```yaml -nano /etc/mysql/mariadb.conf.d/50-server.cnf -``` -Comment `bind-address = 127.0.0.1` -Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". - -For new MariaDB installations, the next step is to run the included security script. This script changes some of the less secure default options. We will use it to block remote root logins and to remove unused database users. - -Run the security script: -```yaml -sudo mysql_secure_installation -``` -Enter current password for root (enter for none): `enter` - -Switch to unix_socket authentication [Y/n] `y` - -Change the root password? [Y/n] `n` - -Remove anonymous users? [Y/n] `y` - -Disallow root login remotely? [Y/n] `y` - -Remove test database and access to it? [Y/n] `y` - -Reload privilege tables now? [Y/n] `y` - -We will create a new account called admin with the same capabilities as the root account, but configured for password authentication. -```yaml -sudo mysql -``` -Prompt will change to ```MariaDB [(none)]>``` - -Create a new local admin (Change the username and password to match your preferences) -```yaml -CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password'; -``` -Give local admin root privileges (Change the username and password to match above) -```yaml -GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; -``` - -Now, we'll give the user admin root privileges and password-based access that can connect from anywhere on your local area network (LAN), which has addresses in the subnet 192.168.100.0/24. This is an improvement because opening a MariaDB server up to the Internet and granting access to all hosts is bad practice.. Change the **_username_**, **_password_** and **_subnet_** to match your preferences: -```yaml -GRANT ALL ON *.* TO 'admin'@'192.168.100.%' IDENTIFIED BY 'password' WITH GRANT OPTION; -``` -Flush the privileges to ensure that they are saved and available in the current session: -```yaml -FLUSH PRIVILEGES; -``` -Following this, exit the MariaDB shell: -```yaml -exit -``` -Log in as the new database user you just created: -```yaml -mysql -u admin -p -``` -Create a new database: -```yaml -CREATE DATABASE homeassistant; -``` -Following this, exit the MariaDB shell: -```yaml -exit -``` -⚠️ Reboot the lxc - -Checking status. -```yaml -sudo systemctl status mariadb -``` -Change the recorder: `db_url:` in your HA configuration.yaml - -Example: -```yaml -recorder: - db_url: mysql://admin:password@192.168.100.26:3306/homeassistant?charset=utf8mb4 -``` - -⚙️ **To Update Mariadb:** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool - - `http://your-mariadb-lxc-ip/adminer/` - -____________________________________________________________________________________________ - -
- -
- PostgreSQL LXC - -

- -

PostgreSQL LXC

-

Option to Install Adminer

- -[PostgreSQL](https://www.postgresql.org/), also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance. - -To create a new Proxmox PostgreSQL LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/postgresql-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -To make sure our PostgreSQL is secured with a strong password, set a password for its system user and then change the default database admin user account - -Change user password -```yaml -passwd postgres -``` -Login using Postgres system account - -```yaml -su - postgres -``` -Now, change the Admin database password -```yaml -psql -c "ALTER USER postgres WITH PASSWORD 'your-password';" -``` -Create a new user. -```yaml -psql -``` -```yaml -CREATE USER admin WITH PASSWORD 'your-password'; -``` -Create a new database: -```yaml -CREATE DATABASE homeassistant; -``` -Grant all rights or privileges on created database to the user -```yaml -GRANT ALL ON DATABASE homeassistant TO admin; -``` -To exit psql -```yaml -\q -``` -Then type exit to get back to root - -Change the recorder: `db_url:` in your HA configuration.yaml - -Example: -```yaml -recorder: - db_url: postgresql://admin:your-password@192.168.100.20:5432/homeassistant?client_encoding=utf8 -``` -⚙️ **To Update PostgreSQL** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -⚙️ [**Adminer**](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/adminer.png) (formerly phpMinAdmin) is a full-featured database management tool - - `http://your-PostgreSQL-lxc-ip/adminer/` - -____________________________________________________________________________________________ - -
- -
- InfluxDB LXC - -

- -

InfluxDB LXC

- -

Options to Install InfluxDB v1 or v2 and Telegraf

- -[InfluxDB](https://www.influxdata.com/) is an open-source time series database developed by the company InfluxData. - -[Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) is an open source plugin-driven server agent for collecting and reporting metrics. - -To create a new Proxmox InfluxDB LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/influxdb-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -⚙️ **InfluxDB Configuration** - -Run in the LXC console -```yaml -nano /etc/influxdb/influxdb.conf -``` - -⚙️ **Telegraf Configuration** - -Run in the LXC console -```yaml -nano /etc/telegraf/telegraf.conf -``` - -⚙️ **To Update InfluxDB/Telegraf** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Zigbee - Zwave -⬇__________________________________________________________________________________________ - -
- Zigbee2MQTT LXC - -

- - -

Zigbee2MQTT LXC

- -

Option to switch to Edge/dev branch

- -[Zigbee2MQTT](https://www.zigbee2mqtt.io/) is a standalone nodejs application that connects a zigbee network to MQTT - -To create a new Proxmox Zigbee2MQTT LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- - -⚙️ **Determine the location of your adapter** - -Run in the LXC console -```yaml -ls -l /dev/serial/by-id -``` -Example Output: ```lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0``` - - -⚙️ ⚠️ **Before you start Zigbee2MQTT you need to edit the [configuration.yaml](https://www.zigbee2mqtt.io/guide/configuration/)** - -Run in the LXC console -```yaml -nano /opt/zigbee2mqtt/data/configuration.yaml -``` - -Save and exit the editor with “Ctrl+O”, “Enter” and “Ctrl+X” - -Example: -```yaml -frontend: - port: 9442 -homeassistant: true -permit_join: false -mqtt: - base_topic: zigbee2mqtt - server: 'mqtt://192.168.86.224:1883' - user: usr - password: pwd - keepalive: 60 - reject_unauthorized: true - version: 4 -serial: - port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 - #adapter: deconz #(uncomment for ConBee II) -advanced: - pan_id: GENERATE - network_key: GENERATE - channel: 20 -``` -⚙️ **Zigbee2MQTT can be started after completing the configuration** - -Run in the LXC console -```yaml -cd /opt/zigbee2mqtt && npm start -``` -⚙️ **To update Zigbee2MQTT** - -Run in the LXC console - ```yaml -cd /opt/zigbee2mqtt && bash update.sh - ``` -⚙️ **Copy Data From a Existing Zigbee2MQTT LXC to another Zigbee2MQTT LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/z2m-copy-data.sh)" - ``` - -____________________________________________________________________________________________ - -
- -
- deCONZ LXC - -

- -

deCONZ LXC

- -[deCONZ](https://www.phoscon.de/en/conbee2/software#deconz) is used to configure, control and display Zigbee networks. - -To create a new Proxmox deCONZ LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/deconz-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**deCONZ Interface - IP:80** - -⚙️ **To Update deCONZ** - -Run in the LXC Console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Z-Wave JS UI LXC - -

- -

Z-Wave JS UI LXC

- -[Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui#) is a fully configurable Z-Wave to MQTT Gateway and Control Panel. - -To create a new Proxmox Z-Wave JS UI LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zwave-js-ui-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**Z-Wave JS UI Interface - IP:8091** - -⚙️ **Copy Data From a Existing Zwavejs2MQTT LXC to a Z-Wave JS UI LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-copy-data.sh)" - ``` -⚙️ **To Update Z-Wave JS UI** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/zwave-js-ui-update.sh)" -``` - -____________________________________________________________________________________________ -
-⬆__________________________________________________________________________________________ -
- -
- Monitoring - Analytics -⬇__________________________________________________________________________________________ - -
- Uptime Kuma LXC - -

- -

Uptime Kuma LXC

- -Uptime Kuma is a self-hosted, open source, fancy uptime monitoring and alerting system. It can monitor HTTP(s) / TCP / HTTP(s) Keyword / Ping / DNS Record / Push / Steam Game Server. - -To create a new Proxmox Uptime Kuma LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/uptimekuma-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 2GB Storage - 1vCPU ⚡

- -**Uptime Kuma Interface - IP:3001** - -⚙️ **To Update Uptime Kuma** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/uptimekuma-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Prometheus LXC - -

- -

Prometheus LXC

- -[Prometheus](https://prometheus.io/) is an open-source systems monitoring and alerting toolkit - -To create a new Proxmox Prometheus LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/prometheus-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 4GB Storage - 1vCPU ⚡

- -**Prometheus Interface - IP:9090** - -⚙️ **To Update Prometheus** - -```yaml -Working On -``` - -____________________________________________________________________________________________ - -
- - -
- Grafana LXC - -

- -

Grafana LXC

- -[Grafana](https://grafana.com/) is a multi-platform open source analytics and interactive visualization web application. - -To create a new Proxmox Grafana LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grafana-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Grafana Interface - IP:3000** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` - -⚙️ **To Update Grafana** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Docker -⬇__________________________________________________________________________________________ - -
- Docker LXC - -

- -

Docker LXC

-

Options to Install Portainer and/or Docker Compose V2

- -[Docker](https://www.docker.com/) is an open-source project for automating the deployment of applications as portable, self-sufficient containers. - -To create a new Proxmox Docker LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 4GB Storage - 2vCPU ⚡

- -**⚠ Run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.** - -**Portainer Interface - IP:9000** - -⚙️ **To Update** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Umbrel LXC - -

- -

Umbrel LXC

- -[Umbrel](https://umbrel.com/) is a beautiful personal server OS for self-hosting. - - -To create a new Proxmox Umbrel LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/umbrel-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Umbrel Interface - IP** - -⚙️ **To Update Umbrel** - -```yaml -update from the Umbrel UI -``` - -____________________________________________________________________________________________ - -
- -
- CasaOS LXC - -

- -

CasaOS LXC

- -[CasaOS](https://www.casaos.io/) is a community-based open source software focused on delivering simple home cloud experience around Docker ecosystem. - - -To create a new Proxmox CasaOS LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/casaos-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**CasaOS Interface - IP** - -⚙️ **To Update CasaOS** - -```yaml -update from the CasaOS UI -``` - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- OS -⬇__________________________________________________________________________________________ - -
- Debian LXC - -

Debian

- -

Debian LXC

-

Option to select version 10 or 11

- -To create a new Proxmox Debian (curl & sudo) LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/debian-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -⚙️ **To Update Debian** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- - -
- Ubuntu LXC - -

Ubuntu

- -

Ubuntu LXC

-

Option to select version 18.04, 20.04, 21.10 or 22.04

- -To create a new Proxmox Ubuntu (curl & sudo) LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU - 22.04 ⚡

- -⚙️ **To Update Ubuntu** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Server - Networking -⬇__________________________________________________________________________________________ - -
- Nginx Proxy Manager LXC - -

hero

- - -

Nginx Proxy Manager LXC

- -[Nginx Proxy Manager](https://nginxproxymanager.com/) Expose your services easily and securely - -To create a new Proxmox Nginx Proxy Manager LXC Container, run the following in the Proxmox Shell. - -```yaml - bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nginx-proxy-manager-v4.sh)" -``` -

⚡ Default Settings: 1GB RAM - 3GB Storage - 1vCPU ⚡

- -____________________________________________________________________________________ - -Forward port `80` and `443` from your router to your Nginx Proxy Manager LXC IP. - -Add the following to your `configuration.yaml` in Home Assistant. -```yaml - http: - use_x_forwarded_for: true - trusted_proxies: - - 192.168.100.27 ###(Nginx Proxy Manager LXC IP)### -``` - -**Nginx Proxy Manager Interface - IP:81** - -⚙️ **Initial Login** - -**username** - ```yaml - admin@example.com - ``` - **password** - ```yaml - changeme - ``` -⚙️ **To Update Nginx Proxy Manager** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/npm_update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- UniFi Network Application LXC - -

- -

UniFi Network Application LXC

- -

With Local Controller Option

- -An application designed to optimize UniFi home and business networks with ease. - -To create a new Proxmox UniFi Network Application LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/unifi-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**UniFi Interface - https:// IP:8443** - -⚙️ **To Update UniFi** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/unifi-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Omada Controller LXC - -

- -

Omada Controller LXC

- -Omada Controller is software which is used to manage the EAP - -To create a new Proxmox Omada Controller LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omada-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Omada Interface - https:// IP:8043** - -`tpeap status` show status of Omada Controller - -`tpeap start` start Omada Controller - -`tpeap stop` stop Omada Controller - -⚙️ **To Update Omada** - -[#403](https://github.com/tteck/Proxmox/issues/402#issue-1328460983) - -____________________________________________________________________________________________ - -
- -
- WireGuard LXC - -

- -

WireGuard LXC

-

With WGDashboard

- -To create a new Proxmox WireGuard LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wireguard-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**WGDashboard Interface - http:// IP:10086** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` - -⚙️ **Host Configuration** - -Run in the LXC console - ```yaml - nano /etc/pivpn/wireguard/setupVars.conf - ``` - ⚙️**Add Clients** - - Run in the LXC console - ```yaml - pivpn add - ``` -⚙️ **To Update WireGuard** - -Run in the LXC console - ```yaml -apt update && apt upgrade -y -``` -____________________________________________________________________________________________ - -
- - -
- MeshCentral LXC - -

- -

MeshCentral LXC

- -[MeshCentral](https://meshcentral.com/info/) is a full computer management web site. With MeshCentral, you can run your own web server to remotely manage and control computers on a local network or anywhere on the internet. - -To create a new Proxmox MeshCentral LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/meshcentral-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**MeshCentral Interface - http:// IP** - -⚙️ **To Update MeshCentral** - -```yaml -Update from the MeshCentral UI -``` -____________________________________________________________________________________________ - -
- -
- Tailscale - -

- -

Tailscale

- -[Tailscale](https://tailscale.com/) Creates a secure network between your servers, computers, and cloud instances. Even when separated by firewalls or subnets, Tailscale just works. - -To Install Talescale on an existing LXC, run the following in the Proxmox Shell (replace `106` with your LXC ID). - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/add-tailscale-lxc.sh)" -s 106 -``` -After the script finishes, reboot the LXC then run `tailscale up` in the LXC console - -[**Tailscale Login**](https://login.tailscale.com/start) - -⚙️ **To Update Tailscale** - -Run in the LXC console - ```yaml -apt update && apt upgrade -y -``` - -___________________________________________________________________________________________ - -
- -
- CrowdSec - -

- -

CrowdSec

- -To Install CrowdSec, ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/crowdsec.sh)" -``` - -[CrowdSec](https://crowdsec.net/) is a free, open-source and collaborative IPS. Analyze behaviors, respond to attacks & share signals across the community. - -[**Control center for your CrowdSec machines.**](https://app.crowdsec.net/product-tour) - -___________________________________________________________________________________________ - -
- -
- Keycloak LXC - -

- -

Keycloak LXC

- -To create a new Proxmox Keycloak LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak-v4.sh)" -``` - -[Keycloak](https://www.keycloak.org/) is an Open Source Identity and Access Management solution for modern Applications and Services. - -**Keycloak Interface - http:// IP:8080** (First start can take a few minutes) - -⚙️ **Initial Login** - -The initial admin user can be added manually using the web frontend when accessed from localhost or automatically using environment variables. - -To add the initial admin user using environment variables, set `KEYCLOAK_ADMIN` for the initial admin username and `KEYCLOAK_ADMIN_PASSWORD` for the initial admin password. - -First, stop Keycloak -```yaml -systemctl stop keycloak.service -``` -then start Keycloak by coping & pasting the following (only needed once) -```yaml -cd /opt/keycloak -export KEYCLOAK_ADMIN=admin -export KEYCLOAK_ADMIN_PASSWORD=changeme - -bin/kc.sh start-dev -``` -⚙️ **To Update Keycloak** - -```yaml -working On -``` -___________________________________________________________________________________________ - -
- -
- Mikrotik RouterOS VM - -

- -

Mikrotik RouterOS VM

- -[Mikrotik RouterOS](https://wiki.mikrotik.com/wiki/Manual:TOC) can be installed on a PC and will turn it into a router with all the necessary features - routing, firewall, bandwidth management, wireless access point, backhaul link, hotspot gateway, VPN server and more. - -To create a new Proxmox Mikrotik RouterOS VM, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/mikrotik-routeros-v4.sh)" -``` -Setup is done via VM console. - -

⚡ Default Settings: 1GB RAM - 2GB Storage - 1CPU ⚡

- - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Media - Photo -⬇__________________________________________________________________________________________ - -
- Plex Media Server LXC - -

- -

Plex Media Server LXC

-

With Hardware Acceleration Support

-To create a new Proxmox Plex Media Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Plex Media Server Interface - IP:32400/web** - -⚙️ **To Update Plex Media Server:** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -⚙️ **Copy Data From a Existing Plex Media Server LXC to another Plex Media Server LXC** - -Run in the Proxmox Shell -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/pms-copy-data.sh)" - ``` - -____________________________________________________________________________________________ - -
- -
- Emby Media Server LXC -

-

Emby Media Server LXC

- -[Emby](https://emby.media/) brings together your personal videos, music, photos, and live television. - -To create a new Proxmox Emby Media Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/emby-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Emby Media Server Interface - IP:8096** - -⚙️ **To Update Emby** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/emby-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- Jellyfin Media Server LXC -

-

Jellyfin Media Server LXC

- -[TurnKey has a LXC CT for Jellyfin](https://www.turnkeylinux.org/mediaserver) - -To create a new Proxmox Jellyfin Media Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/jellyfin-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**Jellyfin Media Server Interface - IP:8096** - -FFmpeg path: `/usr/lib/jellyfin-ffmpeg/ffmpeg` - -⚙️ **To Update Jellyfin Media Server** - -Run in the LXC console -```yaml -apt update && apt upgrade -y -``` -____________________________________________________________________________________________ - -
- -
- NextCloudPi LXC - -

- -

NextCloudPi LXC

- -[NextCloudPi LXC](https://github.com/nextcloud/nextcloudpi#features) is the most popular self-hosted collaboration solution. - -To create a new Proxmox NextCloudPi LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nextcloudpi-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -❗1️. Set nc trusted domains - -Run in the LXC console -``` -sudo ncp-config -``` -Go to config ➡ nc-trusted-domains, add `0.0.0.0` or a static NextCloudPi IP - -Get back to the command prompt, and restart Apache2 `sudo service apache2 restart` - -❗2. **NextCloudPi Interface - https:// IP/** - -____________________________________________________________________________________________ - -
- -
- OpenMediaVault LXC - -

- -

OpenMediaVault LXC

- -[OpenMediaVault](https://www.openmediavault.org/) is the next generation network attached storage (NAS) solution based on Debian Linux. - -To create a new Proxmox OpenMediaVault LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/omv-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -**OpenMediaVault Interface - IP** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - openmediavault - ``` - -____________________________________________________________________________________________ - -
- -
- Navidrome LXC - -

- -

Navidrome LXC

- -[Navidrome](https://www.navidrome.org/) allows you to enjoy your music collection from anywhere, by making it available through a modern Web UI and through a wide range of third-party compatible mobile apps, for both iOS and Android devices. - -To create a new Proxmox Navidrome LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/navidrome-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 2vCPU ⚡

- -To change Navidrome music folder path, edit: `/var/lib/navidrome/navidrome.toml` - -**Navidrome Interface - IP:4533** - -⚙️ **To Update Navidrome** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/navidrome-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- PhotoPrism LXC - -

- -

PhotoPrism LXC

- -[PhotoPrism](https://photoprism.app/) is an AI-powered app for browsing, organizing & sharing your photo collection. - -To create a new Proxmox PhotoPrism LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v4.sh)" -``` -The script builds from source, which takes time and resources. After the build, the script will automatically set resources to Normal Settings. -

⚡ Build Settings: 3GB RAM - 8GB Storage - 2vCPU ⚡

-

⚡ Normal Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**PhotoPrism Interface - IP:2342** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - changeme - ``` -[PhotoSync](https://www.photosync-app.com/home.html) - -⚙️ **To Update or Change Branch** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/photoprism-update.sh)" -``` -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Ad Blocker - DNS -⬇__________________________________________________________________________________________ - -
- Pi-hole LXC - -

- -

Pi-hole LXC

- -[Pi-hole](https://pi-hole.net/) is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server. - -To create a new Proxmox Pi-hole LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pihole-v4.sh)" -``` -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -⚠️ **Reboot Pi-hole LXC after install** - -**Pi-hole Interface - http:// IP/admin** - -⚙️ **To set your password:** - -Run in the LXC console - -```yaml -pihole -a -p -``` -____________________________________________________________________________________________ - -
- -
- Technitium DNS LXC - -

- -

Technitium DNS LXC

-An open source authoritative as well as recursive DNS server - -To create a new Proxmox Technitium DNS LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/technitiumdns-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Technitium DNS Interface - IP:5380** - -⚙️ **To Update Technitium DNS** - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/technitiumdns-update.sh)" -``` -__________________________________________________________________________________________ - -
- - -
- AdGuard Home LXC - -

- -

AdGuard Home LXC

- -To create a new Proxmox AdGuard Home LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/adguard-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**AdGuard Home Setup Interface - IP:3000 (After Setup use only IP)** - - (For the Home Assistant Integration, use port `80` not `3000`) - -⚙️ **To Update Adguard** - -```yaml -Update from the Adguard UI -``` -__________________________________________________________________________________________ - -
- -
- Blocky LXC - -

- -

Blocky LXC

- -[Blocky](https://0xerr0r.github.io/blocky/) is a DNS proxy and ad-blocker for the local network written in Go. 🚨 For Advanced Users. No UI. - -To create a new Proxmox Blocky LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/blocky-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- - -⚙️ **Blocky Config Path** - -```yaml -/opt/blocky/config.yml -``` -__________________________________________________________________________________________ - -
- -⬆__________________________________________________________________________________________ -
- -
- Document - Notes -⬇__________________________________________________________________________________________ - -
- Paperless-ngx LXC - -

- -

Paperless-ngx LXC

- -[Paperless-ngx](https://paperless-ngx.readthedocs.io/en/latest/#) is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper. - -To create a new Proxmox Paperless-ngx LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/paperless-ngx-v4.sh)" -``` - -

⚡ Default Settings: 2048MiB RAM - 4GB Storage - 2vCPU ⚡

- -**Paperless-ngx Interface - IP:8000** - -🛈 A paperless.creds file is in root home directory that contains the usernames and passwords. - -Run in the LXC Console -```yaml -cat paperless.creds -``` - -⚙️ **To Update Paperless-ngx** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/paperless-ngx-update.sh)" -``` -____________________________________________________________________________________________ - -
- -
- Trilium LXC - -

- -

Trilium LXC

- -[Trilium](https://github.com/zadam/trilium#trilium-notes) is a hierarchical note taking application with focus on building large personal knowledge bases. - -To create a new Proxmox Trilium LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/trilium-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Trilium Interface - IP:8080** - -⚙️ **To Update Trilium** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/trilium-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- Wiki.js LXC - -

- -

Wiki.js LXC

- -[Wiki.js](https://js.wiki/) is a modern, lightweight and powerful wiki app built on NodeJS. - -To create a new Proxmox Wiki.js LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/wikijs-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Wiki.js Interface - IP:3000** - -____________________________________________________________________________________________ - -
- -
- NocoDB LXC - -

- -

NocoDB LXC

- -[NocoDB](https://www.nocodb.com/) is an open source #NoCode platform that turns any database into a smart spreadsheet. Airtable Alternative. - -To create a new Proxmox NocoDB LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nocodb-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

- -**NocoDB Interface - IP:8080/dashboard** - -⚙️ **To Update NocoDB** - -Run in the LXC console -```yaml -cd /opt/nocodb && npm run upgrade -``` - -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- -
- Dashboards -⬇__________________________________________________________________________________________ - -
- Heimdall Dashboard LXC - -

- -

Heimdall Dashboard LXC

- -[Heimdall Application Dashboard](https://camo.githubusercontent.com/bcfd4f74c93b25bea7b14eacbafd649206bf754a3d4b596329968f0ee569cf3c/68747470733a2f2f692e696d6775722e636f6d2f4d72433451704e2e676966) is a dashboard for all your web applications. It doesn't need to be limited to applications though, you can add links to anything you like. - -To create a new Proxmox Heimdall Dashboard LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/heimdalldashboard-v4.sh)" -``` -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Heimdall Dashboard Interface - IP:7990** - -⚙️ **To Update Heimdall Dashboard** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/heimdalldashboard-all-update.sh)" -``` - -__________________________________________________________________________________________ - -
- -
- Homepage LXC - -

- -

Homepage LXC

- -[Homepage](https://github.com/benphelps/homepage) is a self-hosted dashboard. - -To create a new Proxmox Homepage LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homepage-v4.sh)" -``` - -

⚡ Default Settings: 1GB RAM - 3GB Storage - 2vCPU ⚡

- -[Configuration](https://github.com/benphelps/homepage/wiki) (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/` - -**Homepage Interface - IP:3000** - -⚙️ **To Update Homepage** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/homepage-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- Dashy LXC - -

- -

Dashy LXC

- -Dashy helps you organize your self-hosted services by making them accessible from a single place - -To create a new Proxmox Dashy LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/dashy-v4.sh)" -``` -

⚡ Default Settings: 2GB RAM - 3GB Storage - 2vCPU ⚡

- -**Dashy Interface - IP:4000** - -After getting everything setup the way you want in interactive mode and saved to disk, you have to go into update configuration and rebuild application. - -⚙️ **To Update Dashy** - -Run in the LXC Console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/dashy-update.sh)" -``` - -__________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ -
- - -
- File - Code -⬇__________________________________________________________________________________________ -
- File Browser - -

- -

File Browser

- -To Install File Browser, ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/filebrowser.sh)" -``` - -[File Browser](https://filebrowser.org/features) is a create-your-own-cloud-kind of software where you can install it on a server, direct it to a path and then access your files through a nice web interface. Many available features! - - - -**File Browser Interface - http:// IP:8080** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - changeme - ``` - -⚙️ **To Update File Browser** - -```yaml -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash -``` -___________________________________________________________________________________________ - -
- -
- VS Code Server - -

- -

VS Code Server

- -To Install VS Code Server, ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/code-server.sh)" -``` - -[VS Code Server](https://code.visualstudio.com/docs/remote/vscode-server) is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH. - - - -**VS Code Server Interface - http:// IP:8680** - -___________________________________________________________________________________________ - -
- -
- Webmin System Administration - -

- -

Webmin System Administration

- -To Install Webmin System Administration [(Screenshot)](https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/file-manager.png), ⚠️ run the following in the LXC console. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/webmin.sh)" -``` - -If you prefer to manage all aspects of your Proxmox LXC from a graphical interface instead of the command line interface, Webmin might be right for you. - -Benefits include automatic daily security updates, backup and restore, file manager with editor, web control panel, and preconfigured system monitoring with optional email alerts. - - - -**Webmin Interface - https:// IP:10000 (https)** - -⚙️ **Initial Login** - -**username** - ```yaml - root - ``` - **password** - ```yaml - root - ``` - -⚙️ **To Update Webmin** - -```yaml -Update from the Webmin UI -``` -⚙️ **To Uninstall Webmin** - -Run in the LXC console -```yaml -bash /etc/webmin/uninstall.sh -``` -___________________________________________________________________________________________ - -
- -
- Syncthing LXC - -

- -

Syncthing LXC

- -[Syncthing](https://syncthing.net/) is a continuous file synchronization program. It synchronizes files between two or more computers. - -To create a new Proxmox Syncthing LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/syncthing-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -⚙️ For the initial start, run `syncthing --gui-address=0.0.0.0:8384` in the LXC console, then go to the LXC IP:8384 In settings set the LXC IP address under the GUI (also set the GUI Authentication User and GUI Authentication Password) and Connections tab's and save. Reboot the LXC. - -**Syncthing Interface - IP:8384** - -⚙️ **To Update Syncthing** - -```yaml -apt update && apt upgrade -y -``` - -____________________________________________________________________________________________ - -
- -
- Daemon Sync Server LXC - -

- -

Daemon Sync Server LXC

- -Sync files from app to server, share photos & videos, back up your data and stay secure inside local network. - -To create a new Proxmox Daemon Sync Server LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/daemonsync-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 8GB Storage - 1vCPU ⚡

- -**Daemon Sync Server Interface - IP:8084** - -Search: `DAEMON Sync` in your favorite app store - -__________________________________________________________________________________________ - -
-⬆________________________________________________________________________________________ - -
- -
- Misc. -⬇________________________________________________________________________________________ - -
- Vaultwarden LXC - -

- -

Vaultwarden LXC

- -Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream [Bitwarden clients](https://bitwarden.com/download/), perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. - -To create a new Proxmox Vaultwarden LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/vaultwarden-v4.sh)" -``` -⚠️ Vaultwarden needs to be behind a proxy (Nginx Proxy Manager) to obtain HTTPS and to allow clients to connect. - -The script builds from source, which takes time and resources. After the build, the script will automatically set resources to Normal Settings. - -Expect 30+ minute install time. -

⚡ Build Settings: 3072Mib RAM - 6GB Storage - 2vCPU ⚡

-

⚡ Normal Settings: 512Mib RAM - 6GB Storage - 1vCPU ⚡

- -**Vaultwarden Interface: IP:8000** - -**Vaultwarden Admin Interface: IP:8000/admin** - -⚙️ **Vaultwarden .env file** (to find the `ADMIN_TOKEN`) -```yaml -cat /opt/vaultwarden/.env -``` - -⚙️ **To Update Vaultwarden (post 2022-05-29 installs only)** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/vaultwarden-update.sh)" -``` -⚙️ **To Update Web-vault (any)** - -Run in the LXC console -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/web-vault-update.sh)" -``` - -____________________________________________________________________________________________ - -
- -
- grocy LXC - -

- -

grocy LXC

- -[grocy](https://grocy.info/) is a web-based self-hosted groceries & household management solution for your home. - -To create a new Proxmox grocy LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/grocy-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**grocy Interface: http:// IP** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - admin - ``` - -⚙️ **To Update grocy** - -Run in the LXC console - ```yaml -bash /var/www/html/update.sh -``` -____________________________________________________________________________________________ - -
- -
- MagicMirror Server LXC - -

- -

MagicMirror Server LXC

- -[MagicMirror²](https://docs.magicmirror.builders/) is an open source modular smart mirror platform. - -To create a new MagicMirror Server LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/magicmirror-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 3GB Storage - 1vCPU ⚡

- -**MagicMirror Interface - IP:8080** - -⚙️ **[Configuration](https://docs.magicmirror.builders/configuration/introduction.html#configuring-your-magicmirror)** -```yaml -/opt/magicmirror/config/config.js -``` -⚙️ **[Update MagicMirror](https://docs.magicmirror.builders/getting-started/upgrade-guide.html#upgrade-guide)** - -Run in the LXC Console -```yaml -cd /opt/magicmirror && git pull && npm install --only=prod --omit=dev -``` -____________________________________________________________________________________________ - -
- -
- Whoogle LXC - -

- -

Whoogle LXC

- -Get Google search results, but without any ads, javascript, AMP links, cookies, or IP address tracking. - -To create a new Proxmox Whoogle LXC, run the following in the Proxmox Shell. - -```yaml -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/whoogle-v4.sh)" -``` - -

⚡ Default Settings: 512MiB RAM - 2GB Storage - 1vCPU ⚡

- -**Whoogle Interface - IP:5000** - -⚙️ **To Update Whoogle** - -Run in the LXC console -```yaml -pip3 install whoogle-search --upgrade -``` -____________________________________________________________________________________________ - -
- -
- MotionEye VMS LXC - -

- -

MotionEye VMS LXC

- -To create a new Proxmox MotionEye VMS LXC, run the following in the Proxmox Shell. - -``` -bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/motioneye-v4.sh)" -``` - -

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

- -**MotionEye Interface - IP:8765** - -⚙️ **Initial Login** - -**username** - ```yaml - admin - ``` - **password** - ```yaml - - ``` - -⚙️ **To Update MotionEye** - -Run in the LXC console - ```yaml -pip install motioneye --upgrade -``` -____________________________________________________________________________________________ - -
-⬆__________________________________________________________________________________________ - -
From fd9cab299fa76db5ebdd58553d4f50e784ccf294 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 05:40:46 -0400 Subject: [PATCH 0491/3335] Delete _config.yml --- _config.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 _config.yml diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 6979f9d8..00000000 --- a/_config.yml +++ /dev/null @@ -1,6 +0,0 @@ -theme: jekyll-theme-hacker -title: Proxmox Helper Scripts -description: Proxmox Scripts For Home Automation -markdown: kramdown -kramdown: - parse_block_html: true From 337d62d28d4a5136c0685d29619ca0e9b2eb3f92 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 19:26:04 -0400 Subject: [PATCH 0492/3335] Create scrypted-install.sh --- setup/scrypted-install.sh | 195 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 setup/scrypted-install.sh diff --git a/setup/scrypted-install.sh b/setup/scrypted-install.sh new file mode 100644 index 00000000..2ad93568 --- /dev/null +++ b/setup/scrypted-install.sh @@ -0,0 +1,195 @@ +#!/usr/bin/env bash +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + exit 1 +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get -y install software-properties-common apt-utils &>/dev/null +apt-get -y update &>/dev/null +apt-get -y upgrade &>/dev/null +apt-get -y install \ + build-essential \ + gcc \ + gir1.2-gtk-3.0 \ + libcairo2-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libjpeg-dev \ + libgif-dev \ + libopenjp2-7 \ + libpango1.0-dev \ + librsvg2-dev \ + pkg-config \ + curl \ + sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing GStreamer" +apt-get -y install \ + gstreamer1.0-tools \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer-plugins-bad1.0-dev \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-libav \ + gstreamer1.0-alsa &>/dev/null +msg_ok "Installed GStreamer" + +msg_info "Setting up Node.js Repository" +curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + +msg_info "Installing Python3" +apt-get -y install \ + python3 \ + python3-dev \ + python3-gi \ + python3-gst-1.0 \ + python3-matplotlib \ + python3-numpy \ + python3-opencv \ + python3-pil \ + python3-pip \ + python3-setuptools \ + python3-skimage \ + python3-wheel &>/dev/null +python3 -m pip install --upgrade pip &>/dev/null +python3 -m pip install aiofiles debugpy typing_extensions typing &>/dev/null +msg_ok "Installed Python3" + +read -r -p "Would you like to add Coral Edge TPU support? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + CORAL="Y" +else + CORAL="N" +fi + +if [[ $CORAL == "Y" ]]; then +msg_info "Adding Coral Edge TPU Support" +echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list &>/dev/null +curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - &>/dev/null +apt-get -y update &>/dev/null +apt-get -y install libedgetpu1-std &>/dev/null +msg_ok "Coral Edge TPU Support Added" +fi + +msg_info "Installing Scrypted" +sudo -u root npx -y scrypted@latest install-server &>/dev/null +msg_info "Installed Scrypted" + +msg_info "Creating Service" +service_path="/etc/systemd/system/scrypted.service" +echo "[Unit] +Description=Scrypted service +After=network.target + +[Service] +User=root +Group=root +Type=simple +ExecStart=/usr/bin/npx -y scrypted serve +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now scrypted.service &>/dev/null +msg_ok "Created Service" +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 690fb173fa6864fbe700973f841fc4c5dde5951c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 19:27:46 -0400 Subject: [PATCH 0493/3335] Create scrypted-v4.sh --- ct/scrypted-v4.sh | 283 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 ct/scrypted-v4.sh diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh new file mode 100644 index 00000000..1b696209 --- /dev/null +++ b/ct/scrypted-v4.sh @@ -0,0 +1,283 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Scrypted" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + _____ __ __ + / ___/____________v4______ / /____ ____/ / + \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / + ___/ / /__/ / / /_/ / /_/ / /_/ __/ /_/ / +/____/\___/_/ \__, / .___/\__/\___/\__,_/ + /____/_/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:10443${CL} \n" From e2158457fa25b5a4b9bbdf0470e837afbfe40905 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Nov 2022 20:20:46 -0400 Subject: [PATCH 0494/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c5cd9005..3bb962f9 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-04 + +### Changed + +- **Scrypted LXC** + - NEW Script + ## 2022-11-01 ### Changed From 4559f66f97e2b2763a90c844bafb1c43581a69ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 5 Nov 2022 08:14:27 -0400 Subject: [PATCH 0495/3335] Update photoprism-install.sh golang 1.19.3 --- setup/photoprism-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 67015a34..3cd2553c 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -98,8 +98,8 @@ apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" msg_info "Installing Golang (Patience)" -wget https://golang.org/dl/go1.19.2.linux-amd64.tar.gz &>/dev/null -tar -xzf go1.19.2.linux-amd64.tar.gz -C /usr/local &>/dev/null +wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz &>/dev/null +tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local &>/dev/null ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null go install github.com/tianon/gosu@latest &>/dev/null go install golang.org/x/tools/cmd/goimports@latest &>/dev/null @@ -196,7 +196,7 @@ apt-get autoremove >/dev/null apt-get autoclean >/dev/null rm -rf /var/{cache,log}/* \ /photoprism \ - /go1.19.2.linux-amd64.tar.gz \ + /go1.19.3.linux-amd64.tar.gz \ /libtensorflow-linux-avx2-1.15.2.tar.gz \ /libtensorflow-linux-avx-1.15.2.tar.gz \ /libtensorflow-linux-cpu-1.15.2.tar.gz From 211c730f47f7015aee4ced10b999c5389db9a4a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 5 Nov 2022 08:27:36 -0400 Subject: [PATCH 0496/3335] Update photoprism-update.sh changes from @chx0003 --- misc/photoprism-update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/photoprism-update.sh b/misc/photoprism-update.sh index f6e99980..143eb9a2 100644 --- a/misc/photoprism-update.sh +++ b/misc/photoprism-update.sh @@ -91,7 +91,8 @@ echo -e "${CM}${CL} \r" echo -en "${GN} Building PhotoPrism ${BR} branch... " sudo make all &>/dev/null sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null -sudo cp -a assets/ /opt/photoprism/assets/ &>/dev/null +sudo rm -rf /opt/photoprism/assets +sudo cp -r assets/ /opt/photoprism/ &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Cleaning... " From 0d8b0faeec7f67806f5c0bab80115467889d15ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 5 Nov 2022 08:29:00 -0400 Subject: [PATCH 0497/3335] Update photoprism-install.sh changes from @chx0003 --- setup/photoprism-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 3cd2553c..449f86d7 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -139,7 +139,7 @@ msg_ok "Cloned PhotoPrism" msg_info "Building PhotoPrism (Patience)" NODE_OPTIONS=--max_old_space_size=2048 make all &>/dev/null ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null -cp -a assets/ /opt/photoprism/assets/ &>/dev/null +cp -r assets/ /opt/photoprism/ &>/dev/null msg_ok "Built PhotoPrism" env_path="/var/lib/photoprism/.env" From 6406ed569865f6c25abb5913b67c3bf52e14d128 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 6 Nov 2022 07:33:12 -0500 Subject: [PATCH 0498/3335] Update scrypted-v4.sh fix path to scrypted-install.sh --- ct/scrypted-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index 1b696209..a9de8c1c 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -273,7 +273,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ From 312377af97ee0a54fdc62eaca3b863416db6f7eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 6 Nov 2022 14:34:11 -0500 Subject: [PATCH 0499/3335] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b72e4da..5334d58e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ -

https://tteck.github.io/Proxmox/

+

Proxmox Helper Scripts

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
- From d521a3c682554890ae304d1f2b3cd4929cdf91cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 8 Nov 2022 07:15:50 -0500 Subject: [PATCH 0500/3335] Update npm_update.sh remove junk --- misc/npm_update.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/npm_update.sh b/misc/npm_update.sh index ca817b59..af3cef7e 100644 --- a/misc/npm_update.sh +++ b/misc/npm_update.sh @@ -54,7 +54,6 @@ function msg() { local TEXT="$1" echo -e "$TEXT" } -T="$(date +%M)" if [ -f /lib/systemd/system/npm.service ]; then echo -en "${GN} Prep For Update... " @@ -168,10 +167,9 @@ systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm echo -e "${CM}${CL} \r" -TS="$(($(date +%M) - T))" IP=$(hostname -I | cut -f1 -d ' ') -echo -e "${GN}Successfully Updated Nginx Proxy Manager to ${RD}${RELEASE}${CL} and it took ${RD}${TS} minutes.${CL} +echo -e "${GN}Successfully Updated Nginx Proxy Manager to ${RD}${RELEASE}${CL}. NPM should be reachable at ${BL}http://${IP}:81 ${CL} " From fe00c2974ce774391d7e18bb066c9f49fe761f71 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 8 Nov 2022 09:35:55 -0500 Subject: [PATCH 0501/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 36ee3afa..668325c2 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -64,14 +64,14 @@ else exit fi function header_info { -echo -e "${HA} - __ __ ___ ____ _____ - / / / // |v4/ __ \/ ___/ - / /_/ // /| | / / / /\__ \ - / __ // ___ |/ /_/ /___/ / -/_/ /_//_/ |_|\____//____/ - Home Assistant OS -${CL}" +cat <<"EOF" + __ __ ___ _ __ __ ____ _____ + / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ + +EOF } function msg_info() { local msg="$1" From bd59aa04a236a75e58f61e68cbcb2b74d6c0d2b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Nov 2022 12:31:41 -0500 Subject: [PATCH 0502/3335] Create adguard-update.sh --- misc/adguard-update.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 misc/adguard-update.sh diff --git a/misc/adguard-update.sh b/misc/adguard-update.sh new file mode 100644 index 00000000..f3018cf1 --- /dev/null +++ b/misc/adguard-update.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +echo -e "\nStarting Update\n" +sleep 3 +wget -q --show-progress https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz +tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null +systemctl stop AdGuardHome +mkdir -p adguard-backup +cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ +cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome +cp -r adguard-backup/* /opt/AdGuardHome/ +systemctl start AdGuardHome +rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup +echo -e "\nFinished\n" From 40223c0106536488de3182c2578b4cac1b9ab469 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 02:09:54 -0500 Subject: [PATCH 0503/3335] Update zigbee2mqtt-install.sh Add NODE_ENV environment variable to run in production mode --- setup/zigbee2mqtt-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 8631ec2a..7b8e283d 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -116,6 +116,7 @@ echo "[Unit] Description=zigbee2mqtt After=network.target [Service] +Environment=NODE_ENV=production ExecStart=/usr/bin/npm start WorkingDirectory=/opt/zigbee2mqtt StandardOutput=inherit From 079d72f21cc3ca90463050b7de10d6cc2bf510c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 09:36:28 -0500 Subject: [PATCH 0504/3335] Update vaultwarden-update.sh --- misc/vaultwarden-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 43bfa368..321e8066 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -22,7 +22,7 @@ ${CL}" update_info while true; do - read -p "This will Update Vaultwarden to $VAULT (set 2vCPU 2048MiB RAM Min.). Proceed(y/n)?" yn + read -p "This will Update Vaultwarden to $VAULT (set 2vCPU 3072MiB RAM Min.). Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; From cbc9d446f038c98a4b137db324858a3cb53c07d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 10:25:48 -0500 Subject: [PATCH 0505/3335] Update vaultwarden-update.sh check for old path --- misc/vaultwarden-update.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 321e8066..25bc07ca 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -38,8 +38,12 @@ echo -e "${GN} Updating (Building) to ${VAULT} (Patience)... ${CL}" git clone https://github.com/dani-garcia/vaultwarden &>/dev/null cd vaultwarden cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null -cp target/release/vaultwarden /opt/vaultwarden/bin/ - +DIR=/usr/bin/vaultwarden +if [ -d "$DIR" ]; then + cp target/release/vaultwarden /usr/bin/ +else + cp target/release/vaultwarden /opt/vaultwarden/bin/ +fi echo -e "${GN} Starting Vaultwarden ${VAULT}... ${CL}" systemctl start vaultwarden.service sleep 1 From 0f83ba59ef8fa646041f32f2f0e85a2787fdd9bf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 19:17:37 -0500 Subject: [PATCH 0506/3335] Create bluetooth.sh HA Bluetooth Integration Preparation --- misc/bluetooth.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 misc/bluetooth.sh diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh new file mode 100644 index 00000000..f7b1ef91 --- /dev/null +++ b/misc/bluetooth.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +set -e +clear + +while true; do + read -p "Start the Bluetooth Integration Preparation (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +clear + cat <<"EOF" + __ __ ___ _ __ __ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + / __ )/ /_ _____ / /_____ ____ / /_/ /_ + / __ / / / / / _ \/ __/ __ \/ __ \/ __/ __ \ + / /_/ / / /_/ / __/ /_/ /_/ / /_/ / /_/ / / / + /_____/_/\__,_/\___/\__/\____/\____/\__/_/_/_/_ + / _/___ / /____ ____ __________ _/ /_(_)___ ____ + / // __ \/ __/ _ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \ + _/ // / / / /_/ __/ /_/ / / / /_/ / /_/ / /_/ / / / / + /___/_/_/_/\__/\___/\__, /_/ \__,_/\__/_/\____/_/ /_/ + / __ \________/____/ ____ __________ _/ /_(_)___ ____ + / /_/ / ___/ _ \/ __ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \ + / ____/ / / __/ /_/ / /_/ / / / /_/ / /_/ / /_/ / / / / + /_/ /_/ \___/ .___/\__,_/_/ \__,_/\__/_/\____/_/ /_/ + /_/ + +EOF +read -r -p "Switch from dbus-daemon to dbus-broker? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +cat <>/etc/apt/sources.list +deb http://deb.debian.org/debian bullseye-backports main contrib non-free + +deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free +EOF +apt-get update &>/dev/null +apt-get -t bullseye-backports install -y dbus-broker &>/dev/null +systemctl enable dbus-broker.service &>/dev/null +fi +read -r -p "Install BlueZ? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +apt-get -t bullseye-backports install -y bluez* &>/dev/null +fi +echo -e "Finished, reboot for changes to take affect" From a800ccc02d3ec24fe01a9d52874d6701600604dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 20:26:46 -0500 Subject: [PATCH 0507/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 3bb962f9..c476225c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-11 + +### Changed + +- **HA Bluetooth Integration Preparation** + - [NEW Script](https://github.com/tteck/Proxmox/discussions/719) + ## 2022-11-04 ### Changed From 2b80b9c140c1418cb00ee2d6c363076a5f152e27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 21:09:04 -0500 Subject: [PATCH 0508/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c476225c..9b01a2a5 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -31,7 +31,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Container & Core Restore from Backup** - - NEW Scripts https://github.com/tteck/Proxmox/discussions/674 + - [NEW Scripts](https://github.com/tteck/Proxmox/discussions/674) ## 2022-10-07 From 43683fce61268270ad16cd28091cc0cc69894b77 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 12 Nov 2022 15:35:44 -0500 Subject: [PATCH 0509/3335] Update umbrel-install.sh start Umbrel os --- setup/umbrel-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index 4da3411c..96f62b27 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -108,7 +108,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - +cd ~/umbrel/scripts && bash start &>/dev/null msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null From c866343d29d84a764982eac65aaf083c7fdfd150 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 12 Nov 2022 17:06:26 -0500 Subject: [PATCH 0510/3335] Update blocky-install.sh bug fix --- setup/blocky-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index 0f063c0b..64e4671f 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -84,7 +84,7 @@ systemctl disable systemd-resolved.service &>/dev/null RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz &>/dev/null mkdir -p /opt/blocky -tar -xf blocky_0.19_Linux_x86_64.tar.gz -C /opt/blocky +tar -xf blocky_${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz cat </opt/blocky/config.yml upstream: From dcd68b523a58fb4587c36c26233c27d13d4a2e78 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 12 Nov 2022 17:25:58 -0500 Subject: [PATCH 0511/3335] Update umbrel-install.sh enable umbrel-startup.service --- setup/umbrel-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index 96f62b27..1cb751a8 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -89,6 +89,8 @@ EOF msg_info "Installing Umbrel (Patience)" curl -sL https://umbrel.sh | bash &>/dev/null +systemctl daemon-reload +systemctl enable --now umbrel-startup.service &>/dev/null msg_ok "Installed Umbrel" PASS=$(grep -w "root" /etc/shadow | cut -b6) @@ -108,7 +110,6 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -cd ~/umbrel/scripts && bash start &>/dev/null msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null From 5543667bd8e87ce10f880777773949e6d91af282 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 12 Nov 2022 17:30:07 -0500 Subject: [PATCH 0512/3335] Update umbrel-v4.sh a reboot is required before app installs --- ct/umbrel-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 8d02a0a6..f9591a5f 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -270,5 +270,5 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} Setup should be reachable by going to the following URL (a reboot is required before app installs). ${BL}http://${IP} ${CL} \n" From 40c63e2cd36342a1c0a609b7fbc071dce46a8f68 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 13 Nov 2022 06:44:26 -0500 Subject: [PATCH 0513/3335] add option to continue upon Internet NOT Connected (#727) --- setup/adguard-install.sh | 8 +++++++- setup/blocky-install.sh | 8 +++++++- setup/casaos-install.sh | 8 +++++++- setup/daemonsync-install.sh | 8 +++++++- setup/dashy-install.sh | 8 +++++++- setup/debian-install.sh | 8 +++++++- setup/deconz-install.sh | 8 +++++++- setup/docker-install.sh | 8 +++++++- setup/emby-install.sh | 8 +++++++- setup/emqx-install.sh | 8 +++++++- setup/esphome-install.sh | 8 +++++++- setup/grafana-install.sh | 8 +++++++- setup/grocy-install.sh | 8 +++++++- setup/heimdalldashboard-install.sh | 8 +++++++- setup/homeassistant-core-install.sh | 8 +++++++- setup/homeassistant-install.sh | 8 +++++++- setup/homebridge-install.sh | 8 +++++++- setup/homepage-install.sh | 8 +++++++- setup/influxdb-install.sh | 8 +++++++- setup/iobroker-install.sh | 8 +++++++- setup/jellyfin-install.sh | 8 +++++++- setup/keycloak-install.sh | 8 +++++++- setup/mariadb-install.sh | 8 +++++++- setup/meshcentral-install.sh | 8 +++++++- setup/motioneye-install.sh | 8 +++++++- setup/mqtt-install.sh | 8 +++++++- setup/n8n-install.sh | 8 +++++++- setup/navidrome-install.sh | 8 +++++++- setup/nextcloudpi-install.sh | 8 +++++++- setup/nginx-proxy-manager-install.sh | 8 +++++++- setup/nocodb-install.sh | 8 +++++++- setup/node-red-install.sh | 8 +++++++- setup/omada-install.sh | 8 +++++++- setup/omv-install.sh | 8 +++++++- setup/openhab-install.sh | 8 +++++++- setup/photoprism-install.sh | 8 +++++++- setup/pihole-install.sh | 8 +++++++- setup/plex-install.sh | 8 +++++++- setup/podman-homeassistant-install.sh | 8 +++++++- setup/postgresql-install.sh | 8 +++++++- setup/prometheus-install.sh | 8 +++++++- setup/scrypted-install.sh | 8 +++++++- setup/syncthing-install.sh | 8 +++++++- setup/technitiumdns-install.sh | 8 +++++++- setup/trilium-install.sh | 8 +++++++- setup/ubuntu-install.sh | 8 +++++++- setup/umbrel-install.sh | 8 +++++++- setup/unifi-install.sh | 8 +++++++- setup/uptimekuma-install.sh | 8 +++++++- setup/vaultwarden-install.sh | 8 +++++++- setup/whoogle-install.sh | 8 +++++++- setup/wikijs-install.sh | 8 +++++++- setup/wireguard-install.sh | 8 +++++++- setup/zigbee2mqtt-install.sh | 8 +++++++- setup/zwave-js-ui-install.sh | 8 +++++++- 55 files changed, 385 insertions(+), 55 deletions(-) diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index e610ca68..e7b481e6 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index 64e4671f..dd78ada9 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index f5eaa998..41d64917 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index d635a284..16e696bc 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 76f44974..cd843b0a 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 1f8c6a20..0ff21992 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index 9b16f561..f1cc5feb 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/docker-install.sh b/setup/docker-install.sh index d28872cb..4cb1e052 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 9377cfb0..a61e4a59 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 33c85add..009445be 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 7c73b3e3..505a5bbf 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index fb212972..7eb61aee 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index d01878f5..b6292c92 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 3b63a1fb..c177c361 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 5f24cdc9..e07419e5 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index ade97b6d..bef7e7f1 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index c363270c..bfbe73a2 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 294dccde..f6a4d605 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 30a1d886..e050e093 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 46e2eae6..428d7f32 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index ba151b5d..040652bd 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index d7fdb4c0..fd90691d 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index 1aa22a35..2c120f3a 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 8f7a4095..40fe2bb6 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index 6fb9e71c..136c611f 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index 225e6bd8..0a2facd6 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 00e48f8b..30e8f176 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index dabdf703..75676fde 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index 195dbc05..543510d6 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index a790811d..2b4da548 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 6d29b402..9030ac93 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 1b382cf1..8373a0e6 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 2bdf2f1f..7a6c7db4 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/omv-install.sh b/setup/omv-install.sh index e6b6b839..513290b3 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 02ef935f..a799182d 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 449f86d7..af60ccc0 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -63,7 +63,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index c64f26db..742e1b5f 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -63,7 +63,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 3cef5ed5..881d75ac 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 2900c446..45999889 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 7fa9dc77..dd191991 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index ba9b453e..8937ded9 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/scrypted-install.sh b/setup/scrypted-install.sh index 2ad93568..9b2e5e33 100644 --- a/setup/scrypted-install.sh +++ b/setup/scrypted-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index 0a435c4d..d0cb5005 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index f97b40cd..12c78df6 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index a6aab029..bf5a1f78 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -61,7 +61,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index c7010188..85c25805 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index 1cb751a8..fa7f6cef 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 94100a0c..5f28058f 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -63,7 +63,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index 83c31b6c..b0fbd824 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index c5736db9..81599329 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 3085e59b..4c324c89 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 31f2ef9f..850bb44b 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 9dde9a1d..45206a29 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 7b8e283d..b6859a5d 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index d8dbaead..52800dbc 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -62,7 +62,13 @@ set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" - exit 1 + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi From 1c380355b01af1b5a7207e4e6f7a946cee4f66a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 13 Nov 2022 07:10:04 -0500 Subject: [PATCH 0514/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 9b01a2a5..6cec5a33 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-13 + +### Changed + +- **All LXC's** + - Add option to continue upon Internet NOT Connected + ## 2022-11-11 ### Changed From be152dd3aa2e1bbf97fce9e2b435916fe06da3e8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 13 Nov 2022 13:24:06 -0500 Subject: [PATCH 0515/3335] Update edge-kernel.sh 6.0-edge --- misc/edge-kernel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 74867e89..87c187bf 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -62,7 +62,7 @@ while [ $opt != '' ]; do curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add - echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" >/etc/apt/sources.list.d/pve-edge-kernel.list apt-get -y update - apt-get -y install pve-kernel-5.19-edge + apt-get -y install pve-kernel-6.0-edge reboot break ;; From 5733159956b1d2baa6e514b335d274a8056d9fbe Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 13 Nov 2022 13:38:37 -0500 Subject: [PATCH 0516/3335] Update edge-kernel.sh fix "$opt" --- misc/edge-kernel.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 87c187bf..e13e4ed8 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -42,8 +42,8 @@ option_picked() { } clear show_menu -while [ $opt != '' ]; do - if [ $opt = '' ]; then +while [ "$opt" != "" ]; do + if [ "$opt" = "" ]; then exit else case $opt in From a16ab672c2dbdde598f4d03de4302a9ef1fb7e4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 15 Nov 2022 06:57:24 -0500 Subject: [PATCH 0517/3335] Update grocy-install.sh install PHP 8.1 --- setup/grocy-install.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index b6292c92..c15713dc 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -85,13 +85,21 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null apt-get install -y apache2 &>/dev/null apt-get install -y unzip &>/dev/null -apt-get install -y php &>/dev/null -apt-get install -y libapache2-mod-php &>/dev/null +apt-get install -y apt-transport-https &>/dev/null +apt-get install -y lsb-release &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing PHP 8.1" +curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg +sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +apt-get update &>/dev/null +apt-get install -y php8.1 &>/dev/null +apt-get install -y libapache2-mod-php8.1 &>/dev/null apt-get install -y php-sqlite3 &>/dev/null apt-get install -y php-gd &>/dev/null apt-get install -y php-intl &>/dev/null apt-get install -y php-mbstring &>/dev/null -msg_ok "Installed Dependencies" +msg_ok "Installed PHP 8.1" msg_info "Installing grocy" wget https://releases.grocy.info/latest &>/dev/null From f004932f27ee4aa426877ea5bc9af1183a9411b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 15 Nov 2022 07:10:08 -0500 Subject: [PATCH 0518/3335] Update unifi-install.sh correct Local Controller default --- setup/unifi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 5f28058f..2adeda07 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -86,7 +86,7 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" -read -r -p "Local Controller? " prompt +read -r -p "Local Controller? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then LOCAL="--local-controller" else From 7603bfc2f989ad4654d4dea0d7d82e662bec3bc6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Nov 2022 04:01:40 -0500 Subject: [PATCH 0519/3335] Update emby-v4.sh unprivileged no device passthrough --- ct/emby-v4.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 3a3096f4..c858bb44 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -264,6 +264,8 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 226:0 rwm @@ -273,6 +275,7 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file EOF +fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From 55c25de85ec65e4eaf9fa611158a1b9949a23119 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Nov 2022 04:03:05 -0500 Subject: [PATCH 0520/3335] Update jellyfin-v4.sh unprivileged no device passthrough --- ct/jellyfin-v4.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 3f49d1e7..a287b7e1 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -264,6 +264,8 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 226:0 rwm @@ -273,6 +275,7 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file EOF +fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From 9e16245ed0313d6fb33dd731d1376434d41b8f88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Nov 2022 04:04:26 -0500 Subject: [PATCH 0521/3335] Update plex-v4.sh unprivileged no device passthrough --- ct/plex-v4.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index d9c4b619..b2e631d9 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -264,6 +264,8 @@ export PCT_OPTIONS=" $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf LXC_CONFIG=/etc/pve/lxc/${CTID}.conf cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 226:0 rwm @@ -273,6 +275,7 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file EOF +fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From e69b1a461a4e4d6a2f5a121c183e733aa0f2514e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Nov 2022 11:19:16 -0500 Subject: [PATCH 0522/3335] Update vaultwarden-update.sh stop execution instantly if a query exits while having a non-zero status. --- misc/vaultwarden-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 25bc07ca..60130d3c 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From b28568d0ca5b8d3247126d4c0df7e7928ce48235 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Nov 2022 11:32:52 -0500 Subject: [PATCH 0523/3335] Update vaultwarden-update.sh Ensure you set resources --- misc/vaultwarden-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 60130d3c..2a0c9436 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -23,7 +23,7 @@ ${CL}" update_info while true; do - read -p "This will Update Vaultwarden to $VAULT (set 2vCPU 3072MiB RAM Min.). Proceed(y/n)?" yn + read -p "This will Update Vaultwarden to $VAULT (Ensure you set 2vCPU 3072MiB RAM Min.). Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -52,4 +52,4 @@ sleep 1 echo -e "${GN} Cleaning up... ${CL}" cd ~ && rm -rf vaultwarden -echo -e "${GN} Finished Update (set resources back to normal settings)${CL}" +echo -e "${GN} Finished Update (Ensure you set resources back to normal settings)${CL}" From 1b353883365f292efba62c537815e62442eef836 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 21 Nov 2022 17:34:59 -0500 Subject: [PATCH 0524/3335] ubuntu os versions (#753) --- ct/emby-v4.sh | 5 +++-- ct/jellyfin-v4.sh | 5 +++-- ct/omada-v4.sh | 2 +- ct/plex-v4.sh | 5 +++-- ct/ubuntu-v4.sh | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index c858bb44..7bd7cced 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -98,10 +98,11 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ - "21.10" "Impish" OFF \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index a287b7e1..21af5b44 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -98,10 +98,11 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ - "21.10" "Impish" OFF \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 6cea6f85..7ef80131 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -100,8 +100,8 @@ function advanced_settings() { var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ - "21.10" "Impish" OFF \ "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index b2e631d9..71891a0f 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -98,10 +98,11 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ - "21.10" "Impish" OFF \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index ce011c0a..1cd16c05 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -100,8 +100,8 @@ function advanced_settings() { var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" OFF \ - "21.10" "Impish" OFF \ "22.04" "Jammy" ON \ + "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi From 694002e14a85aafc6a507a035bc81d663dfe109a Mon Sep 17 00:00:00 2001 From: Uruk <68083474+Uruknara@users.noreply.github.com> Date: Tue, 22 Nov 2022 01:04:28 +0100 Subject: [PATCH 0525/3335] Adding more support and little feature (#755) Just adding support of other os and the hostname in the info bar [Update Ubuntu, Debian, Devuan, Alpine Linux, CentOS-Rocky-Alma, Fedora, ArchLinux ] New feature --- misc/update-lxcs.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 84a59274..59c8f0ce 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -34,16 +34,23 @@ function update_container() { container=$1 clear header_info - echo -e "${BL}[Info]${GN} Updating${BL} $container ${CL} \n" + name=`pct exec $container hostname` + echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} \n" pct config $container > temp os=`awk '/^ostype/' temp | cut -d' ' -f2` - if [ "$os" == "alpine" ] - then - pct exec $container -- ash -c "apk update && apk upgrade" + if [ "$os" == "alpine" ]; then + pct exec $container -- ash -c "apk update && apk upgrade -y" + elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then + pct exec $container -- bash -c "apt-get update && apt-get upgrade -y && apt-get clean && apt-get --purge autoremove -y" + elif [ "$os" == "fedora" ]; then + pct exec $container -- bash -c "dnf -y update && dnf -y upgrade && dnf -y --purge autoremove" + elif [ "$os" == "archlinux" ]; then + pct exec $container -- bash -c "pacman -Syyu --noconfirm" else - pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y" + pct exec $container -- bash -c "yum -y update" fi } + read -p "Skip stopped containers? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then From 2abc2631429948e876905d4a29abb3752c4ff211 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 21 Nov 2022 19:20:59 -0500 Subject: [PATCH 0526/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6cec5a33..ddec2910 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-21 + +### Changed + +- **Proxmox LXC Updater** + - Now updates Ubuntu, Debian, Devuan, Alpine Linux, CentOS-Rocky-Alma, Fedora, ArchLinux [(@Uruknara)](https://github.com/tteck/Proxmox/commits?author=Uruknara) + ## 2022-11-13 ### Changed From a8f6bd9eec1a4d58aca08c904d87cfb7f0964367 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 22 Nov 2022 09:06:34 -0500 Subject: [PATCH 0527/3335] Update post-pve-install.sh update no-nag --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 7fb7bd7b..d5f40dce 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -100,7 +100,7 @@ fi read -r -p "Disable Subscription Nag? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then msg_info "Disabling Subscription Nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag (Delete browser cache)" fi From e9094021d8143954bc4cbe99caa69be4b3fd7996 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 22 Nov 2022 09:30:43 -0500 Subject: [PATCH 0528/3335] Update post-pbs-install.sh update no-nag --- misc/post-pbs-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index b96dbb93..7b29e5f4 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -94,7 +94,7 @@ fi read -r -p "Disable Subscription Nag? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then msg_info "Disabling Subscription Nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag" fi From a8433ea36c98e9a57d2d55ca47ba6df30719a02c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Nov 2022 10:00:42 -0500 Subject: [PATCH 0529/3335] Update debian-v4.sh Testing Enable Root SSH Access --- ct/debian-v4.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 443d577a..c2e7cfce 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version From 9f192aeec213436e343b44f0c31a1b7fe30071fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Nov 2022 10:04:35 -0500 Subject: [PATCH 0530/3335] Update debian-install.sh Testing Enable Root SSH Access --- setup/debian-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 0ff21992..96b5f984 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -42,7 +42,7 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -msg_info "Setting up Container OS " +msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null while [ "$(hostname -I)" = "" ]; do @@ -100,6 +100,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null From b54ba602ea9782c9a8e9fafe1fc02f4a9836e728 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Nov 2022 12:34:11 -0500 Subject: [PATCH 0531/3335] enable root ssh access during lxc creation (#765) --- ct/adguard-v4.sh | 12 +++++++++++- ct/alpine-v4.sh | 12 +++++++++++- ct/archlinux-v4.sh | 12 +++++++++++- ct/blocky-v4.sh | 12 +++++++++++- ct/casaos-v4.sh | 12 +++++++++++- ct/daemonsync-v4.sh | 12 +++++++++++- ct/dashy-v4.sh | 12 +++++++++++- ct/deconz-v4.sh | 12 +++++++++++- ct/docker-v4.sh | 12 +++++++++++- ct/emby-v4.sh | 12 +++++++++++- ct/emqx-v4.sh | 12 +++++++++++- ct/esphome-v4.sh | 12 +++++++++++- ct/grafana-v4.sh | 12 +++++++++++- ct/grocy-v4.sh | 12 +++++++++++- ct/heimdalldashboard-v4.sh | 12 +++++++++++- ct/homeassistant-core-v4.sh | 12 +++++++++++- ct/homeassistant-v4.sh | 12 +++++++++++- ct/homebridge-v4.sh | 12 +++++++++++- ct/homepage-v4.sh | 12 +++++++++++- ct/influxdb-v4.sh | 12 +++++++++++- ct/iobroker-v4.sh | 12 +++++++++++- ct/jellyfin-v4.sh | 12 +++++++++++- ct/keycloak-v4.sh | 12 +++++++++++- ct/magicmirror-v4.sh | 12 +++++++++++- ct/mariadb-v4.sh | 12 +++++++++++- ct/meshcentral-v4.sh | 12 +++++++++++- ct/motioneye-v4.sh | 12 +++++++++++- ct/mqtt-v4.sh | 7 +++++-- ct/n8n-v4.sh | 12 +++++++++++- ct/navidrome-v4.sh | 12 +++++++++++- ct/nextcloudpi-v4.sh | 12 +++++++++++- ct/nginx-proxy-manager-v4.sh | 12 +++++++++++- ct/nocodb-v4.sh | 12 +++++++++++- ct/node-red-v4.sh | 12 +++++++++++- ct/omada-v4.sh | 12 +++++++++++- ct/omv-v4.sh | 12 +++++++++++- ct/openhab-v4.sh | 12 +++++++++++- ct/paperless-ngx-v4.sh | 12 +++++++++++- ct/photoprism-v4.sh | 12 +++++++++++- ct/pihole-v4.sh | 12 +++++++++++- ct/plex-v4.sh | 12 +++++++++++- ct/podman-homeassistant-v4.sh | 12 +++++++++++- ct/postgresql-v4.sh | 12 +++++++++++- ct/prometheus-v4.sh | 12 +++++++++++- ct/scrypted-v4.sh | 12 +++++++++++- ct/syncthing-v4.sh | 12 +++++++++++- ct/technitiumdns-v4.sh | 12 +++++++++++- ct/trilium-v4.sh | 12 +++++++++++- ct/ubuntu-v4.sh | 12 +++++++++++- ct/umbrel-v4.sh | 12 +++++++++++- ct/unifi-v4.sh | 12 +++++++++++- ct/uptimekuma-v4.sh | 12 +++++++++++- ct/vaultwarden-v4.sh | 12 +++++++++++- ct/whoogle-v4.sh | 12 +++++++++++- ct/wikijs-v4.sh | 12 +++++++++++- ct/wireguard-v4.sh | 12 +++++++++++- ct/zigbee2mqtt-v4.sh | 12 +++++++++++- ct/zwave-js-ui-v4.sh | 12 +++++++++++- setup/adguard-install.sh | 6 ++++++ setup/blocky-install.sh | 6 ++++++ setup/casaos-install.sh | 6 ++++++ setup/daemonsync-install.sh | 6 ++++++ setup/dashy-install.sh | 6 ++++++ setup/deconz-install.sh | 6 ++++++ setup/docker-install.sh | 6 ++++++ setup/emby-install.sh | 6 ++++++ setup/emqx-install.sh | 6 ++++++ setup/esphome-install.sh | 6 ++++++ setup/grafana-install.sh | 6 ++++++ setup/grocy-install.sh | 6 ++++++ setup/heimdalldashboard-install.sh | 6 ++++++ setup/homeassistant-core-install.sh | 6 ++++++ setup/homeassistant-install.sh | 6 ++++++ setup/homebridge-install.sh | 6 ++++++ setup/homepage-install.sh | 6 ++++++ setup/influxdb-install.sh | 6 ++++++ setup/iobroker-install.sh | 6 ++++++ setup/jellyfin-install.sh | 6 ++++++ setup/keycloak-install.sh | 6 ++++++ setup/magicmirror-install.sh | 6 ++++++ setup/mariadb-install.sh | 6 ++++++ setup/meshcentral-install.sh | 6 ++++++ setup/motioneye-install.sh | 6 ++++++ setup/mqtt-install.sh | 6 ++++++ setup/n8n-install.sh | 6 ++++++ setup/navidrome-install.sh | 6 ++++++ setup/nextcloudpi-install.sh | 6 ++++++ setup/nginx-proxy-manager-install.sh | 6 ++++++ setup/nocodb-install.sh | 6 ++++++ setup/node-red-install.sh | 6 ++++++ setup/omada-install.sh | 6 ++++++ setup/omv-install.sh | 6 ++++++ setup/openhab-install.sh | 6 ++++++ setup/photoprism-install.sh | 6 ++++++ setup/pihole-install.sh | 6 ++++++ setup/plex-install.sh | 6 ++++++ setup/podman-homeassistant-install.sh | 6 ++++++ setup/postgresql-install.sh | 6 ++++++ setup/prometheus-install.sh | 6 ++++++ setup/scrypted-install.sh | 6 ++++++ setup/syncthing-install.sh | 6 ++++++ setup/technitiumdns-install.sh | 6 ++++++ setup/trilium-install.sh | 6 ++++++ setup/ubuntu-install.sh | 6 ++++++ setup/umbrel-install.sh | 6 ++++++ setup/unifi-install.sh | 6 ++++++ setup/uptimekuma-install.sh | 6 ++++++ setup/vaultwarden-install.sh | 6 ++++++ setup/whoogle-install.sh | 6 ++++++ setup/wikijs-install.sh | 6 ++++++ setup/wireguard-install.sh | 6 ++++++ setup/zigbee2mqtt-install.sh | 6 ++++++ setup/zwave-js-ui-install.sh | 6 ++++++ 113 files changed, 962 insertions(+), 59 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index 60b4e089..5d67195f 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/alpine-v4.sh b/ct/alpine-v4.sh index 11f8f2e7..546de0ad 100644 --- a/ct/alpine-v4.sh +++ b/ct/alpine-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -208,6 +210,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -237,6 +246,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/archlinux-v4.sh b/ct/archlinux-v4.sh index 6d3243ca..4b33de51 100644 --- a/ct/archlinux-v4.sh +++ b/ct/archlinux-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index ff4f3475..b861c58a 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index e1e701f6..2ac17453 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 820267f4..27e49b1f 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index fa6e0ad6..abb1eae3 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 2605ceae..1b9d3f1a 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index 1e598396..d65fd6a0 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 7bd7cced..354d640b 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -95,6 +95,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -114,7 +116,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -221,6 +223,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -250,6 +259,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index 0a79efcf..fcc35a86 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index 95c5b25e..2429f988 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 6762da87..0678a118 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index f1ed2e1d..e41ada96 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 7912b71b..8c831979 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index 4098d9c0..fd3bb250 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 77b128df..a7d1fb71 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 861bc448..0b7510f2 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 9c92edc8..7781857f 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 74121380..25cb3a3d 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 43436724..5b5d78b7 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 21af5b44..9ebf41d8 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -95,6 +95,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -114,7 +116,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -221,6 +223,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -250,6 +259,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 63d553f5..0b9babff 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 5a52a4de..78bd04a7 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index b2db3d31..a1201a89 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index a7b6767c..885a8a3c 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 4834b42e..d75d9e52 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index c9b3cfe6..dcdc2f71 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -93,7 +93,9 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ @@ -104,7 +106,7 @@ exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi -PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; @@ -216,6 +218,7 @@ if [ "$CT_TYPE" == "1" ]; then fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index c1f88353..18e74805 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 57bfe2a0..3e6d737f 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index 68e5aed5..d2b8d7a2 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 8e316769..bf9c0037 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 8c58f846..ba516ee4 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 434bd642..c95cc54b 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 7ef80131..ae0a1faf 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -113,7 +115,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -220,6 +222,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -249,6 +258,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index 2d58a0ad..628f4c11 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index fb07b1fd..d120b45d 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index f735b822..53ea9807 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index 69b2fd5e..217d1a31 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 65b1df79..83c7b06f 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index 71891a0f..d1798958 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -95,6 +95,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -114,7 +116,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -221,6 +223,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -250,6 +259,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 87bf6dea..bad2ad8f 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -97,6 +97,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -108,7 +110,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -215,6 +217,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -244,6 +253,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index 9fc542d3..ab0fa879 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index f17864ae..4d1c7e05 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index a9de8c1c..4f1b213c 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index e20ee8df..9084cd49 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -95,6 +95,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -106,7 +108,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -213,6 +215,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -242,6 +251,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index 7d36387e..5bcd7bfe 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index b64d1333..fa2f31de 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 1cd16c05..182cdd21 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -113,7 +115,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -220,6 +222,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -249,6 +258,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index f9591a5f..2d876e87 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index 0051f6a5..2d2582ad 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index f1779f12..fd2ee780 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index 1de5fc5d..c64c257a 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 9527d486..0d35cb1b 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -93,6 +93,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -104,7 +106,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -211,6 +213,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -240,6 +249,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index b4b50eff..df631e62 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 38e82951..7b3bc459 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -95,6 +95,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -106,7 +108,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -213,6 +215,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -242,6 +251,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index d19c5a03..335bf03e 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 0f2af7ab..8442a1ec 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -94,6 +94,8 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -105,7 +107,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -212,6 +214,13 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -241,6 +250,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os export PCT_OSVERSION=$var_version diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index e7b481e6..ec248d10 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -106,6 +106,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index dd78ada9..39690a37 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -362,6 +362,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index 41d64917..dbd62604 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -115,6 +115,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index 16e696bc..ef0b5f9b 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -108,6 +108,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index cd843b0a..7bd1c5a0 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -139,6 +139,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index f1cc5feb..476a61a9 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -132,6 +132,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 4cb1e052..6fc265d4 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -158,6 +158,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/emby-install.sh b/setup/emby-install.sh index a61e4a59..1c0b0622 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -121,6 +121,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index 009445be..da49201b 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -106,6 +106,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 505a5bbf..15160dce 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -128,6 +128,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 7eb61aee..0570d690 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -115,6 +115,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi systemctl start grafana-server systemctl enable grafana-server.service &>/dev/null diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index c15713dc..20166eb0 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -144,6 +144,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index c177c361..4f57ac50 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -139,6 +139,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index e07419e5..956db032 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -146,6 +146,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index bef7e7f1..6e78f010 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -342,6 +342,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index bfbe73a2..f6ab776c 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -118,6 +118,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index f6a4d605..80c4ef20 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -136,6 +136,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index e050e093..7e8aab4c 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -139,6 +139,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 428d7f32..271401b6 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -106,6 +106,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index 040652bd..b9e9de7a 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -146,6 +146,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index fd90691d..b72f14fe 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -127,6 +127,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index cf71719d..a1ab2eec 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -223,6 +223,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index 2c120f3a..b4e261ce 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -123,6 +123,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 40fe2bb6..1e5789be 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -117,6 +117,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index 136c611f..f718adc4 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -136,6 +136,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index 0a2facd6..180b0c45 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -113,6 +113,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 30e8f176..70e4b615 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -129,6 +129,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index 75676fde..b6cc28e5 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -155,6 +155,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index 543510d6..c5f63f65 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -104,6 +104,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 2b4da548..9fc27d3d 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -261,6 +261,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Starting Services" systemctl enable npm &>/dev/null diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 9030ac93..be07ed72 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -135,6 +135,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 8373a0e6..8e7257ec 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -137,6 +137,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 7a6c7db4..0fd4551e 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -111,6 +111,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/omv-install.sh b/setup/omv-install.sh index 513290b3..f5bf3267 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -123,6 +123,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index a799182d..082db069 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -123,6 +123,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index af60ccc0..85349d25 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -196,6 +196,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 742e1b5f..a43a230e 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -126,6 +126,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 881d75ac..fad4c048 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -125,6 +125,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 45999889..c7e09cd7 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -159,6 +159,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index dd191991..8587b17c 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -230,6 +230,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 8937ded9..8b3f7907 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -135,6 +135,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/scrypted-install.sh b/setup/scrypted-install.sh index 9b2e5e33..b9b9223f 100644 --- a/setup/scrypted-install.sh +++ b/setup/scrypted-install.sh @@ -194,6 +194,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index d0cb5005..cb3b2113 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -109,6 +109,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 12c78df6..ab51a406 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -106,6 +106,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index bf5a1f78..f62528e7 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -130,6 +130,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 85c25805..9b7597ba 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -101,6 +101,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index fa7f6cef..e233a6a7 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -116,6 +116,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 2adeda07..0a7f87e3 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -114,6 +114,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index b0fbd824..a7305c9e 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -135,6 +135,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 81599329..bcd58970 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -191,6 +191,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 4c324c89..3971ce10 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -122,6 +122,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 850bb44b..01d3df47 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -151,6 +151,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 45206a29..6d726417 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -165,6 +165,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index b6859a5d..910dffb4 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -151,6 +151,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 52800dbc..68ab1885 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -127,6 +127,12 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi msg_info "Cleaning up" rm zwave-js-ui-${RELEASE}-linux.zip From 9beca482179f94406fd08f1b6b86c13e6313ef1f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Nov 2022 13:20:03 -0500 Subject: [PATCH 0532/3335] Update umbrel-v4.sh change wording --- ct/umbrel-v4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 2d876e87..4e98420b 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -280,5 +280,5 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL (a reboot is required before app installs). - ${BL}http://${IP} ${CL} \n" +echo -e "${APP} should be reachable by going to the following URL (reboot is required before app installs). + ${BL}http://${IP} ${CL} \n" From 4f1d613ae9885abc038f561872ea6286b5053916 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Nov 2022 22:59:56 -0500 Subject: [PATCH 0533/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ddec2910..f1bc9b9e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,12 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-23 + +### Changed + +- **All LXC's** + - Now you can enable root ssh access during lxc creation (Advance) ## 2022-11-21 ### Changed From 14461857f6a20bad2aca5479b478c75b386a0b40 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Nov 2022 23:00:46 -0500 Subject: [PATCH 0534/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f1bc9b9e..ef98f502 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **All LXC's** - - Now you can enable root ssh access during lxc creation (Advance) + - Add option to enable root ssh access during lxc creation (Advance) ## 2022-11-21 ### Changed From f69227a38654a5d83e4acf80236dba4806038ac1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Nov 2022 06:43:53 -0500 Subject: [PATCH 0535/3335] Update omada-install.sh 5.7.4 --- setup/omada-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/omada-install.sh b/setup/omada-install.sh index 0fd4551e..dc5a8ded 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -91,8 +91,8 @@ sudo dpkg -i mongodb-org-server_3.6.23_amd64.deb &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Omada Controller v5.6.3" -wget -qL https://static.tp-link.com/upload/software/2022/202210/20221024/Omada_SDN_Controller_v5.6.3_Linux_x64.deb -sudo dpkg -i Omada_SDN_Controller_v5.6.3_Linux_x64.deb &>/dev/null +wget -qL https://static.tp-link.com/upload/software/2022/202211/20221121/Omada_SDN_Controller_v5.7.4_Linux_x64.deb +sudo dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 3dacb89b25f264d5f364b1506509332a1cf29d4d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Nov 2022 14:06:14 -0500 Subject: [PATCH 0536/3335] Update haos-vm-v4.sh add option to set machine type --- vm/haos-vm-v4.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 668325c2..49e226fc 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -91,6 +91,9 @@ function default_settings() { BRANCH=${STABLE} echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" VMID=$NEXTID + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + FORMAT=",efitype=4m" + MACHINE="" echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" HN=haos${STABLE} echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" @@ -122,6 +125,20 @@ if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMI else if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; fi +MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +"i440fx" "Machine i440fx" ON \ +"q35" "Machine q35" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",format=raw" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" +fi VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; @@ -255,12 +272,12 @@ for i in {0,1}; do done msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null -qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ + qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null qm set $VMID \ -boot order=scsi0 >/dev/null From 0d2bb7ac3a7a3626b97a4b72565222694962313f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Nov 2022 14:10:14 -0500 Subject: [PATCH 0537/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ef98f502..d3c0986c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,12 +3,20 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-24 + +### Changed + +- **Home Assistant OS VM** + - Add option to set machine type during VM creation (Advance) + ## 2022-11-23 ### Changed - **All LXC's** - - Add option to enable root ssh access during lxc creation (Advance) + - Add option to enable root ssh access during LXC creation (Advance) + ## 2022-11-21 ### Changed From d56341fe5fc5af8430146a79dd01994914531d4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Nov 2022 15:08:10 -0500 Subject: [PATCH 0538/3335] Update haos-vm-v4.sh clean --- vm/haos-vm-v4.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 49e226fc..6075915e 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -276,12 +276,11 @@ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf -cores $COR -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null - qm set $VMID \ - -efidisk0 ${DISK0_REF}${FORMAT} \ - -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null qm set $VMID \ - -boot order=scsi0 >/dev/null -qm set $VMID -description "# Home Assistant OS + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 \ + -boot order=scsi0 \ + -description "# Home Assistant OS ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" From 189439964f7c8d5ed91bc1f5bd6c612aa9ff0657 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Nov 2022 03:36:29 -0500 Subject: [PATCH 0539/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index d3c0986c..ea4de26c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,14 +8,14 @@ All notable changes to this project will be documented in this file. ### Changed - **Home Assistant OS VM** - - Add option to set machine type during VM creation (Advance) + - Add option to set machine type during VM creation (Advanced) ## 2022-11-23 ### Changed - **All LXC's** - - Add option to enable root ssh access during LXC creation (Advance) + - Add option to enable root ssh access during LXC creation (Advanced) ## 2022-11-21 From 5fe82e720c73e412a14493a60339f02bd7d20839 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Nov 2022 10:41:57 -0500 Subject: [PATCH 0540/3335] Update whoogle-install.sh add dependency --- setup/whoogle-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 3971ce10..964b437c 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -90,6 +90,7 @@ apt-get install python3-pip -y &>/dev/null msg_ok "Installed pip3" msg_info "Installing Whoogle" +pip install brotli &>/dev/null pip install whoogle-search &>/dev/null service_path="/etc/systemd/system/whoogle.service" From 0c88e26b0ee1464326873cd37aa5dfa85c3b44c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Nov 2022 18:50:55 -0500 Subject: [PATCH 0541/3335] Update crowdsec.sh make not installable on Proxmox --- misc/crowdsec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index 63d3645e..95984108 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -27,7 +27,7 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } - +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in From 901e26b8ac5f7504b10669b1f75846104f21c73b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Nov 2022 18:52:37 -0500 Subject: [PATCH 0542/3335] Update crowdsec.sh --- misc/crowdsec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index 95984108..7f509ba8 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -27,7 +27,7 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; fi +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in From a46082ffaac6a9bcfce559d06b31ee30a9112cdb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 26 Nov 2022 06:30:39 -0500 Subject: [PATCH 0543/3335] Update technitiumdns-update.sh update .net to 7 --- misc/technitiumdns-update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/technitiumdns-update.sh b/misc/technitiumdns-update.sh index 0cfbd7f8..88494319 100644 --- a/misc/technitiumdns-update.sh +++ b/misc/technitiumdns-update.sh @@ -14,7 +14,7 @@ echo "===============================" echo "Technitium DNS Server Update" echo "===============================" -if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then +if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then dotnetFound="yes" else dotnetFound="no" @@ -22,21 +22,21 @@ fi if [ -d $dotnetDir ]; then dotnetUpdate="yes" - echo "Updating .NET 6 Runtime..." + echo "Updating .NET 7 Runtime..." fi -curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1 +curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 7.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1 if [ ! -f "/usr/bin/dotnet" ]; then ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1 fi -if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then +if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then if [ "$dotnetUpdate" = "yes" ]; then - echo ".NET 6 Runtime was updated successfully!" + echo ".NET 7 Runtime was updated successfully!" fi else - echo "Failed to update .NET 6 Runtime. Please try again." + echo "Failed to update .NET 7 Runtime. Please try again." exit 1 fi From a7f797ede23f906ecc5fca3dfe6512847366a310 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 26 Nov 2022 18:01:55 -0500 Subject: [PATCH 0544/3335] Update update-lxcs.sh --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 59c8f0ce..63b452c9 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -39,7 +39,7 @@ function update_container() { pct config $container > temp os=`awk '/^ostype/' temp | cut -d' ' -f2` if [ "$os" == "alpine" ]; then - pct exec $container -- ash -c "apk update && apk upgrade -y" + pct exec $container -- ash -c "apk update && apk upgrade" elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then pct exec $container -- bash -c "apt-get update && apt-get upgrade -y && apt-get clean && apt-get --purge autoremove -y" elif [ "$os" == "fedora" ]; then From 5e7ec6be42a1d853aaed0f2f32bc041ae49f2f71 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Nov 2022 16:54:16 -0500 Subject: [PATCH 0545/3335] Create shinobi-install.sh --- setup/shinobi-install.sh | 177 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 setup/shinobi-install.sh diff --git a/setup/shinobi-install.sh b/setup/shinobi-install.sh new file mode 100644 index 00000000..6eeb65cc --- /dev/null +++ b/setup/shinobi-install.sh @@ -0,0 +1,177 @@ +#!/usr/bin/env bash +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update --fix-missing &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1) +if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then + apt install sudo wget -y + sudo apt install -y software-properties-common + sudo add-apt-repository universe -y + apt update -y + apt update --fix-missing -y +fi + +msg_info "Installing Dependencies" +apt-get install -y curl sudo git &>/dev/null +apt-get install -y make zip net-tools &>/dev/null +apt-get install -y gcc g++ cmake &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + +msg_info "Installing FFMPEG" +apt-get install -y ffmpeg &>/dev/null +msg_ok "Installed FFMPEG" + +msg_info "Clonning Shinobi" +cd /opt +git clone https://gitlab.com/Shinobi-Systems/Shinobi.git -b master Shinobi &>/dev/null +cd Shinobi +gitVersionNumber=$(git rev-parse HEAD) +theDateRightNow=$(date) +touch version.json +chmod 777 version.json +echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json +msg_ok "Cloned Shinobi" + +msg_info "Installing Database" +sqlpass="" +echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections +echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections +apt-get install -y mariadb-server &>/dev/null +service mysql start +sqluser="root" +mysql -e "source sql/user.sql" || true +mysql -e "source sql/framework.sql" || true +msg_ok "Installed Database" +cp conf.sample.json conf.json +cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') +sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json +cp super.sample.json super.json + +msg_info "Installing Shinobi" +npm i npm -g &>/dev/null +npm install --unsafe-perm &>/dev/null +npm install pm2@latest -g &>/dev/null +chmod -R 755 . +touch INSTALL/installed.txt +ln -s /opt/Shinobi/INSTALL/shinobi /usr/bin/shinobi +node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null +pm2 start camera.js &>/dev/null +pm2 start cron.js &>/dev/null +pm2 startup &>/dev/null +pm2 save &>/dev/null +pm2 list &>/dev/null +msg_ok "Installed Shinobi" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From a9e5aebdbdcfdbd6069363ac5a0257f8ad75b1b8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Nov 2022 16:55:41 -0500 Subject: [PATCH 0546/3335] Create shinobi-v4.sh --- ct/shinobi-v4.sh | 288 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 ct/shinobi-v4.sh diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh new file mode 100644 index 00000000..ed3020b7 --- /dev/null +++ b/ct/shinobi-v4.sh @@ -0,0 +1,288 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Shinobi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="22.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + _____ __ _ __ _ + / ___// /_ (_)___v4____ / /_ (_) + \__ \/ __ \/ / __ \/ __ \/ __ \/ / + ___/ / / / / / / / / /_/ / /_/ / / +/____/_/ /_/_/_/ /_/\____/_.___/_/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" ON \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8080/super${CL} \n" From 7a28d21247ac8c2b44f8c8abc54d80fa25e804ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Nov 2022 17:02:23 -0500 Subject: [PATCH 0547/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ea4de26c..3d3660c3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-11-27 + +### Changed + +- **Shinobi LXC** + - NEW Script + ## 2022-11-24 ### Changed From 4d66780ec121a5f08048f86845144dcda2808fb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 28 Nov 2022 13:56:14 -0500 Subject: [PATCH 0548/3335] Update paperless-ngx-install.sh --- setup/paperless-ngx-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 01f85926..1a732217 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -196,12 +196,12 @@ msg_ok "Set up admin Paperless-ngx User & Password" cat </etc/systemd/system/paperless-scheduler.service [Unit] -Description=Paperless consumer +Description=Paperless Celery Beat Requires=redis.service [Service] WorkingDirectory=/opt/paperless/src -ExecStart=python3 manage.py qcluster +ExecStart=celery --app paperless beat --loglevel INFO [Install] WantedBy=multi-user.target From dae1040a24988076ecf6dfc198eaac3b0a70aa6f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 10:28:05 -0500 Subject: [PATCH 0549/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 87cbf03f..ba5cfab3 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -38,7 +38,8 @@ cat <<"EOF" /_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| /_/ UPDATE /____/ EOF - +echo -e "🚨 This will break Paperless-ngx DO NOT UPGRADE to version 1.10.0" +echo -e "Working on a solution" while true; do read -p "This will Update Paperless-ngx to $RELEASE. Proceed(y/n)?" yn case $yn in From ba6d6bdc6a95187dbc29a19b54b30436c7b8671a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 10:33:32 -0500 Subject: [PATCH 0550/3335] Update paperless-ngx-install.sh switch back to v1.9.2 --- setup/paperless-ngx-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 1a732217..cbf0b26e 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -137,10 +137,10 @@ msg_ok "Installed JBIG2" msg_info "Downloading Paperless-ngx" Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) cd /opt && - wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && - tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && + wget https://github.com/paperless-ngx/paperless-ngx/releases/download/v1.9.2/paperless-ngx-v1.9.2.tar.xz &>/dev/null && + tar -xf paperless-ngx-v1.9.2.tar.xz -C /opt/ &>/dev/null && mv paperless-ngx paperless && - rm paperless-ngx-$Paperlessngx.tar.xz + rm paperless-ngx-v1.9.2.tar.xz cd /opt/paperless ## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file @@ -201,7 +201,8 @@ Requires=redis.service [Service] WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless beat --loglevel INFO +#ExecStart=celery --app paperless beat --loglevel INFO +ExecStart=python3 manage.py qcluster [Install] WantedBy=multi-user.target From e3ebc43ae6fd685745c52260ea82cb56119f575e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 11:37:28 -0500 Subject: [PATCH 0551/3335] Update paperless-ngx-install.sh fix for v1.10.0 --- setup/paperless-ngx-install.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index cbf0b26e..41e72f36 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -137,10 +137,10 @@ msg_ok "Installed JBIG2" msg_info "Downloading Paperless-ngx" Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) cd /opt && - wget https://github.com/paperless-ngx/paperless-ngx/releases/download/v1.9.2/paperless-ngx-v1.9.2.tar.xz &>/dev/null && - tar -xf paperless-ngx-v1.9.2.tar.xz -C /opt/ &>/dev/null && + wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && + tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && mv paperless-ngx paperless && - rm paperless-ngx-v1.9.2.tar.xz + rm paperless-ngx-$Paperlessngx.tar.xz cd /opt/paperless ## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file @@ -196,13 +196,25 @@ msg_ok "Set up admin Paperless-ngx User & Password" cat </etc/systemd/system/paperless-scheduler.service [Unit] -Description=Paperless Celery Beat +Description=Paperless Celery beat Requires=redis.service [Service] WorkingDirectory=/opt/paperless/src -#ExecStart=celery --app paperless beat --loglevel INFO -ExecStart=python3 manage.py qcluster +ExecStart=celery --app paperless beat --loglevel INFO + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/paperless-task-queue.service +[Unit] +Description=Paperless Celery Workers +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless worker --loglevel INFO [Install] WantedBy=multi-user.target @@ -239,7 +251,7 @@ EOF sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml systemctl daemon-reload -systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler &>/dev/null +systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service &>/dev/null msg_ok "Finished installing Paperless-ngx" From 165ea5897bc8246c62aa6baac9652cc2e556138a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 12:02:29 -0500 Subject: [PATCH 0552/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index ba5cfab3..d6d93222 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -38,8 +38,7 @@ cat <<"EOF" /_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| /_/ UPDATE /____/ EOF -echo -e "🚨 This will break Paperless-ngx DO NOT UPGRADE to version 1.10.0" -echo -e "Working on a solution" + while true; do read -p "This will Update Paperless-ngx to $RELEASE. Proceed(y/n)?" yn case $yn in @@ -50,7 +49,7 @@ while true; do done sleep 2 msg_info "Stopping Paperless-ngx" -systemctl stop paperless-consumer paperless-webserver paperless-scheduler +systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service sleep 1 msg_ok "Stopped Paperless-ngx" @@ -64,6 +63,33 @@ sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://gi pip install -r requirements.txt &>/dev/null cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null +SER=/etc/systemd/system/paperless-task-queue.service +if [ -f "$SER" ]; then + msg_ok "paperless-task-queue.service Exists." +else +cat </etc/systemd/system/paperless-task-queue.service +[Unit] +Description=Paperless Celery Workers +Requires=redis.service +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless worker --loglevel INFO +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now paperless-task-queue +msg_ok "paperless-task-queue.service Created." +fi +cat </etc/systemd/system/paperless-scheduler.service +[Unit] +Description=Paperless Celery beat +Requires=redis.service +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless beat --loglevel INFO +[Install] +WantedBy=multi-user.target +EOF msg_ok "Updated to ${RELEASE}" msg_info "Cleaning up" @@ -73,7 +99,7 @@ rm -rf paperless-ngx msg_ok "Cleaned" msg_info "Starting Paperless-ngx" -systemctl start paperless-consumer paperless-webserver paperless-scheduler +systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service sleep 1 msg_ok "Finished Update" echo -e "\n${BL}It may take a minute or so for Paperless-ngx to become available.${CL}\n" From 2c3dfafae9182c9483584f22f07a41e150401419 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 12:05:08 -0500 Subject: [PATCH 0553/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index d6d93222..6b9c4dba 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -77,7 +77,7 @@ ExecStart=celery --app paperless worker --loglevel INFO [Install] WantedBy=multi-user.target EOF -systemctl enable --now paperless-task-queue +systemctl enable paperless-task-queue &>/dev/null msg_ok "paperless-task-queue.service Created." fi cat </etc/systemd/system/paperless-scheduler.service From 3f01bfcf3110e3b887e2524c1e795c4314e58b43 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 12:08:17 -0500 Subject: [PATCH 0554/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 6b9c4dba..509067bc 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -99,6 +99,7 @@ rm -rf paperless-ngx msg_ok "Cleaned" msg_info "Starting Paperless-ngx" +systemctl daemon-reload systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service sleep 1 msg_ok "Finished Update" From 1068827ea0aeb29543ca4feb9a395ad88fd5d395 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 13:15:52 -0500 Subject: [PATCH 0555/3335] Update paperless-ngx-update.sh fix paperless-task-queue.service stop --- misc/paperless-ngx-update.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 509067bc..752c4376 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash clear RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +SER=/etc/systemd/system/paperless-task-queue.service YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -49,7 +50,10 @@ while true; do done sleep 2 msg_info "Stopping Paperless-ngx" -systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service +systemctl stop paperless-consumer paperless-webserver paperless-scheduler +if [ -f "$SER" ]; then + systemctl stop paperless-task-queue.service +fi sleep 1 msg_ok "Stopped Paperless-ngx" @@ -63,7 +67,6 @@ sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://gi pip install -r requirements.txt &>/dev/null cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null -SER=/etc/systemd/system/paperless-task-queue.service if [ -f "$SER" ]; then msg_ok "paperless-task-queue.service Exists." else From 1eaf803c29974c95a5e848554848a5f1d6096f34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Nov 2022 22:03:06 -0500 Subject: [PATCH 0556/3335] Update hacore2hacore-data.sh --- misc/hacore2hacore-data.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/hacore2hacore-data.sh b/misc/hacore2hacore-data.sh index 1faff32c..3f5352e6 100644 --- a/misc/hacore2hacore-data.sh +++ b/misc/hacore2hacore-data.sh @@ -81,15 +81,15 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then pct stop $CTID_TO fi msg "Mounting Container Disks..." -DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data CORE_PATH=/root/.homeassistant +CORE_PATH2=/root/ CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." [ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || +[ -d "${CTID_TO_PATH}${CORE_PATH2}" ] || die "Home Assistant directories in '$CTID_TO' not found." msg "Copying Data..." @@ -102,7 +102,7 @@ RSYNC_OPTIONS=( --info=progress2 ) msg "<======== Docker Data ========>" -rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${CORE_PATH} ${CTID_TO_PATH}${CORE_PATH} +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${CORE_PATH} ${CTID_TO_PATH}${CORE_PATH2} echo -en "\e[1A\e[0K\e[1A\e[0K" info "Successfully Transferred Data." From a42bdbee40b19d265f72d9ce046fde6cc844471e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Nov 2022 22:04:27 -0500 Subject: [PATCH 0557/3335] Update homeassistant-core-install.sh remove bluez --- setup/homeassistant-core-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 956db032..397c7680 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -85,7 +85,6 @@ apt-get install -y \ python3-dev \ python3-venv \ python3-pip \ - bluez \ libffi-dev \ libssl-dev \ libjpeg-dev \ From 73d993a30d83be8a96b95b28c2fa653fb1ecdb90 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Dec 2022 10:03:56 -0500 Subject: [PATCH 0558/3335] Create pyenv2.sh --- misc/pyenv2.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 misc/pyenv2.sh diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh new file mode 100644 index 00000000..9b7126fb --- /dev/null +++ b/misc/pyenv2.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -e +echo "Installing Python 3.10.8" +pyenv install 3.10.8 &>/dev/null +pyenv global 3.10.8 +echo "Installed Python 3.10.8" +read -r -p "Would you like to install Home Assistant Beta? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + HA="Y" +fi +if [[ $HA == "Y" ]]; then +echo "Installing Home Assistant Beta" +cat </etc/systemd/system/homeassistant.service +[Unit] +Description=Home Assistant +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/root/.homeassistant +ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" +RestartForceExitStatus=100 +[Install] +WantedBy=multi-user.target +EOF +mkdir /srv/homeassistant +cd /srv/homeassistant +python3 -m venv . +source bin/activate +python3 -m pip install wheel &>/dev/null +pip3 install psycopg2-binary &>/dev/null +pip3 install --pre homeassistant &>/dev/null +systemctl enable homeassistant &>/dev/null +echo "Installed Home Assistant Beta" +echo -e " Go to $(hostname -I | awk '{print $1}'):8123" +hass +fi From 9742c35d6ad5c26403725cdc2a0c4c6b50b536f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Dec 2022 10:05:02 -0500 Subject: [PATCH 0559/3335] Create pyenv.sh --- misc/pyenv.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 misc/pyenv.sh diff --git a/misc/pyenv.sh b/misc/pyenv.sh new file mode 100644 index 00000000..9d596f7c --- /dev/null +++ b/misc/pyenv.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -e +echo "Installing pyenv" +apt-get install -y \ +make \ +build-essential \ +libjpeg-dev \ +libpcap-dev \ +libssl-dev \ +zlib1g-dev \ +libbz2-dev \ +libreadline-dev \ +libsqlite3-dev \ +autoconf \ +git \ +llvm \ +libncursesw5-dev \ +xz-utils \ +tk-dev \ +libxml2-dev \ +libxmlsec1-dev \ +libffi-dev \ +libopenjp2-7 \ +libtiff5 \ +libturbojpeg0-dev \ +liblzma-dev &>/dev/null + +git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null + +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc +echo "Installed pyenv" +echo "Restarting Shell" +echo "Run pyenv2.sh to finish" +exec $SHELL From 102a2061b4b404e073ac5599ab6fdef684284d1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Dec 2022 15:27:42 -0500 Subject: [PATCH 0560/3335] options to set DNS (#803) --- ct/adguard-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/alpine-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/archlinux-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/blocky-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/casaos-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/daemonsync-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/dashy-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/debian-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/deconz-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/docker-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/emby-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/emqx-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/esphome-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/grafana-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/grocy-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/heimdalldashboard-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/homeassistant-core-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/homeassistant-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/homebridge-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/homepage-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/influxdb-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/iobroker-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/jellyfin-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/keycloak-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/magicmirror-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/mariadb-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/meshcentral-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/motioneye-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/mqtt-v4.sh | 2 ++ ct/n8n-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/navidrome-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/nextcloudpi-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/nginx-proxy-manager-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/nocodb-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/node-red-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/omada-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/omv-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/openhab-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/paperless-ngx-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/photoprism-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/pihole-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/plex-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/podman-homeassistant-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/postgresql-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/prometheus-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/scrypted-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/shinobi-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/syncthing-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/technitiumdns-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/trilium-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/ubuntu-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/umbrel-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/unifi-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/uptimekuma-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/vaultwarden-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/whoogle-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/wikijs-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/wireguard-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/zigbee2mqtt-v4.sh | 30 ++++++++++++++++++++++++++++++ ct/zwave-js-ui-v4.sh | 30 ++++++++++++++++++++++++++++++ 60 files changed, 1772 insertions(+) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index 5d67195f..1c50582a 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/alpine-v4.sh b/ct/alpine-v4.sh index 546de0ad..dd3a7d6d 100644 --- a/ct/alpine-v4.sh +++ b/ct/alpine-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -188,6 +192,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -254,6 +282,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/archlinux-v4.sh b/ct/archlinux-v4.sh index 4b33de51..6c8c294a 100644 --- a/ct/archlinux-v4.sh +++ b/ct/archlinux-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index b861c58a..0f6ebcad 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 2ac17453..9a2a9dee 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 27e49b1f..ce51efa0 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index abb1eae3..43a9ce29 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index c2e7cfce..457e5bce 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 1b9d3f1a..f3aa35f4 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index d65fd6a0..aa82aafc 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 354d640b..06a83bf9 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -91,6 +91,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -201,6 +205,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -267,6 +295,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index fcc35a86..6dbffae3 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index 2429f988..45d2f651 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 0678a118..0a096cb5 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index e41ada96..3aa8b8a2 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 8c831979..1d20b4ab 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index fd3bb250..e2e6d324 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index a7d1fb71..b3c21663 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 0b7510f2..604e8756 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 7781857f..e0079f56 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 25cb3a3d..544c08a6 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 5b5d78b7..bbea2222 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 9ebf41d8..e83f9b3b 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -91,6 +91,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -201,6 +205,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -267,6 +295,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 0b9babff..5ab128f3 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 78bd04a7..14686897 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index a1201a89..ba1848bc 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 885a8a3c..268be525 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index d75d9e52..70798f15 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index dcdc2f71..b511688d 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -226,6 +226,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index 18e74805..e864e714 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 3e6d737f..e274d0cf 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index d2b8d7a2..e5bb4d6f 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index bf9c0037..f6ec77d7 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index ba516ee4..8a7680e6 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index c95cc54b..87bf78e5 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index ae0a1faf..5ced9246 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -200,6 +204,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -266,6 +294,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index 628f4c11..9be51f0b 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index d120b45d..0ce75e46 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 53ea9807..3b5247e8 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index 217d1a31..fad36764 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 83c7b06f..a34e8eb5 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index d1798958..8564195d 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -91,6 +91,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -201,6 +205,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -267,6 +295,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index bad2ad8f..c5944bef 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -93,6 +93,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -195,6 +199,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -261,6 +289,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index ab0fa879..a3c82982 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 4d1c7e05..a792708e 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index 4f1b213c..cc23caee 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh index ed3020b7..265e7d23 100644 --- a/ct/shinobi-v4.sh +++ b/ct/shinobi-v4.sh @@ -91,6 +91,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -201,6 +205,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -267,6 +295,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index 9084cd49..c741c527 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -91,6 +91,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -193,6 +197,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -259,6 +287,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index 5bcd7bfe..ce8c822a 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index fa2f31de..c7b08580 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 182cdd21..13d9fa3d 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -200,6 +204,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -266,6 +294,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 4e98420b..1df43db6 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index 2d2582ad..329e3326 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index fd2ee780..d49cf8cc 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index c64c257a..ecf7d10f 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 0d35cb1b..3457e95e 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -89,6 +89,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -191,6 +195,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -257,6 +285,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index df631e62..13a5dccd 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 7b3bc459..da10e317 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -91,6 +91,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -193,6 +197,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -259,6 +287,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 335bf03e..5d726061 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 8442a1ec..d477aefb 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -90,6 +90,10 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -192,6 +196,30 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -258,6 +286,8 @@ export PCT_DISK_SIZE=$DISK_SIZE export PCT_OPTIONS=" -features $FEATURES -hostname $HN + $SD + $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN -onboot 1 -cores $CORE_COUNT From 68384f1e6efeb96b5efc0a9627313307c3abcbb4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Dec 2022 15:30:22 -0500 Subject: [PATCH 0561/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 3d3660c3..9d48acac 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-03 + +### Changed + +- **All LXC's** + - Add options to set DNS Server IP Address and DNS Search Domain (Advanced) + ## 2022-11-27 ### Changed From 1de5901ff48512164cd61c0bbc7fa898f9808532 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Dec 2022 13:44:27 -0500 Subject: [PATCH 0562/3335] Update mqtt-v4.sh --- ct/mqtt-v4.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index b511688d..b572a509 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -91,11 +91,11 @@ function default_settings() { GATE="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ From 9e1c5b15e069d5d4a5b8bdb7cc0f58425bc6b8fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Dec 2022 13:57:01 -0500 Subject: [PATCH 0563/3335] Update mqtt-v4.sh fix missing variables --- ct/mqtt-v4.sh | 89 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 27 deletions(-) diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index b572a509..afcb6892 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -69,33 +69,37 @@ if [[ $PVE != 1 ]]; then fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ @@ -169,6 +173,30 @@ else echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -189,6 +217,13 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else From 34da49ea02a5d256b3adc107474b9a200cb9b553 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Dec 2022 17:35:28 -0500 Subject: [PATCH 0564/3335] Update haos-vm-v4.sh changes for non thin provisioned disks --- vm/haos-vm-v4.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 6075915e..d4890df0 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -18,6 +18,7 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," set -o errexit set -o errtrace set -o nounset @@ -132,7 +133,7 @@ MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script " exitstatus=$? if [ $MACH = q35 ]; then echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT=",format=raw" + FORMAT="" MACHINE=" -machine q35" else echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" @@ -254,15 +255,17 @@ unxz $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in nfs|dir) - DISK_EXT=".qcow2" + DISK_EXT=".raw" DISK_REF="$VMID/" - DISK_IMPORT="-format qcow2" + DISK_IMPORT="-format raw" + THIN="" ;; btrfs) DISK_EXT=".raw" DISK_REF="$VMID/" - DISK_FORMAT="subvol" DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" ;; esac for i in {0,1}; do @@ -278,7 +281,7 @@ pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ - -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 \ + -scsi0 ${DISK1_REF},${THIN}size=32G \ -boot order=scsi0 \ -description "# Home Assistant OS ### https://github.com/tteck/Proxmox From 532da20188ecc9aa9091083eb7e4f70188d77f6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 10:25:37 -0500 Subject: [PATCH 0565/3335] Update pyenv2.sh --- misc/pyenv2.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 9b7126fb..70e99977 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -34,3 +34,25 @@ echo "Installed Home Assistant Beta" echo -e " Go to $(hostname -I | awk '{print $1}'):8123" hass fi + +read -r -p "Would you like to install ESPHome Beta? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ESP="Y" +fi +if [[ $ESP == "Y" ]]; then +echo "Installing ESPHome" +pip3 install --pre esphome &>/dev/null +cat </etc/systemd/system/esphomeDashboard.service +[Unit] +Description=ESPHome Dashboard +After=network.target +[Service] +ExecStart=/root/.pyenv/versions/3.10.8/bin/esphome /root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/esphome_dashboard dashboard +Restart=always +User=root +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now esphomeDashboard &>/dev/null +echo "Installed ESPHome" +fi From 124e0e191b7a8180c361d143bb1bc3bf39d18352 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 16:02:05 -0500 Subject: [PATCH 0566/3335] Update pyenv2.sh --- misc/pyenv2.sh | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 70e99977..77a3d610 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -27,6 +27,7 @@ cd /srv/homeassistant python3 -m venv . source bin/activate python3 -m pip install wheel &>/dev/null +pip3 install --upgrade pip &>/dev/null pip3 install psycopg2-binary &>/dev/null pip3 install --pre homeassistant &>/dev/null systemctl enable homeassistant &>/dev/null @@ -40,19 +41,35 @@ if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ] ESP="Y" fi if [[ $ESP == "Y" ]]; then -echo "Installing ESPHome" +echo "Installing ESPHome Beta" +mkdir /srv/esphome +cd /srv/esphome +python3 -m venv . +source bin/activate +python3 -m pip install wheel &>/dev/null +pip3 install --upgrade pip &>/dev/null pip3 install --pre esphome &>/dev/null -cat </etc/systemd/system/esphomeDashboard.service +cat </srv/esphome/start.sh +#!/bin/bash +source /srv/esphome/bin/activate +esphome dashboard /srv/esphome/ +EOF +chmod +x start.sh +cat </etc/systemd/system/esphomedashboard.service [Unit] -Description=ESPHome Dashboard +Description=ESPHome Dashboard Service After=network.target [Service] -ExecStart=/root/.pyenv/versions/3.10.8/bin/esphome /root/.pyenv/versions/3.10.8/lib/python3.10/site-packages/esphome_dashboard dashboard -Restart=always +Type=simple User=root +WorkingDirectory=/srv/esphome +ExecStart=/srv/esphome/start.sh +RestartSec=30 +Restart=on-failure [Install] WantedBy=multi-user.target EOF -systemctl enable --now esphomeDashboard &>/dev/null -echo "Installed ESPHome" +systemctl enable --now esphomedashboard &>/dev/null +echo "Installed ESPHome Beta" +echo -e " Go to $(hostname -I | awk '{print $1}'):6052" fi From f5595b070915e4f7af0b4d4e09060af7e5ffbe7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 18:38:58 -0500 Subject: [PATCH 0567/3335] Update pyenv2.sh --- misc/pyenv2.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 77a3d610..87349fde 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -73,3 +73,21 @@ systemctl enable --now esphomedashboard &>/dev/null echo "Installed ESPHome Beta" echo -e " Go to $(hostname -I | awk '{print $1}'):6052" fi + +read -r -p "Would you like to install Matter-Server? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + MTR="Y" +fi +if [[ $MTR == "Y" ]]; then +echo "Installing Matter Server" +apt-get install -y \ +libcairo2-dev \ +libjpeg62-turbo-dev \ +libgirepository1.0-dev \ +libpango1.0-dev \ +libgif-dev \ +g++ &>/dev/null +python3 -m pip install wheel +pip3 install --upgrade pip +pip install python-matter-server[server] +echo "Installed Matter Server" From 8b36a1953b1fe4853c65dc08da9d061029b1484b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 18:45:29 -0500 Subject: [PATCH 0568/3335] Update pyenv.sh --- misc/pyenv.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/pyenv.sh b/misc/pyenv.sh index 9d596f7c..a36ffdf5 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi set -e echo "Installing pyenv" apt-get install -y \ From e1355dc305dc1aa40d9c9c0a8887a6d7324bef5c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 18:45:58 -0500 Subject: [PATCH 0569/3335] Update pyenv2.sh --- misc/pyenv2.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 87349fde..6aff5940 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi set -e echo "Installing Python 3.10.8" pyenv install 3.10.8 &>/dev/null From bd4592523de09bf9d8d34105286f62ae6643135c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 18:51:59 -0500 Subject: [PATCH 0570/3335] Update pyenv2.sh --- misc/pyenv2.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 6aff5940..aef5896c 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -91,4 +91,5 @@ g++ &>/dev/null python3 -m pip install wheel pip3 install --upgrade pip pip install python-matter-server[server] +fi echo "Installed Matter Server" From 0fc2a3733414dddee4160cd5ebd4fcd60d8e2902 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 19:14:24 -0500 Subject: [PATCH 0571/3335] Update pyenv2.sh --- misc/pyenv2.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index aef5896c..0c744785 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -1,10 +1,15 @@ #!/usr/bin/env bash if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi set -e +DIR=/root/.pyenv/3.10.8 +if [ -d "$DIR" ]; then + echo "Python 3.10.8 is already installed, moving on..." +else echo "Installing Python 3.10.8" pyenv install 3.10.8 &>/dev/null pyenv global 3.10.8 echo "Installed Python 3.10.8" +fi read -r -p "Would you like to install Home Assistant Beta? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then HA="Y" From e86baf6a43b91683d176dc8774767fe8f6f22ee6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 19:16:13 -0500 Subject: [PATCH 0572/3335] Update pyenv2.sh --- misc/pyenv2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 0c744785..46ee141a 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi set -e -DIR=/root/.pyenv/3.10.8 +DIR=/root/.pyenv/versions/3.10.8 if [ -d "$DIR" ]; then echo "Python 3.10.8 is already installed, moving on..." else From ee1c480ebf0982e4a8031ae0725e1663f603e8da Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 19:19:12 -0500 Subject: [PATCH 0573/3335] Update pyenv2.sh --- misc/pyenv2.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 46ee141a..751a8f9e 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -96,5 +96,6 @@ g++ &>/dev/null python3 -m pip install wheel pip3 install --upgrade pip pip install python-matter-server[server] -fi echo "Installed Matter Server" +fi +echo -e "\nFinished\n" From cd2acd8b972b4706fe6c1d55601302e2ee458889 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Dec 2022 19:41:47 -0500 Subject: [PATCH 0574/3335] Update pyenv2.sh --- misc/pyenv2.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh index 751a8f9e..58ae4351 100644 --- a/misc/pyenv2.sh +++ b/misc/pyenv2.sh @@ -97,5 +97,6 @@ python3 -m pip install wheel pip3 install --upgrade pip pip install python-matter-server[server] echo "Installed Matter Server" +echo -e "Start server > python -m matter_server.server" fi echo -e "\nFinished\n" From 227fb76e410ca564cbbd1891b280199dccad5225 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Dec 2022 10:18:55 -0500 Subject: [PATCH 0575/3335] Create changedetection-install.sh --- setup/changedetection-install.sh | 134 +++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 setup/changedetection-install.sh diff --git a/setup/changedetection-install.sh b/setup/changedetection-install.sh new file mode 100644 index 00000000..486c474b --- /dev/null +++ b/setup/changedetection-install.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y pip &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Change Detection" +mkdir /opt/changedetection +pip3 install changedetection.io &>/dev/null +msg_ok "Installed Change Detection" + +msg_info "Creating Service" +cat </etc/systemd/system/changedetection.service +[Unit] +Description=Change Detection +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/opt/changedetection +ExecStart=changedetection.io -d /opt/changedetection -p 5000 +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now changedetection &>/dev/null +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + cat <>/etc/ssh/sshd_config +PermitRootLogin yes +EOF +systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From a4ef550738992a4825706abec93a08b496c5c3b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Dec 2022 10:20:23 -0500 Subject: [PATCH 0576/3335] Create changedetection-v4.sh --- ct/changedetection-v4.sh | 309 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 ct/changedetection-v4.sh diff --git a/ct/changedetection-v4.sh b/ct/changedetection-v4.sh new file mode 100644 index 00000000..13f64d23 --- /dev/null +++ b/ct/changedetection-v4.sh @@ -0,0 +1,309 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Change Detection" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + ________ ____ __ __ _ + / ____/ /_v4____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ + / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ +/ /___/ / / / /_/ / / / / /_/ / __/ / /_/ / __/ /_/ __/ /__/ /_/ / /_/ / / / / +\____/_/ /_/\__,_/_/ /_/\__, /\___/ /_____/\___/\__/\___/\___/\__/_/\____/_/ /_/ + /____/ +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From 2f67cc885c6965cbf17ceb5440e3dd41d5fac46c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Dec 2022 11:04:19 -0500 Subject: [PATCH 0577/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 9d48acac..e59cc515 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-09 + +### Changed + +- **Change Detection LXC** + - NEW Script + ## 2022-12-03 ### Changed From fef4ebe456441b31d9c8ee6db86ed9423b6ed207 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Dec 2022 20:12:33 -0500 Subject: [PATCH 0578/3335] mount fix (#830) --- ct/emby-v4.sh | 2 +- ct/jellyfin-v4.sh | 2 +- ct/plex-v4.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 06a83bf9..d8abcd6e 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -314,7 +314,7 @@ lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF fi msg_info "Starting LXC Container" diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index e83f9b3b..a0c417d0 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -314,7 +314,7 @@ lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF fi msg_info "Starting LXC Container" diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index 8564195d..cfcd9696 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -314,7 +314,7 @@ lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF fi msg_info "Starting LXC Container" From ef8238332ae95a82c3ff90700326aee6c2619c63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Dec 2022 06:27:22 -0500 Subject: [PATCH 0579/3335] Update nextcloudpi-install.sh php8.2 error fix --- setup/nextcloudpi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index c5f63f65..217eb7cf 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -85,7 +85,7 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" -curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null +curl -sSL https://raw.githubusercontent.com/tteck/nextcloudpi/master/install.sh | bash &>/dev/null msg_ok "Installed NextCloudPi" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 7a788da1dea33763d1c789970787f29bcab33aa5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Dec 2022 11:24:37 -0500 Subject: [PATCH 0580/3335] check for wget --- vm/haos-vm-v4.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index d4890df0..2e6d6858 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -239,6 +239,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +if ! command -v wget >/dev/null 2>&1; then apt-get install -y wget &>/dev/null; fi if [ "$BRANCH" == "$DEV" ]; then URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz else From c76e4072da4f056a2114ee1adc2a2f12fac07c60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Dec 2022 07:59:52 -0500 Subject: [PATCH 0581/3335] Update homeassistant-core-install.sh --- setup/homeassistant-core-install.sh | 47 ++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 397c7680..3ca1a401 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -79,27 +79,48 @@ apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated Container OS" -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (Patience)" apt-get install -y \ - python3 \ - python3-dev \ - python3-venv \ - python3-pip \ - libffi-dev \ - libssl-dev \ + make \ + build-essential \ libjpeg-dev \ libpcap-dev \ + libssl-dev \ zlib1g-dev \ + libbz2-dev \ + libreadline-dev \ + libsqlite3-dev \ autoconf \ - build-essential \ + git \ + curl \ + sudo \ + llvm \ + libncursesw5-dev \ + xz-utils \ + tk-dev \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ libopenjp2-7 \ libtiff5 \ libturbojpeg0-dev \ - tzdata \ - curl \ - sudo &>/dev/null + liblzma-dev &>/dev/null msg_ok "Installed Dependencies" +msg_info "Installing pyenv" +git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null +set +e +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc +msg_ok "Installed pyenv" +. ~/.bashrc +set -e +msg_info "Installing Python 3.10.8" +pyenv install 3.10.8 &>/dev/null +pyenv global 3.10.8 +msg_ok "Installed Python 3.10.8" + msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant cd /srv/homeassistant @@ -107,14 +128,10 @@ python3 -m venv . source bin/activate python3 -m pip install wheel &>/dev/null pip3 install homeassistant &>/dev/null -pip3 install Cython &>/dev/null -pip3 install python-libpcap &>/dev/null -pip3 install psycopg2-binary &>/dev/null msg_ok "Installed Home Assistant-Core" msg_info "Creating Service" cat </etc/systemd/system/homeassistant.service - [Unit] Description=Home Assistant After=network-online.target From 9eb8c142972d2ef63ab1c6061c04a337b38b840c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Dec 2022 08:01:38 -0500 Subject: [PATCH 0582/3335] Update homeassistant-core-v4.sh --- ct/homeassistant-core-v4.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index e2e6d324..af70dd12 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -44,12 +44,12 @@ else fi function header_info { cat <<"EOF" - __ __ ___ _ __ __ ______ - / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___v4________ - / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / __ \/ ___/ _ \ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /___/ /_/ / / / __/ -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____/\____/_/ \___/ - + _ _ _ _ ___ + /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___v4_ __ ___ + / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ +/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ +\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| + EOF } function msg_info() { From 90ed1a7de35740a203109126d15ef28978fd415d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Dec 2022 08:05:25 -0500 Subject: [PATCH 0583/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index e59cc515..5f6f4bb7 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-16 + +### Changed + +- **Home Assistant Core LXC** + - Python 3.10.8 + ## 2022-12-09 ### Changed From 318eb7f4e22c59e9f8e09164b293b08fb2a32e9f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Dec 2022 09:02:11 -0500 Subject: [PATCH 0584/3335] Update pyenv.sh --- misc/pyenv.sh | 175 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 147 insertions(+), 28 deletions(-) diff --git a/misc/pyenv.sh b/misc/pyenv.sh index a36ffdf5..51120c62 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -1,37 +1,156 @@ #!/usr/bin/env bash -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi set -e -echo "Installing pyenv" +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} +if command -v pveversion >/dev/null 2>&1; then msg_error "Can't Install on Proxmox "; exit; fi +msg_info "Installing pyenv" apt-get install -y \ -make \ -build-essential \ -libjpeg-dev \ -libpcap-dev \ -libssl-dev \ -zlib1g-dev \ -libbz2-dev \ -libreadline-dev \ -libsqlite3-dev \ -autoconf \ -git \ -llvm \ -libncursesw5-dev \ -xz-utils \ -tk-dev \ -libxml2-dev \ -libxmlsec1-dev \ -libffi-dev \ -libopenjp2-7 \ -libtiff5 \ -libturbojpeg0-dev \ -liblzma-dev &>/dev/null + make \ + build-essential \ + libjpeg-dev \ + libpcap-dev \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + libreadline-dev \ + libsqlite3-dev \ + autoconf \ + git \ + curl \ + sudo \ + llvm \ + libncursesw5-dev \ + xz-utils \ + tk-dev \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ + libopenjp2-7 \ + libtiff5 \ + libturbojpeg0-dev \ + liblzma-dev &>/dev/null git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null - +set +e echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc -echo "Installed pyenv" -echo "Restarting Shell" -echo "Run pyenv2.sh to finish" +msg_ok "Installed pyenv" +. ~/.bashrc +set -e +msg_info "Installing Python 3.10.8" +pyenv install 3.10.8 &>/dev/null +pyenv global 3.10.8 +msg_ok "Installed Python 3.10.8" +read -r -p "Would you like to install Home Assistant Beta? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + HA="Y" +fi +if [[ $HA == "Y" ]]; then +msg_info "Installing Home Assistant Beta" +cat </etc/systemd/system/homeassistant.service +[Unit] +Description=Home Assistant +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/root/.homeassistant +ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" +RestartForceExitStatus=100 +[Install] +WantedBy=multi-user.target +EOF +mkdir /srv/homeassistant +cd /srv/homeassistant +python3 -m venv . +source bin/activate +python3 -m pip install wheel &>/dev/null +pip3 install --upgrade pip &>/dev/null +pip3 install psycopg2-binary &>/dev/null +pip3 install --pre homeassistant &>/dev/null +systemctl enable homeassistant &>/dev/null +msg_ok "Installed Home Assistant Beta" +echo -e " Go to $(hostname -I | awk '{print $1}'):8123" +hass +fi + +read -r -p "Would you like to install ESPHome Beta? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ESP="Y" +fi +if [[ $ESP == "Y" ]]; then +msg_info "Installing ESPHome Beta" +mkdir /srv/esphome +cd /srv/esphome +python3 -m venv . +source bin/activate +python3 -m pip install wheel &>/dev/null +pip3 install --upgrade pip &>/dev/null +pip3 install --pre esphome &>/dev/null +cat </srv/esphome/start.sh +#!/bin/bash +source /srv/esphome/bin/activate +esphome dashboard /srv/esphome/ +EOF +chmod +x start.sh +cat </etc/systemd/system/esphomedashboard.service +[Unit] +Description=ESPHome Dashboard Service +After=network.target +[Service] +Type=simple +User=root +WorkingDirectory=/srv/esphome +ExecStart=/srv/esphome/start.sh +RestartSec=30 +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now esphomedashboard &>/dev/null +msg_ok "Installed ESPHome Beta" +echo -e " Go to $(hostname -I | awk '{print $1}'):6052" +exec $SHELL +fi + +read -r -p "Would you like to install Matter-Server (Beta)? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + MTR="Y" +fi +if [[ $MTR == "Y" ]]; then +msg_info "Installing Matter Server" +apt-get install -y \ +libcairo2-dev \ +libjpeg62-turbo-dev \ +libgirepository1.0-dev \ +libpango1.0-dev \ +libgif-dev \ +g++ &>/dev/null +python3 -m pip install wheel +pip3 install --upgrade pip +pip install python-matter-server[server] +msg_ok "Installed Matter Server" +echo -e "Start server > python -m matter_server.server" +fi +msg_ok "\nFinished\n" exec $SHELL From ac54183ec949f3ae515b3769038826014a4a3d62 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Dec 2022 09:02:37 -0500 Subject: [PATCH 0585/3335] Delete pyenv2.sh --- misc/pyenv2.sh | 102 ------------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 misc/pyenv2.sh diff --git a/misc/pyenv2.sh b/misc/pyenv2.sh deleted file mode 100644 index 58ae4351..00000000 --- a/misc/pyenv2.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env bash -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi -set -e -DIR=/root/.pyenv/versions/3.10.8 -if [ -d "$DIR" ]; then - echo "Python 3.10.8 is already installed, moving on..." -else -echo "Installing Python 3.10.8" -pyenv install 3.10.8 &>/dev/null -pyenv global 3.10.8 -echo "Installed Python 3.10.8" -fi -read -r -p "Would you like to install Home Assistant Beta? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - HA="Y" -fi -if [[ $HA == "Y" ]]; then -echo "Installing Home Assistant Beta" -cat </etc/systemd/system/homeassistant.service -[Unit] -Description=Home Assistant -After=network-online.target -[Service] -Type=simple -WorkingDirectory=/root/.homeassistant -ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" -RestartForceExitStatus=100 -[Install] -WantedBy=multi-user.target -EOF -mkdir /srv/homeassistant -cd /srv/homeassistant -python3 -m venv . -source bin/activate -python3 -m pip install wheel &>/dev/null -pip3 install --upgrade pip &>/dev/null -pip3 install psycopg2-binary &>/dev/null -pip3 install --pre homeassistant &>/dev/null -systemctl enable homeassistant &>/dev/null -echo "Installed Home Assistant Beta" -echo -e " Go to $(hostname -I | awk '{print $1}'):8123" -hass -fi - -read -r -p "Would you like to install ESPHome Beta? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - ESP="Y" -fi -if [[ $ESP == "Y" ]]; then -echo "Installing ESPHome Beta" -mkdir /srv/esphome -cd /srv/esphome -python3 -m venv . -source bin/activate -python3 -m pip install wheel &>/dev/null -pip3 install --upgrade pip &>/dev/null -pip3 install --pre esphome &>/dev/null -cat </srv/esphome/start.sh -#!/bin/bash -source /srv/esphome/bin/activate -esphome dashboard /srv/esphome/ -EOF -chmod +x start.sh -cat </etc/systemd/system/esphomedashboard.service -[Unit] -Description=ESPHome Dashboard Service -After=network.target -[Service] -Type=simple -User=root -WorkingDirectory=/srv/esphome -ExecStart=/srv/esphome/start.sh -RestartSec=30 -Restart=on-failure -[Install] -WantedBy=multi-user.target -EOF -systemctl enable --now esphomedashboard &>/dev/null -echo "Installed ESPHome Beta" -echo -e " Go to $(hostname -I | awk '{print $1}'):6052" -fi - -read -r -p "Would you like to install Matter-Server? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - MTR="Y" -fi -if [[ $MTR == "Y" ]]; then -echo "Installing Matter Server" -apt-get install -y \ -libcairo2-dev \ -libjpeg62-turbo-dev \ -libgirepository1.0-dev \ -libpango1.0-dev \ -libgif-dev \ -g++ &>/dev/null -python3 -m pip install wheel -pip3 install --upgrade pip -pip install python-matter-server[server] -echo "Installed Matter Server" -echo -e "Start server > python -m matter_server.server" -fi -echo -e "\nFinished\n" From f1e4e0c19c0012921ce422155b9007cbfea6281f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Dec 2022 19:04:22 -0500 Subject: [PATCH 0586/3335] Update haos-vm-v4.sh revert check for wget --- vm/haos-vm-v4.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 2e6d6858..d4890df0 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -239,7 +239,6 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" -if ! command -v wget >/dev/null 2>&1; then apt-get install -y wget &>/dev/null; fi if [ "$BRANCH" == "$DEV" ]; then URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz else From cd7a9c618d50ba0d4c258a6d3559d9b87c6161f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 09:40:45 -0500 Subject: [PATCH 0587/3335] Update core-restore-from-backup.sh check for PVE --- misc/core-restore-from-backup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index afa664ee..6f65801b 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash clear +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") From bc3d30b4160fc79ed3965d08cd610398fe62e967 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 09:41:27 -0500 Subject: [PATCH 0588/3335] Update container-restore-from-backup.sh check for PVE --- misc/container-restore-from-backup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh index f1526ec5..bc0a6b52 100644 --- a/misc/container-restore-from-backup.sh +++ b/misc/container-restore-from-backup.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash clear +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") From 1a4837e881e82efed65c1a08f410cb26221c30ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 09:43:25 -0500 Subject: [PATCH 0589/3335] Update hacs.sh check for PVE --- misc/hacs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/hacs.sh b/misc/hacs.sh index 0c3cd2ad..e48dbf82 100644 --- a/misc/hacs.sh +++ b/misc/hacs.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" while true; do From 88647eee74ff627503a52f882ae8971da7a27523 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 09:44:07 -0500 Subject: [PATCH 0590/3335] Update hacs-core.sh check for PVE --- misc/hacs-core.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/hacs-core.sh b/misc/hacs-core.sh index 71a9524f..0479d932 100644 --- a/misc/hacs-core.sh +++ b/misc/hacs-core.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" while true; do From f22df25bd2eaecfa9f587452ff60fda1ae6c94cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 09:44:55 -0500 Subject: [PATCH 0591/3335] Update bluetooth.sh check for PVE --- misc/bluetooth.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh index f7b1ef91..69ea28e4 100644 --- a/misc/bluetooth.sh +++ b/misc/bluetooth.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi set -e clear From 4e117988d20ed5e49f7abde87d083f77dc5e3e8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 09:47:13 -0500 Subject: [PATCH 0592/3335] Update podman_hacs.sh check for PVE --- misc/podman_hacs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/podman_hacs.sh b/misc/podman_hacs.sh index 6936b066..10d5b1bf 100644 --- a/misc/podman_hacs.sh +++ b/misc/podman_hacs.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" while true; do From 32d804dbd748d5b8627930939cd3a859e8d63839 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 15:37:12 -0500 Subject: [PATCH 0593/3335] Update homeassistant-core-install.sh - Linux D-Bus Message Broker - Mariadb & PostgreSQL ready - fix for inconsistent dependency versions - Bluetooth ready --- setup/homeassistant-core-install.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 3ca1a401..cde1bef3 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -90,6 +90,7 @@ apt-get install -y \ libbz2-dev \ libreadline-dev \ libsqlite3-dev \ + libmariadb-dev-compat \ autoconf \ git \ curl \ @@ -97,6 +98,8 @@ apt-get install -y \ llvm \ libncursesw5-dev \ xz-utils \ + tzdata \ + bluez \ tk-dev \ libxml2-dev \ libxmlsec1-dev \ @@ -107,6 +110,16 @@ apt-get install -y \ liblzma-dev &>/dev/null msg_ok "Installed Dependencies" +msg_info "Installing Linux D-Bus Message Broker" +cat <>/etc/apt/sources.list +deb http://deb.debian.org/debian bullseye-backports main contrib non-free +deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free +EOF +apt-get update &>/dev/null +apt-get -t bullseye-backports install -y dbus-broker &>/dev/null +systemctl enable --now dbus-broker.service &>/dev/null +msg_ok "Installed Linux D-Bus Message Broker" + msg_info "Installing pyenv" git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null set +e @@ -126,10 +139,19 @@ mkdir /srv/homeassistant cd /srv/homeassistant python3 -m venv . source bin/activate +pip install --upgrade pip &>/dev/null python3 -m pip install wheel &>/dev/null -pip3 install homeassistant &>/dev/null +pip install mysqlclient &>/dev/null +pip install psycopg2-binary &>/dev/null +pip install homeassistant &>/dev/null msg_ok "Installed Home Assistant-Core" +# fix for inconsistent versions, hopefully the HA team will get this fixed +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json + msg_info "Creating Service" cat </etc/systemd/system/homeassistant.service [Unit] From 5756b217d1e726d5edb248cba00c48d26687a6f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 15:41:44 -0500 Subject: [PATCH 0594/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5f6f4bb7..afb53133 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,16 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-17 + +### Changed + +- **Home Assistant Core LXC** + - Linux D-Bus Message Broker + - Mariadb & PostgreSQL Ready + - Bluetooth Ready + - Fix for Inconsistent Dependency Versions (dbus-fast & bleak) + ## 2022-12-16 ### Changed From 71096ba2764536f1b7c522804a8a84d43e0d4041 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Dec 2022 21:59:55 -0500 Subject: [PATCH 0595/3335] Create core-update.sh --- misc/core-update.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 misc/core-update.sh diff --git a/misc/core-update.sh b/misc/core-update.sh new file mode 100644 index 00000000..b4e0acd2 --- /dev/null +++ b/misc/core-update.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +clear +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + cat <<"EOF" + _ _ _ _ ___ + /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___ _ __ ___ + / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ +/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ +\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| + UPDATE +EOF +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +msg_info "Stopping Home Assistant" +systemctl stop homeassistant +msg_ok "Stopped Home Assistant" + +read -r -p "Use the Beta Branch? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + BR="--pre " +else + BR="" +fi +msg_info "Updating Home Assistant" +source /srv/homeassistant/bin/activate +pip install ${BR}--upgrade homeassistant &>/dev/null +msg_ok "Updated Home Assistant" + +msg_info "Setting Dependency Versions" +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +msg_ok "Set Dependency Versions" + +msg_info "Starting Home Assistant" +systemctl start homeassistant +msg_ok "Started Home Assistant" +msg_ok "Update Successful" +exit From 21230cedb2d92a07936ee03c06fc2be6383752c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 05:45:09 -0500 Subject: [PATCH 0596/3335] Update core-update.sh fix for python 3.9 --- misc/core-update.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/misc/core-update.sh b/misc/core-update.sh index b4e0acd2..47a72dfb 100644 --- a/misc/core-update.sh +++ b/misc/core-update.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash clear if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi +set -e YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -42,16 +43,23 @@ msg_info "Updating Home Assistant" source /srv/homeassistant/bin/activate pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" - +set +e msg_info "Setting Dependency Versions" +DIR=/srv/homeassistant/lib/python3.10 +if [ -d "$DIR" ]; then sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +else +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/package_constraints.txt +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/bluetooth/manifest.json +fi msg_ok "Set Dependency Versions" - +set -e msg_info "Starting Home Assistant" systemctl start homeassistant msg_ok "Started Home Assistant" msg_ok "Update Successful" -exit From daa9b78019a9befaf1a2ec3a169578b09718172d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 06:25:23 -0500 Subject: [PATCH 0597/3335] Update hacore2hacore-data.sh check PVE --- misc/hacore2hacore-data.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/hacore2hacore-data.sh b/misc/hacore2hacore-data.sh index 3f5352e6..28e0997b 100644 --- a/misc/hacore2hacore-data.sh +++ b/misc/hacore2hacore-data.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn case $yn in From 44da61804129380be1812826d602446f305ae50a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 06:26:33 -0500 Subject: [PATCH 0598/3335] Update hacontainer2hacore-data.sh check PVE --- misc/hacontainer2hacore-data.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/hacontainer2hacore-data.sh b/misc/hacontainer2hacore-data.sh index e6563275..29728e47 100644 --- a/misc/hacontainer2hacore-data.sh +++ b/misc/hacontainer2hacore-data.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn case $yn in From bc4640d589fcedc947e47ee19f334f45ea42eb46 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 06:27:49 -0500 Subject: [PATCH 0599/3335] Update ha-copy-data.sh check PVE --- misc/ha-copy-data.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/ha-copy-data.sh b/misc/ha-copy-data.sh index 83f26a19..698c1cfb 100644 --- a/misc/ha-copy-data.sh +++ b/misc/ha-copy-data.sh @@ -2,6 +2,8 @@ # Use to copy all data from one Home Assistant LXC to another # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data.sh)" +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from one Home Assistant LXC to another. Proceed(y/n)?" yn case $yn in From deb681a21186f16c97921e4cbc7095abee8f3e49 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 06:28:48 -0500 Subject: [PATCH 0600/3335] Update ha-copy-data-podman.sh check PVE --- misc/ha-copy-data-podman.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/ha-copy-data-podman.sh b/misc/ha-copy-data-podman.sh index 7296519c..2b8abc13 100644 --- a/misc/ha-copy-data-podman.sh +++ b/misc/ha-copy-data-podman.sh @@ -2,6 +2,8 @@ # Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. # run from the Proxmox Shell # bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data-podman.sh)" +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. Proceed(y/n)?" yn case $yn in From e994ce793ca06bbd62ea98e79e478137fabe9d70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 06:29:56 -0500 Subject: [PATCH 0601/3335] Update hacore2hacontainer-data.sh check PVE --- misc/hacore2hacontainer-data.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/hacore2hacontainer-data.sh b/misc/hacore2hacontainer-data.sh index ec40b43c..ab037fc1 100644 --- a/misc/hacore2hacontainer-data.sh +++ b/misc/hacore2hacontainer-data.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC. Proceed(y/n)?" yn case $yn in From 9507f9df5ca0285f6112fb574355e1e7cab5a10e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Dec 2022 14:18:23 -0500 Subject: [PATCH 0602/3335] Update core-update.sh clean code --- misc/core-update.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/misc/core-update.sh b/misc/core-update.sh index 47a72dfb..105685e2 100644 --- a/misc/core-update.sh +++ b/misc/core-update.sh @@ -21,6 +21,10 @@ CROSS="${RD}✗${CL}" \/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| UPDATE EOF +PY=$(ls /srv/homeassistant/lib/) +IP=$(hostname -I | awk '{print $1}') +if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi +sleep 2 function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -33,7 +37,7 @@ msg_info "Stopping Home Assistant" systemctl stop homeassistant msg_ok "Stopped Home Assistant" -read -r -p "Use the Beta Branch? " prompt +read -r -p " Use the Beta Branch? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then BR="--pre " else @@ -43,23 +47,16 @@ msg_info "Updating Home Assistant" source /srv/homeassistant/bin/activate pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" -set +e + msg_info "Setting Dependency Versions" -DIR=/srv/homeassistant/lib/python3.10 -if [ -d "$DIR" ]; then -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -else -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/bluetooth/manifest.json -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/package_constraints.txt -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/bluetooth/manifest.json -fi +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt +sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json msg_ok "Set Dependency Versions" -set -e + msg_info "Starting Home Assistant" systemctl start homeassistant msg_ok "Started Home Assistant" msg_ok "Update Successful" +echo -e "\n Go to http://${IP}:8123 \n" From 13ac5e607fe3526bac7d7a76e7bdf1039ce2b40e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Dec 2022 11:08:29 -0500 Subject: [PATCH 0603/3335] code refactoring (#845) --- setup/adguard-install.sh | 6 ++---- setup/blocky-install.sh | 6 ++---- setup/casaos-install.sh | 6 ++---- setup/changedetection-install.sh | 6 ++---- setup/daemonsync-install.sh | 6 ++---- setup/dashy-install.sh | 6 ++---- setup/debian-install.sh | 6 ++---- setup/deconz-install.sh | 6 ++---- setup/docker-install.sh | 6 ++---- setup/emby-install.sh | 6 ++---- setup/emqx-install.sh | 6 ++---- setup/esphome-install.sh | 6 ++---- setup/grafana-install.sh | 6 ++---- setup/grocy-install.sh | 6 ++---- setup/heimdalldashboard-install.sh | 6 ++---- setup/homeassistant-core-install.sh | 6 ++---- setup/homeassistant-install.sh | 6 ++---- setup/homebridge-install.sh | 6 ++---- setup/homepage-install.sh | 6 ++---- setup/influxdb-install.sh | 6 ++---- setup/iobroker-install.sh | 6 ++---- setup/jellyfin-install.sh | 6 ++---- setup/keycloak-install.sh | 6 ++---- setup/magicmirror-install.sh | 6 ++---- setup/mariadb-install.sh | 6 ++---- setup/meshcentral-install.sh | 6 ++---- setup/motioneye-install.sh | 6 ++---- setup/mqtt-install.sh | 6 ++---- setup/n8n-install.sh | 6 ++---- setup/navidrome-install.sh | 6 ++---- setup/nextcloudpi-install.sh | 6 ++---- setup/nginx-proxy-manager-install.sh | 6 ++---- setup/nocodb-install.sh | 6 ++---- setup/node-red-install.sh | 6 ++---- setup/omada-install.sh | 6 ++---- setup/omv-install.sh | 6 ++---- setup/openhab-install.sh | 6 ++---- setup/photoprism-install.sh | 6 ++---- setup/pihole-install.sh | 6 ++---- setup/plex-install.sh | 6 ++---- setup/podman-homeassistant-install.sh | 6 ++---- setup/postgresql-install.sh | 6 ++---- setup/prometheus-install.sh | 6 ++---- setup/scrypted-install.sh | 6 ++---- setup/shinobi-install.sh | 6 ++---- setup/syncthing-install.sh | 6 ++---- setup/technitiumdns-install.sh | 6 ++---- setup/trilium-install.sh | 6 ++---- setup/ubuntu-install.sh | 6 ++---- setup/umbrel-install.sh | 6 ++---- setup/unifi-install.sh | 6 ++---- setup/uptimekuma-install.sh | 6 ++---- setup/vaultwarden-install.sh | 6 ++---- setup/whoogle-install.sh | 6 ++---- setup/wikijs-install.sh | 6 ++---- setup/wireguard-install.sh | 6 ++---- setup/zigbee2mqtt-install.sh | 6 ++---- setup/zwave-js-ui-install.sh | 6 ++---- 58 files changed, 116 insertions(+), 232 deletions(-) diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index ec248d10..bfaf8b83 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index 39690a37..620c57a2 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -363,10 +363,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index dbd62604..23ea0f98 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -116,10 +116,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/changedetection-install.sh b/setup/changedetection-install.sh index 486c474b..923ca216 100644 --- a/setup/changedetection-install.sh +++ b/setup/changedetection-install.sh @@ -122,10 +122,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index ef0b5f9b..e70c9943 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -109,10 +109,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 7bd1c5a0..677b4913 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -140,10 +140,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 96b5f984..124a8984 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -101,10 +101,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index 476a61a9..7c5f1b08 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -133,10 +133,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 6fc265d4..b455fbbc 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -159,10 +159,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 1c0b0622..979f1955 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -122,10 +122,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index da49201b..e73f7777 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 15160dce..91092358 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -129,10 +129,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 0570d690..c912e472 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -116,10 +116,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi systemctl start grafana-server systemctl enable grafana-server.service &>/dev/null diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 20166eb0..8740d66f 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -145,10 +145,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 4f57ac50..ff8cc386 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -140,10 +140,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index cde1bef3..d49b08f2 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -185,10 +185,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 6e78f010..11af7412 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -343,10 +343,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index f6ab776c..8ce65cf0 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -119,10 +119,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 80c4ef20..0f60d5b1 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -137,10 +137,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 7e8aab4c..07c40091 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -140,10 +140,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 271401b6..5c2580db 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index b9e9de7a..176dc5fc 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -147,10 +147,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index b72f14fe..6e412b6d 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -128,10 +128,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index a1ab2eec..e252fea4 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -224,10 +224,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index b4e261ce..6d0ad608 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 1e5789be..114424d5 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -118,10 +118,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index f718adc4..b7528335 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -137,10 +137,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index 180b0c45..b0d2406d 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -114,10 +114,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 70e4b615..a6689a66 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -130,10 +130,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index b6cc28e5..e08f0842 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -156,10 +156,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index 217eb7cf..dba702f4 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -105,10 +105,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 9fc27d3d..f60e548d 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -262,10 +262,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Starting Services" diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index be07ed72..9244e605 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -136,10 +136,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 8e7257ec..b535cf54 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -138,10 +138,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/omada-install.sh b/setup/omada-install.sh index dc5a8ded..d55510f9 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -112,10 +112,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/omv-install.sh b/setup/omv-install.sh index f5bf3267..3b8b07e3 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 082db069..24600d2d 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 85349d25..a879cc0e 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -197,10 +197,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index a43a230e..1b785b05 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -127,10 +127,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/plex-install.sh b/setup/plex-install.sh index fad4c048..47883856 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -126,10 +126,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index c7e09cd7..9cd77087 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -160,10 +160,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 8587b17c..4b5986be 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -231,10 +231,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 8b3f7907..8c0b5dc8 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -136,10 +136,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/scrypted-install.sh b/setup/scrypted-install.sh index b9b9223f..1bb80bdc 100644 --- a/setup/scrypted-install.sh +++ b/setup/scrypted-install.sh @@ -195,10 +195,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/shinobi-install.sh b/setup/shinobi-install.sh index 6eeb65cc..a72a5572 100644 --- a/setup/shinobi-install.sh +++ b/setup/shinobi-install.sh @@ -165,10 +165,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index cb3b2113..15e34ca2 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -110,10 +110,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index ab51a406..509e2fda 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index f62528e7..f5080744 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -131,10 +131,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 9b7597ba..3cc2a4b3 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -102,10 +102,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index e233a6a7..11f26a6d 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -117,10 +117,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 0a7f87e3..2210a47e 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -115,10 +115,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index a7305c9e..f08f5021 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -136,10 +136,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index bcd58970..2047f631 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -192,10 +192,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 964b437c..b574667a 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 01d3df47..51255211 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -152,10 +152,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 6d726417..e8b82753 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -166,10 +166,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 910dffb4..2ac580b7 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -152,10 +152,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 68ab1885..031ef329 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -128,10 +128,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" From e6ee476c49c28f6b612ff968b6276bf67662cb61 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 02:14:26 -0500 Subject: [PATCH 0604/3335] Update edge-kernel.sh update code --- misc/edge-kernel.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index e13e4ed8..52f83213 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -4,6 +4,9 @@ set -e KERNEL_ON=$(uname -r) PVE_KERNEL=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) EDGE_KERNEL=$(dpkg --list | grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) +VER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-9) }') +KER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-6) }') + clear while true; do read -p "This is a Proxmox Edge Kernel Tool, USE AT YOUR OWN RISK. Proceed(y/n)?" yn @@ -14,7 +17,16 @@ while true; do esac done clear - +function header_info { +cat <<"EOF" + ____ _ ________ ______ __ __ __ __ + / __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____ + / /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/ + / ____/| |/ / /___ / /___/ /_/ / /_/ / __/ / /| / __/ / / / / / __/ (__ ) +/_/ |___/_____/ /_____/\__,_/\__, /\___/ /_/ |_\___/_/ /_/ /_/\___/_/____/ + /____/ +EOF +} show_menu() { normal=$(echo "\033[m") safe=$(echo "\033[32m") @@ -25,13 +37,13 @@ show_menu() { proxmox-boot-tool kernel list echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}" printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Install Proxmox Edge Kernel & Reboot\n" + printf "${menu}**${number} 1)${normal} Install Proxmox Edge Kernel ${menu}${KER}${normal} & Reboot\n" printf "${menu}**${number} 2)${normal} Switch to Proxmox VE 7 ${menu}${PVE_KERNEL}${normal} Kernel & Reboot\n" printf "${menu}**${number} 3)${normal} Switch to Proxmox Edge ${menu}${EDGE_KERNEL}${normal} Kernel & Reboot\n" printf "${menu}**${number} 4)${normal} Unpin Current Kernel\n" - printf "${menu}**${number} 5)${normal} Remove Proxmox Edge Kernel & Reboot\n" + printf "${menu}**${number} 5)${normal} Remove All Current ${menu}${VER}*${normal} Proxmox Edge Kernels & Reboot\n" printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu and enter or ${fgred}x${normal} to exit." + printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." read opt } option_picked() { @@ -41,6 +53,7 @@ option_picked() { printf "${msgcolor}${message}${normal}\n" } clear +header_info show_menu while [ "$opt" != "" ]; do if [ "$opt" = "" ]; then @@ -62,7 +75,7 @@ while [ "$opt" != "" ]; do curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add - echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" >/etc/apt/sources.list.d/pve-edge-kernel.list apt-get -y update - apt-get -y install pve-kernel-6.0-edge + apt-get -y install pve-kernel-${VER}-edge reboot break ;; @@ -122,7 +135,7 @@ while [ "$opt" != "" ]; do done clear option_picked "Removing Proxmox Edge Kernel & Rebooting" - apt-get purge -y ${EDGE_KERNEL} + apt --purge remove -y pve-kernel-${VER}*edge pve-headers-${VER}*edge rm -rf /etc/apt/sources.list.d/pve-edge-kernel.list proxmox-boot-tool kernel unpin reboot @@ -137,10 +150,11 @@ while [ "$opt" != "" ]; do *) clear option_picked "Please choose an option from the menu" + header_info show_menu ;; esac fi done - +header_info show_menu From 59de4ffdc918af6471b57df3f1375a7891ac7440 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 16:27:14 -0500 Subject: [PATCH 0605/3335] Create hyperion-install.sh --- setup/hyperion-install.sh | 121 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 setup/hyperion-install.sh diff --git a/setup/hyperion-install.sh b/setup/hyperion-install.sh new file mode 100644 index 00000000..682a0212 --- /dev/null +++ b/setup/hyperion-install.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y lsb-release &>/dev/null +apt-get install -y gnupg &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Hyperion" +wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | sudo gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg &>/dev/null +echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hyperion.list &>/dev/null +apt-get update &>/dev/null +apt-get install -y hyperion &>/dev/null +systemctl enable --now hyperion@root.service &>/dev/null +msg_ok "Installed Hyperion" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From fbc1d1b0ceff17781cd3427104f96f996244ecf2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 16:28:47 -0500 Subject: [PATCH 0606/3335] Create hyperion-v4.sh --- ct/hyperion-v4.sh | 324 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 ct/hyperion-v4.sh diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh new file mode 100644 index 00000000..3386700b --- /dev/null +++ b/ct/hyperion-v4.sh @@ -0,0 +1,324 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Hyperion" +var_disk="2" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat <<"EOF" + __ __ _ + / / / /_ ______v4___ _____(_)___ ____ + / /_/ / / / / __ \/ _ \/ ___/ / __ \/ __ \ + / __ / /_/ / /_/ / __/ / / / /_/ / / / / +/_/ /_/\__, / .___/\___/_/ /_/\____/_/ /_/ + /____/_/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL} \n" From 01b814bdac7260cd1a93ceb18beb4577080d8b5e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 16:40:43 -0500 Subject: [PATCH 0607/3335] Update hyperion-install.sh add dependencies --- setup/hyperion-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/hyperion-install.sh b/setup/hyperion-install.sh index 682a0212..80c5de26 100644 --- a/setup/hyperion-install.sh +++ b/setup/hyperion-install.sh @@ -83,7 +83,8 @@ msg_info "Installing Dependencies" apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null apt-get install -y lsb-release &>/dev/null -apt-get install -y gnupg &>/dev/null +apt-get install -y gpg &>/dev/null +apt-get install -y apt-transport-https &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing Hyperion" From 283d7ef01cd423f4f5186a4cba7c896fe23e023f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 17:00:16 -0500 Subject: [PATCH 0608/3335] Update hyperion-v4.sh adjust ram --- ct/hyperion-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh index 3386700b..75491664 100644 --- a/ct/hyperion-v4.sh +++ b/ct/hyperion-v4.sh @@ -3,7 +3,7 @@ echo -e "Loading..." APP="Hyperion" var_disk="2" var_cpu="1" -var_ram="1024" +var_ram="512" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') From 3e833e6b9ee3c36170b36066ecd2ab8f5ea6e9cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 17:06:08 -0500 Subject: [PATCH 0609/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index afb53133..b9e58383 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-20 + +### Changed + +- **Hyperion LXC** + - NEW Script + ## 2022-12-17 ### Changed From bb88143a653f997c981fb64ae87b208202f57e47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 21:25:33 -0500 Subject: [PATCH 0610/3335] Update nextcloudpi-install.sh switch back to github.com/nextcloud/ --- setup/nextcloudpi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index dba702f4..f45aadbc 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -85,7 +85,7 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" -curl -sSL https://raw.githubusercontent.com/tteck/nextcloudpi/master/install.sh | bash &>/dev/null +curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null msg_ok "Installed NextCloudPi" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 1b1f7bd51fb80d4b27d82565a3750cd4ec6722ca Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Dec 2022 23:05:51 -0500 Subject: [PATCH 0611/3335] Update nextcloudpi-install.sh add 0.0.0.0 as a trusted domain --- setup/nextcloudpi-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index f45aadbc..a7a03299 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -86,6 +86,8 @@ msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null +sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php +sudo service apache2 restart msg_ok "Installed NextCloudPi" PASS=$(grep -w "root" /etc/shadow | cut -b6) From da7741e0f239d2b0d0f403a48462aa274f410886 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 08:26:16 -0500 Subject: [PATCH 0612/3335] Update paperless-ngx-update.sh check dependencies --- misc/paperless-ngx-update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 752c4376..ca0a1989 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -58,6 +58,8 @@ sleep 1 msg_ok "Stopped Paperless-ngx" msg_info "Updating to ${RELEASE}" +if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev; fi &>/dev/null +if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev-compat; fi &>/dev/null wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null cp -r /opt/paperless/paperless.conf paperless-ngx/ From 221176f20d540cee2b8485793d368b7eb6b92851 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 08:41:08 -0500 Subject: [PATCH 0613/3335] Update paperless-ngx-update.sh check dependencies --- misc/paperless-ngx-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index ca0a1989..2f478912 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -58,7 +58,7 @@ sleep 1 msg_ok "Stopped Paperless-ngx" msg_info "Updating to ${RELEASE}" -if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev; fi &>/dev/null +if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 2 ]; then apt-get install libmariadb-dev; fi &>/dev/null if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev-compat; fi &>/dev/null wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null From b0f5898f699c987aaf18a380fad698ac70eb1f4b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 08:48:29 -0500 Subject: [PATCH 0614/3335] Update to allow continue despite network issues (#855) (#856) Change to allow install to continue like it does for Postgres Co-authored-by: ThellraAK --- setup/paperless-ngx-install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 41e72f36..14fa3d1b 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -61,8 +61,14 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - exit 1 + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi From 5b03b47ee61d7634c4b5d900811c653c046f8d4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 09:19:47 -0500 Subject: [PATCH 0615/3335] Update magicmirror-install.sh (#857) (#858) Change connection prompt to allow bypass Co-authored-by: ThellraAK --- setup/magicmirror-install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index e252fea4..1017de12 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -61,8 +61,14 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - exit 1 + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi From 1c42003b641fcfc155f808d0e19e35c5933f459b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 11:48:27 -0500 Subject: [PATCH 0616/3335] Update paperless-ngx-update.sh add tag --- misc/paperless-ngx-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 2f478912..3b1d4719 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -58,8 +58,8 @@ sleep 1 msg_ok "Stopped Paperless-ngx" msg_info "Updating to ${RELEASE}" -if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 2 ]; then apt-get install libmariadb-dev; fi &>/dev/null -if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev-compat; fi &>/dev/null +if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 2 ]; then apt-get install -y libmariadb-dev; fi &>/dev/null +if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null cp -r /opt/paperless/paperless.conf paperless-ngx/ From 01bfd71633a4bcd6e015bd6a6e322f90a18f55ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 11:55:44 -0500 Subject: [PATCH 0617/3335] Update paperless-ngx-update.sh --- misc/paperless-ngx-update.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 3b1d4719..9ab62db6 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -58,7 +58,6 @@ sleep 1 msg_ok "Stopped Paperless-ngx" msg_info "Updating to ${RELEASE}" -if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 2 ]; then apt-get install -y libmariadb-dev; fi &>/dev/null if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null From cb327cd55cfe8330aed57488875ab481955d00c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 15:04:51 -0500 Subject: [PATCH 0618/3335] add option for verbose mode (#859) --- ct/adguard-v4.sh | 11 +++++++++++ ct/alpine-v4.sh | 11 +++++++++++ ct/archlinux-v4.sh | 11 +++++++++++ ct/blocky-v4.sh | 11 +++++++++++ ct/casaos-v4.sh | 11 +++++++++++ ct/changedetection-v4.sh | 11 +++++++++++ ct/create_lxc.sh | 1 + ct/daemonsync-v4.sh | 11 +++++++++++ ct/dashy-v4.sh | 11 +++++++++++ ct/debian-v4.sh | 11 +++++++++++ ct/deconz-v4.sh | 11 +++++++++++ ct/docker-v4.sh | 11 +++++++++++ ct/emby-v4.sh | 11 +++++++++++ ct/emqx-v4.sh | 11 +++++++++++ ct/esphome-v4.sh | 11 +++++++++++ ct/grafana-v4.sh | 11 +++++++++++ ct/grocy-v4.sh | 11 +++++++++++ ct/heimdalldashboard-v4.sh | 11 +++++++++++ ct/homeassistant-core-v4.sh | 11 +++++++++++ ct/homeassistant-v4.sh | 11 +++++++++++ ct/homebridge-v4.sh | 11 +++++++++++ ct/homepage-v4.sh | 11 +++++++++++ ct/hyperion-v4.sh | 11 +++++++++++ ct/influxdb-v4.sh | 11 +++++++++++ ct/iobroker-v4.sh | 11 +++++++++++ ct/jellyfin-v4.sh | 11 +++++++++++ ct/keycloak-v4.sh | 11 +++++++++++ ct/magicmirror-v4.sh | 11 +++++++++++ ct/mariadb-v4.sh | 11 +++++++++++ ct/meshcentral-v4.sh | 11 +++++++++++ ct/motioneye-v4.sh | 11 +++++++++++ ct/mqtt-v4.sh | 21 ++++++++++++++++----- ct/n8n-v4.sh | 11 +++++++++++ ct/navidrome-v4.sh | 11 +++++++++++ ct/nextcloudpi-v4.sh | 11 +++++++++++ ct/nginx-proxy-manager-v4.sh | 11 +++++++++++ ct/nocodb-v4.sh | 11 +++++++++++ ct/node-red-v4.sh | 11 +++++++++++ ct/omada-v4.sh | 11 +++++++++++ ct/omv-v4.sh | 11 +++++++++++ ct/openhab-v4.sh | 11 +++++++++++ ct/paperless-ngx-v4.sh | 11 +++++++++++ ct/photoprism-v4.sh | 11 +++++++++++ ct/pihole-v4.sh | 11 +++++++++++ ct/plex-v4.sh | 11 +++++++++++ ct/podman-homeassistant-v4.sh | 11 +++++++++++ ct/postgresql-v4.sh | 11 +++++++++++ ct/prometheus-v4.sh | 11 +++++++++++ ct/scrypted-v4.sh | 11 +++++++++++ ct/shinobi-v4.sh | 11 +++++++++++ ct/syncthing-v4.sh | 11 +++++++++++ ct/technitiumdns-v4.sh | 11 +++++++++++ ct/trilium-v4.sh | 11 +++++++++++ ct/ubuntu-v4.sh | 11 +++++++++++ ct/umbrel-v4.sh | 11 +++++++++++ ct/unifi-v4.sh | 11 +++++++++++ ct/uptimekuma-v4.sh | 11 +++++++++++ ct/vaultwarden-v4.sh | 11 +++++++++++ ct/whoogle-v4.sh | 11 +++++++++++ ct/wikijs-v4.sh | 11 +++++++++++ ct/wireguard-v4.sh | 11 +++++++++++ ct/zigbee2mqtt-v4.sh | 11 +++++++++++ ct/zwave-js-ui-v4.sh | 11 +++++++++++ setup/adguard-install.sh | 1 + setup/blocky-install.sh | 1 + setup/casaos-install.sh | 1 + setup/changedetection-install.sh | 1 + setup/daemonsync-install.sh | 1 + setup/dashy-install.sh | 1 + setup/debian-install.sh | 1 + setup/deconz-install.sh | 1 + setup/docker-install.sh | 1 + setup/emby-install.sh | 1 + setup/emqx-install.sh | 1 + setup/esphome-install.sh | 1 + setup/grafana-install.sh | 1 + setup/grocy-install.sh | 1 + setup/heimdalldashboard-install.sh | 1 + setup/homeassistant-core-install.sh | 1 + setup/homeassistant-install.sh | 1 + setup/homebridge-install.sh | 1 + setup/homepage-install.sh | 1 + setup/hyperion-install.sh | 1 + setup/influxdb-install.sh | 1 + setup/iobroker-install.sh | 1 + setup/jellyfin-install.sh | 1 + setup/keycloak-install.sh | 1 + setup/magicmirror-install.sh | 1 + setup/mariadb-install.sh | 1 + setup/meshcentral-install.sh | 1 + setup/motioneye-install.sh | 1 + setup/mqtt-install.sh | 1 + setup/n8n-install.sh | 1 + setup/navidrome-install.sh | 1 + setup/nextcloudpi-install.sh | 1 + setup/nginx-proxy-manager-install.sh | 1 + setup/nocodb-install.sh | 1 + setup/node-red-install.sh | 1 + setup/omada-install.sh | 1 + setup/omv-install.sh | 1 + setup/openhab-install.sh | 1 + setup/paperless-ngx-install.sh | 1 + setup/photoprism-install.sh | 1 + setup/pihole-install.sh | 1 + setup/plex-install.sh | 1 + setup/podman-homeassistant-install.sh | 1 + setup/postgresql-install.sh | 1 + setup/prometheus-install.sh | 1 + setup/scrypted-install.sh | 1 + setup/shinobi-install.sh | 1 + setup/syncthing-install.sh | 1 + setup/technitiumdns-install.sh | 1 + setup/trilium-install.sh | 1 + setup/ubuntu-install.sh | 1 + setup/umbrel-install.sh | 1 + setup/unifi-install.sh | 1 + setup/uptimekuma-install.sh | 1 + setup/vaultwarden-install.sh | 1 + setup/whoogle-install.sh | 1 + setup/wikijs-install.sh | 1 + setup/wireguard-install.sh | 1 + setup/zigbee2mqtt-install.sh | 1 + setup/zwave-js-ui-install.sh | 1 + 123 files changed, 748 insertions(+), 5 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index 1c50582a..a21350c5 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/alpine-v4.sh b/ct/alpine-v4.sh index dd3a7d6d..74ca977f 100644 --- a/ct/alpine-v4.sh +++ b/ct/alpine-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -245,6 +247,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -267,6 +276,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -274,6 +284,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/archlinux-v4.sh b/ct/archlinux-v4.sh index 6c8c294a..0c88369e 100644 --- a/ct/archlinux-v4.sh +++ b/ct/archlinux-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index 0f6ebcad..07f58776 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 9a2a9dee..63819aa5 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/changedetection-v4.sh b/ct/changedetection-v4.sh index 13f64d23..0580a2cc 100644 --- a/ct/changedetection-v4.sh +++ b/ct/changedetection-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 43aea538..c0af30d9 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index ce51efa0..c9c19e9b 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 43a9ce29..5aac4c22 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 457e5bce..c70d40dc 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index f3aa35f4..83debc14 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index aa82aafc..1a6d2d50 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index d8abcd6e..6ad8344e 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -258,6 +260,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -280,6 +289,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -287,6 +297,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index 6dbffae3..ee621375 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index 45d2f651..d7e7350d 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 0a096cb5..68a8488d 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 3aa8b8a2..7b4fae30 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 1d20b4ab..410d50fa 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index af70dd12..df5f2408 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index b3c21663..a4f50ad8 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 604e8756..c1305e20 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index e0079f56..95df4b44 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh index 75491664..a4746631 100644 --- a/ct/hyperion-v4.sh +++ b/ct/hyperion-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -250,6 +252,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -272,6 +281,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -279,6 +289,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 544c08a6..9ba3a22b 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index bbea2222..7e91f90f 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index a0c417d0..44a18a47 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -258,6 +260,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -280,6 +289,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -287,6 +297,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 5ab128f3..f145d045 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 14686897..28290847 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index ba1848bc..780ba45c 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 268be525..f91f91d3 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 70798f15..78d60c7b 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index afcb6892..84801204 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -224,6 +226,13 @@ fi echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -246,13 +255,15 @@ fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index e864e714..c7b0cc56 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index e274d0cf..750767a0 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index e5bb4d6f..0b119e71 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index f6ec77d7..c12d14d1 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 8a7680e6..2ca00f97 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 87bf78e5..97a94755 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 5ced9246..099deba7 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -257,6 +259,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -279,6 +288,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -286,6 +296,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index 9be51f0b..a649a28c 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index 0ce75e46..dc559dc3 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 3b5247e8..37c347a7 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index fad36764..5f4a5827 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index a34e8eb5..01d25fff 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index cfcd9696..a490c938 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -258,6 +260,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -280,6 +289,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -287,6 +297,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index c5944bef..e4d22054 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -103,6 +103,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -252,6 +254,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -274,6 +283,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -281,6 +291,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index a3c82982..aaa68b00 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index a792708e..6bb1b9db 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index cc23caee..94f598d1 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh index 265e7d23..cfb70935 100644 --- a/ct/shinobi-v4.sh +++ b/ct/shinobi-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -258,6 +260,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -280,6 +289,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -287,6 +297,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index c741c527..6a5e0de7 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -250,6 +252,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -272,6 +281,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -279,6 +289,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index ce8c822a..644ddd78 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index c7b08580..dbdf6585 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 13d9fa3d..44f3d233 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -257,6 +259,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -279,6 +288,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -286,6 +296,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 1df43db6..391b4578 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index 329e3326..3d60590d 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index d49cf8cc..b31b279f 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index ecf7d10f..9e5ffc70 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 3457e95e..a910806c 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -99,6 +99,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -270,6 +279,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -277,6 +287,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 13a5dccd..54b25b7b 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index da10e317..946b6c00 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -101,6 +101,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -250,6 +252,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -272,6 +281,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -279,6 +289,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 5d726061..1d5e0bc8 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index d477aefb..46aa99ba 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -100,6 +100,8 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -249,6 +251,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else @@ -271,6 +280,7 @@ function start_script() { } clear start_script +if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" else @@ -278,6 +288,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index bfaf8b83..ec37c2c9 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index 620c57a2..ff3ad10c 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index 23ea0f98..d2f383f9 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/changedetection-install.sh b/setup/changedetection-install.sh index 923ca216..8fe7d7fd 100644 --- a/setup/changedetection-install.sh +++ b/setup/changedetection-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index e70c9943..3936e378 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 677b4913..72155a18 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 124a8984..dca29c9b 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index 7c5f1b08..cef9767d 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/docker-install.sh b/setup/docker-install.sh index b455fbbc..8587b39b 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 979f1955..fcd7396c 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index e73f7777..e40bed9c 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 91092358..d624ad84 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index c912e472..4235bd26 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 8740d66f..cab299fb 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index ff8cc386..c9ef0bd7 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index d49b08f2..f5ff284c 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 11af7412..1c42053c 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index 8ce65cf0..1841a555 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 0f60d5b1..c48b139b 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/hyperion-install.sh b/setup/hyperion-install.sh index 80c5de26..ee8a3c9f 100644 --- a/setup/hyperion-install.sh +++ b/setup/hyperion-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 07c40091..83c6199e 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 5c2580db..3bcb2570 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index 176dc5fc..d70f29ce 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index 6e412b6d..00128983 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index 1017de12..71bd489a 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index 6d0ad608..12eeba97 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 114424d5..77233afc 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index b7528335..2d116c01 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index b0d2406d..70f9efeb 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index a6689a66..1cca4611 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index e08f0842..763d5353 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index a7a03299..ec0729d7 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index f60e548d..88c11cdd 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index 9244e605..0099b7bd 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index b535cf54..2169624a 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/omada-install.sh b/setup/omada-install.sh index d55510f9..0daab6a0 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/omv-install.sh b/setup/omv-install.sh index 3b8b07e3..415e428b 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 24600d2d..5736c2b0 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 14fa3d1b..a994c2f3 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index a879cc0e..6b6ec3f7 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index 1b785b05..8e3783ac 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/setup/plex-install.sh b/setup/plex-install.sh index 47883856..93527256 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index 9cd77087..7fb81641 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 4b5986be..88cd544d 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 8c0b5dc8..c0493b2f 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/scrypted-install.sh b/setup/scrypted-install.sh index 1bb80bdc..2347d59a 100644 --- a/setup/scrypted-install.sh +++ b/setup/scrypted-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/shinobi-install.sh b/setup/shinobi-install.sh index a72a5572..ba6fa2af 100644 --- a/setup/shinobi-install.sh +++ b/setup/shinobi-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index 15e34ca2..c16488f6 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index 509e2fda..dbd8ecd1 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index f5080744..c7f97023 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 3cc2a4b3..b090d307 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index 11f26a6d..872a0907 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 2210a47e..6dcd2e00 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi #https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index f08f5021..c542bba5 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index 2047f631..72a03a9e 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index b574667a..dc3efde8 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 51255211..8194d606 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index e8b82753..96e11ce9 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 2ac580b7..1d488c49 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 031ef329..b67f28d5 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") From 6ca1374026e065ed3b5043e5fe9808f5a94ebc8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 15:13:10 -0500 Subject: [PATCH 0619/3335] Update influxdb-install.sh add `systemctl enable --now influxdb` --- setup/influxdb-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 83c6199e..3c57b2c8 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -108,6 +108,7 @@ if [[ $INFLUX == "2" ]]; then else apt-get install -y influxdb &>/dev/null fi +systemctl enable --now influxdb &>/dev/null msg_ok "Installed InfluxDB" read -r -p "Would you like to add Telegraf? " prompt From 9bc78dcfe5e37ddf607732b12b089f1881a08064 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Dec 2022 15:19:38 -0500 Subject: [PATCH 0620/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b9e58383..384d090c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-22 + +### Changed + +- **All LXC's** + - Add an option to run the script in Verbose Mode (Advanced) + ## 2022-12-20 ### Changed From 5bc7e2fc7c90950e90ed65c2c7fe29ee2e3ab221 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Dec 2022 03:06:24 -0500 Subject: [PATCH 0621/3335] Update mqtt-v4.sh --- ct/mqtt-v4.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 84801204..d8b09ed8 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -255,6 +255,11 @@ fi } clear start_script +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" From aff72290c44a8d5af286871284f72e5ddba91fc8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Dec 2022 03:07:34 -0500 Subject: [PATCH 0622/3335] Update mqtt-v4.sh --- ct/mqtt-v4.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index d8b09ed8..84801204 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -255,11 +255,6 @@ fi } clear start_script -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" From c176eb03fb946da2c7d56e5778768c515e7929da Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Dec 2022 19:56:40 -0500 Subject: [PATCH 0623/3335] Update homeassistant-core-install.sh dbus-fast==1.83.1 --- setup/homeassistant-core-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index f5ff284c..2ae98abd 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -148,8 +148,8 @@ pip install homeassistant &>/dev/null msg_ok "Installed Home Assistant-Core" # fix for inconsistent versions, hopefully the HA team will get this fixed -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json From c2c75f4788a5dab617f122429323c91288c372a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Dec 2022 19:57:42 -0500 Subject: [PATCH 0624/3335] Update core-update.sh dbus-fast==1.83.1 --- misc/core-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/core-update.sh b/misc/core-update.sh index 105685e2..64e60e9f 100644 --- a/misc/core-update.sh +++ b/misc/core-update.sh @@ -49,8 +49,8 @@ pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" msg_info "Setting Dependency Versions" -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.82.0/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json msg_ok "Set Dependency Versions" From a6b1722a27884ec21829272284503f8f140379a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Dec 2022 16:45:27 -0500 Subject: [PATCH 0625/3335] Update deconz-v4.sh set Advanced settings to default as Privileged --- ct/deconz-v4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 83debc14..9faf169b 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -106,8 +106,8 @@ function default_settings() { } function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From 74bc5cd3cadc25bd452ad797c0370a5f8560c674 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 05:29:59 -0500 Subject: [PATCH 0626/3335] Update grocy-install.sh (#873) (#874) Fixes bug of missing packages when installing grocy php8.1-sqlite3, php8.1-gd, php8.1-intl and php8.1-mbstring Co-authored-by: Calvin --- setup/grocy-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index cab299fb..fcc019e7 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -96,10 +96,10 @@ sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://pa apt-get update &>/dev/null apt-get install -y php8.1 &>/dev/null apt-get install -y libapache2-mod-php8.1 &>/dev/null -apt-get install -y php-sqlite3 &>/dev/null -apt-get install -y php-gd &>/dev/null -apt-get install -y php-intl &>/dev/null -apt-get install -y php-mbstring &>/dev/null +apt-get install -y php8.1-sqlite3 &>/dev/null +apt-get install -y php8.1-gd &>/dev/null +apt-get install -y php8.1-intl &>/dev/null +apt-get install -y php8.1-mbstring &>/dev/null msg_ok "Installed PHP 8.1" msg_info "Installing grocy" From 93c9e0494adef46b254cebc8b838edb8ba261745 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 07:56:09 -0500 Subject: [PATCH 0627/3335] Update docker-install.sh fuse-overlayfs option --- setup/docker-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 8587b39b..54a51695 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -97,6 +97,13 @@ DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +fi cat >$DOCKER_CONFIG_PATH <<'EOF' { "log-driver": "journald" From 36d78d83b447799785eb610468cf2326e3d455e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 08:01:03 -0500 Subject: [PATCH 0628/3335] Update docker-v4.sh fuse-overlayfs option if created privileged, automatic usb passthrough --- ct/docker-v4.sh | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index 1a6d2d50..326fb3f9 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -97,8 +97,10 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" @@ -250,6 +252,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" @@ -280,13 +289,14 @@ function start_script() { clear start_script if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" else - FEATURES="nesting=1" +FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export ST=$FUSE export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID @@ -311,6 +321,18 @@ cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$CT_TYPE" == "0" ]; then +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From c0bad2760f26f1fb86199a226deed919efa99a26 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 08:04:28 -0500 Subject: [PATCH 0629/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 384d090c..86f48bc6 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,14 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-27 + +### Changed + +- **Docker LXC** + - Add an option to use Fuse Overlayfs (ZFS) (Advanced) + - If the LXC is created Privileged, the script will automatically set up USB passthrough. + ## 2022-12-22 ### Changed From 4dc248cfe47b348473fdadd49570d5ae91d3d9c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 09:17:21 -0500 Subject: [PATCH 0630/3335] Update homeassistant-install.sh fuse-overlayfs option --- setup/homeassistant-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 1c42053c..5e7e83f7 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -101,6 +101,13 @@ PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +fi cat >$DOCKER_CONFIG_PATH <<'EOF' { "log-driver": "journald" From 9ac80e6ebe8a9adf0693e5b5f056beb05d1b9a63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 09:19:53 -0500 Subject: [PATCH 0631/3335] Update homeassistant-v4.sh fuse-overlayfs option --- ct/homeassistant-v4.sh | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index a4f50ad8..dece5d89 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -97,8 +97,10 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" @@ -250,6 +252,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" @@ -280,13 +289,14 @@ function start_script() { clear start_script if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" else - FEATURES="nesting=1" +FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export ST=$FUSE export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID @@ -307,10 +317,13 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: +EOF +if [ "$CT_TYPE" == "0" ]; then +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir @@ -319,11 +332,6 @@ 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 -else - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF fi msg_info "Starting LXC Container" pct start $CTID From f3c45d0398ad1b1ec7f72c040a63b291a6b12be8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Dec 2022 09:22:06 -0500 Subject: [PATCH 0632/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 86f48bc6..b222837e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file. ### Changed +- **Home Assistant Container LXC** + - Add an option to use Fuse Overlayfs (ZFS) (Advanced) + - **Docker LXC** - Add an option to use Fuse Overlayfs (ZFS) (Advanced) - If the LXC is created Privileged, the script will automatically set up USB passthrough. From 552cff8a2c889b257ac565431b66b10c09836cc4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 06:41:43 -0500 Subject: [PATCH 0633/3335] fuse-overlayfs option (#876) CasaOS Umbrel --- ct/casaos-v4.sh | 18 ++++++++++++++---- ct/umbrel-v4.sh | 18 ++++++++++++++---- setup/casaos-install.sh | 7 +++++++ setup/umbrel-install.sh | 7 +++++++ 4 files changed, 42 insertions(+), 8 deletions(-) diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 63819aa5..c3d54ea9 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -98,8 +98,10 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" @@ -251,6 +253,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" @@ -281,13 +290,14 @@ function start_script() { clear start_script if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" else - FEATURES="nesting=1" +FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export ST=$FUSE export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 391b4578..c19dce93 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -98,8 +98,10 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" @@ -251,6 +253,13 @@ function advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" @@ -281,13 +290,14 @@ function start_script() { clear start_script if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" else - FEATURES="nesting=1" +FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export ST=$FUSE export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index d2f383f9..35e88e14 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -96,6 +96,13 @@ cat >$DOCKER_CONFIG_PATH <<'EOF' EOF msg_info "Installing CasaOS (Patience)" +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +fi wget -qO- https://get.casaos.io | bash &>/dev/null msg_ok "Installed CasaOS" diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index 872a0907..95c1c376 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -95,6 +95,13 @@ cat >$DOCKER_CONFIG_PATH <<'EOF' EOF msg_info "Installing Umbrel (Patience)" +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +fi curl -sL https://umbrel.sh | bash &>/dev/null systemctl daemon-reload systemctl enable --now umbrel-startup.service &>/dev/null From 2cdc4d411546bacc8e7eda6c4df6b5c0da9cb8c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 10:18:52 -0500 Subject: [PATCH 0634/3335] Update docker-install.sh --- setup/docker-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 54a51695..a41bbc79 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -102,6 +102,7 @@ VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/la cd /usr/local/bin curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 chmod 755 /usr/local/bin/fuse-overlayfs +echo -e '{\n "storage-driver": "fuse-overlayfs"\n}' > /etc/docker/daemon.json cd ~ fi cat >$DOCKER_CONFIG_PATH <<'EOF' From 51667bbf9af59b10d716e6767fc3555d61d65501 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 11:46:44 -0500 Subject: [PATCH 0635/3335] Update docker-install.sh fix daemon.json --- setup/docker-install.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setup/docker-install.sh b/setup/docker-install.sh index a41bbc79..19b6c1ff 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -102,14 +102,11 @@ VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/la cd /usr/local/bin curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 chmod 755 /usr/local/bin/fuse-overlayfs -echo -e '{\n "storage-driver": "fuse-overlayfs"\n}' > /etc/docker/daemon.json cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "storage-driver": "overlay2",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" From 878eeb242973879911018d5ef708a4218be52940 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 15:10:36 -0500 Subject: [PATCH 0636/3335] Update homeassistant-core-install.sh option to run beta --- setup/homeassistant-core-install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index 2ae98abd..b54381c2 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -135,6 +135,13 @@ pyenv install 3.10.8 &>/dev/null pyenv global 3.10.8 msg_ok "Installed Python 3.10.8" +read -r -p " Use the Beta Branch? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + BR="--pre " +else + BR="" +fi + msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant cd /srv/homeassistant @@ -144,7 +151,7 @@ pip install --upgrade pip &>/dev/null python3 -m pip install wheel &>/dev/null pip install mysqlclient &>/dev/null pip install psycopg2-binary &>/dev/null -pip install homeassistant &>/dev/null +pip install ${BR}homeassistant &>/dev/null msg_ok "Installed Home Assistant-Core" # fix for inconsistent versions, hopefully the HA team will get this fixed From 398f23c0b4d567070f56d3b692c9475954578fbd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 15:49:57 -0500 Subject: [PATCH 0637/3335] Update homeassistant-core-install.sh fix dependency versions for beta --- setup/homeassistant-core-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index b54381c2..d704fca5 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -155,8 +155,13 @@ pip install ${BR}homeassistant &>/dev/null msg_ok "Installed Home Assistant-Core" # fix for inconsistent versions, hopefully the HA team will get this fixed +if [ "${BR}" == "--pre " ]; then +sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +else sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +fi sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json From 791d8c91f74946a26f7599981dd7018e77d53195 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 15:53:47 -0500 Subject: [PATCH 0638/3335] Update core-update.sh fix dependency versions for beta --- misc/core-update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/core-update.sh b/misc/core-update.sh index 64e60e9f..1b618de9 100644 --- a/misc/core-update.sh +++ b/misc/core-update.sh @@ -49,8 +49,13 @@ pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" msg_info "Setting Dependency Versions" -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json +if [ "${BR}" == "--pre " ]; then +sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +else +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +fi sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json msg_ok "Set Dependency Versions" From a5a5374134a09d6069b69148ee89445065053a30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 17:27:12 -0500 Subject: [PATCH 0639/3335] Create k0s-install.sh --- setup/k0s-install.sh | 133 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 setup/k0s-install.sh diff --git a/setup/k0s-install.sh b/setup/k0s-install.sh new file mode 100644 index 00000000..1ed9806f --- /dev/null +++ b/setup/k0s-install.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +apt-get install -y git &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing k0s Kubernetes" +sh <(curl -sSLf https://get.k0s.sh) &>/dev/null +k0s install controller --single &>/dev/null +k0s start &>/dev/null +mkdir -p /etc/k0s +k0s config create > /etc/k0s/k0s.yaml +msg_ok "Installed k0s Kubernetes" + +read -r -p "Would you like to add Helm Package Manager? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + HELM="Y" +else + HELM="N" +fi + +if [[ $HELM == "Y" ]]; then +msg_info "Installing Helm" +curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash &>/dev/null +msg_ok "Installed Helm" +fi +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 3dfbe0a5daadd865c6977ee97047e0a453a37a60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 17:29:00 -0500 Subject: [PATCH 0640/3335] Create k0s-v4.sh --- ct/k0s-v4.sh | 318 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 ct/k0s-v4.sh diff --git a/ct/k0s-v4.sh b/ct/k0s-v4.sh new file mode 100644 index 00000000..1622434e --- /dev/null +++ b/ct/k0s-v4.sh @@ -0,0 +1,318 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="k0s" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + __ ____ + / /__/ __ \__v4_ + / //_/ / / / ___/ + / ,< / /_/ (__ ) +/_/|_|\____/____/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From d024c8d340c367d2ed7f3d6202bba4dfacb42b60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 19:35:30 -0500 Subject: [PATCH 0641/3335] Create podman-install.sh --- setup/podman-install.sh | 144 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 setup/podman-install.sh diff --git a/setup/podman-install.sh b/setup/podman-install.sh new file mode 100644 index 00000000..eabfdf02 --- /dev/null +++ b/setup/podman-install.sh @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing Podman" +apt-get -y install podman &>/dev/null +systemctl enable --now podman.socket &>/dev/null +echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf +msg_ok "Installed Podman" + +read -r -p "Would you like to add Portainer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + PORTAINER="Y" +else + PORTAINER="N" +fi + +if [[ $PORTAINER == "Y" ]]; then + msg_info "Installing Portainer" + podman run -d \ + --name portainer \ + --restart always \ + -v /var/run/podman/podman.sock:/var/run/docker.sock \ + -v portainer:/config \ + -v /etc/localtime:/etc/localtime:ro \ + -v /etc/timezone:/etc/timezone:ro \ + -p 8000:8000 \ + -p 9000:9000 \ + portainer/portainer-ce:latest &>/dev/null + podman generate systemd \ + --new --name portainer \ + >/etc/systemd/system/portainer.service + systemctl enable portainer &>/dev/null + msg_ok "Installed Portainer" +fi + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 4b5e5ef13b240fc000ebe07261e0af55b8b47e20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 19:37:33 -0500 Subject: [PATCH 0642/3335] Create podman-v4.sh --- ct/podman-v4.sh | 318 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 ct/podman-v4.sh diff --git a/ct/podman-v4.sh b/ct/podman-v4.sh new file mode 100644 index 00000000..97250e37 --- /dev/null +++ b/ct/podman-v4.sh @@ -0,0 +1,318 @@ +#!/usr/bin/env bash +echo -e "Loading..." +APP="Podman" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + cat <<"EOF" + ____ __ + / __ \____v4____/ /___ ___ ____ _____ + / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ + / ____/ /_/ / /_/ / / / / / / /_/ / / / / +/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +start_script +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From c1ef7ad7b06dae06c86dc92930c27f5e9d3d3c1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Dec 2022 20:24:52 -0500 Subject: [PATCH 0643/3335] Update homeassistant-install.sh correct daemon.json --- setup/homeassistant-install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 5e7e83f7..47ac3bba 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -107,12 +107,10 @@ cd /usr/local/bin curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 chmod 755 /usr/local/bin/fuse-overlayfs cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "storage-driver": "overlay2",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" From 734e978440822ee30f31de553b9315376533aa5b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Dec 2022 06:11:45 -0500 Subject: [PATCH 0644/3335] Update homeassistant-core-install.sh shorten code for inconsistent versions --- setup/homeassistant-core-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index d704fca5..e997f268 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -156,14 +156,12 @@ msg_ok "Installed Home Assistant-Core" # fix for inconsistent versions, hopefully the HA team will get this fixed if [ "${BR}" == "--pre " ]; then -sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json else -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json fi -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json msg_info "Creating Service" cat </etc/systemd/system/homeassistant.service From 36b596dc97581f6a2f9fcc322618484c496b6993 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Dec 2022 06:14:13 -0500 Subject: [PATCH 0645/3335] Update core-update.sh shorten code for dependency versions --- misc/core-update.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/misc/core-update.sh b/misc/core-update.sh index 1b618de9..e3af18a1 100644 --- a/misc/core-update.sh +++ b/misc/core-update.sh @@ -50,14 +50,12 @@ msg_ok "Updated Home Assistant" msg_info "Setting Dependency Versions" if [ "${BR}" == "--pre " ]; then -sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.82.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json else -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i "s/dbus-fast==1.75.0/dbus-fast==1.83.1/g" /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json fi -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/package_constraints.txt -sed -i "s/bleak==0.19.2/bleak==0.19.5/g" /srv/homeassistant/lib/$PY/site-packages/homeassistant/components/bluetooth/manifest.json msg_ok "Set Dependency Versions" msg_info "Starting Home Assistant" From d4248dbe845efbab08b1b59c20b5ae5568c9c4e8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Dec 2022 15:36:12 -0500 Subject: [PATCH 0646/3335] Update docker-install.sh adjust daemon.json --- setup/docker-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 19b6c1ff..de2a015f 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -105,7 +105,7 @@ chmod 755 /usr/local/bin/fuse-overlayfs cd ~ echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json else -echo -e '{\n "storage-driver": "overlay2",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" From 9d8c30981ddcf18e21c7c67383f1a9514c93a00b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Dec 2022 15:43:05 -0500 Subject: [PATCH 0647/3335] Update homeassistant-install.sh adjust daemon.json --- setup/homeassistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 47ac3bba..7ad489d5 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -109,7 +109,7 @@ chmod 755 /usr/local/bin/fuse-overlayfs cd ~ echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json else -echo -e '{\n "storage-driver": "overlay2",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi sh <(curl -sSL https://get.docker.com) &>/dev/null msg_ok "Installed Docker $DOCKER_LATEST_VERSION" From ee832a3c6b91c028f5105333bf592f8e0fd85f5f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Dec 2022 00:25:10 -0500 Subject: [PATCH 0648/3335] Update core-update.sh code refactoring --- misc/core-update.sh | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/misc/core-update.sh b/misc/core-update.sh index e3af18a1..b9a547ab 100644 --- a/misc/core-update.sh +++ b/misc/core-update.sh @@ -13,6 +13,7 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" +function header_info { cat <<"EOF" _ _ _ _ ___ /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___ _ __ ___ @@ -21,10 +22,12 @@ CROSS="${RD}✗${CL}" \/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| UPDATE EOF +} PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') -if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi -sleep 2 +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') +BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -33,16 +36,30 @@ function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +if (whiptail --title "CORE UPDATE" --yesno "This will update Home Assistant Core. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then + clear + header_info + echo -e "${GN}Updating to Version ${BETA}${CL}" + BR="--pre " +else + clear + header_info + echo -e "${GN}Updating to Version ${STABLE}${CL}" + BR="" +fi +if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi + msg_info "Stopping Home Assistant" systemctl stop homeassistant msg_ok "Stopped Home Assistant" -read -r -p " Use the Beta Branch? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - BR="--pre " -else - BR="" -fi msg_info "Updating Home Assistant" source /srv/homeassistant/bin/activate pip install ${BR}--upgrade homeassistant &>/dev/null @@ -56,10 +73,12 @@ else sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json fi +sleep 2 msg_ok "Set Dependency Versions" msg_info "Starting Home Assistant" systemctl start homeassistant +sleep 2 msg_ok "Started Home Assistant" msg_ok "Update Successful" echo -e "\n Go to http://${IP}:8123 \n" From ce90d7da2359f71c4cf139c4a4af8b0a1ae4a4e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 07:39:25 -0500 Subject: [PATCH 0649/3335] Update and rename vaultwarden-v4.sh to vaultwarden-v5.sh --- ct/{vaultwarden-v4.sh => vaultwarden-v5.sh} | 130 +++++++++++++++++--- 1 file changed, 111 insertions(+), 19 deletions(-) rename ct/{vaultwarden-v4.sh => vaultwarden-v5.sh} (77%) diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v5.sh similarity index 77% rename from ct/vaultwarden-v4.sh rename to ct/vaultwarden-v5.sh index 9e5ffc70..03dbef93 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v5.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ ____ _ __ __ +| | / /___ ___v5__/ / /| | / /___ __________/ /__ ____ +| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ +| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / +|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ + +EOF +} echo -e "Loading..." APP="Vaultwarden" var_disk="6" @@ -8,7 +18,6 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -20,6 +29,7 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -35,30 +45,22 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${CL} - _ _____ __ ____ _______ _____ ____ ____ _______ __ -| | / / | / / / / / /_ __/ | / / | / __ \/ __ \/ ____/ | / / -| | / / /| |/ / / / / / / | | /| / / /| | / /_/ / / / / __/ / |/ / -| |/ / ___ / /_/ / /___/ / | |/ |/ / ___ |/ _, _/ /_/ / /___/ /| / -|___/_/ |_\____/_____/_/ v4 |__/|__/_/ |_/_/ |_/_____/_____/_/ |_/ -${CL}" -} + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) if [[ $PVE != 1 ]]; then @@ -68,6 +70,28 @@ function PVE_CHECK() { exit fi } +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/vaultwarden ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP}. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -101,6 +125,7 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -253,9 +278,11 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" + VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -266,7 +293,7 @@ function advanced_settings() { advanced_settings fi } -function start_script() { +function install_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -277,8 +304,72 @@ function start_script() { advanced_settings fi } + +function update_script() { +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "VaultWarden" ON \ + "2" "Web-Vault" OFF \ + 3>&1 1>&2 2>&3) + clear -start_script +header_info +echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" +if [ "$UPD" == "1" ]; then +msg_info "Stopping Vaultwarden" +systemctl stop vaultwarden.service +msg_ok "Stopped Vaultwarden" + +msg_info "Updating VaultWarden (Patience)" +git clone https://github.com/dani-garcia/vaultwarden &>/dev/null +cd vaultwarden +cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null +DIR=/usr/bin/vaultwarden + if [ -d "$DIR" ]; then + cp target/release/vaultwarden /usr/bin/ + else + cp target/release/vaultwarden /opt/vaultwarden/bin/ + fi +msg_ok "Updated VaultWarden" + +msg_info "Cleaning up" +cd ~ && rm -rf vaultwarden +msg_ok "Cleaned" + +msg_info "Starting Vaultwarden" +systemctl start vaultwarden.service +msg_ok "Started Vaultwarden" + +msg_ok "Update Successful" +echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" +exit; +fi +if [ "$UPD" == "2" ]; then +msg_info "Stopping Vaultwarden" +systemctl stop vaultwarden.service +msg_ok "Stopped Vaultwarden" + +msg_info "Updating Web-Vault" +curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null + if [ -d "/var/lib/vaultwarden" ]; then + tar -xzf bw_web_$VWRELEASE.tar.gz -C /var/lib/vaultwarden/ &>/dev/null + else + tar -zxf bw_web_$VWRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null + fi +msg_ok "Updated Web-Vault" + +msg_info "Cleaning up" +rm bw_web_$VWRELEASE.tar.gz +msg_ok "Cleaned" + +msg_info "Starting Vaultwarden" +systemctl start vaultwarden.service +msg_ok "Started Vaultwarden" +msg_ok "Update Successful" +exit; +fi +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" @@ -288,6 +379,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export VERBOSE=$VERB +export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os From a9ea2cf3df1baa9bdf0975b6e2753f3c78b7424f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 07:43:46 -0500 Subject: [PATCH 0650/3335] Update and rename vaultwarden-v5.sh to vaultwarden-v4.sh --- ct/{vaultwarden-v5.sh => vaultwarden-v4.sh} | 130 +++----------------- 1 file changed, 19 insertions(+), 111 deletions(-) rename ct/{vaultwarden-v5.sh => vaultwarden-v4.sh} (77%) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v4.sh similarity index 77% rename from ct/vaultwarden-v5.sh rename to ct/vaultwarden-v4.sh index 03dbef93..9e5ffc70 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v4.sh @@ -1,14 +1,4 @@ #!/usr/bin/env bash -function header_info { - cat <<"EOF" - _ __ ____ _ __ __ -| | / /___ ___v5__/ / /| | / /___ __________/ /__ ____ -| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ -| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / -|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ - -EOF -} echo -e "Loading..." APP="Vaultwarden" var_disk="6" @@ -18,6 +8,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" +NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -29,7 +20,6 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -45,22 +35,30 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } - +if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { + echo -e "${CL} + _ _____ __ ____ _______ _____ ____ ____ _______ __ +| | / / | / / / / / /_ __/ | / / | / __ \/ __ \/ ____/ | / / +| | / / /| |/ / / / / / / | | /| / / /| | / /_/ / / / / __/ / |/ / +| |/ / ___ / /_/ / /___/ / | |/ |/ / ___ |/ _, _/ /_/ / /___/ /| / +|___/_/ |_\____/_____/_/ v4 |__/|__/_/ |_/_/ |_/_____/_____/_/ |_/ +${CL}" +} function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } - function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) if [[ $PVE != 1 ]]; then @@ -70,28 +68,6 @@ function PVE_CHECK() { exit fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/vaultwarden ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP}. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -125,7 +101,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -278,11 +253,9 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -293,7 +266,7 @@ function advanced_settings() { advanced_settings fi } -function install_script() { +function start_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -304,72 +277,8 @@ function install_script() { advanced_settings fi } - -function update_script() { -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ - "1" "VaultWarden" ON \ - "2" "Web-Vault" OFF \ - 3>&1 1>&2 2>&3) - clear -header_info -echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" -if [ "$UPD" == "1" ]; then -msg_info "Stopping Vaultwarden" -systemctl stop vaultwarden.service -msg_ok "Stopped Vaultwarden" - -msg_info "Updating VaultWarden (Patience)" -git clone https://github.com/dani-garcia/vaultwarden &>/dev/null -cd vaultwarden -cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null -DIR=/usr/bin/vaultwarden - if [ -d "$DIR" ]; then - cp target/release/vaultwarden /usr/bin/ - else - cp target/release/vaultwarden /opt/vaultwarden/bin/ - fi -msg_ok "Updated VaultWarden" - -msg_info "Cleaning up" -cd ~ && rm -rf vaultwarden -msg_ok "Cleaned" - -msg_info "Starting Vaultwarden" -systemctl start vaultwarden.service -msg_ok "Started Vaultwarden" - -msg_ok "Update Successful" -echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" -exit; -fi -if [ "$UPD" == "2" ]; then -msg_info "Stopping Vaultwarden" -systemctl stop vaultwarden.service -msg_ok "Stopped Vaultwarden" - -msg_info "Updating Web-Vault" -curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null - if [ -d "/var/lib/vaultwarden" ]; then - tar -xzf bw_web_$VWRELEASE.tar.gz -C /var/lib/vaultwarden/ &>/dev/null - else - tar -zxf bw_web_$VWRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null - fi -msg_ok "Updated Web-Vault" - -msg_info "Cleaning up" -rm bw_web_$VWRELEASE.tar.gz -msg_ok "Cleaned" - -msg_info "Starting Vaultwarden" -systemctl start vaultwarden.service -msg_ok "Started Vaultwarden" -msg_ok "Update Successful" -exit; -fi -} -clear -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +start_script if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" @@ -379,7 +288,6 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os From 632d6f0e662fe64db4baa0e728e29843aacc2b26 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 09:57:56 -0500 Subject: [PATCH 0651/3335] Rename docker-install.sh to docker-v5-install.sh --- setup/{docker-install.sh => docker-v5-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename setup/{docker-install.sh => docker-v5-install.sh} (100%) diff --git a/setup/docker-install.sh b/setup/docker-v5-install.sh similarity index 100% rename from setup/docker-install.sh rename to setup/docker-v5-install.sh From aa941a60cdc867268cc93dafc1505c81d009a966 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 09:59:24 -0500 Subject: [PATCH 0652/3335] Rename homeassistant-core-install.sh to homeassistant-core-v5-install.sh --- ...assistant-core-install.sh => homeassistant-core-v5-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename setup/{homeassistant-core-install.sh => homeassistant-core-v5-install.sh} (100%) diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-v5-install.sh similarity index 100% rename from setup/homeassistant-core-install.sh rename to setup/homeassistant-core-v5-install.sh From 5ea4b1064e447a0619d50a227c5bc0e529546452 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 10:02:25 -0500 Subject: [PATCH 0653/3335] Rename homeassistant-core-v5-install.sh to homeassistant-core-install.sh --- ...assistant-core-v5-install.sh => homeassistant-core-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename setup/{homeassistant-core-v5-install.sh => homeassistant-core-install.sh} (100%) diff --git a/setup/homeassistant-core-v5-install.sh b/setup/homeassistant-core-install.sh similarity index 100% rename from setup/homeassistant-core-v5-install.sh rename to setup/homeassistant-core-install.sh From fce1839580c5974418847c936ca07ea26bba0dc9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 10:17:51 -0500 Subject: [PATCH 0654/3335] Rename docker-v5-install.sh to docker-install.sh --- setup/{docker-v5-install.sh => docker-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename setup/{docker-v5-install.sh => docker-install.sh} (100%) diff --git a/setup/docker-v5-install.sh b/setup/docker-install.sh similarity index 100% rename from setup/docker-v5-install.sh rename to setup/docker-install.sh From 049b2cf770e8d78868c302643592169bf519ee1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 10:53:32 -0500 Subject: [PATCH 0655/3335] purge (#884) --- ct/adguard-v1.sh | 162 -------- ct/adguard-v2.sh | 256 ------------ ct/adguard-v3.sh | 358 ----------------- ct/adguard-v4.sh | 2 +- ct/blocky-v4.sh | 2 +- ct/casaos-v4.sh | 2 +- ct/changedetection-v4.sh | 2 +- ct/daemonsync-v2.sh | 253 ------------ ct/daemonsync-v3.sh | 358 ----------------- ct/daemonsync-v4.sh | 2 +- ct/dashy-v2.sh | 254 ------------ ct/dashy-v3.sh | 358 ----------------- ct/dashy-v4.sh | 2 +- ct/debian-v1.sh | 165 -------- ct/debian-v2.sh | 257 ------------ ct/debian-v3.sh | 357 ----------------- ct/debian-v4.sh | 2 +- ct/deconz-v3.sh | 371 ----------------- ct/deconz-v4.sh | 2 +- ct/docker-v2.sh | 312 --------------- ct/docker-v3.sh | 361 ----------------- ct/docker-v4.sh | 2 +- ct/emby-v4.sh | 2 +- ct/emqx-v4.sh | 2 +- ct/esphome-v1.sh | 188 --------- ct/esphome-v2.sh | 259 ------------ ct/esphome-v3.sh | 357 ----------------- ct/esphome-v4.sh | 2 +- ct/grafana-v2.sh | 252 ------------ ct/grafana-v3.sh | 356 ----------------- ct/grafana-v4.sh | 2 +- ct/grocy-v3.sh | 359 ----------------- ct/grocy-v4.sh | 2 +- ct/heimdalldashboard-v2.sh | 259 ------------ ct/heimdalldashboard-v3.sh | 357 ----------------- ct/heimdalldashboard-v4.sh | 2 +- ct/homeassistant-core-v4.sh | 2 +- ct/homeassistant-v1.sh | 176 -------- ct/homeassistant-v2.sh | 316 --------------- ct/homeassistant-v3.sh | 365 ----------------- ct/homeassistant-v4.sh | 2 +- ct/homebridge-v2.sh | 251 ------------ ct/homebridge-v3.sh | 356 ----------------- ct/homebridge-v4.sh | 2 +- ct/homepage-v4.sh | 2 +- ct/hyperion-v4.sh | 2 +- ct/influxdb-v2.sh | 250 ------------ ct/influxdb-v3.sh | 355 ----------------- ct/influxdb-v4.sh | 2 +- ct/iobroker-v3.sh | 356 ----------------- ct/iobroker-v4.sh | 2 +- ct/jellyfin-v1.sh | 171 -------- ct/jellyfin-v3.sh | 370 ----------------- ct/jellyfin-v4.sh | 2 +- ct/k0s-v4.sh | 2 +- ct/keycloak-v3.sh | 360 ----------------- ct/keycloak-v4.sh | 2 +- ct/magicmirror-v3.sh | 359 ----------------- ct/magicmirror-v4.sh | 2 +- ct/mariadb-v1.sh | 168 -------- ct/mariadb-v2.sh | 252 ------------ ct/mariadb-v3.sh | 356 ----------------- ct/mariadb-v4.sh | 2 +- ct/meshcentral-v2.sh | 258 ------------ ct/meshcentral-v3.sh | 356 ----------------- ct/meshcentral-v4.sh | 2 +- ct/motioneye-v1.sh | 168 -------- ct/motioneye-v2.sh | 258 ------------ ct/motioneye-v3.sh | 356 ----------------- ct/motioneye-v4.sh | 2 +- ct/mqtt-v1.sh | 158 -------- ct/mqtt-v2.sh | 250 ------------ ct/mqtt-v3.sh | 354 ---------------- ct/mqtt-v4.sh | 2 +- ct/n8n-v3.sh | 356 ----------------- ct/n8n-v4.sh | 2 +- ct/navidrome-v4.sh | 2 +- ct/nextcloudpi-v4.sh | 2 +- ct/nginx-proxy-manager-v1.sh | 162 -------- ct/nginx-proxy-manager-v2.sh | 251 ------------ ct/nginx-proxy-manager-v3.sh | 356 ----------------- ct/nginx-proxy-manager-v4.sh | 2 +- ct/nocodb-v2.sh | 258 ------------ ct/nocodb-v3.sh | 356 ----------------- ct/nocodb-v4.sh | 2 +- ct/node-red-v1.sh | 161 -------- ct/node-red-v2.sh | 253 ------------ ct/node-red-v3.sh | 356 ----------------- ct/node-red-v4.sh | 2 +- ct/omada-v2.sh | 252 ------------ ct/omada-v3.sh | 356 ----------------- ct/omada-v4.sh | 2 +- ct/omv-v4.sh | 2 +- ct/openhab-v3.sh | 361 ----------------- ct/openhab-v4.sh | 2 +- ct/paperless-ngx-v4.sh | 2 +- ct/photoprism-v2.sh | 259 ------------ ct/photoprism-v3.sh | 357 ----------------- ct/photoprism-v4.sh | 2 +- ct/pihole-v1.sh | 162 -------- ct/pihole-v2.sh | 258 ------------ ct/pihole-v3.sh | 356 ----------------- ct/pihole-v4.sh | 2 +- ct/plex-v1.sh | 170 -------- ct/plex-v3.sh | 368 ----------------- ct/plex-v4.sh | 2 +- ct/podman-homeassistant-v1.sh | 189 --------- ct/podman-homeassistant-v3.sh | 371 ----------------- ct/podman-homeassistant-v4.sh | 2 +- ct/podman-v4.sh | 2 +- ct/postgresql-v3.sh | 361 ----------------- ct/postgresql-v4.sh | 2 +- ct/prometheus-v3.sh | 359 ----------------- ct/prometheus-v4.sh | 2 +- ct/scrypted-v4.sh | 2 +- ct/shinobi-v4.sh | 2 +- ct/syncthing-v4.sh | 2 +- ct/technitiumdns-v2.sh | 259 ------------ ct/technitiumdns-v3.sh | 356 ----------------- ct/technitiumdns-v4.sh | 2 +- ct/trilium-v4.sh | 2 +- ct/ubuntu-v1.sh | 164 -------- ct/ubuntu-v2.sh | 255 ------------ ct/ubuntu-v3.sh | 377 ------------------ ct/ubuntu-v4.sh | 2 +- ct/umbrel-v4.sh | 2 +- ct/unifi-v2.sh | 258 ------------ ct/unifi-v3.sh | 356 ----------------- ct/unifi-v4.sh | 2 +- ct/uptimekuma-v2.sh | 261 ------------ ct/uptimekuma-v3.sh | 358 ----------------- ct/uptimekuma-v4.sh | 2 +- ct/vaultwarden-v1.sh | 179 --------- ct/vaultwarden-v2.sh | 259 ------------ ct/vaultwarden-v3.sh | 361 ----------------- ct/vaultwarden-v4.sh | 2 +- ct/whoogle-v3.sh | 360 ----------------- ct/whoogle-v4.sh | 2 +- ct/wikijs-v4.sh | 2 +- ct/wireguard-v2.sh | 253 ------------ ct/wireguard-v3.sh | 357 ----------------- ct/wireguard-v4.sh | 2 +- ct/zigbee2mqtt-v1.sh | 173 -------- ct/zigbee2mqtt-v2.sh | 263 ------------ ct/zigbee2mqtt-v3.sh | 369 ----------------- ct/zigbee2mqtt-v4.sh | 2 +- ct/zwave-js-ui-v4.sh | 2 +- ct/zwavejs2mqtt-v1.sh | 191 --------- ct/zwavejs2mqtt-v2.sh | 266 ------------ ct/zwavejs2mqtt-v3.sh | 371 ----------------- {setup => install}/adguard-install.sh | 0 {setup => install}/blocky-install.sh | 0 {setup => install}/casaos-install.sh | 0 {setup => install}/changedetection-install.sh | 0 {setup => install}/daemonsync-install.sh | 0 {setup => install}/dashy-install.sh | 0 {setup => install}/debian-install.sh | 0 {setup => install}/deconz-install.sh | 0 {setup => install}/docker-install.sh | 0 {setup => install}/emby-install.sh | 0 {setup => install}/emqx-install.sh | 0 {setup => install}/esphome-install.sh | 0 {setup => install}/grafana-install.sh | 0 {setup => install}/grocy-install.sh | 0 .../heimdalldashboard-install.sh | 0 .../homeassistant-core-install.sh | 0 {setup => install}/homeassistant-install.sh | 0 {setup => install}/homebridge-install.sh | 0 {setup => install}/homepage-install.sh | 0 {setup => install}/hyperion-install.sh | 0 {setup => install}/influxdb-install.sh | 0 {setup => install}/iobroker-install.sh | 0 {setup => install}/jellyfin-install.sh | 0 {setup => install}/k0s-install.sh | 0 {setup => install}/keycloak-install.sh | 0 {setup => install}/magicmirror-install.sh | 0 {setup => install}/mariadb-install.sh | 0 {setup => install}/meshcentral-install.sh | 0 {setup => install}/motioneye-install.sh | 0 {setup => install}/mqtt-install.sh | 0 {setup => install}/n8n-install.sh | 0 {setup => install}/navidrome-install.sh | 0 {setup => install}/nextcloudpi-install.sh | 0 .../nginx-proxy-manager-install.sh | 0 {setup => install}/nocodb-install.sh | 0 {setup => install}/node-red-install.sh | 0 {setup => install}/omada-install.sh | 0 {setup => install}/omv-install.sh | 0 {setup => install}/openhab-install.sh | 0 {setup => install}/paperless-ngx-install.sh | 0 {setup => install}/photoprism-install.sh | 0 {setup => install}/pihole-install.sh | 0 {setup => install}/plex-install.sh | 0 .../podman-homeassistant-install.sh | 0 {setup => install}/podman-install.sh | 0 {setup => install}/postgresql-install.sh | 0 {setup => install}/prometheus-install.sh | 0 {setup => install}/scrypted-install.sh | 0 {setup => install}/shinobi-install.sh | 0 {setup => install}/syncthing-install.sh | 0 {setup => install}/technitiumdns-install.sh | 0 {setup => install}/trilium-install.sh | 0 {setup => install}/ubuntu-install.sh | 0 {setup => install}/umbrel-install.sh | 0 {setup => install}/unifi-install.sh | 0 {setup => install}/uptimekuma-install.sh | 0 {setup => install}/vaultwarden-install.sh | 0 {setup => install}/whoogle-install.sh | 0 {setup => install}/wikijs-install.sh | 0 {setup => install}/wireguard-install.sh | 0 {setup => install}/zigbee2mqtt-install.sh | 0 {setup => install}/zwave-js-ui-install.sh | 0 setup/adguard_setup.sh | 73 ---- setup/debian11_setup.sh | 78 ---- setup/esphome_setup.sh | 104 ----- setup/ha_setup.sh | 296 -------------- setup/jellyfin_setup.sh | 98 ----- setup/mariadb_setup.sh | 93 ----- setup/motioneye_setup.sh | 97 ----- setup/mqtt_setup.sh | 80 ---- setup/node-red_setup.sh | 74 ---- setup/npm_setup.sh | 216 ---------- setup/pihole_setup.sh | 73 ---- setup/plex_setup.sh | 86 ---- setup/podman_ha_setup.sh | 157 -------- setup/ubuntu_setup.sh | 77 ---- setup/vault_setup.sh | 157 -------- setup/zigbee2mqtt_setup.sh | 97 ----- setup/zwavejs2mqtt_setup.sh | 104 ----- 229 files changed, 62 insertions(+), 27584 deletions(-) delete mode 100644 ct/adguard-v1.sh delete mode 100644 ct/adguard-v2.sh delete mode 100644 ct/adguard-v3.sh delete mode 100644 ct/daemonsync-v2.sh delete mode 100644 ct/daemonsync-v3.sh delete mode 100644 ct/dashy-v2.sh delete mode 100644 ct/dashy-v3.sh delete mode 100644 ct/debian-v1.sh delete mode 100644 ct/debian-v2.sh delete mode 100644 ct/debian-v3.sh delete mode 100644 ct/deconz-v3.sh delete mode 100644 ct/docker-v2.sh delete mode 100644 ct/docker-v3.sh delete mode 100644 ct/esphome-v1.sh delete mode 100644 ct/esphome-v2.sh delete mode 100644 ct/esphome-v3.sh delete mode 100644 ct/grafana-v2.sh delete mode 100644 ct/grafana-v3.sh delete mode 100644 ct/grocy-v3.sh delete mode 100644 ct/heimdalldashboard-v2.sh delete mode 100644 ct/heimdalldashboard-v3.sh delete mode 100644 ct/homeassistant-v1.sh delete mode 100644 ct/homeassistant-v2.sh delete mode 100644 ct/homeassistant-v3.sh delete mode 100644 ct/homebridge-v2.sh delete mode 100644 ct/homebridge-v3.sh delete mode 100644 ct/influxdb-v2.sh delete mode 100644 ct/influxdb-v3.sh delete mode 100644 ct/iobroker-v3.sh delete mode 100644 ct/jellyfin-v1.sh delete mode 100644 ct/jellyfin-v3.sh delete mode 100644 ct/keycloak-v3.sh delete mode 100644 ct/magicmirror-v3.sh delete mode 100644 ct/mariadb-v1.sh delete mode 100644 ct/mariadb-v2.sh delete mode 100644 ct/mariadb-v3.sh delete mode 100644 ct/meshcentral-v2.sh delete mode 100644 ct/meshcentral-v3.sh delete mode 100644 ct/motioneye-v1.sh delete mode 100644 ct/motioneye-v2.sh delete mode 100644 ct/motioneye-v3.sh delete mode 100644 ct/mqtt-v1.sh delete mode 100644 ct/mqtt-v2.sh delete mode 100644 ct/mqtt-v3.sh delete mode 100644 ct/n8n-v3.sh delete mode 100644 ct/nginx-proxy-manager-v1.sh delete mode 100644 ct/nginx-proxy-manager-v2.sh delete mode 100644 ct/nginx-proxy-manager-v3.sh delete mode 100644 ct/nocodb-v2.sh delete mode 100644 ct/nocodb-v3.sh delete mode 100644 ct/node-red-v1.sh delete mode 100644 ct/node-red-v2.sh delete mode 100644 ct/node-red-v3.sh delete mode 100644 ct/omada-v2.sh delete mode 100644 ct/omada-v3.sh delete mode 100644 ct/openhab-v3.sh delete mode 100644 ct/photoprism-v2.sh delete mode 100644 ct/photoprism-v3.sh delete mode 100644 ct/pihole-v1.sh delete mode 100644 ct/pihole-v2.sh delete mode 100644 ct/pihole-v3.sh delete mode 100644 ct/plex-v1.sh delete mode 100644 ct/plex-v3.sh delete mode 100644 ct/podman-homeassistant-v1.sh delete mode 100644 ct/podman-homeassistant-v3.sh delete mode 100644 ct/postgresql-v3.sh delete mode 100644 ct/prometheus-v3.sh delete mode 100644 ct/technitiumdns-v2.sh delete mode 100644 ct/technitiumdns-v3.sh delete mode 100644 ct/ubuntu-v1.sh delete mode 100644 ct/ubuntu-v2.sh delete mode 100644 ct/ubuntu-v3.sh delete mode 100644 ct/unifi-v2.sh delete mode 100644 ct/unifi-v3.sh delete mode 100644 ct/uptimekuma-v2.sh delete mode 100644 ct/uptimekuma-v3.sh delete mode 100644 ct/vaultwarden-v1.sh delete mode 100644 ct/vaultwarden-v2.sh delete mode 100644 ct/vaultwarden-v3.sh delete mode 100644 ct/whoogle-v3.sh delete mode 100644 ct/wireguard-v2.sh delete mode 100644 ct/wireguard-v3.sh delete mode 100644 ct/zigbee2mqtt-v1.sh delete mode 100644 ct/zigbee2mqtt-v2.sh delete mode 100644 ct/zigbee2mqtt-v3.sh delete mode 100644 ct/zwavejs2mqtt-v1.sh delete mode 100644 ct/zwavejs2mqtt-v2.sh delete mode 100644 ct/zwavejs2mqtt-v3.sh rename {setup => install}/adguard-install.sh (100%) rename {setup => install}/blocky-install.sh (100%) rename {setup => install}/casaos-install.sh (100%) rename {setup => install}/changedetection-install.sh (100%) rename {setup => install}/daemonsync-install.sh (100%) rename {setup => install}/dashy-install.sh (100%) rename {setup => install}/debian-install.sh (100%) rename {setup => install}/deconz-install.sh (100%) rename {setup => install}/docker-install.sh (100%) rename {setup => install}/emby-install.sh (100%) rename {setup => install}/emqx-install.sh (100%) rename {setup => install}/esphome-install.sh (100%) rename {setup => install}/grafana-install.sh (100%) rename {setup => install}/grocy-install.sh (100%) rename {setup => install}/heimdalldashboard-install.sh (100%) rename {setup => install}/homeassistant-core-install.sh (100%) rename {setup => install}/homeassistant-install.sh (100%) rename {setup => install}/homebridge-install.sh (100%) rename {setup => install}/homepage-install.sh (100%) rename {setup => install}/hyperion-install.sh (100%) rename {setup => install}/influxdb-install.sh (100%) rename {setup => install}/iobroker-install.sh (100%) rename {setup => install}/jellyfin-install.sh (100%) rename {setup => install}/k0s-install.sh (100%) rename {setup => install}/keycloak-install.sh (100%) rename {setup => install}/magicmirror-install.sh (100%) rename {setup => install}/mariadb-install.sh (100%) rename {setup => install}/meshcentral-install.sh (100%) rename {setup => install}/motioneye-install.sh (100%) rename {setup => install}/mqtt-install.sh (100%) rename {setup => install}/n8n-install.sh (100%) rename {setup => install}/navidrome-install.sh (100%) rename {setup => install}/nextcloudpi-install.sh (100%) rename {setup => install}/nginx-proxy-manager-install.sh (100%) rename {setup => install}/nocodb-install.sh (100%) rename {setup => install}/node-red-install.sh (100%) rename {setup => install}/omada-install.sh (100%) rename {setup => install}/omv-install.sh (100%) rename {setup => install}/openhab-install.sh (100%) rename {setup => install}/paperless-ngx-install.sh (100%) rename {setup => install}/photoprism-install.sh (100%) rename {setup => install}/pihole-install.sh (100%) rename {setup => install}/plex-install.sh (100%) rename {setup => install}/podman-homeassistant-install.sh (100%) rename {setup => install}/podman-install.sh (100%) rename {setup => install}/postgresql-install.sh (100%) rename {setup => install}/prometheus-install.sh (100%) rename {setup => install}/scrypted-install.sh (100%) rename {setup => install}/shinobi-install.sh (100%) rename {setup => install}/syncthing-install.sh (100%) rename {setup => install}/technitiumdns-install.sh (100%) rename {setup => install}/trilium-install.sh (100%) rename {setup => install}/ubuntu-install.sh (100%) rename {setup => install}/umbrel-install.sh (100%) rename {setup => install}/unifi-install.sh (100%) rename {setup => install}/uptimekuma-install.sh (100%) rename {setup => install}/vaultwarden-install.sh (100%) rename {setup => install}/whoogle-install.sh (100%) rename {setup => install}/wikijs-install.sh (100%) rename {setup => install}/wireguard-install.sh (100%) rename {setup => install}/zigbee2mqtt-install.sh (100%) rename {setup => install}/zwave-js-ui-install.sh (100%) delete mode 100644 setup/adguard_setup.sh delete mode 100644 setup/debian11_setup.sh delete mode 100644 setup/esphome_setup.sh delete mode 100644 setup/ha_setup.sh delete mode 100644 setup/jellyfin_setup.sh delete mode 100644 setup/mariadb_setup.sh delete mode 100644 setup/motioneye_setup.sh delete mode 100644 setup/mqtt_setup.sh delete mode 100644 setup/node-red_setup.sh delete mode 100644 setup/npm_setup.sh delete mode 100644 setup/pihole_setup.sh delete mode 100644 setup/plex_setup.sh delete mode 100644 setup/podman_ha_setup.sh delete mode 100644 setup/ubuntu_setup.sh delete mode 100644 setup/vault_setup.sh delete mode 100644 setup/zigbee2mqtt_setup.sh delete mode 100644 setup/zwavejs2mqtt_setup.sh diff --git a/ct/adguard-v1.sh b/ct/adguard-v1.sh deleted file mode 100644 index daada894..00000000 --- a/ct/adguard-v1.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New AdGuard Home LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/adguard_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "LXC ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC... \e[0m" -DISK_SIZE=2G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=adguard -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 512 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC... \e[0m" -pct start $CTID -pct push $CTID adguard_setup.sh /adguard_setup.sh -perms 755 -pct exec $CTID /adguard_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a AdGuard Home LXC to $CTID" -echo -e "\e[1;92m AdGuard Home Setup should be reachable by going to the following URL. - http://${IP}:3000 -\e[0m" diff --git a/ct/adguard-v2.sh b/ct/adguard-v2.sh deleted file mode 100644 index 9838585b..00000000 --- a/ct/adguard-v2.sh +++ /dev/null @@ -1,256 +0,0 @@ -#!/usr/bin/env bash - -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Adguard Home LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${GN} - _ _ - /\ | | | | - / \ __| | __ _ _ _ __ _ _ __ __| | - / /\ \ / _ |/ _ | | | |/ _ | __/ _ | - / ____ \ (_| | (_| | |_| | (_| | | | (_| | - /_/ \_\__,_|\__, |\__,_|\__,_|_| \__,_| - __/ | - |___/ - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname adguard - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/adguard-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Adguard Home LXC to${CL} ${BL}$CTID${CL}. -${GN}Adguard${CL} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" - diff --git a/ct/adguard-v3.sh b/ct/adguard-v3.sh deleted file mode 100644 index 26955d34..00000000 --- a/ct/adguard-v3.sh +++ /dev/null @@ -1,358 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Adguard" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${GN} - _ _ - /\ | | | | - / \ __| | __ _ _ _ __ _ _ __ __| | - / /\ \ / _ |/ _ | | | |/ _ | __/ _ | - / ____ \ (_| | (_| | |_| | (_| | | | (_| | - /_/ \_\__,_|\__, |\__,_|\__,_|_| \__,_| - v3__/ | - |___/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/adguard-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# AdGuard Home LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "Adguard Setup should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index a21350c5..1b65ff63 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index 07f58776..122669b1 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index c3d54ea9..b6c9364a 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -325,7 +325,7 @@ EOF msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/changedetection-v4.sh b/ct/changedetection-v4.sh index 0580a2cc..db179033 100644 --- a/ct/changedetection-v4.sh +++ b/ct/changedetection-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/daemonsync-v2.sh b/ct/daemonsync-v2.sh deleted file mode 100644 index 5b47dfa6..00000000 --- a/ct/daemonsync-v2.sh +++ /dev/null @@ -1,253 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Daemon Sync Server LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _____ - | __ \ / ____| - | | | | __ _ ___ _ __ ___ ___ _ __ | (___ _ _ _ __ ___ - | | | |/ _ |/ _ \ _ _ \ / _ \| _ \ \___ \| | | | _ \ / __| - | |__| | (_| | __/ | | | | | (_) | | | | ____) | |_| | | | | (__ - |_____/ \__,_|\___|_| |_| |_|\___/|_| |_| |_____/ \__, |_| |_|\___| - __/ | - |___/ -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname daemonsync - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/daemonsync-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Daemon Sync Server LXC to${CL} ${BL}$CTID${CL}. - Daemon Sync should be reachable by going to the following URL. - ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/daemonsync-v3.sh b/ct/daemonsync-v3.sh deleted file mode 100644 index df44541e..00000000 --- a/ct/daemonsync-v3.sh +++ /dev/null @@ -1,358 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Daemon Sync" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _____ - | __ \ / ____| - | | | | __ _v3___ _ __ ___ ___ _ __ | (___ _ _ _ __ ___ - | | | |/ _ |/ _ \ _ _ \ / _ \| _ \ \___ \| | | | _ \ / __| - | |__| | (_| | __/ | | | | | (_) | | | | ____) | |_| | | | | (__ - |_____/ \__,_|\___|_| |_| |_|\___/|_| |_| |_____/ \__, |_| |_|\___| - __/ | - |___/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/daemonsync-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index c9c19e9b..33bc978f 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/dashy-v2.sh b/ct/dashy-v2.sh deleted file mode 100644 index 49e63390..00000000 --- a/ct/dashy-v2.sh +++ /dev/null @@ -1,254 +0,0 @@ -#!/usr/bin/env bash -clear -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Dashy LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _ - | __ \ | | - | | | | __ _ ___| |__ _ _ - | | | |/ _ / __| _ \| | | | - | |__| | (_| \__ \ | | | |_| | - |_____/ \__,_|___/_| |_|\__, | - __/ | - |___/ -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=3 -export PCT_OPTIONS=" - -features $FEATURES - -hostname dashy - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/dashy-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Dashy LXC to${CL} ${BL}$CTID${CL}. -${BL}Dashy${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/dashy-v3.sh b/ct/dashy-v3.sh deleted file mode 100644 index b7e795d2..00000000 --- a/ct/dashy-v3.sh +++ /dev/null @@ -1,358 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Dashy" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _ - | __ \ | | - | | | | __ _ ___| |__ _ _ - | | | |/ _ / __| _ \| | | | - | |__| | (_| \__ \ | | | |_| | - |_____/ \__,_|___/_| |_|\__, | - v3__/ | - |___/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}3${CL}${DGN}GB${CL}" - DISK_SIZE="3" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 3 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="3"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/dashy-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 5aac4c22..4f777b81 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/debian-v1.sh b/ct/debian-v1.sh deleted file mode 100644 index c002b0c6..00000000 --- a/ct/debian-v1.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Debian 11 LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/debian11_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=2G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=debian11 -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 512\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID debian11_setup.sh /debian11_setup.sh -perms 755 -pct exec $CTID /debian11_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a Debian 11 LXC Container to $CTID at IP Address ${IP}" diff --git a/ct/debian-v2.sh b/ct/debian-v2.sh deleted file mode 100644 index 36ed693b..00000000 --- a/ct/debian-v2.sh +++ /dev/null @@ -1,257 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[32m"` -CL=`echo "\033[m"` -APP="Debian" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _ _ - | __ \ | | (_) - | | | | ___| |__ _ __ _ _ __ - | | | |/ _ \ _ \| |/ _ | _ \ - | |__| | __/ |_) | | (_| | | | | - |_____/ \___|_.__/|_|\__,_|_| |_| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some applications may not work properly due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. \n" diff --git a/ct/debian-v3.sh b/ct/debian-v3.sh deleted file mode 100644 index 79c9bdd1..00000000 --- a/ct/debian-v3.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Debian" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _ _ - | __ \ | | (_) - | | | | ___| |__ _ __ _ _ __ - | | | |/ _ \ _ \| |/ _ | _ \ - | |__| | __/ |_) | | (_| | | | | - |_${YW}v3${RD}__/ \___|_.__/|_|\__,_|_| |_| -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index c70d40dc..25501b0e 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/deconz-v3.sh b/ct/deconz-v3.sh deleted file mode 100644 index 3679fb6c..00000000 --- a/ct/deconz-v3.sh +++ /dev/null @@ -1,371 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="deCONZ" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="ubuntu" -var_version="20.04" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _____ - | | / ____| - __| | v3_| | ___ _ __ ____ - / _ |/ _ \ | / _ \| _ \|_ / - | (_| | __/ |___| (_) | | | |/ / - \__,_|\___|\_____\___/|_| |_/___| -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Unprivileged" - CT_TYPE="1" - echo -en "${DGN}Set CT Type ${BL}Unprivileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -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 - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 9faf169b..0a373336 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -324,7 +324,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/docker-v2.sh b/ct/docker-v2.sh deleted file mode 100644 index 43ceb81b..00000000 --- a/ct/docker-v2.sh +++ /dev/null @@ -1,312 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Docker LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _ - | __ \ | | - | | | | ___ ___| | _____ _ __ - | | | |/ _ \ / __| |/ / _ \ __| - | |__| | (_) | (__| < __/ | - |_____/ \___/ \___|_|\_\___|_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${RD} If Using ZFS, You Have Storage Driver Options${CL}\n" - printf " ${RD} Non ZFS, Select Standard overlay2 Storage Driver${CL}\n" - printf " ${YW} 1)${GN} Use fuse-overlayfs Storage Driver${CL}\n" - printf " ${YW} 2)${GN} Use Standard overlay2 Storage Driver${CL}\n" - - printf "Please choose a Storage Driver and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using fuse-overlayfs Storage Driver"; - STORAGE_DRIVER="fuse" - break; - ;; - 2) clear; - header_info; - option_picked "Using overlay2 Storage Driver"; - STORAGE_DRIVER=" " - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Storage Driver from the menu"; - show_menu3; - ;; - esac - done -show_menu4(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message4=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" - printf " ${YW}${message4}${CL}\n" -} -show_menu4 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu4; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ] && [ "$STORAGE_DRIVER" == " " ]; then - FEATURES="nesting=1,keyctl=1" - elif - [ "$IM" == "1" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then - FEATURES="nesting=1,keyctl=1,fuse=1" - elif - [ "$IM" == "0" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then - FEATURES="nesting=1,fuse=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname docker - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - wget -qL -O fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v1.8.2/fuse-overlayfs-x86_64 - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - - if [ "$STORAGE_TYPE" == "zfspool" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then - pct push $CTID fuse-overlayfs /usr/local/bin/fuse-overlayfs -perms 755 - info "Using ${BL}fuse-overlayfs${CL} Storage Driver." - else - info "Using ${BL}overlay2${CL} Storage Driver." - fi - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/docker-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Docker LXC to${CL} ${BL}$CTID${CL}. \n" diff --git a/ct/docker-v3.sh b/ct/docker-v3.sh deleted file mode 100644 index 3c2c71a4..00000000 --- a/ct/docker-v3.sh +++ /dev/null @@ -1,361 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Docker" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _ - | __ \ | | - | | | | ___ ___| | _____ _ __ - | |v3| |/ _ \ / __| |/ / _ \ __| - | |__| | (_) | (__| < __/ | - |_____/ \___/ \___|_|\_\___|_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/docker-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index 326fb3f9..fcaf2469 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -336,7 +336,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 6ad8344e..c1461b71 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -331,7 +331,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index ee621375..21499816 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/esphome-v1.sh b/ct/esphome-v1.sh deleted file mode 100644 index 902c9969..00000000 --- a/ct/esphome-v1.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env bash - -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` - -while true; do - read -p "This will create a New ESPHome LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${CL} - ______ _____ _____ _ _ ____ __ __ ______ - | ____|/ ____| __ \| | | |/ __ \| \/ | ____| - | |__ | (___ | |__) | |__| | | | | \ / | |__ - | __| \___ \| ___/| __ | | | | |\/| | __| - | |____ ____) | | | | | | |__| | | | | |____ - |______|_____/|_| |_| |_|\____/|_| |_|______| - -${CL}" -} - -header_info - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/esphome_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using ${BL}$STORAGE${CL} for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is ${BL}$CTID.${CL}" - -echo -en "${GN} Updating LXC Template List... " -pveam update >/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Downloading LXC Template... " -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} -echo -e "${CM}${CL} \r" - -echo -en "${GN} Creating LXC Container... " -DISK_SIZE=4G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=esphome -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 1024 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -pct push $CTID esphome_setup.sh /esphome_setup.sh -perms 755 -echo -e "${CM}${CL} \r" -pct exec $CTID /esphome_setup.sh - - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created ESPHome LXC Container to ${BL}$CTID${CL}" -echo -e "${CL} ESPHome should be reachable by going to the following URL. - ${BL}http://${IP}:6052${CL} -\n" diff --git a/ct/esphome-v2.sh b/ct/esphome-v2.sh deleted file mode 100644 index 8fcbf29b..00000000 --- a/ct/esphome-v2.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="ESPHome" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - ______ _____ _____ _ _ ____ __ __ ______ - | ____|/ ____| __ \| | | |/ __ \| \/ | ____| - | |__ | (___ | |__) | |__| | | | | \ / | |__ - | __| \___ \| ___/| __ | | | | |\/| | __| - | |____ ____) | | | | | | |__| | | | | |____ - |______|_____/|_| |_| |_|\____/|_| |_|______| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/esphome-v3.sh b/ct/esphome-v3.sh deleted file mode 100644 index b39f4f07..00000000 --- a/ct/esphome-v3.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="ESPHome" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - ______ _____ _____ _ _ ____ __ __ ______ - | ____|/ ____| __ \| | | |/ __ \| \/ | ____| - | |__ | (___ | |__) | |__| | | | | \ / | |__ - | __| \___ \| ___/| __ | | | | |\/| | __| - | |____ ____) | | | | | | |__| | | | | |____ - |______|_____/|_| v3 |_| |_|\____/|_| |_|______| - -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/esphome-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index d7e7350d..ff206eec 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/grafana-v2.sh b/ct/grafana-v2.sh deleted file mode 100644 index 04d65207..00000000 --- a/ct/grafana-v2.sh +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Grafana LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _____ __ - / ____| / _| - | | __ _ __ __ _| |_ __ _ _ __ __ _ - | | |_ | __/ _ | _/ _ | _ \ / _ | - | |__| | | | (_| | || (_| | | | | (_| | - \_____|_| \__,_|_| \__,_|_| |_|\__,_| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname grafana - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/grafana-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Grafana LXC to${CL} ${BL}$CTID${CL}. -${BL}Grafana${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grafana-v3.sh b/ct/grafana-v3.sh deleted file mode 100644 index cf708a67..00000000 --- a/ct/grafana-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Grafana" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _____ __ - / ____| / _| - | | __ _ __ __ _| |_ __ _ _ __ __ _ - | | |_ | __/ _ | _/ _ | _ \ / _ | - | |__| | | | (_| | || (_| | | | | (_| | - \_____|_|v3\__,_|_| \__,_|_| |_|\__,_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/grafana-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index 68a8488d..f72fd3cf 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/grocy-v3.sh b/ct/grocy-v3.sh deleted file mode 100644 index 38f6b555..00000000 --- a/ct/grocy-v3.sh +++ /dev/null @@ -1,359 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="grocy" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - __ _ _ __ ___ ___ _ _ - / _ | __/ _ \ / __| | | | - | (_| | | | (_) | (__| |_| | - \__, |_| \___/ \___|\__, | - __/ | v3 __/ | - |___/ |___/ -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 7b4fae30..3c0f7e0e 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/heimdalldashboard-v2.sh b/ct/heimdalldashboard-v2.sh deleted file mode 100644 index 1a60e74c..00000000 --- a/ct/heimdalldashboard-v2.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash -PP=`echo "\e[1;35m"` -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="Heimdall Dashboard" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${PP} - _ _ _ _ _ _ _____ _ _ _ - | | | | (_) | | | | | | __ \ | | | | | | - | |__| | ___ _ _ __ ___ __| | __ _| | | | | | | __ _ ___| |__ | |__ ___ __ _ _ __ __| | - | __ |/ _ \ | _ _ \ / _ |/ _ | | | | | | |/ _ / __| _ \| _ \ / _ \ / _ | __/ _ | - | | | | __/ | | | | | | (_| | (_| | | | | |__| | (_| \__ \ | | | |_) | (_) | (_| | | | (_| | - |_| |_|\___|_|_| |_| |_|\__,_|\__,_|_|_| |_____/ \__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and press [ENTER] or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and press [ENTER] or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and press [ENTER] or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press [ENTER]." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/heimdalldashboard-v3.sh b/ct/heimdalldashboard-v3.sh deleted file mode 100644 index 1a1eb641..00000000 --- a/ct/heimdalldashboard-v3.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -PP=`echo "\e[1;35m"` -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Heimdall Dashboard" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${PP} - _ _ _ _ _ _ _____ _ _ _ - | | | | (_) | | | | | | __ \ | | | | | | - | |__| | ___ _ _ __ ___ __| | __v3| | | | | | | __ _ ___| |__ | |__ ___ __ _ _ __ __| | - | __ |/ _ \ | _ _ \ / _ |/ _ | | | | | | |/ _ / __| _ \| _ \ / _ \ / _ | __/ _ | - | | | | __/ | | | | | | (_| | (_| | | | | |__| | (_| \__ \ | | | |_) | (_) | (_| | | | (_| | - |_| |_|\___|_|_| |_| |_|\__,_|\__,_|_|_| |_____/ \__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/heimdalldashboard-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 410d50fa..6c4b3492 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index df5f2408..684577a7 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -324,7 +324,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/homeassistant-v1.sh b/ct/homeassistant-v1.sh deleted file mode 100644 index 40c7652e..00000000 --- a/ct/homeassistant-v1.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Home Assistant Container LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/ha_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=8G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - wget -qL -O fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v1.8.2/fuse-overlayfs-x86_64 - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi - ARCH=$(dpkg --print-architecture) -HOSTNAME=homeassistant -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -if [ "$STORAGE_TYPE" == "zfspool" ]; then - CT_FEATURES="fuse=1,keyctl=1,mknod=1,nesting=1" -else - CT_FEATURES="nesting=1" -fi -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features $CT_FEATURES \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 2048 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -if [ "$STORAGE_TYPE" == "zfspool" ]; then -pct push $CTID fuse-overlayfs /usr/local/bin/fuse-overlayfs -perms 755 -info "Using fuse-overlayfs." -fi -pct push $CTID ha_setup.sh /ha_setup.sh -perms 755 -pct exec $CTID /ha_setup.sh -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created Home Assistant Container LXC to $CTID." -msg " - -Home Assistant should be reachable by going to the following URL. - - http://${IP}:8123 -" diff --git a/ct/homeassistant-v2.sh b/ct/homeassistant-v2.sh deleted file mode 100644 index 938b6921..00000000 --- a/ct/homeassistant-v2.sh +++ /dev/null @@ -1,316 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[94m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Home Assistant Container LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _ _ _ _ - | | (_) | | | | - | |__ ___ _ __ ___ ___ __ _ ___ ___ _ ___| |_ __ _ _ __ | |_ - | _ \ / _ \| _ _ \ / _ \/ _ / __/ __| / __| __/ _ | _ \| __| - | | | | (_) | | | | | | __/ (_| \__ \__ \ \__ \ || (_| | | | | |_ - |_| |_|\___/|_| |_| |_|\___|\__,_|___/___/_|___/\__\__,_|_| |_|\__| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${RD} If Using ZFS, You Have Storage Driver Options${CL}\n" - printf " ${RD} Non ZFS, Select Standard overlay2 Storage Driver${CL}\n" - printf " ${YW} 1)${GN} Use fuse-overlayfs Storage Driver${CL}\n" - printf " ${YW} 2)${GN} Use Standard overlay2 Storage Driver${CL}\n" - - printf "Please choose a Storage Driver and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using fuse-overlayfs Storage Driver"; - STORAGE_DRIVER="fuse" - break; - ;; - 2) clear; - header_info; - option_picked "Using overlay2 Storage Driver"; - STORAGE_DRIVER=" " - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Storage Driver from the menu"; - show_menu3; - ;; - esac - done -show_menu4(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message4=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" - printf " ${YW}${message4}${CL}\n" -} -show_menu4 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu4; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ] && [ "$STORAGE_DRIVER" == " " ]; then - FEATURES="nesting=1,keyctl=1" - elif - [ "$IM" == "1" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then - FEATURES="nesting=1,keyctl=1,fuse=1" - elif - [ "$IM" == "0" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then - FEATURES="nesting=1,fuse=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=16 -export PCT_OPTIONS=" - -features $FEATURES - -hostname homeassistant - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - wget -qL -O fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v1.8.2/fuse-overlayfs-x86_64 - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - - if [ "$STORAGE_TYPE" == "zfspool" ] && [ "$STORAGE_DRIVER" == "fuse" ]; then - pct push $CTID fuse-overlayfs /usr/local/bin/fuse-overlayfs -perms 755 - info "Using ${BL}fuse-overlayfs${CL} Storage Driver." - else - info "Using ${BL}overlay2${CL} Storage Driver." - fi - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/homeassistant-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Home Assistant Container LXC to${CL} ${BL}$CTID${CL}. -${BL}Home Assistant${CL} should be reachable by going to the following URL. - - ${BL}http://${IP}:8123${CL} \n" diff --git a/ct/homeassistant-v3.sh b/ct/homeassistant-v3.sh deleted file mode 100644 index ad4dc553..00000000 --- a/ct/homeassistant-v3.sh +++ /dev/null @@ -1,365 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Home Assistant" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _ _ _ _ - | | ${YW}v3${CL}${BL} (_) | | | | - | |__ ___ _ __ ___ ___ __ _ ___ ___ _ ___| |_ __ _ _ __ | |_ - | _ \ / _ \| _ _ \ / _ \/ _ / __/ __| / __| __/ _ | _ \| __| - | | | | (_) | | | | | | __/ (_| \__ \__ \ \__ \ || (_| | | | | |_ - |_| |_|\___/|_| |_| |_|\___|\__,_|___/___/_|___/\__\__,_|_| |_|\__| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}16${CL}${DGN}GB${CL}" - DISK_SIZE="16" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 16 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="16"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/homeassistant-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} -Portainer should be reachable by going to the following URL. - ${BL}http://${IP}:9000${CL}\n" diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index dece5d89..23577ce7 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -336,7 +336,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/homebridge-v2.sh b/ct/homebridge-v2.sh deleted file mode 100644 index 3e045697..00000000 --- a/ct/homebridge-v2.sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Homebridge LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ ____ __ __ ______ ____ _____ _____ _____ _____ ______ - | | | |/ __ \| \/ | ____| _ \| __ \|_ _| __ \ / ____| ____| - | |__| | | | | \ / | |__ | |_) | |__) | | | | | | | | __| |__ - | __ | | | | |\/| | __| | _ <| _ / | | | | | | | |_ | __| - | | | | |__| | | | | |____| |_) | | \ \ _| |_| |__| | |__| | |____ - |_| |_|\____/|_| |_|______|____/|_| \_\_____|_____/ \_____|______| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname homebridge - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/homebridge-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Homebridge LXC to${CL} ${BL}$CTID${CL}. -${BL}Homebridge${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/homebridge-v3.sh b/ct/homebridge-v3.sh deleted file mode 100644 index 629a9a19..00000000 --- a/ct/homebridge-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Homebridge" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ ____ __ __ ______ ____ _____ _____ _____ _____ ______ - | | | |/ __ \| \/ | ____| _ \| __ \|_ _| __ \ / ____| ____| - | |__| | | | | \ / | |__ | |_) | |__) | | | | | | | | __| |__ - | __ | | | | |\/| | __| | _ <| _ / | | | | | | | |_ | __| - | | | | |__| | | | | |____| |_) | | \ \ _| |_| |__| | |__| | |____ - |_|v3|_|\____/|_| |_|______|____/|_| \_\_____|_____/ \_____|______| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/homebridge-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "Homebridge should be reachable by going to the following URL. - ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index c1305e20..ff5edd74 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 95df4b44..a7713489 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh index a4746631..80f618eb 100644 --- a/ct/hyperion-v4.sh +++ b/ct/hyperion-v4.sh @@ -325,7 +325,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/influxdb-v2.sh b/ct/influxdb-v2.sh deleted file mode 100644 index 0d9e113c..00000000 --- a/ct/influxdb-v2.sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New InfluxDB LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _____ __ _ _____ ____ - |_ _| / _| | | __ \| _ \ - | | _ __ | |_| |_ ___ _| | | | |_) | - | | | _ \| _| | | | \ \/ / | | | _ < - _| |_| | | | | | | |_| |> <| |__| | |_) | - |_____|_| |_|_| |_|\__,_/_/\_\_____/|____/ - with Telegraf -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname influxdb - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/influxdb-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created InfluxDB LXC to${CL} ${BL}$CTID${CL}. \n" diff --git a/ct/influxdb-v3.sh b/ct/influxdb-v3.sh deleted file mode 100644 index d4288d8b..00000000 --- a/ct/influxdb-v3.sh +++ /dev/null @@ -1,355 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="InfluxDB" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _____ __ _ _____ ____ - |_ _| / _| | | __ \| _ \ - | | _ __ | |_| |_ v3___ _| | | | |_) | - | | | _ \| _| | | | \ \/ / | | | _ < - _| |_| | | | | | | |_| |> <| |__| | |_) | - |_____|_| |_|_| |_|\__,_/_/\_\_____/|____/ - with Telegraf -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/influxdb-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 9ba3a22b..81b5457e 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/iobroker-v3.sh b/ct/iobroker-v3.sh deleted file mode 100644 index f6a52106..00000000 --- a/ct/iobroker-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="ioBroker" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _ ____ _ - (_) | _ \ | | - _ ___ | |_) |_ __ ___ | | _____ _ __ - | |/ _ \| _ <| __/ _ \| |/ / _ \ __| - | | (_) | |_) | | | (_) | < __/ | - |_|\___/|____/|_|v3\___/|_|\_\___|_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/iobroker-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 7e91f90f..17f878fe 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/jellyfin-v1.sh b/ct/jellyfin-v1.sh deleted file mode 100644 index 3b8e674a..00000000 --- a/ct/jellyfin-v1.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a Jellyfin Media Server LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/jellyfin_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for Storage Location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=ubuntu -OSVERSION=${OSTYPE}-20.04 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=8G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=jellyfin -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 2048\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID jellyfin_setup.sh /jellyfin_setup.sh -perms 755 -pct exec $CTID /jellyfin_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created Jellyfin Media Server LXC to $CTID." -echo -e "\e[1;92m Jellyfin Media Server should be reachable by going to the following URL. - http://${IP}:8096 -\e[0m" diff --git a/ct/jellyfin-v3.sh b/ct/jellyfin-v3.sh deleted file mode 100644 index 59b4cae9..00000000 --- a/ct/jellyfin-v3.sh +++ /dev/null @@ -1,370 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -APP="Jellyfin" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${DGN} - _ _ _ __ _ - | | | | | / _(_) - | | ___| | |_v3 _| |_ _ _ __ - _ | |/ _ \ | | | | | _| | _ \ - | |__| | __/ | | |_| | | | | | | | - \____/ \___|_|_|\__, |_| |_|_| |_| - __/ | - |___/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type ${CROSS}${YW}Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Unprivileged" - CT_TYPE="1" - echo -en "${DGN}Set CT Type ${BL}Unprivileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=ubuntu -export PCT_OSVERSION=20.04 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file -EOF - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/jellyfin-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "Jellyfin Media Server should be reachable by going to the following URL. - ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 44a18a47..37905cd7 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -331,7 +331,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/k0s-v4.sh b/ct/k0s-v4.sh index 1622434e..7e8ac4ba 100644 --- a/ct/k0s-v4.sh +++ b/ct/k0s-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/keycloak-v3.sh b/ct/keycloak-v3.sh deleted file mode 100644 index f11080d3..00000000 --- a/ct/keycloak-v3.sh +++ /dev/null @@ -1,360 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Keycloak" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - - _ __________ _______ _ ____ _ __ - | |/ / ____\ \ / / ____| | / __ \ /\ | |/ / - | ' /| |__ \ \_/ / | | | | | | | / \ | ' / - | < | __| \ /| | v3 | | | | | |/ /\ \ | < - | . \| |____ | | | |____| |___| |__| / ____ \| . \ - |_|\_\______| |_| \_____|______\____/_/ \_\_|\_\ -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index f145d045..4702c46e 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/magicmirror-v3.sh b/ct/magicmirror-v3.sh deleted file mode 100644 index fc2fa201..00000000 --- a/ct/magicmirror-v3.sh +++ /dev/null @@ -1,359 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="MagicMirror" -var_disk="3" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ _____ _____ _____ __ __ _____ _____ _____ ____ _____ - | \/ | /\ / ____|_ _/ ____| \/ |_ _| __ \| __ \ / __ \| __ \ - | \ / | / \ | | __ | || | | \ / | | | | |__) | |__) | | | | |__) | - | |\/| | / /\ \| | |_ | | || | v3 | |\/| | | | | _ /| _ /| | | | _ / - | | | |/ ____ \ |__| |_| || |____| | | |_| |_| | \ \| | \ \| |__| | | \ \ - |_| |_/_/ \_\_____|_____\_____|_| |_|_____|_| \_\_| \_\ ____/|_| \_\ -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 28290847..ff4c7365 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/mariadb-v1.sh b/ct/mariadb-v1.sh deleted file mode 100644 index c3f09991..00000000 --- a/ct/mariadb-v1.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Mariadb LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/mariadb_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using ${BL}${STORAGE}${CL} for Storage Location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is ${BL}${CTID}${CL}." - -echo -en "${GN} Updating LXC Template List... " -pveam update >/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Downloading LXC Template... " -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} -echo -e "${CM}${CL} \r" - -echo -en "${GN} Creating LXC Container... " -DISK_SIZE=4G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=mariadb -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 1024 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -pct push $CTID mariadb_setup.sh /mariadb_setup.sh -perms 755 -echo -e "${CM}${CL} \r" -pct exec $CTID /mariadb_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "${GN} Successfully created a MariaDB LXC Container to ${BL}${CTID}${CL}" -echo -e "${CL} Adminer should be reachable by going to the following URL. - ${BL} http://${IP}/adminer/ ${CL}" diff --git a/ct/mariadb-v2.sh b/ct/mariadb-v2.sh deleted file mode 100644 index 233296d4..00000000 --- a/ct/mariadb-v2.sh +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Mariadb LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ _ _ _ - | \/ | (_) | | | - | \ / | __ _ _ __ _ __ _ __| | |__ - | |\/| |/ _ | __| |/ _ |/ _ | _ \ - | | | | (_| | | | | (_| | (_| | |_) | - |_| |_|\__,_|_| |_|\__,_|\__,_|_.__/ - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname mariadb - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/mariadb-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Mariadb LXC to${CL} ${BL}$CTID${CL}. -${BL}Adminer${CL} should be reachable by going to the following URL. - ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/mariadb-v3.sh b/ct/mariadb-v3.sh deleted file mode 100644 index 74c52575..00000000 --- a/ct/mariadb-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="MariaDB" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ _ _ _ - | \/ | (_) | | | - | \ / | __ _ _ __ _ __ _ __| | |__ - | |\/| |/ _ | __| |/ _ |/ _ | _ \ - | | | | (_| | | | | (_| | (_| | |_) | - |_| |_|\__,_|_|v3|_|\__,_|\__,_|_.__/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/mariadb-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "Adminer should be reachable by going to the following URL. - ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index 780ba45c..20a1ff7a 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/meshcentral-v2.sh b/ct/meshcentral-v2.sh deleted file mode 100644 index f8df0b17..00000000 --- a/ct/meshcentral-v2.sh +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="MeshCentral" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ _ _____ _ _ - | \/ | | | / ____| | | | | - | \ / | ___ ___| |__ | | ___ _ __ | |_ _ __ __ _| | - | |\/| |/ _ \/ __| _ \| | / _ \ _ \| __| __/ _ | | - | | | | __/\__ \ | | | |___| __/ | | | |_| | | (_| | | - |_| |_|\___||___/_| |_|\_____\___|_| |_|\__|_| \__,_|_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some applications may not work properly due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/meshcentral-v3.sh b/ct/meshcentral-v3.sh deleted file mode 100644 index ff411439..00000000 --- a/ct/meshcentral-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="MeshCentral" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ _ _____ _ _ - | \/ | | | / ____| | | | | - | \ / | ___ ___| |__ | | ___ _ __ | |_ _ __ __ _| | - | |\/| |/ _ \/ __| _ \| | v3 / _ \ _ \| __| __/ _ | | - | | | | __/\__ \ | | | |___| __/ | | | |_| | | (_| | | - |_| |_|\___||___/_| |_|\_____\___|_| |_|\__|_| \__,_|_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/meshcentral-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index f91f91d3..8de241a6 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/motioneye-v1.sh b/ct/motioneye-v1.sh deleted file mode 100644 index 944ee9b6..00000000 --- a/ct/motioneye-v1.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New MotionEye NVR LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/motioneye_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=8G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=motioneye -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 2048\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID motioneye_setup.sh /motioneye_setup.sh -perms 755 -pct exec $CTID /motioneye_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created MotionEye LXC to $CTID." -echo -e "\e[1;92m MotionEye NVR should be reachable by going to the following URL. - http://${IP}:8765 -\e[0m" diff --git a/ct/motioneye-v2.sh b/ct/motioneye-v2.sh deleted file mode 100644 index 0c3449b3..00000000 --- a/ct/motioneye-v2.sh +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="Motioneye" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ ____ _______ _____ ____ _ _ ________ ________ - | \/ |/ __ \__ __|_ _/ __ \| \ | | ____\ \ / / ____| - | \ / | | | | | | | || | | | \| | |__ \ \_/ /| |__ - | |\/| | | | | | | | || | | | | __| \ / | __| - | | | | |__| | | | _| || |__| | |\ | |____ | | | |____ - |_| |_|\____/ |_| |_____\____/|_| \_|______| |_| |______| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/motioneye-v3.sh b/ct/motioneye-v3.sh deleted file mode 100644 index 1c3ca29e..00000000 --- a/ct/motioneye-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Motioneye" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ ____ _______ _____ ____ _ _ ________ ________ - | \/ |/ __ \__ __|_ _/ __ \| \ | | ____\ \ / / ____| - | \ / | | | | | | | || | | | \| | |__ \ \_/ /| |__ - | |\/| | | | | | | | || | | | | __| \ / | __| - | | | | |__| | | | v3_| || |__| | |\ | |____ | | | |____ - |_| |_|\____/ |_| |_____\____/|_| \_|______| |_| |______| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/motioneye-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 78d60c7b..f8a8663b 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/mqtt-v1.sh b/ct/mqtt-v1.sh deleted file mode 100644 index bda6ed8e..00000000 --- a/ct/mqtt-v1.sh +++ /dev/null @@ -1,158 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New MQTT LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/mqtt_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=2G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=mqtt -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 512 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID mqtt_setup.sh /mqtt_setup.sh -perms 755 -pct exec $CTID /mqtt_setup.sh -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a MQTT LXC Container to $CTID at IP Address ${IP}" diff --git a/ct/mqtt-v2.sh b/ct/mqtt-v2.sh deleted file mode 100644 index 7bd70ed0..00000000 --- a/ct/mqtt-v2.sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New MQTT LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ ____ _______ _______ - | \/ |/ __ \__ __|__ __| - | \ / | | | | | | | | - | |\/| | | | | | | | | - | | | | |__| | | | | | - |_| |_|\___\_\ |_| |_| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname mqtt - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/mqtt-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created MQTT LXC to${CL} ${BL}$CTID${CL}. \n" diff --git a/ct/mqtt-v3.sh b/ct/mqtt-v3.sh deleted file mode 100644 index 7d74a950..00000000 --- a/ct/mqtt-v3.sh +++ /dev/null @@ -1,354 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="MQTT" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ ____ _______ _______ - | \/ |/ __ \__ __|__ __| - | \ / | | | | | | | | - | |\/| | | | | | | | | - | | | | |__| | | | | | - |_| |_|\___\_\ |_| v3 |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/mqtt-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 84801204..0518991c 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -285,7 +285,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/n8n-v3.sh b/ct/n8n-v3.sh deleted file mode 100644 index 1347f25c..00000000 --- a/ct/n8n-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="n8n" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - ___ - / _ \ - _ __ | (_) |_v3_ - | _ \ > _ <| _ \ - | | | | (_) | | | | - |_| |_|\___/|_| |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}3${CL}${DGN}GB${CL}" - DISK_SIZE="3" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 3 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="3"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/n8n-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index c7b0cc56..f09ea205 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 750767a0..ed513d68 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index 0b119e71..84ed147c 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/nginx-proxy-manager-v1.sh b/ct/nginx-proxy-manager-v1.sh deleted file mode 100644 index efc67e28..00000000 --- a/ct/nginx-proxy-manager-v1.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env bash - -#!/usr/bin/env bash -while true; do - read -p "This will create a New Nginx Proxy Manager LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/npm_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "LXC ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC... \e[0m" -DISK_SIZE=3G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=npm -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 1024 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC... \e[0m" -pct start $CTID -pct push $CTID npm_setup.sh /npm_setup.sh -perms 755 -pct exec $CTID /npm_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created Nginx Proxy Manager LXC to $CTID." -echo -e "\e[1;92m Nginx Proxy Manager should be reachable by going to the following URL. - http://${IP}:81 -\e[0m" diff --git a/ct/nginx-proxy-manager-v2.sh b/ct/nginx-proxy-manager-v2.sh deleted file mode 100644 index 2b147d60..00000000 --- a/ct/nginx-proxy-manager-v2.sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Nginx Proxy Manager LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _ _ _____ __ __ - | \ | | __ \| \/ | - | \| | |__) | \ / | - | | ___/| |\/| | - | |\ | | | | | | - |_| \_|_| |_| |_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=3 -export PCT_OPTIONS=" - -features $FEATURES - -hostname npm - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/nginx-proxy-manager-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Nginx Proxy Manager LXC to${CL} ${BL}$CTID${CL}. -Nginx Proxy Manager should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nginx-proxy-manager-v3.sh b/ct/nginx-proxy-manager-v3.sh deleted file mode 100644 index bfcf2225..00000000 --- a/ct/nginx-proxy-manager-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Nginx Proxy Manager" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _ _ _____ __ __ - | \ | | __ \| \/ | - | \| | |__) | \ / | - | | ___/| |\/| | - | |\ | | | | | | - |_| \_|_| v3 |_| |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}3${CL}${DGN}GB${CL}" - DISK_SIZE="3" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 3 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="3"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/nginx-proxy-manager-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index c12d14d1..6cc5cb1b 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/nginx-proxy-manager-install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/nginx-proxy-manager-install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/nocodb-v2.sh b/ct/nocodb-v2.sh deleted file mode 100644 index 4eafd1cf..00000000 --- a/ct/nocodb-v2.sh +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="NocoDB" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ _____ ____ - | \ | | | __ \| _ \ - | \| | ___ ___ ___ | | | | |_) | - | |/ _ \ / __/ _ \| | | | _ < - | |\ | (_) | (_| (_) | |__| | |_) | - |_| \_|\___/ \___\___/|_____/|____/ -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some applications may not work properly due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:8080/dashboard${CL}\n" diff --git a/ct/nocodb-v3.sh b/ct/nocodb-v3.sh deleted file mode 100644 index 9ede88a8..00000000 --- a/ct/nocodb-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="NocoDB" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ _____ ____ - | \ | | | __ \| _ \ - | \| | ___ v3___ ___ | | | | |_) | - | |/ _ \ / __/ _ \| | | | _ < - | |\ | (_) | (_| (_) | |__| | |_) | - |_| \_|\___/ \___\___/|_____/|____/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/nocodb-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080/dashboard${CL}\n" diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 2ca00f97..7503fb7a 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/node-red-v1.sh b/ct/node-red-v1.sh deleted file mode 100644 index ebd544b3..00000000 --- a/ct/node-red-v1.sh +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Node-Red LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/node-red_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=4G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=nodered -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 1024 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID node-red_setup.sh /node-red_setup.sh -perms 755 -pct exec $CTID /node-red_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created Node-Red LXC to $CTID." -echo -e "\e[1;92m Node-Red should be reachable by going to the following URL. - http://${IP}:1880 -\e[0m" diff --git a/ct/node-red-v2.sh b/ct/node-red-v2.sh deleted file mode 100644 index 9ecc7d17..00000000 --- a/ct/node-red-v2.sh +++ /dev/null @@ -1,253 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Node-Red LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _ _ _ _____ _ - | \ | | | | | __ \ | | - | \| | ___ __| | ___ ______| |__) |___ __| | - | |/ _ \ / _ |/ _ \______| _ // _ \/ _ | - | |\ | (_) | (_| | __/ | | \ \ __/ (_| | - |_| \_|\___/ \__,_|\___| |_| \_\___|\__,_| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname node-red - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/node-red-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Node-Red LXC to${CL} ${BL}$CTID${CL}. -${RD}Node-Red${CL} should be reachable by going to the following URL. - - ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/node-red-v3.sh b/ct/node-red-v3.sh deleted file mode 100644 index 58252e17..00000000 --- a/ct/node-red-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Node Red" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _ _ _ _____ _ - | \ | | | | | __ \ | | - | \| | ___ __| | ___ ______| |__) |___ __| | - | |/ _ \ / _ |/ _ \__v3__| _ // _ \/ _ | - | |\ | (_) | (_| | __/ | | \ \ __/ (_| | - |_| \_|\___/ \__,_|\___| |_| \_\___|\__,_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/node-red-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 97a94755..2ca913de 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/omada-v2.sh b/ct/omada-v2.sh deleted file mode 100644 index 6ec8036b..00000000 --- a/ct/omada-v2.sh +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/env bash -clear -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Omada Controller LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - ____ _ _____ _ _ _ - / __ \ | | / ____| | | | | | - | | | |_ __ ___ __ _ __| | __ _ | | ___ _ __ | |_ _ __ ___ | | | ___ _ __ - | | | | _ _ \ / _ |/ _ |/ _ | | | / _ \| _ \| __| __/ _ \| | |/ _ \ __| - | |__| | | | | | | (_| | (_| | (_| | | |___| (_) | | | | |_| | | (_) | | | __/ | - \____/|_| |_| |_|\__,_|\__,_|\__,_| \_____\___/|_| |_|\__|_| \___/|_|_|\___|_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose an Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=ubuntu -export PCT_OSVERSION=20.04 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname omada - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/omada-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Omada Controller LXC to${CL} ${BL}$CTID${CL}. -${BL}Omada${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/omada-v3.sh b/ct/omada-v3.sh deleted file mode 100644 index 7b97dace..00000000 --- a/ct/omada-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Omada" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - ____ _ _____ _ _ _ - / __ \ | | / ____| | | | | | - | | | |_ __ ___ v3__ _ __| | __ _ | | ___ _ __ | |_ _ __ ___ | | | ___ _ __ - | | | | _ _ \ / _ |/ _ |/ _ | | | / _ \| _ \| __| __/ _ \| | |/ _ \ __| - | |__| | | | | | | (_| | (_| | (_| | | |___| (_) | | | | |_| | | (_) | | | __/ | - \____/|_| |_| |_|\__,_|\__,_|\__,_| \_____\___/|_| |_|\__|_| \___/|_|_|\___|_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=ubuntu -export PCT_OSVERSION=20.04 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/omada-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 099deba7..2b48b2a4 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -318,7 +318,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index a649a28c..9aa13239 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -320,7 +320,7 @@ EOF msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/openhab-v3.sh b/ct/openhab-v3.sh deleted file mode 100644 index a4726cb0..00000000 --- a/ct/openhab-v3.sh +++ /dev/null @@ -1,361 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="openHAB" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ ____ - | | | | /\ | _ \ - ___ _ __ ___ _ __ | |__| | / \ | |_) | - / _ \| _ \ / _ \ _ \| __ | / /\ \ | _ < - | (_) | |_) | __/ | | | | | |/ ____ \| |_) | - \___/| .__/ \___|_| |_|_| |_/_/ v3 \_\____/ - | | - |_| -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Unprivileged" - CT_TYPE="1" - echo -en "${DGN}Set CT Type ${BL}Unprivileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL}\n" diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index dc559dc3..75d60950 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 37c347a7..b51119b6 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/photoprism-v2.sh b/ct/photoprism-v2.sh deleted file mode 100644 index 31035d89..00000000 --- a/ct/photoprism-v2.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -PP=`echo "\e[1;35m"` -APP="PhotoPrism" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${PP} - _____ _ _ _____ _ - | __ \| | | | | __ \ (_) - | |__) | |__ ___ | |_ ___ | |__) | __ _ ___ _ __ ___ - | ___/| _ \ / _ \| __/ _ \| ___/ __| / __| _ _ \ - | | | | | | (_) | || (_) | | | | | \__ \ | | | | | - |_| |_| |_|\___/ \__\___/|_| |_| |_|___/_| |_| |_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/photoprism-v3.sh b/ct/photoprism-v3.sh deleted file mode 100644 index 3f90236f..00000000 --- a/ct/photoprism-v3.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -PP=`echo "\e[1;35m"` -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="PhotoPrism" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${PP} - _____ _ _ _____ _ - | __ \| | | | | __ \ (_) - | |__) | |__ ___ | |_ ___ | |__) | __ _ ___ _ __ ___ - | ___/| _ \ / _ \| __/ _ \| ___/ __| / __| _ _ \ - | | | | | | (_) | || (_) | | | | | \__ \ | | | | | - |_| v3 |_| |_|\___/ \__\___/|_| |_| |_|___/_| |_| |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/photoprism-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index 5f4a5827..fc5b8c7f 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/pihole-v1.sh b/ct/pihole-v1.sh deleted file mode 100644 index 1d420089..00000000 --- a/ct/pihole-v1.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Pi-hole LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/pihole_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "LXC ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC... \e[0m" -DISK_SIZE=2G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=pi-hole -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 512 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC... \e[0m" -pct start $CTID -pct push $CTID pihole_setup.sh /pihole_setup.sh -perms 755 -pct exec $CTID /pihole_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a Pi-hole LXC to $CTID" -echo -e "\e[1;92m Pi-hole should be reachable by going to the following URL. - http://${IP} -\e[0m" diff --git a/ct/pihole-v2.sh b/ct/pihole-v2.sh deleted file mode 100644 index 9a0abcdd..00000000 --- a/ct/pihole-v2.sh +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="Pihole" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _____ _ _ ____ _ ______ - | __ \_ _| | | |/ __ \| | | ____| - | |__) || | | |__| | | | | | | |__ - | ___/ | | | __ | | | | | | __| - | | _| |_| | | | |__| | |____| |____ - |_| |_____|_| |_|\____/|______|______| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/pihole-v3.sh b/ct/pihole-v3.sh deleted file mode 100644 index 03a5b577..00000000 --- a/ct/pihole-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Pihole" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _____ _ _ ____ _ ______ - | __ \_ _| | | |/ __ \| | | ____| - | |__) || | | |__| | | | | | | |__ - | ___/ | | | __ | | | | | | __| - | | v3 _| |_| | | | |__| | |____| |____ - |_| |_____|_| |_|\____/|______|______| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Unprivileged" - CT_TYPE="1" - echo -en "${DGN}Set CT Type ${BL}Unprivileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/pihole-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 01d25fff..e6a8b6d8 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/plex-v1.sh b/ct/plex-v1.sh deleted file mode 100644 index 68949613..00000000 --- a/ct/plex-v1.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Plex Media Server LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/plex_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for Storage Location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=ubuntu -OSVERSION=${OSTYPE}-20.04 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=8G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=plex -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 2048\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID plex_setup.sh /plex_setup.sh -perms 755 -pct exec $CTID /plex_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created Plex Media Server LXC to $CTID." -echo -e "\e[1;92m Plex Media Server should be reachable by going to the following URL. - http://${IP}:32400/web -\e[0m" diff --git a/ct/plex-v3.sh b/ct/plex-v3.sh deleted file mode 100644 index da77b58e..00000000 --- a/ct/plex-v3.sh +++ /dev/null @@ -1,368 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -APP="Plex" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _____ _ - | __ \| | - | |__) | | _____ __ - | ___/| |/ _ \ \/ / - | | | | __/> < - |_| v3 |_|\___/_/\_\ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type ${CROSS}${YW}Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Unprivileged" - CT_TYPE="1" - echo -en "${DGN}Set CT Type ${BL}Unprivileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=ubuntu -export PCT_OSVERSION=20.04 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file -EOF - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/plex-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "Plex Media Server should be reachable by going to the following URL. - ${BL}http://${IP}:32400/web${CL}\n" diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index a490c938..6566426f 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -331,7 +331,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/podman-homeassistant-v1.sh b/ct/podman-homeassistant-v1.sh deleted file mode 100644 index 7bf3164a..00000000 --- a/ct/podman-homeassistant-v1.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Podman Home Assistant Container LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _ - | __ \ | | - | |__) |__ __| |_ __ ___ __ _ _ __ - | ___/ _ \ / _ | _ _ \ / _ | _ \ - | | | (_) | (_| | | | | | | (_| | | | | - |_| \___/ \__,_|_| |_| |_|\__,_|_| |_| _ _ _ - | | (_) | | | | - | |__ ___ _ __ ___ ___ __ _ ___ ___ _ ___| |_ __ _ _ __ | |_ - | _ \ / _ \| _ _ \ / _ \/ _ / __/ __| / __| __/ _ | _ \| __| - | | | | (_) | | | | | | __/ (_| \__ \__ \ \__ \ || (_| | | | | |_ - |_| |_|\___/|_| |_| |_|\___|\__,_|___/___/_|___/\__\__,_|_| |_|\__| - -${CL}" -} -header_info -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/podman_ha_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using ${BL}$STORAGE${CL} for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is ${BL}$CTID${CL}" -echo -en "${GN} Updating LXC Template List... " -pveam update >/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Downloading LXC Template... " -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} -echo -e "${CM}${CL} \r" - -echo -en "${GN} Creating LXC Container... " -DISK_SIZE=16G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi - ARCH=$(dpkg --print-architecture) -HOSTNAME=p-homeassistant -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 2048 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT -echo -e "${CM}${CL} \r" -echo -en "${GN} Starting LXC Container... " -pct start $CTID -pct push $CTID podman_ha_setup.sh /podman_ha_setup.sh -perms 755 -echo -e "${CM}${CL} \r" -pct exec $CTID /podman_ha_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully Created Podman Home Assistant Container LXC to ${BL}$CTID${CL}." -echo -e "${CL} Home Assistant Container should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} -Yacht should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/podman-homeassistant-v3.sh b/ct/podman-homeassistant-v3.sh deleted file mode 100644 index 30985849..00000000 --- a/ct/podman-homeassistant-v3.sh +++ /dev/null @@ -1,371 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -APP="P-Home Assistant" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _ - | __ \ | | - | |__) |__ __| |_ __ ___ __ _ _ __ - | ___/ _ \ / _ | _ _ \ / _ | _ \ - | | | (_) | (_| | | | | | | (_| | | | | - |_| \___/ \__,_|_| |_| |_|\__,_|_| |_| _ _ _ - | | v3 (_) | | | | - | |__ ___ _ __ ___ ___ __ _ ___ ___ _ ___| |_ __ _ _ __ | |_ - | _ \ / _ \| _ _ \ / _ \/ _ / __/ __| / __| __/ _ | _ \| __| - | | | | (_) | | | | | | __/ (_| \__ \__ \ \__ \ || (_| | | | | |_ - |_| |_|\___/|_| |_| |_|\___|\__,_|___/___/_|___/\__\__,_|_| |_|\__| - -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}16${CL}${DGN}GB${CL}" - DISK_SIZE="16" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type ${CROSS}${YW}Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Unprivileged" - CT_TYPE="1" - echo -en "${DGN}Set CT Type ${BL}UnPrivileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 16 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="16"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/podman-homeassistant-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} -Yacht should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL}\n" diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index e4d22054..9aaa9f40 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -333,7 +333,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/podman-v4.sh b/ct/podman-v4.sh index 97250e37..49878c07 100644 --- a/ct/podman-v4.sh +++ b/ct/podman-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/postgresql-v3.sh b/ct/postgresql-v3.sh deleted file mode 100644 index d68d8102..00000000 --- a/ct/postgresql-v3.sh +++ /dev/null @@ -1,361 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="PostgreSQL" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _____ _ _____ ____ _ - | __ \ | | / ____|/ __ \| | - | |__) |__ ___| |_ __ _ _ __ ___| (___ | | | | | - | ___/ _ \/ __| __/ _ | __/ _ \\___ \| | | | | - | | | (_) \__ \ || (_| | | | __/____) | |__| | |____ - |_| \___/|___/\__\__, |_| \___|_____/ \___\_\______| - __/ | - v3|___/ -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "Adminer should be reachable by going to the following URL. - ${BL}http://${IP}/adminer/${CL} \n" diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index aaa68b00..cee3ec14 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/prometheus-v3.sh b/ct/prometheus-v3.sh deleted file mode 100644 index a41f5125..00000000 --- a/ct/prometheus-v3.sh +++ /dev/null @@ -1,359 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Prometheus" -var_disk="4" -var_cpu="1" -var_ram="2048" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _____ _____ ____ __ __ ______ _______ _ _ ______ _ _ _____ - | __ \| __ \ / __ \| \/ | ____|__ __| | | | ____| | | |/ ____| - | |__) | |__) | | | | \ / | |__ | | | |__| | |__ | | | | (___ - | ___/| _ /| | | | |\/| | __| v3 | | | __ | __| | | | |\___ \ - | | | | \ \| |__| | | | | |____ | | | | | | |____| |__| |____) | - |_| |_| \_\\_____/|_| |_|______| |_| |_| |_|______|\____/|_____/ -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 6bb1b9db..3cc52e25 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index 94f598d1..77f84839 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -324,7 +324,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh index cfb70935..08b8fcb9 100644 --- a/ct/shinobi-v4.sh +++ b/ct/shinobi-v4.sh @@ -319,7 +319,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index 6a5e0de7..85da6fc5 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -311,7 +311,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/technitiumdns-v2.sh b/ct/technitiumdns-v2.sh deleted file mode 100644 index 2d960480..00000000 --- a/ct/technitiumdns-v2.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="Technitium DNS" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - - _______ _ _ _ _ - |__ __| | | (_) | (_) - | | ___ ___| |__ _ __ _| |_ _ _ _ _ __ ___ - | |/ _ \/ __| _ \| _ \| | __| | | | | _ _ \ - | | __/ (__| | | | | | | | |_| | |_| | | | | | | - |_|\___|\___|_| |_|_| |_|_|\__|_|\__,_|_| |_| |_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/technitiumdns-v3.sh b/ct/technitiumdns-v3.sh deleted file mode 100644 index 201b6267..00000000 --- a/ct/technitiumdns-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Technitium DNS" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - _______ _ _ _ _ - |__ __| | | (_) | (_) - | | ___v3___| |__ _ __ _| |_ _ _ _ _ __ ___ - | |/ _ \/ __| _ \| _ \| | __| | | | | _ _ \ - | | __/ (__| | | | | | | | |_| | |_| | | | | | | - |_|\___|\___|_| |_|_| |_|_|\__|_|\__,_|_| |_| |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/technitiumdns-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index 644ddd78..70716601 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index dbdf6585..4342cf70 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/ubuntu-v1.sh b/ct/ubuntu-v1.sh deleted file mode 100644 index 3703d85a..00000000 --- a/ct/ubuntu-v1.sh +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Ubuntu 21.10 LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/ubuntu_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=ubuntu -OSVERSION=${OSTYPE}-21.10 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC... \e[0m" -DISK_SIZE=2G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=$OSTYPE -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 1 -memory 512\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC... \e[0m" -pct start $CTID -pct push $CTID ubuntu_setup.sh /ubuntu_setup.sh -perms 755 -pct exec $CTID /ubuntu_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a Ubuntu LXC Container to $CTID at IP Address ${IP}" diff --git a/ct/ubuntu-v2.sh b/ct/ubuntu-v2.sh deleted file mode 100644 index 4152e1d0..00000000 --- a/ct/ubuntu-v2.sh +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Ubuntu 21.10 LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ _ _ - | | | | | | | - | | | | |__ _ _ _ __ | |_ _ _ - | | | | _ \| | | | _ \| __| | | | - | |__| | |_) | |_| | | | | |_| |_| | - \____/|_.__/ \__,_|_| |_|\__|\__,_| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=ubuntu -export PCT_OSVERSION=21.10 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname ubuntu - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/ubuntu-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Ubuntu 21.10 LXC to${CL} ${BL}$CTID${CL}. \n" diff --git a/ct/ubuntu-v3.sh b/ct/ubuntu-v3.sh deleted file mode 100644 index 5f5b38b1..00000000 --- a/ct/ubuntu-v3.sh +++ /dev/null @@ -1,377 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Ubuntu" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _ _ _ _ - | | | | | | | - | | | | |__ _ v3_ _ __ | |_ _ _ - | | | | _ \| | | | _ \| __| | | | - | |__| | |_) | |_| | | | | |_| |_| | - \____/|_.__/ \__,_|_| |_|\__|\__,_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using Version ${BGN}22.04${CL}" - VER="22.04" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type 18.04, 20.04, 21.10 or Press [ENTER] for Default: 22.04" - read VER - if [ -z $VER ]; then VER="22.04"; fi; - echo -en "${DGN}Set Version To ${BL}$VER${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using Version ${BGN}$VER${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=ubuntu -export PCT_OSVERSION=$VER -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/ubuntu-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 44f3d233..755af1cd 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -318,7 +318,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index c19dce93..859696e8 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -325,7 +325,7 @@ EOF msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/unifi-v2.sh b/ct/unifi-v2.sh deleted file mode 100644 index 077f3cc1..00000000 --- a/ct/unifi-v2.sh +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="UniFi" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _ _ _ ______ _ - | | | | (_) ____(_) - | | | |_ __ _| |__ _ - | | | | _ \| | __| | | - | |__| | | | | | | | | - \____/|_| |_|_|_| |_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 2048 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/unifi-v3.sh b/ct/unifi-v3.sh deleted file mode 100644 index 158758b1..00000000 --- a/ct/unifi-v3.sh +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Unifi" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - _ _ _ ______ _ - | | | | (_) ____(_) - | | | |_ __ _| |__ _ - | | | | _ \| | __| | | - | |__| | | | | | | | | - \____/|_| |_|_|_| v3 |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}8${CL}${DGN}GB${CL}" - DISK_SIZE="8" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 8 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="8"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/unifi-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index 3d60590d..b0a9bfd4 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/uptimekuma-v2.sh b/ct/uptimekuma-v2.sh deleted file mode 100644 index b40519ba..00000000 --- a/ct/uptimekuma-v2.sh +++ /dev/null @@ -1,261 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -APP="Uptime Kuma" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${DGN} - _ _ _ _ _ __ - | | | | | | (_) | |/ / - | | | |_ __ | |_ _ _ __ ___ ___ | ' /_ _ _ __ ___ __ _ - | | | | _ \| __| | _ _ \ / _ \ | <| | | | _ _ \ / _ | - | |__| | |_) | |_| | | | | | | __/ | . \ |_| | | | | | | (_| | - \____/| .__/ \__|_|_| |_| |_|\___| |_|\_\__,_|_| |_| |_|\__,_| - | | - |_| -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some applications may not work properly due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:3001${CL}\n" diff --git a/ct/uptimekuma-v3.sh b/ct/uptimekuma-v3.sh deleted file mode 100644 index d9cb376b..00000000 --- a/ct/uptimekuma-v3.sh +++ /dev/null @@ -1,358 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Uptime Kuma" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${DGN} - _ _ _ _ _ __ - | | | | | | (_) | |/ / - | | | |_v3_ | |_ _ _ __ ___ ___ | ' /_ _ _ __ ___ __ _ - | | | | _ \| __| | _ _ \ / _ \ | <| | | | _ _ \ / _ | - | |__| | |_) | |_| | | | | | | __/ | . \ |_| | | | | | | (_| | - \____/| .__/ \__|_|_| |_| |_|\___| |_|\_\__,_|_| |_| |_|\__,_| - | | - |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/uptimekuma-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3001${CL}\n" diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index b31b279f..297aae54 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/vaultwarden-v1.sh b/ct/vaultwarden-v1.sh deleted file mode 100644 index 56b5ac3b..00000000 --- a/ct/vaultwarden-v1.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env bash -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Vaultwarden LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - __ __ _ _ _ - \ \ / / | | | | | - \ \ / /_ _ _ _| | |___ ____ _ _ __ __| | ___ _ __ - \ \/ / _ | | | | | __\ \ /\ / / _ | __/ _ |/ _ \ _ \ - \ / (_| | |_| | | |_ \ V V / (_| | | | (_| | __/ | | | - \/ \__,_|\__,_|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| - -${CL}" -} - -header_info -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/vault_setup.sh - -load_module overlay -echo -e "${RD} Expect 30+ minute install time. ${CL} \n" -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=8G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=vaultwarden -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 4 -memory 4096\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID vault_setup.sh /vault_setup.sh -perms 755 -pct exec $CTID /vault_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a Vaultwarden LXC Container to $CTID" -echo -e "\e[1;92m Vaultwarden should be reachable by going to the following URL. - http://${IP}:8000 -\e[0m" diff --git a/ct/vaultwarden-v2.sh b/ct/vaultwarden-v2.sh deleted file mode 100644 index fe16570c..00000000 --- a/ct/vaultwarden-v2.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="Vaultwarden" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - __ __ _ _ _ - \ \ / / | | | | | - \ \ / /_ _ _ _| | |___ ____ _ _ __ __| | ___ _ __ - \ \/ / _ | | | | | __\ \ /\ / / _ | __/ _ |/ _ \ _ \ - \ / (_| | |_| | | |_ \ V V / (_| | | | (_| | __/ | | | - \/ \__,_|\__,_|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=8 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 4 - -memory 4096 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/vaultwarden-v3.sh b/ct/vaultwarden-v3.sh deleted file mode 100644 index 735160ff..00000000 --- a/ct/vaultwarden-v3.sh +++ /dev/null @@ -1,361 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Vaultwarden" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - __ __ _ _ _ - \ \ v3 / / | | | | | - \ \ / /_ _ _ _| | |___ ____ _ _ __ __| | ___ _ __ - \ \/ / _ | | | | | __\ \ /\ / / _ | __/ _ |/ _ \ _ \ - \ / (_| | |_| | | |_ \ V V / (_| | | | (_| | __/ | | | - \/ \__,_|\__,_|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}6${CL}${DGN}GB${CL}" - DISK_SIZE="6" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}2048${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="2048" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 6 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="6"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 2048 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="2048"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/vaultwarden-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 512 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index 9e5ffc70..a57b2191 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/whoogle-v3.sh b/ct/whoogle-v3.sh deleted file mode 100644 index 59274f4e..00000000 --- a/ct/whoogle-v3.sh +++ /dev/null @@ -1,360 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Whoogle" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -PP=`echo "\e[1;35m"` -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${PP} - __ ___ _ ____ ____ _____ _ ______ - \ \ v3 / / | | |/ __ \ / __ \ / ____| | | ____| - \ \ /\ / /| |__| | | | | | | | | __| | | |__ - \ \/ \/ / | __ | | | | | | | | |_ | | | __| - \ /\ / | | | | |__| | |__| | |__| | |____| |____ - \/ \/ |_| |_|\____/ \____/ \_____|______|______| -${CL}" -} - -header_info - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Using ${BGN}$var_cpu${CL}${DGN}vCPU${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Using ${BGN}$var_ram${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: $var_disk " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: $var_cpu " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: $var_ram " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index a910806c..422e9d46 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -309,7 +309,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 54b25b7b..486100a7 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -310,7 +310,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/wireguard-v2.sh b/ct/wireguard-v2.sh deleted file mode 100644 index 7137c4d3..00000000 --- a/ct/wireguard-v2.sh +++ /dev/null @@ -1,253 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New WireGuard LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - __ ___ _____ _ - \ \ / (_) / ____| | | - \ \ /\ / / _ _ __ ___| | __ _ _ __ _ _ __ __| | - \ \/ \/ / | | __/ _ \ | |_ | | | |/ _ | __/ _ | - \ /\ / | | | | __/ |__| | |_| | (_| | | | (_| | - \/ \/ |_|_| \___|\_____|\__,_|\__,_|_| \__,_| - ${YW}With WGDashboard -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=2 -export PCT_OPTIONS=" - -features $FEATURES - -hostname wireguard - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 1 - -memory 512 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/wireguard-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created WireGuard LXC to${CL} ${BL}$CTID${CL}. - -${BL}WGDashboard${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:10086${CL} \n" diff --git a/ct/wireguard-v3.sh b/ct/wireguard-v3.sh deleted file mode 100644 index 284f665c..00000000 --- a/ct/wireguard-v3.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Wireguard" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - __ ___ _____ _ - \ \ / (_) / ____| | | - \ \ /\ / / _ _ __ ___| | __ _ _ __ _ _ __ __| | - \ \/ \/ / | | __/ _ \ | |_ | | | |/ _ | __/ _ | - \ /\ / | | | | __/ |__| | |_| | (_| | | | (_| | - \/ \/ v3|_|_| \___|\_____|\__,_|\__,_|_| \__,_| - ${YW}With WGDashboard -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}2${CL}${DGN}GB${CL}" - DISK_SIZE="2" - echo -e "${DGN}Using ${BGN}1${CL}${DGN}vCPU${CL}" - CORE_COUNT="1" - echo -e "${DGN}Using ${BGN}512${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="512" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type Privileged, or Press [ENTER] for Default: Unprivileged (${RD}NO DEVICE PASSTHROUGH${CL}${YW})" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Unprivileged" CT_TYPE="1"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 2 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="2"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 1 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="1"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 512 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="512"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/wireguard-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "WGDashboard should be reachable by going to the following URL. - ${BL}http://${IP}:10086${CL} \n" diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 946b6c00..95bfda0a 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -311,7 +311,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/zigbee2mqtt-v1.sh b/ct/zigbee2mqtt-v1.sh deleted file mode 100644 index 4e7d8c65..00000000 --- a/ct/zigbee2mqtt-v1.sh +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Zigbee2MQTT LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/zigbee2mqtt_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for storage location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC Template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=4G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=zigbee2mqtt -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 1024 \ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file -EOF - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID zigbee2mqtt_setup.sh /zigbee2mqtt_setup.sh -perms 755 -pct exec $CTID /zigbee2mqtt_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created zigbee2mqtt LXC Container to $CTID at IP Address ${IP}" -echo -echo -e "\e[1;31m Updating the configuration.yaml is required and found at /opt/zigbee2mqtt/data/ \e[0m" -echo -echo diff --git a/ct/zigbee2mqtt-v2.sh b/ct/zigbee2mqtt-v2.sh deleted file mode 100644 index f4a0c0fd..00000000 --- a/ct/zigbee2mqtt-v2.sh +++ /dev/null @@ -1,263 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -while true; do - read -p "This will create a New Zigbee2MQTT LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _______ _ ___ __ __ ____ _______ _______ - |___ (_) | | |__ \| \/ |/ __ \__ __|__ __| - / / _ __ _| |__ ___ ___ ) | \ / | | | | | | | | - / / | |/ _ | _ \ / _ \/ _ \ / /| |\/| | | | | | | | | - / /__| | (_| | |_) | __/ __// /_| | | | |__| | | | | | - /_____|_|\__, |____/ \___|\___|____|_| |_|\___\_\ |_| |_| - __/ | - |___/ - -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${GN} Privileged ${CL}\n" - printf " ${YW} 2)${RD} Unprivileged (no device passthrough) ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname zigbee2mqtt - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file -EOF -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/zigbee2mqtt-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created Zigbee2MQTT LXC to${CL} ${BL}$CTID${CL}. \n" diff --git a/ct/zigbee2mqtt-v3.sh b/ct/zigbee2mqtt-v3.sh deleted file mode 100644 index 46a61c82..00000000 --- a/ct/zigbee2mqtt-v3.sh +++ /dev/null @@ -1,369 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -APP="Zigbee2MQTT" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${YW} - _______ _ ___ __ __ ____ _______ _______ - |___ (_) | | |__ \| \/ |/ __ \__ __|__ __| - / / _ __ _| |__ ___ ___ ) | \ / | | | | | | | | - / / | |/ _ | _ \ / _ \/ _ \ / /| |\/| | | | | | | | | - / /__| | (_| | |_) | __/ __// /_| | | | |__| | | | | | - /_____|_|\__, |____/ \___|\___|____|_| |_|\___\_\ |_| |_| - v3 __/ | - |___/ -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type ${CROSS}${YW}Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file -EOF - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/zigbee2mqtt-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 1d5e0bc8..53a0cc5b 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -324,7 +324,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 46aa99ba..5928e9b9 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -324,7 +324,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ diff --git a/ct/zwavejs2mqtt-v1.sh b/ct/zwavejs2mqtt-v1.sh deleted file mode 100644 index fb21a900..00000000 --- a/ct/zwavejs2mqtt-v1.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` - -while true; do - read -p "This will create a New Zwavejs2MQTT LXC Container. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${RD} - ______ _ ___ __ __ ____ _______ _______ - |___ / (_) |__ \| \/ |/ __ \__ __|__ __| - / /_ ____ ___ _____ _ ___ ) | \ / | | | | | | | | - / /\ \ /\ / / _ \ \ / / _ \ / __| / /| |\/| | | | | | | | | - / /__\ V V / (_| |\ V / __/ \__ \/ /_| | | | |__| | | | | | - /_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_|\___\_\ |_| |_| - _/ | - |__/ -${CL}" -} - -header_info - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if [ ! -z ${MOUNT+x} ]; then - pct unmount $CTID - fi - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -function load_module() { - if ! $(lsmod | grep -Fq $1); then - modprobe $1 &>/dev/null || \ - die "Failed to load '$1' module." - fi - MODULES_PATH=/etc/modules - if ! $(grep -Fxq "$1" $MODULES_PATH); then - echo "$1" >> $MODULES_PATH || \ - die "Failed to add '$1' module to load at boot." - fi -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -wget -qL https://raw.githubusercontent.com/tteck/Proxmox/main/setup/zwavejs2mqtt_setup.sh - -load_module overlay - -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content rootdir | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then - warn "'Container' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the container?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -info "Using '$STORAGE' for Storage Location." - -CTID=$(pvesh get /cluster/nextid) -info "Container ID is $CTID." - -echo -e "${CHECKMARK} \e[1;92m Updating LXC Template List... \e[0m" -pveam update >/dev/null -echo -e "${CHECKMARK} \e[1;92m Downloading LXC Template... \e[0m" -OSTYPE=debian -OSVERSION=${OSTYPE}-11 -mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) -TEMPLATE="${TEMPLATES[-1]}" -pveam download local $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." - -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - dir|nfs) - DISK_EXT=".raw" - DISK_REF="$CTID/" - ;; - zfspool) - DISK_PREFIX="subvol" - DISK_FORMAT="subvol" - ;; -esac -DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-} -ROOTFS=${STORAGE}:${DISK_REF-}${DISK} - -echo -e "${CHECKMARK} \e[1;92m Creating LXC Container... \e[0m" -DISK_SIZE=4G -pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." -else - mkfs.ext4 $(pvesm path $ROOTFS) &>/dev/null -fi -ARCH=$(dpkg --print-architecture) -HOSTNAME=zwavejs2mqtt -TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" -pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ - -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 1024\ - -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -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 - -MOUNT=$(pct mount $CTID | cut -d"'" -f 2) -ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime -pct unmount $CTID && unset MOUNT - -echo -e "${CHECKMARK} \e[1;92m Starting LXC Container... \e[0m" -pct start $CTID -pct push $CTID zwavejs2mqtt_setup.sh /zwavejs2mqtt_setup.sh -perms 755 -pct exec $CTID /zwavejs2mqtt_setup.sh - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -info "Successfully created a Zwavejs2MQTT LXC Container to $CTID at IP Address ${IP}:8091" diff --git a/ct/zwavejs2mqtt-v2.sh b/ct/zwavejs2mqtt-v2.sh deleted file mode 100644 index 72669df9..00000000 --- a/ct/zwavejs2mqtt-v2.sh +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/env bash -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -APP="Zwavejs2MQTT" -HN=$(echo ${APP,,} | tr -d ' ') -while true; do - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - ______ _ ___ __ __ ____ _______ _______ - |___ / (_) |__ \| \/ |/ __ \__ __|__ __| - / /_ ____ ___ _____ _ ___ ) | \ / | | | | | | | | - / /\ \ /\ / / _ \ \ / / _ \ / __| / /| |\/| | | | | | | | | - / /__\ V V / (_| |\ V / __/ \__ \/ /_| | | | |__| | | | | | - /_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_|\___\_\ |_| |_| - _/ | - |__/ -${CL}" -} - -header_info -show_menu(){ - printf " ${YW} 1)${GN} Privileged ${CL}\n" - printf " ${YW} 2)${RD} Unprivileged (no device passthrough) ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Privileged Install"; - IM=0 - break; - ;; - 2) clear; - header_info; - option_picked "Using Unprivileged Install"; - IM=1 - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Install Method from the menu"; - show_menu; - ;; - esac - done -show_menu2(){ - printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" - printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" - - printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message2=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" -} -show_menu2 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic Login"; - PW=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Password (changeme)"; - PW="-password changeme" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a Password Type from the menu"; - show_menu2; - ;; - esac - done -show_menu3(){ - printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n" - printf " ${YW} 2)${GN} Manual DHCP ${CL}\n" - - printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message3=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" - printf " ${YW}${message2}${CL}\n" - printf " ${YW}${message3}${CL}\n" -} -show_menu3 -while [ "$opt" != " " ] - do - case $opt in - 1) clear; - header_info; - option_picked "Using Automatic DHCP"; - DHCP=" " - break; - ;; - 2) clear; - header_info; - option_picked "Using Manual DHCP"; - DHCP="1" - break; - ;; - - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose a DHCP Type from the menu"; - show_menu3; - ;; - esac - done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if $(pct status $CTID &>/dev/null); then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - elif [ "$(pvesm list $STORAGE --vmid $CTID)" != "" ]; then - pvesm free $ROOTFS - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - if [ "$IM" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$(pvesh get /cluster/nextid) -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=4 -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -onboot 1 - -cores 2 - -memory 1024 - -unprivileged ${IM} - ${PW} -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F ":" '{print $2}') | awk 'NR>1 {print $2}') -if [ "$STORAGE_TYPE" == "zfspool" ]; then - warn "Some addons may not work due to ZFS not supporting 'fallocate'." -fi -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -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 -if [ "$DHCP" == "1" ]; then -MAC=$(pct config $CTID \ -| grep -i hwaddr \ -| awk '{print substr($2, 31, length($3) 17 ) }') \ - -echo -e "MAC Address ${BL}$MAC${CL}" - -dhcp_reservation(){ - printf "Please set DHCP reservation and press Enter." - read -} -dhcp_reservation -fi - -echo -en "${GN} Starting LXC Container... " -pct start $CTID -echo -e "${CM}${CL} \r" - -alias lxc-cmd="lxc-attach -n $CTID --" - -lxc-cmd bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/$HN-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -echo -e "${GN}Successfully created ${APP} LXC to${CL} ${BL}$CTID${CL}. -${BL}${APP}${CL} should be reachable by going to the following URL. - ${BL}http://${IP}:8091${CL} \n" diff --git a/ct/zwavejs2mqtt-v3.sh b/ct/zwavejs2mqtt-v3.sh deleted file mode 100644 index 88b9c87c..00000000 --- a/ct/zwavejs2mqtt-v3.sh +++ /dev/null @@ -1,371 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -APP="Zwavejs2MQTT" -NSAPP=$(echo ${APP,,} | tr -d ' ') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - clear - read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done -clear -function header_info { -echo -e "${BL} - ______ _ ___ __ __ ____ _______ _______ - |___ / (_) |__ \| \/ |/ __ \__ __|__ __| - / /_ ____ ___ _____ _ ___ ) | \ / | | | | | | | | - / /\ \ /\ / / _ \ \ / / _ \ / __| / /| |\/| | | | | | | | | - / /__\ V V / (_| |\ V / __/ \__ \/ /_| | | | |__| | | | | | - /_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_|\___\_\ |_| v3 |_| - _/ | - |__/ -${CL}" -} -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function default_settings() { - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using CT Password ${BGN}Automatic Login${CL}" - PW=" " - echo -e "${DGN}Using CT ID ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using CT Name ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size ${BGN}4${CL}${DGN}GB${CL}" - DISK_SIZE="4" - echo -e "${DGN}Using ${BGN}2${CL}${DGN}vCPU${CL}" - CORE_COUNT="2" - echo -e "${DGN}Using ${BGN}1024${CL}${DGN}MiB RAM${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address ${BGN}DHCP${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address ${BGN}NONE${CL}" - GATE="" - echo -e "${DGN}Using VLAN Tag ${BGN}NONE${CL}" - VLAN="" -} - -function advanced_settings() { - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${YW}Type ${CROSS}${YW}Unprivileged, or Press [ENTER] for Default: Privileged" - read CT_TYPE1 - if [ -z $CT_TYPE1 ]; then CT_TYPE1="Privileged" CT_TYPE="0"; - echo -en "${DGN}Set CT Type ${BL}$CT_TYPE1${CL}" - else - CT_TYPE1="Privileged" - CT_TYPE="0" - echo -en "${DGN}Set CT Type ${BL}Privileged${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${YW}Set Password, or Press [ENTER] for Default: Automatic Login " - read PW1 - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -en "${DGN}Set CT ${BL}$PW1${CL}" - else - PW="-password $PW1" - echo -en "${DGN}Set CT Password ${BL}$PW1${CL}" - fi; -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${YW}Enter the CT ID, or Press [ENTER] to automatically generate (${NEXTID}) " - read CT_ID - if [ -z $CT_ID ]; then CT_ID=$NEXTID; fi; - echo -en "${DGN}Set CT ID To ${BL}$CT_ID${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${YW}Enter CT Name (no-spaces), or Press [ENTER] for Default: $NSAPP " - read CT_NAME - if [ -z $CT_NAME ]; then - HN=$NSAPP - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -en "${DGN}Set CT Name To ${BL}$HN${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${YW}Enter a Disk Size, or Press [ENTER] for Default: 4 " - read DISK_SIZE - if [ -z $DISK_SIZE ]; then DISK_SIZE="4"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo "ERROR! DISK SIZE MUST HAVE INTEGER NUMBER!"; exit; fi; - echo -en "${DGN}Set Disk Size To ${BL}$DISK_SIZE${CL}${DGN}GB${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${YW}Allocate CPU cores, or Press [ENTER] for Default: 2 " - read CORE_COUNT - if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; fi; - echo -en "${DGN}Set Cores To ${BL}$CORE_COUNT${CL}${DGN}vCPU${CL}" -echo -e " ${CM}${CL} \r" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${YW}Allocate RAM in MiB, or Press [ENTER] for Default: 1024 " - read RAM_SIZE - if [ -z $RAM_SIZE ]; then RAM_SIZE="1024"; fi; - echo -en "${DGN}Set RAM To ${BL}$RAM_SIZE${CL}${DGN}MiB RAM${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${YW}Enter a Bridge, or Press [ENTER] for Default: vmbr0 " - read BRG - if [ -z $BRG ]; then BRG="vmbr0"; fi; - echo -en "${DGN}Set Bridge To ${BL}$BRG${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${YW}Enter a Static IPv4 CIDR Address, or Press [ENTER] for Default: DHCP " - read NET - if [ -z $NET ]; then NET="dhcp"; fi; - echo -en "${DGN}Set Static IP Address To ${BL}$NET${CL}" -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${YW}Enter a Gateway IP (mandatory if static IP is used), or Press [ENTER] for Default: NONE " - read GATE1 - if [ -z $GATE1 ]; then GATE1="NONE" GATE=""; - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -en "${DGN}Set Gateway IP To ${BL}$GATE1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${YW}Enter a VLAN Tag, or Press [ENTER] for Default: NONE " - read VLAN1 - if [ -z $VLAN1 ]; then VLAN1="NONE" VLAN=""; - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -en "${DGN}Set VLAN Tag To ${BL}$VLAN1${CL}" - fi; -echo -e " ${CM}${CL} \n" -sleep 1 -clear -header_info - echo -e "${RD}Using Advanced Settings${CL}" - echo -e "${DGN}Using CT Type ${BGN}$CT_TYPE1${CL}" - echo -e "${DGN}Using CT Password ${BGN}$PW1${CL}" - echo -e "${DGN}Using CT ID ${BGN}$CT_ID${CL}" - echo -e "${DGN}Using CT Name ${BGN}$HN${CL}" - echo -e "${DGN}Using Disk Size ${BGN}$DISK_SIZE${CL}${DGN}GB${CL}" - echo -e "${DGN}Using ${BGN}${CORE_COUNT}${CL}${DGN}vCPU${CL}" - echo -e "${DGN}Using ${BGN}${RAM_SIZE}${CL}${DGN}MiB RAM${CL}" - echo -e "${DGN}Using Bridge ${BGN}${BRG}${CL}" - echo -e "${DGN}Using Static IP Address ${BGN}$NET${CL}" - echo -e "${DGN}Using Gateway IP Address ${BGN}$GATE1${CL}" - echo -e "${DGN}Using VLAN Tag ${BGN}$VLAN1${CL}" - -read -p "Are these settings correct(y/n)? " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - advanced_settings -fi -} - -function start_script() { - echo -e "${YW}Type Advanced, or Press [ENTER] for Default Settings " - read SETTINGS - if [ -z $SETTINGS ]; then default_settings; - else - advanced_settings - fi; -} - -PVE_CHECK -start_script - -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -export CTID=$CT_ID -export PCT_OSTYPE=debian -export PCT_OSVERSION=11 -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - -net0 name=eth0,bridge=$BRG,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <> $LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -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 - -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" - -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/setup/zwavejs2mqtt-install.sh)" || exit - -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') - -pct set $CTID -description "# ${APP} LXC -### https://github.com/tteck/Proxmox" - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8091${CL} \n" diff --git a/setup/adguard-install.sh b/install/adguard-install.sh similarity index 100% rename from setup/adguard-install.sh rename to install/adguard-install.sh diff --git a/setup/blocky-install.sh b/install/blocky-install.sh similarity index 100% rename from setup/blocky-install.sh rename to install/blocky-install.sh diff --git a/setup/casaos-install.sh b/install/casaos-install.sh similarity index 100% rename from setup/casaos-install.sh rename to install/casaos-install.sh diff --git a/setup/changedetection-install.sh b/install/changedetection-install.sh similarity index 100% rename from setup/changedetection-install.sh rename to install/changedetection-install.sh diff --git a/setup/daemonsync-install.sh b/install/daemonsync-install.sh similarity index 100% rename from setup/daemonsync-install.sh rename to install/daemonsync-install.sh diff --git a/setup/dashy-install.sh b/install/dashy-install.sh similarity index 100% rename from setup/dashy-install.sh rename to install/dashy-install.sh diff --git a/setup/debian-install.sh b/install/debian-install.sh similarity index 100% rename from setup/debian-install.sh rename to install/debian-install.sh diff --git a/setup/deconz-install.sh b/install/deconz-install.sh similarity index 100% rename from setup/deconz-install.sh rename to install/deconz-install.sh diff --git a/setup/docker-install.sh b/install/docker-install.sh similarity index 100% rename from setup/docker-install.sh rename to install/docker-install.sh diff --git a/setup/emby-install.sh b/install/emby-install.sh similarity index 100% rename from setup/emby-install.sh rename to install/emby-install.sh diff --git a/setup/emqx-install.sh b/install/emqx-install.sh similarity index 100% rename from setup/emqx-install.sh rename to install/emqx-install.sh diff --git a/setup/esphome-install.sh b/install/esphome-install.sh similarity index 100% rename from setup/esphome-install.sh rename to install/esphome-install.sh diff --git a/setup/grafana-install.sh b/install/grafana-install.sh similarity index 100% rename from setup/grafana-install.sh rename to install/grafana-install.sh diff --git a/setup/grocy-install.sh b/install/grocy-install.sh similarity index 100% rename from setup/grocy-install.sh rename to install/grocy-install.sh diff --git a/setup/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh similarity index 100% rename from setup/heimdalldashboard-install.sh rename to install/heimdalldashboard-install.sh diff --git a/setup/homeassistant-core-install.sh b/install/homeassistant-core-install.sh similarity index 100% rename from setup/homeassistant-core-install.sh rename to install/homeassistant-core-install.sh diff --git a/setup/homeassistant-install.sh b/install/homeassistant-install.sh similarity index 100% rename from setup/homeassistant-install.sh rename to install/homeassistant-install.sh diff --git a/setup/homebridge-install.sh b/install/homebridge-install.sh similarity index 100% rename from setup/homebridge-install.sh rename to install/homebridge-install.sh diff --git a/setup/homepage-install.sh b/install/homepage-install.sh similarity index 100% rename from setup/homepage-install.sh rename to install/homepage-install.sh diff --git a/setup/hyperion-install.sh b/install/hyperion-install.sh similarity index 100% rename from setup/hyperion-install.sh rename to install/hyperion-install.sh diff --git a/setup/influxdb-install.sh b/install/influxdb-install.sh similarity index 100% rename from setup/influxdb-install.sh rename to install/influxdb-install.sh diff --git a/setup/iobroker-install.sh b/install/iobroker-install.sh similarity index 100% rename from setup/iobroker-install.sh rename to install/iobroker-install.sh diff --git a/setup/jellyfin-install.sh b/install/jellyfin-install.sh similarity index 100% rename from setup/jellyfin-install.sh rename to install/jellyfin-install.sh diff --git a/setup/k0s-install.sh b/install/k0s-install.sh similarity index 100% rename from setup/k0s-install.sh rename to install/k0s-install.sh diff --git a/setup/keycloak-install.sh b/install/keycloak-install.sh similarity index 100% rename from setup/keycloak-install.sh rename to install/keycloak-install.sh diff --git a/setup/magicmirror-install.sh b/install/magicmirror-install.sh similarity index 100% rename from setup/magicmirror-install.sh rename to install/magicmirror-install.sh diff --git a/setup/mariadb-install.sh b/install/mariadb-install.sh similarity index 100% rename from setup/mariadb-install.sh rename to install/mariadb-install.sh diff --git a/setup/meshcentral-install.sh b/install/meshcentral-install.sh similarity index 100% rename from setup/meshcentral-install.sh rename to install/meshcentral-install.sh diff --git a/setup/motioneye-install.sh b/install/motioneye-install.sh similarity index 100% rename from setup/motioneye-install.sh rename to install/motioneye-install.sh diff --git a/setup/mqtt-install.sh b/install/mqtt-install.sh similarity index 100% rename from setup/mqtt-install.sh rename to install/mqtt-install.sh diff --git a/setup/n8n-install.sh b/install/n8n-install.sh similarity index 100% rename from setup/n8n-install.sh rename to install/n8n-install.sh diff --git a/setup/navidrome-install.sh b/install/navidrome-install.sh similarity index 100% rename from setup/navidrome-install.sh rename to install/navidrome-install.sh diff --git a/setup/nextcloudpi-install.sh b/install/nextcloudpi-install.sh similarity index 100% rename from setup/nextcloudpi-install.sh rename to install/nextcloudpi-install.sh diff --git a/setup/nginx-proxy-manager-install.sh b/install/nginx-proxy-manager-install.sh similarity index 100% rename from setup/nginx-proxy-manager-install.sh rename to install/nginx-proxy-manager-install.sh diff --git a/setup/nocodb-install.sh b/install/nocodb-install.sh similarity index 100% rename from setup/nocodb-install.sh rename to install/nocodb-install.sh diff --git a/setup/node-red-install.sh b/install/node-red-install.sh similarity index 100% rename from setup/node-red-install.sh rename to install/node-red-install.sh diff --git a/setup/omada-install.sh b/install/omada-install.sh similarity index 100% rename from setup/omada-install.sh rename to install/omada-install.sh diff --git a/setup/omv-install.sh b/install/omv-install.sh similarity index 100% rename from setup/omv-install.sh rename to install/omv-install.sh diff --git a/setup/openhab-install.sh b/install/openhab-install.sh similarity index 100% rename from setup/openhab-install.sh rename to install/openhab-install.sh diff --git a/setup/paperless-ngx-install.sh b/install/paperless-ngx-install.sh similarity index 100% rename from setup/paperless-ngx-install.sh rename to install/paperless-ngx-install.sh diff --git a/setup/photoprism-install.sh b/install/photoprism-install.sh similarity index 100% rename from setup/photoprism-install.sh rename to install/photoprism-install.sh diff --git a/setup/pihole-install.sh b/install/pihole-install.sh similarity index 100% rename from setup/pihole-install.sh rename to install/pihole-install.sh diff --git a/setup/plex-install.sh b/install/plex-install.sh similarity index 100% rename from setup/plex-install.sh rename to install/plex-install.sh diff --git a/setup/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh similarity index 100% rename from setup/podman-homeassistant-install.sh rename to install/podman-homeassistant-install.sh diff --git a/setup/podman-install.sh b/install/podman-install.sh similarity index 100% rename from setup/podman-install.sh rename to install/podman-install.sh diff --git a/setup/postgresql-install.sh b/install/postgresql-install.sh similarity index 100% rename from setup/postgresql-install.sh rename to install/postgresql-install.sh diff --git a/setup/prometheus-install.sh b/install/prometheus-install.sh similarity index 100% rename from setup/prometheus-install.sh rename to install/prometheus-install.sh diff --git a/setup/scrypted-install.sh b/install/scrypted-install.sh similarity index 100% rename from setup/scrypted-install.sh rename to install/scrypted-install.sh diff --git a/setup/shinobi-install.sh b/install/shinobi-install.sh similarity index 100% rename from setup/shinobi-install.sh rename to install/shinobi-install.sh diff --git a/setup/syncthing-install.sh b/install/syncthing-install.sh similarity index 100% rename from setup/syncthing-install.sh rename to install/syncthing-install.sh diff --git a/setup/technitiumdns-install.sh b/install/technitiumdns-install.sh similarity index 100% rename from setup/technitiumdns-install.sh rename to install/technitiumdns-install.sh diff --git a/setup/trilium-install.sh b/install/trilium-install.sh similarity index 100% rename from setup/trilium-install.sh rename to install/trilium-install.sh diff --git a/setup/ubuntu-install.sh b/install/ubuntu-install.sh similarity index 100% rename from setup/ubuntu-install.sh rename to install/ubuntu-install.sh diff --git a/setup/umbrel-install.sh b/install/umbrel-install.sh similarity index 100% rename from setup/umbrel-install.sh rename to install/umbrel-install.sh diff --git a/setup/unifi-install.sh b/install/unifi-install.sh similarity index 100% rename from setup/unifi-install.sh rename to install/unifi-install.sh diff --git a/setup/uptimekuma-install.sh b/install/uptimekuma-install.sh similarity index 100% rename from setup/uptimekuma-install.sh rename to install/uptimekuma-install.sh diff --git a/setup/vaultwarden-install.sh b/install/vaultwarden-install.sh similarity index 100% rename from setup/vaultwarden-install.sh rename to install/vaultwarden-install.sh diff --git a/setup/whoogle-install.sh b/install/whoogle-install.sh similarity index 100% rename from setup/whoogle-install.sh rename to install/whoogle-install.sh diff --git a/setup/wikijs-install.sh b/install/wikijs-install.sh similarity index 100% rename from setup/wikijs-install.sh rename to install/wikijs-install.sh diff --git a/setup/wireguard-install.sh b/install/wireguard-install.sh similarity index 100% rename from setup/wireguard-install.sh rename to install/wireguard-install.sh diff --git a/setup/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh similarity index 100% rename from setup/zigbee2mqtt-install.sh rename to install/zigbee2mqtt-install.sh diff --git a/setup/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh similarity index 100% rename from setup/zwave-js-ui-install.sh rename to install/zwave-js-ui-install.sh diff --git a/setup/adguard_setup.sh b/setup/adguard_setup.sh deleted file mode 100644 index bd48318d..00000000 --- a/setup/adguard_setup.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -y install \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing AdGuard Home... \e[0m" -curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /adguard_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/debian11_setup.sh b/setup/debian11_setup.sh deleted file mode 100644 index e1cbf177..00000000 --- a/setup/debian11_setup.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null - -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /debian11_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/esphome_setup.sh b/setup/esphome_setup.sh deleted file mode 100644 index 001730f0..00000000 --- a/setup/esphome_setup.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -en "${GN} Setting up Container OS... " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -echo -e "${CM}${CL} \r" - -echo -en "${GN} Updating Container OS... " -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Dependencies... " -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing pip3... " -apt-get install python3-pip -y &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing ESPHome... " -pip3 install esphome &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing ESPHome Dashboard... " -pip3 install tornado esptool &>/dev/null - -service_path="/etc/systemd/system/esphomeDashboard.service" -echo "[Unit] -Description=ESPHome Dashboard -After=network.target -[Service] -ExecStart=/usr/local/bin/esphome /root/config/ dashboard -Restart=always -User=root -[Install] -WantedBy=multi-user.target" > $service_path -systemctl enable esphomeDashboard.service &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Customizing Container... " -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -systemctl start esphomeDashboard -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleanup... " -rm -rf /esphome_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* -echo -e "${CM}${CL} \r" diff --git a/setup/ha_setup.sh b/setup/ha_setup.sh deleted file mode 100644 index a97b62e8..00000000 --- a/setup/ha_setup.sh +++ /dev/null @@ -1,296 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing pip3... \e[0m" -apt-get install -y python3-pip &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Docker... \e[0m" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF -sh <(curl -sSL https://get.docker.com) &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Pulling Portainer Image...\e[0m" -docker pull portainer/portainer-ce:latest &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Portainer... \e[0m" -docker volume create portainer_data >/dev/null -docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Pulling Home Assistant Image...\e[0m" -docker pull homeassistant/home-assistant:stable &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Home Assistant... \e[0m" -docker volume create hass_config >/dev/null -docker run -d \ - --name homeassistant \ - --privileged \ - --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:stable &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Creating Update Menu Script... \e[0m" -pip3 install runlike &>/dev/null -UPDATE_PATH='/root/update' -UPDATE_CONTAINERS_PATH='/root/update-containers.sh' -cat >$UPDATE_PATH <<'EOF' -#!/bin/sh -set -o errexit -show_menu(){ - normal=`echo "\033[m"` - safe=`echo "\033[32m"` - menu=`echo "\033[36m"` - number=`echo "\033[33m"` - bgred=`echo "\033[41m"` - fgred=`echo "\033[31m"` - hostname -I - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${safe} Switch to Stable Branch ${normal}\n" - printf "${menu}**${number} 2)${number} Switch to Beta Branch ${normal}\n" - printf "${menu}**${number} 3)${fgred} Switch to Dev Branch ${normal}\n" - printf "${menu}**${number} 4)${safe} Backup Home Assistant Data (to root) ${normal}\n" - printf "${menu}**${number} 5)${number} Restore Home Assistant Data ${normal}\n" - printf "${menu}**${number} 6)${fgred} Edit Home Assistant Configuration ${normal}\n" - printf "${menu}**${number} 7)${safe} Restart Home Assistant ${normal}\n" - printf "${menu}**${number} 8)${safe} Just Update Containers ${normal}\n" - printf "${menu}**${number} 9)${number} Remove Unused Images ${normal}\n" - printf "${menu}**${number} 10)${safe} Update Host OS ${normal}\n" - printf "${menu}**${number} 11)${safe} Reboot Host OS ${normal}\n" - printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu and enter or ${fgred}x to exit. ${normal}" - read opt -} -option_picked(){ - msgcolor=`echo "\033[01;31m"` - normal=`echo "\033[00;00m"` - message=${@:-"${normal}Error: No message passed"} - printf "${msgcolor}${message}${normal}\n" -} -clear -show_menu -while [ $opt != '' ] - do - if [ $opt = '' ]; then - exit; - else - case $opt in - 1) clear; - option_picked "Switching to Stable Branch"; - TAG=stable - break; - ;; - 2) clear; - option_picked "Switching to Beta Branch"; - TAG=beta - break; - ;; - 3) while true; do - read -p "Are you sure you want to Switch to Dev Branch? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Switching to Dev Branch"; - TAG=dev - break; - ;; - 4) clear; - option_picked "Backing up Home Assistant Data to root (hass_config)"; - rm -r hass_config; - cp -pR /var/lib/docker/volumes/hass_config/ /root/; - sleep 2; - clear; - show_menu; - ;; - 5) while true; do - read -p "Are you sure you want to Restore Home Assistant Data? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Restoring Home Assistant Data from root (hass_config)"; - rm -r /var/lib/docker/volumes/hass_config/_data; - cp -pR /root/hass_config/_data /var/lib/docker/volumes/hass_config/; - sleep 2; - clear; - show_menu; - ;; - 6) while true; do - read -p "Are you sure you want to Edit Home Assistant Configuration? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Editing Home Assistant Configuration"; - nano /var/lib/docker/volumes/hass_config/_data/configuration.yaml; - clear; - show_menu; - ;; - 7) clear; - option_picked "Restarting Home Assistant"; - docker restart homeassistant; - exit; - ;; - 8) clear; - option_picked "Just Updating Containers"; - ./update-containers.sh; - sleep 2; - clear; - show_menu; - ;; - 9) clear; - option_picked "Removing Unused Images"; - docker image prune -af; - sleep 2; - clear; - show_menu; - ;; - 10) clear; - option_picked "Updating Host OS"; - apt update && apt upgrade -y; - sleep 2; - clear; - show_menu; - ;; - 11) clear; - option_picked "Reboot Host OS"; - reboot; - exit; - ;; - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose an option from the menu"; - show_menu; - ;; - esac - fi - done -docker pull homeassistant/home-assistant:$TAG -docker rm --force homeassistant -docker run -d \ - --name homeassistant \ - --privileged \ - --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:$TAG -EOF -sudo chmod +x /root/update -cat >$UPDATE_CONTAINERS_PATH <<'EOF' -#!/bin/bash -set -o errexit -CONTAINER_LIST="${1:-$(docker ps -q)}" -for container in ${CONTAINER_LIST}; do - CONTAINER_IMAGE="$(docker inspect --format "{{.Config.Image}}" --type container ${container})" - RUNNING_IMAGE="$(docker inspect --format "{{.Image}}" --type container "${container}")" - docker pull "${CONTAINER_IMAGE}" - LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" - if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then - echo "Updating ${container} image ${CONTAINER_IMAGE}" - DOCKER_COMMAND="$(runlike "${container}")" - docker rm --force "${container}" - eval ${DOCKER_COMMAND} - fi -done -EOF -sudo chmod +x /root/update-containers.sh - -echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -mkdir /root/hass_config -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /ha_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/jellyfin_setup.sh b/setup/jellyfin_setup.sh deleted file mode 100644 index 0f7a2549..00000000 --- a/setup/jellyfin_setup.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" - apt-get update &>/dev/null - apt-get -qqy install \ - curl \ - sudo &>/dev/null - sudo apt install apt-transport-https -y &>/dev/null - sudo apt-get install software-properties-common -y &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Setting Up Jellyfin Repository... \e[0m" -sudo add-apt-repository universe -y &>/dev/null -wget -q -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add - &>/dev/null -echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list &>/dev/null -echo -e "${CHECKMARK} \e[1;92m Installing Jellyfin... \e[0m" -apt-get update &>/dev/null -sudo apt install jellyfin-server -y &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Creating Jellyfin Service... \e[0m" -cat << 'EOF' > /lib/systemd/system/jellyfin.service -[Unit] -Description = Jellyfin Media Server -After = network.target - -[Service] -Type = simple -EnvironmentFile = /etc/default/jellyfin -User = root -ExecStart = /usr/bin/jellyfin ${JELLYFIN_WEB_OPT} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_FFMPEG_OPT} ${JELL> -Restart = on-failure -TimeoutSec = 15 - -[Install] -WantedBy = multi-user.target -EOF - -ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /jellyfin_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/mariadb_setup.sh b/setup/mariadb_setup.sh deleted file mode 100644 index b3d8b445..00000000 --- a/setup/mariadb_setup.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -en "${GN} Setting up Container OS... " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS}${RD} No Network! \r" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -echo -e "${CM}${CL} \r" -echo -en "${GN} Network Connected: ${BL}$(hostname -I)${CL} " -echo -e "${CM}${CL} \r" - -echo -en "${GN} Updating Container OS... " -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Dependencies... " -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing MariaDB... " -curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash &>/dev/null -apt-get update >/dev/null -apt-get install -y mariadb-server &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Adminer... " -sudo apt install adminer -y &>/dev/null -sudo a2enconf adminer &>/dev/null -sudo systemctl reload apache2 &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Customizing Container... " -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleanup... " -rm -rf /mariadb_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* -mkdir /var/log/apache2 -echo -e "${CM}${CL} \r" diff --git a/setup/motioneye_setup.sh b/setup/motioneye_setup.sh deleted file mode 100644 index ee7a6301..00000000 --- a/setup/motioneye_setup.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" - sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen - locale-gen >/dev/null - while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi - done -echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" - apt-get update &>/dev/null - apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" - apt-get update &>/dev/null - apt-get -qqy install \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Motion... \e[0m" - apt-get install motion -y &>/dev/null - systemctl stop motion &>/dev/null - systemctl disable motion &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing FFmpeg... \e[0m" - apt-get install ffmpeg v4l-utils -y &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Python... \e[0m" - apt-get update &>/dev/null - apt-get install python2 -y &>/dev/null - curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py &>/dev/null - python2 get-pip.py &>/dev/null - apt-get install libffi-dev libzbar-dev libzbar0 -y &>/dev/null - apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -y &>/dev/null -echo -e "${CHECKMARK} \e[1;92m Installing MotionEye... \e[0m" - apt-get update &>/dev/null - sudo pip install motioneye &>/dev/null - mkdir -p /etc/motioneye - cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf - mkdir -p /var/lib/motioneye - -echo -e "${CHECKMARK} \e[1;92m Creating Service file motioneye.service... \e[0m" - cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat << EOF > $GETTY_OVERRIDE - [Service] - ExecStart= - ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - systemctl enable motioneye &>/dev/null - systemctl start motioneye - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" - rm -rf /motioneye_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/mqtt_setup.sh b/setup/mqtt_setup.sh deleted file mode 100644 index 13d42531..00000000 --- a/setup/mqtt_setup.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - gnupg \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Mosquitto MQTT Broker.. \e[0m" -wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key &>/dev/null -apt-key add mosquitto-repo.gpg.key &>/dev/null -cd /etc/apt/sources.list.d/ -wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list &>/dev/null -apt-get update >/dev/null -apt-get -y install mosquitto &>/dev/null -apt-get -y install mosquitto-clients &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /mqtt_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/node-red_setup.sh b/setup/node-red_setup.sh deleted file mode 100644 index def5d877..00000000 --- a/setup/node-red_setup.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Node-Red... \e[0m" -bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --confirm-root --confirm-install --skip-pi &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -systemctl start nodered.service &>/dev/null -systemctl enable nodered.service &>/dev/null -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /node-red_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/npm_setup.sh b/setup/npm_setup.sh deleted file mode 100644 index c3917d44..00000000 --- a/setup/npm_setup.sh +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - sudo \ - curl \ - wget \ - gnupg \ - openssl \ - ca-certificates \ - apache2-utils \ - logrotate \ - build-essential \ - python3-dev \ - git \ - lsb-release &>/dev/null - - echo -e "${CHECKMARK} \e[1;92m Installing Python... \e[0m" - apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv &>/dev/null - pip3 install --upgrade setuptools &>/dev/null - pip3 install --upgrade pip &>/dev/null - python3 -m venv /opt/certbot/ &>/dev/null - if [ "$(getconf LONG_BIT)" = "32" ]; then - python3 -m pip install --no-cache-dir -U cryptography==3.3.2 &>/dev/null - fi - python3 -m pip install --no-cache-dir cffi certbot &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Openresty... \e[0m" -wget -q -O - https://openresty.org/package/pubkey.gpg | apt-key add - &>/dev/null -codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release` &>/dev/null -echo "deb http://openresty.org/package/debian $codename openresty" | tee /etc/apt/sources.list.d/openresty.list &>/dev/null -apt-get -y update &>/dev/null -apt-get -y install --no-install-recommends openresty &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Setting up Node.js Repository... \e[0m" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Node.js... \e[0m" -sudo apt-get install -y nodejs git make g++ gcc &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Yarn... \e[0m" -npm install --global yarn &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Downloading NPM v2.9.16... \e[0m" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.16 -O - | tar -xz &>/dev/null -cd ./nginx-proxy-manager-2.9.16 - -echo -e "${CHECKMARK} \e[1;92m Setting up Enviroment... \e[0m" -ln -sf /usr/bin/python3 /usr/bin/python -ln -sf /usr/bin/certbot /opt/certbot/bin/certbot -ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx -ln -sf /usr/local/openresty/nginx/ /etc/nginx - -sed -i "s+0.0.0+#v2.9.16+g" backend/package.json -sed -i "s+0.0.0+#v2.9.16+g" frontend/package.json - -sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf -NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") -for NGINX_CONF in $NGINX_CONFS; do - sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" -done - -mkdir -p /var/www/html /etc/nginx/logs -cp -r docker/rootfs/var/www/html/* /var/www/html/ -cp -r docker/rootfs/etc/nginx/* /etc/nginx/ -cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini -cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager -ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf -rm -f /etc/nginx/conf.d/dev.conf - -mkdir -p /tmp/nginx/body \ -/run/nginx \ -/data/nginx \ -/data/custom_ssl \ -/data/logs \ -/data/access \ -/data/nginx/default_host \ -/data/nginx/default_www \ -/data/nginx/proxy_host \ -/data/nginx/redirection_host \ -/data/nginx/stream \ -/data/nginx/dead_host \ -/data/nginx/temp \ -/var/lib/nginx/cache/public \ -/var/lib/nginx/cache/private \ -/var/cache/nginx/proxy_temp - -chmod -R 777 /var/cache/nginx -chown root /tmp/nginx - -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" > /etc/nginx/conf.d/include/resolvers.conf - -if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null -fi - -mkdir -p /app/global /app/frontend/images -cp -r backend/* /app -cp -r global/* /app/global - -echo -e "${CHECKMARK} \e[1;92m Building Frontend... \e[0m" -cd ./frontend -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -yarn build &>/dev/null -cp -r dist/* /app/frontend -cp -r app-images/* /app/frontend/images - -echo -e "${CHECKMARK} \e[1;92m Initializing Backend... \e[0m" -rm -rf /app/config/default.json &>/dev/null -if [ ! -f /app/config/production.json ]; then -cat << 'EOF' > /app/config/production.json -{ - "database": { - "engine": "knex-native", - "knex": { - "client": "sqlite3", - "connection": { - "filename": "/data/database.sqlite" - } - } - } -} -EOF -fi -cd /app -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Creating NPM Service... \e[0m" -cat << 'EOF' > /lib/systemd/system/npm.service -[Unit] -Description=Nginx Proxy Manager -After=network.target -Wants=openresty.service - -[Service] -Type=simple -Environment=NODE_ENV=production -ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge -ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 -WorkingDirectory=/app -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Starting Services... \e[0m" -systemctl enable npm &>/dev/null -systemctl start openresty -systemctl start npm - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /npm_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/pihole_setup.sh b/setup/pihole_setup.sh deleted file mode 100644 index d6d7eb4e..00000000 --- a/setup/pihole_setup.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up LXC OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Pi-hole... \e[0m" -curl -sSL https://install.pi-hole.net | bash - -echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /pihole_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/plex_setup.sh b/setup/plex_setup.sh deleted file mode 100644 index 8d10d71a..00000000 --- a/setup/plex_setup.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo \ - gnupg &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Setting Up Hardware Acceleration... \e[0m" -apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd &>/dev/null - -/bin/chgrp video /dev/dri -/bin/chmod 755 /dev/dri -/bin/chmod 660 /dev/dri/* - -echo -e "${CHECKMARK} \e[1;92m Setting Up Plex Media Server Repository... \e[0m" -wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add - &>/dev/null -echo "deb [arch=$( dpkg --print-architecture )] https://downloads.plex.tv/repo/deb/ public main" | tee /etc/apt/sources.list.d/plexmediaserver.list &>/dev/null -echo -e "${CHECKMARK} \e[1;92m Installing Plex Media Server... \e[0m" -apt-get update &>/dev/null -apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /plex_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/podman_ha_setup.sh b/setup/podman_ha_setup.sh deleted file mode 100644 index 8cc8d414..00000000 --- a/setup/podman_ha_setup.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM - -echo -en "${GN} Setting up Container OS... " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -echo -e "${CM}${CL} \r" -echo -en "${GN} Network Connected: ${BL}$(hostname -I)${CL} " -echo -e "${CM}${CL} \r" - -echo -en "${GN} Updating Container OS... " -apt update &>/dev/null -apt-get -qqy upgrade &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Dependencies... " -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo \ - runc &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Podman... " -apt-get -y install podman &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Pulling Yacht Image... " -podman pull docker.io/selfhostedpro/yacht:latest &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Yacht... " -podman volume create yacht >/dev/null -podman run -d \ - --privileged \ - --name yacht \ - --restart always \ - -v /var/run/podman/podman.sock:/var/run/docker.sock \ - -v yacht:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - -p 8000:8000 \ - selfhostedpro/yacht:latest &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Pulling Home Assistant Image... " -podman pull docker.io/homeassistant/home-assistant:stable &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Installing Home Assistant... " -podman volume create hass_config >/dev/null -podman run -d \ - --privileged \ - --name homeassistant \ - --restart unless-stopped \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:stable &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Creating Update Script... " -file_path="/root/update.sh" -echo "#!/bin/bash -echo -e '\e[1;33m Pulling New Stable Version... \e[0m' -podman pull docker.io/homeassistant/home-assistant:stable -echo -e '\e[1;33m Stopping Home Assistant... \e[0m' -podman stop homeassistant -echo -e '\e[1;33m Removing Home Assistant... \e[0m' -podman rm homeassistant -echo -e '\e[1;33m Starting Home Assistant... \e[0m' -podman run -d \ - --name homeassistant \ - --restart unless-stopped \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:stable -echo -e '\e[1;33m Removing Old Image... \e[0m' -podman image prune -f -echo -e '\e[1;33m Finished Update! \e[0m'" > $file_path -sudo chmod +x /root/update.sh -echo -e "${CM}${CL} \r" - -echo -en "${GN} Customizing LXC... " -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -podman generate systemd \ - --new --name homeassistant \ - > /etc/systemd/system/homeassistant.service -systemctl enable homeassistant &>/dev/null - -podman generate systemd \ - --new --name yacht \ - > /etc/systemd/system/yacht.service -systemctl enable yacht &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleanup... " -rm -rf /podman_ha_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* -echo -e "${CM}${CL} \n" diff --git a/setup/ubuntu_setup.sh b/setup/ubuntu_setup.sh deleted file mode 100644 index ea116c5b..00000000 --- a/setup/ubuntu_setup.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null - -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF - -echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" -chmod -x /etc/update-motd.d/* -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /ubuntu_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/vault_setup.sh b/setup/vault_setup.sh deleted file mode 100644 index 57f2117c..00000000 --- a/setup/vault_setup.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RD=`echo "\033[01;31m"` -BL=`echo "\033[36m"` -CM='\xE2\x9C\x94\033' -GN=`echo "\033[1;92m"` -CL=`echo "\033[m"` -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - git \ - nano \ - wget \ - htop \ - pkg-config \ - openssl \ - libssl1.1 \ - libssl-dev \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Build Essentials... \e[0m" -apt-get install -y build-essential &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Rust... \e[0m" -curl https://sh.rustup.rs -sSf | sh -s -- -y &>/dev/null -echo 'export PATH=~/.cargo/bin:$PATH' >> ~/.bashrc &>/dev/null -export PATH=~/.cargo/bin:$PATH &>/dev/null -which rustc &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Node.js... \e[0m" -curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null -apt-get install -y nodejs &>/dev/null -npm -g install npm@7 &>/dev/null -which npm &>/dev/null -npm i npm@latest -g &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Building Vaultwarden (Patience)... \e[0m" -git clone https://github.com/dani-garcia/vaultwarden &>/dev/null -pushd vaultwarden &>/dev/null -cargo clean &>/dev/null -cargo build --features sqlite --release &>/dev/null -file target/release/vaultwarden &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Building Web-Vault... \e[0m" -pushd target/release/ &>/dev/null -git clone --recurse-submodules https://github.com/bitwarden/web.git web-vault.git &>/dev/null -cd web-vault.git &>/dev/null -git checkout v2.25.1 &>/dev/null -git submodule update --init --recursive &>/dev/null -wget https://raw.githubusercontent.com/dani-garcia/bw_web_builds/master/patches/v2.25.0.patch &>/dev/null -git apply v2.25.0.patch &>/dev/null -npm ci --silent --legacy-peer-deps &>/dev/null -npm audit fix --silent --legacy-peer-deps || true &>/dev/null -npm run --silent dist:oss:selfhost &>/dev/null -cp -a build ../web-vault &>/dev/null -cd .. -mkdir data - -echo -e "${CHECKMARK} \e[1;92m Create Systemd Service... \e[0m" -cp ../../.env.template /etc/vaultwarden.env &>/dev/null -cp vaultwarden /usr/bin/vaultwarden &>/dev/null -chmod +x /usr/bin/vaultwarden &>/dev/null -useradd -m -d /var/lib/vaultwarden vaultwarden &>/dev/null -sudo cp -R data /var/lib/vaultwarden/ &>/dev/null -cp -R web-vault /var/lib/vaultwarden/ &>/dev/null -chown -R vaultwarden:vaultwarden /var/lib/vaultwarden &>/dev/null - -service_path="/etc/systemd/system/vaultwarden.service" &>/dev/null - -echo "[Unit] -Description=Bitwarden Server (Powered by Vaultwarden) -Documentation=https://github.com/dani-garcia/vaultwarden - -After=network.target - -[Service] -User=vaultwarden -Group=vaultwarden -EnvironmentFile=/etc/vaultwarden.env -ExecStart=/usr/bin/vaultwarden -LimitNOFILE=1048576 -LimitNPROC=64 -PrivateTmp=true -PrivateDevices=true -ProtectHome=true -ProtectSystem=strict -WorkingDirectory=/var/lib/vaultwarden -ReadWriteDirectories=/var/lib/vaultwarden -AmbientCapabilities=CAP_NET_BIND_SERVICE - -[Install] -WantedBy=multi-user.target" > $service_path - -echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -systemctl enable vaultwarden.service &>/dev/null -systemctl start vaultwarden.service &>/dev/null -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /vault_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/zigbee2mqtt_setup.sh b/setup/zigbee2mqtt_setup.sh deleted file mode 100644 index d0ce0c01..00000000 --- a/setup/zigbee2mqtt_setup.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Dependencies... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Setting up Node.js Repository... \e[0m" -sudo curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Node.js... \e[0m" -sudo apt-get install -y nodejs git make g++ gcc &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Setting up Zigbee2MQTT Repository... \e[0m" -sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Zigbee2MQTT... \e[0m" -cd /opt/zigbee2mqtt &>/dev/null -npm ci &>/dev/null - -service_path="/etc/systemd/system/zigbee2mqtt.service" -echo "[Unit] -Description=zigbee2mqtt -After=network.target -[Service] -ExecStart=/usr/bin/npm start -WorkingDirectory=/opt/zigbee2mqtt -StandardOutput=inherit -StandardError=inherit -Restart=always -User=root -[Install] -WantedBy=multi-user.target" > $service_path - -echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') -systemctl enable zigbee2mqtt.service &>/dev/null -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /zigbee2mqtt_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* diff --git a/setup/zwavejs2mqtt_setup.sh b/setup/zwavejs2mqtt_setup.sh deleted file mode 100644 index b4cdd610..00000000 --- a/setup/zwavejs2mqtt_setup.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' -CHECKMARK='\033[0;32m\xE2\x9C\x94\033[0m' -RETRY_NUM=5 -RETRY_EVERY=3 -NUM=$RETRY_NUM -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -echo -e "${CHECKMARK} \e[1;92m Setting up Container OS... \e[0m" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - 1>&2 echo -e "${CROSS} \e[1;31m No Network: \e[0m $(date)" - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ] - then - 1>&2 echo -e "${CROSS} \e[1;31m No Network After $RETRY_NUM Tries \e[0m" - exit 1 - fi -done - echo -e "${CHECKMARK} \e[1;92m Network Connected: \e[0m $(hostname -I)" - -echo -e "${CHECKMARK} \e[1;92m Updating Container OS... \e[0m" -apt-get update &>/dev/null -apt-get -qqy upgrade &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Installing Prerequisites... \e[0m" -apt-get update &>/dev/null -apt-get -qqy install \ - curl \ - sudo \ - unzip &>/dev/null - - echo -e "${CHECKMARK} \e[1;92m Setting up Node.js Repository... \e[0m" - sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null - - echo -e "${CHECKMARK} \e[1;92m Installing Node.js... \e[0m" - sudo apt-get install -y nodejs git make g++ gcc &>/dev/null - - echo -e "${CHECKMARK} \e[1;92m Installing yarn... \e[0m" - npm install --global yarn &>/dev/null - - echo -e "${CHECKMARK} \e[1;92m Build/Install Zwavejs2MQTT (5-6 min)... \e[0m" - sudo git clone https://github.com/zwave-js/zwavejs2mqtt /opt/zwavejs2mqtt &>/dev/null - cd /opt/zwavejs2mqtt &>/dev/null - yarn install &>/dev/null - yarn run build &>/dev/null - -echo -e "${CHECKMARK} \e[1;92m Creating Service file zwavejs2mqtt.service... \e[0m" -service_path="/etc/systemd/system/zwavejs2mqtt.service" - -echo "[Unit] -Description=zwavejs2mqtt -After=network.target -[Service] -ExecStart=/usr/bin/npm start -WorkingDirectory=/opt/zwavejs2mqtt -StandardOutput=inherit -StandardError=inherit -Restart=always -User=root -[Install] -WantedBy=multi-user.target" > $service_path - -echo -e "${CHECKMARK} \e[1;92m Customizing container... \e[0m" -rm /etc/motd -rm /etc/update-motd.d/10-uname -touch ~/.hushlogin -GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" -mkdir -p $(dirname $GETTY_OVERRIDE) -cat << EOF > $GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF -systemctl daemon-reload -systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - -echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m" -rm -rf /zwavejs2mqtt_setup.sh /var/{cache,log}/* /var/lib/apt/lists/* -systemctl start zwavejs2mqtt -systemctl enable zwavejs2mqtt &>/dev/null From a6dc675d2316a1a855a141d59d691c209b419f9e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:08:44 -0500 Subject: [PATCH 0656/3335] Create docker-v5.sh --- ct/docker-v5.sh | 382 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 382 insertions(+) create mode 100644 ct/docker-v5.sh diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh new file mode 100644 index 00000000..363e6a7b --- /dev/null +++ b/ct/docker-v5.sh @@ -0,0 +1,382 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____ _____/ /_v5__ _____ + / / / / __ \/ ___/ //_/ _ \/ ___/ + / /_/ / /_/ / /__/ ,< / __/ / +/_____/\____/\___/_/|_|\___/_/ + +EOF +} +echo -e "Loading..." +APP="Docker" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/docker ]]; then + msg_error "No Docker Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating Docker LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Docker LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" +else +FEATURES="keyctl=1,nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export ST=$FUSE +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +if [ "$CT_TYPE" == "0" ]; then +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/setup/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From b00184759ba75d2a670a5ef7a58da5aaff8230d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:10:34 -0500 Subject: [PATCH 0657/3335] Create docker-v5-install.sh --- install/docker-v5-install.sh | 175 +++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 install/docker-v5-install.sh diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh new file mode 100644 index 00000000..82cd8d7f --- /dev/null +++ b/install/docker-v5-install.sh @@ -0,0 +1,175 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") + +msg_info "Installing Docker $DOCKER_LATEST_VERSION" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD sh <(curl -sSL https://get.docker.com) +msg_ok "Installed Docker $DOCKER_LATEST_VERSION" + +read -r -p "Would you like to add Portainer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + PORTAINER="Y" +else + PORTAINER="N" +fi + +if [[ $PORTAINER == "Y" ]]; then + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + docker volume create portainer_data >/dev/null + $STD docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +fi + +read -r -p "Would you like to add Docker Compose? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + DOCKER_COMPOSE="Y" +else + DOCKER_COMPOSE="N" +fi + +if [[ $DOCKER_COMPOSE == "Y" ]]; then + msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} + mkdir -p $DOCKER_CONFIG/cli-plugins + curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose + msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" +fi + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From bedfb91fdc429a2eac9eae9f1cbb5cde9b548530 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:11:48 -0500 Subject: [PATCH 0658/3335] Update docker-v5.sh --- ct/docker-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 363e6a7b..04c639dc 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -374,7 +374,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/setup/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ From 58d471c8b2de8eb0eccd33139afebeb2bb0523e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:15:08 -0500 Subject: [PATCH 0659/3335] Create homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 413 ++++++++++++++++++++++++++++++++++++ 1 file changed, 413 insertions(+) create mode 100644 ct/homeassistant-core-v5.sh diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh new file mode 100644 index 00000000..76ff5b92 --- /dev/null +++ b/ct/homeassistant-core-v5.sh @@ -0,0 +1,413 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ _ _ _ ___ + /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___v5_ __ ___ + / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ +/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ +\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| + +EOF +} +echo -e "Loading..." +APP="Home Assistant-Core" +var_disk="8" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') +BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + msg_error "This script requires Proxmox Virtual Environment 7.0 or greater" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /srv/homeassistant ]]; then + msg_error "No Home Assistant Core Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC to ${STABLE} Or, Beta to ${BETA}. Proceed?" 10 58); then + echo "User selected Yes" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { + PY=$(ls /srv/homeassistant/lib/) + IP=$(hostname -I | awk '{print $1}') + if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then + clear + header_info + echo -e "${GN}Updating to Version ${BETA}${CL}" + BR="--pre " + else + clear + header_info + echo -e "${GN}Updating to Version ${STABLE}${CL}" + BR="" + fi + if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi + +msg_info "Stopping Home Assistant" +systemctl stop homeassistant +msg_ok "Stopped Home Assistant" + +msg_info "Updating Home Assistant" +source /srv/homeassistant/bin/activate +pip install ${BR}--upgrade homeassistant &>/dev/null +msg_ok "Updated Home Assistant" + +msg_info "Setting Dependency Versions" +if [ "${BR}" == "--pre " ]; then +sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +else +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json +fi +sleep 2 +msg_ok "Set Dependency Versions" + +msg_info "Starting Home Assistant" +systemctl start homeassistant +sleep 2 +msg_ok "Started Home Assistant" +msg_ok "Update Successful" +echo -e "\n Go to http://${IP}:8123 \n" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable (after it's initialized) by going to the following URL. + ${BL}http://${IP}:8123${CL}" From a3a63d929876d2ac8961c5350b06eae0e4475ef4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:16:43 -0500 Subject: [PATCH 0660/3335] Create homeassistant-core-v5-install.sh --- install/homeassistant-core-v5-install.sh | 195 +++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 install/homeassistant-core-v5-install.sh diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh new file mode 100644 index 00000000..1ee82a65 --- /dev/null +++ b/install/homeassistant-core-v5-install.sh @@ -0,0 +1,195 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + make \ + build-essential \ + libjpeg-dev \ + libpcap-dev \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + libreadline-dev \ + libsqlite3-dev \ + libmariadb-dev-compat \ + autoconf \ + git \ + curl \ + sudo \ + llvm \ + libncursesw5-dev \ + xz-utils \ + tzdata \ + bluez \ + tk-dev \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ + libopenjp2-7 \ + libtiff5 \ + libturbojpeg0-dev \ + liblzma-dev +msg_ok "Installed Dependencies" + +msg_info "Installing Linux D-Bus Message Broker" +cat <>/etc/apt/sources.list +deb http://deb.debian.org/debian bullseye-backports main contrib non-free +deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free +EOF +$STD apt-get update +$STD apt-get -t bullseye-backports install -y dbus-broker +$STD systemctl enable --now dbus-broker.service +msg_ok "Installed Linux D-Bus Message Broker" + +msg_info "Installing pyenv" +$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv +set +e +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc +msg_ok "Installed pyenv" +. ~/.bashrc +set -e +msg_info "Installing Python 3.10.8" +$STD pyenv install 3.10.8 +pyenv global 3.10.8 +msg_ok "Installed Python 3.10.8" + +msg_info "Installing Home Assistant-Core" +mkdir /srv/homeassistant +cd /srv/homeassistant +python3 -m venv . +source bin/activate +$STD pip install --upgrade pip +$STD python3 -m pip install wheel +$STD pip install mysqlclient +$STD pip install psycopg2-binary +$STD pip install homeassistant +msg_ok "Installed Home Assistant-Core" + +# fix for inconsistent versions, hopefully the HA team will get this fixed +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt +sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json + +msg_info "Creating Service" +cat </etc/systemd/system/homeassistant.service +[Unit] +Description=Home Assistant +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/root/.homeassistant +ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" +RestartForceExitStatus=100 +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable homeassistant +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 8e17349c672a9b10875101cce7b94770f4d9efc8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:19:11 -0500 Subject: [PATCH 0661/3335] Create photoprism-v5.sh --- ct/photoprism-v5.sh | 384 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 384 insertions(+) create mode 100644 ct/photoprism-v5.sh diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh new file mode 100644 index 00000000..398908b6 --- /dev/null +++ b/ct/photoprism-v5.sh @@ -0,0 +1,384 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ ______ __________ ____ ____ _________ __ ___ + / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / + / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / + / ____/ __ / /_/ / / / / /_/ / ____/ _, _// / v5_/ / / / / +/_/ /_/ /_/\____/ /_/ \____/_/ /_/ |_/___//____/_/ /_/ + +EOF +} +echo -e "Loading..." +APP="PhotoPrism" +var_disk="8" +var_cpu="2" +var_ram="3072" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/photoprism ]]; then + msg_error "No PhotoPrism Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" +msg_info "Stopping PhotoPrism" +sudo systemctl stop photoprism +msg_ok "Stopped PhotoPrism" + +msg_info "Cloning PhotoPrism" +git clone https://github.com/photoprism/photoprism.git &>/dev/null +cd photoprism +git checkout release &>/dev/null +msg_ok "Cloned PhotoPrism" + +msg_info "Building PhotoPrism" +sudo make all &>/dev/null +sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null +sudo rm -rf /opt/photoprism/assets +sudo cp -r assets/ /opt/photoprism/ &>/dev/null +msg_ok "Built PhotoPrism" + +msg_info "Cleaning" +cd ~ +rm -rf photoprism +msg_ok "Cleaned" + +msg_info "Starting PhotoPrism" +sudo systemctl start photoprism +msg_ok "Started PhotoPrism" +msg_ok "Update Successful" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:2342${CL} \n" From 620965e14b48008471f993e0b35e812dc4dd6f87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:21:05 -0500 Subject: [PATCH 0662/3335] Create photoprism-v5-install.sh --- photoprism-v5-install.sh | 220 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 photoprism-v5-install.sh diff --git a/photoprism-v5-install.sh b/photoprism-v5-install.sh new file mode 100644 index 00000000..384c0074 --- /dev/null +++ b/photoprism-v5-install.sh @@ -0,0 +1,220 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gcc +$STD apt-get install -y g++ +$STD apt-get install -y git +$STD apt-get install -y gnupg +$STD apt-get install -y make +$STD apt-get install -y zip +$STD apt-get install -y unzip +$STD apt-get install -y exiftool +$STD apt-get install -y ffmpeg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +wget -qL https://deb.nodesource.com/setup_18.x +$STD bash setup_18.x +rm setup_18.x +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get -y install nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Golang (Patience)" +$STD wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz +$STD tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +$STD go install github.com/tianon/gosu@latest +$STD go install golang.org/x/tools/cmd/goimports@latest +$STD go install github.com/psampaz/go-mod-outdated@latest +$STD go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest +$STD go install github.com/mikefarah/yq/v4@latest +$STD go install github.com/kyoh86/richgo@latest +cp /root/go/bin/* /usr/local/go/bin/ +cp /usr/local/go/bin/richgo /usr/local/bin/richgo +cp /usr/local/go/bin/gosu /usr/local/sbin/gosu +chown root:root /usr/local/sbin/gosu +chmod 755 /usr/local/sbin/gosu +msg_ok "Installed Golang" + +msg_info "Installing Tensorflow" +if [[ "$AVX" =~ avx2 ]]; then + $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz + $STD tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz +elif [[ "$AVX" =~ avx ]]; then + $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz + $STD tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz +else + $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz + $STD tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz +fi +$STD ldconfig +msg_ok "Installed Tensorflow" + +msg_info "Cloning PhotoPrism" +mkdir -p /opt/photoprism/bin +mkdir -p /var/lib/photoprism/storage +$STD git clone https://github.com/photoprism/photoprism.git +cd photoprism +$STD git checkout release +msg_ok "Cloned PhotoPrism" + +msg_info "Building PhotoPrism (Patience)" +$STD make -B +$STD ./scripts/build.sh prod /opt/photoprism/bin/photoprism +$STD cp -r assets/ /opt/photoprism/ +msg_ok "Built PhotoPrism" + +env_path="/var/lib/photoprism/.env" +echo " +PHOTOPRISM_AUTH_MODE='password' +PHOTOPRISM_ADMIN_PASSWORD='changeme' +PHOTOPRISM_HTTP_HOST='0.0.0.0' +PHOTOPRISM_HTTP_PORT='2342' +PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' +PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' +PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' +PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' +" >$env_path + +msg_info "Creating Service" +service_path="/etc/systemd/system/photoprism.service" + +echo "[Unit] +Description=PhotoPrism service +After=network.target + +[Service] +Type=forking +User=root +WorkingDirectory=/opt/photoprism +EnvironmentFile=/var/lib/photoprism/.env +ExecStart=/opt/photoprism/bin/photoprism up -d +ExecStop=/opt/photoprism/bin/photoprism down + +[Install] +WantedBy=multi-user.target" >$service_path +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /var/{cache,log}/* \ + /photoprism \ + /go1.19.3.linux-amd64.tar.gz \ + /libtensorflow-linux-avx2-1.15.2.tar.gz \ + /libtensorflow-linux-avx-1.15.2.tar.gz \ + /libtensorflow-linux-cpu-1.15.2.tar.gz +msg_ok "Cleaned" + +msg_info "Starting PhotoPrism" +$STD systemctl enable --now photoprism +msg_ok "Started PhotoPrism" From 8b455d7b16b032da11cef54e17ce7588cda1c1ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:22:38 -0500 Subject: [PATCH 0663/3335] Create vaultwarden-v5.sh --- ct/vaultwarden-v5.sh | 422 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 422 insertions(+) create mode 100644 ct/vaultwarden-v5.sh diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh new file mode 100644 index 00000000..fb314d38 --- /dev/null +++ b/ct/vaultwarden-v5.sh @@ -0,0 +1,422 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ ____ _ __ __ +| | / /___ ___v5__/ / /| | / /___ __________/ /__ ____ +| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ +| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / +|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ + +EOF +} +echo -e "Loading..." +APP="Vaultwarden" +var_disk="6" +var_cpu="2" +var_ram="3072" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/vaultwarden ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP}. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') +WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "VaultWarden $VAULT" ON \ + "2" "Web-Vault $WVRELEASE" OFF \ + 3>&1 1>&2 2>&3) + +clear +header_info +echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" +if [ "$UPD" == "1" ]; then +msg_info "Stopping Vaultwarden" +systemctl stop vaultwarden.service +msg_ok "Stopped Vaultwarden" + +msg_info "Updating VaultWarden to $VAULT (Patience)" +git clone https://github.com/dani-garcia/vaultwarden &>/dev/null +cd vaultwarden +cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null +DIR=/usr/bin/vaultwarden + if [ -d "$DIR" ]; then + cp target/release/vaultwarden /usr/bin/ + else + cp target/release/vaultwarden /opt/vaultwarden/bin/ + fi +msg_ok "Updated VaultWarden" + +msg_info "Cleaning up" +cd ~ && rm -rf vaultwarden +msg_ok "Cleaned" + +msg_info "Starting Vaultwarden" +systemctl start vaultwarden.service +msg_ok "Started Vaultwarden" + +msg_ok "$VAULT Update Successful" +echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" +exit; +fi +if [ "$UPD" == "2" ]; then + +msg_info "Stopping Vaultwarden" +systemctl stop vaultwarden.service +msg_ok "Stopped Vaultwarden" + +msg_info "Updating Web-Vault to $WVRELEASE" +curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WVRELEASE/bw_web_$WVRELEASE.tar.gz &>/dev/null +tar -zxf bw_web_$WVRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null +msg_ok "Updated Web-Vault" + +msg_info "Cleaning up" +rm bw_web_$WVRELEASE.tar.gz +msg_ok "Cleaned" + +msg_info "Starting Vaultwarden" +systemctl start vaultwarden.service +msg_ok "Started Vaultwarden" +msg_ok "$WVRELEASE Update Successful" +exit; +fi +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 512 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From f23d3e7088e36ac32f0c3510c75b4fc012cc77ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:24:33 -0500 Subject: [PATCH 0664/3335] Create vaultwarden-v5-install.sh --- install/vaultwarden-v5-install.sh | 204 ++++++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 install/vaultwarden-v5-install.sh diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh new file mode 100644 index 00000000..510d78c1 --- /dev/null +++ b/install/vaultwarden-v5-install.sh @@ -0,0 +1,204 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get update +$STD apt-get -qqy install \ + git \ + build-essential \ + pkgconf \ + libssl-dev \ + libmariadb-dev-compat \ + libpq-dev \ + curl \ + sudo +msg_ok "Installed Dependencies" + +WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + +VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + +msg_info "Installing Rust" +wget -qL https://sh.rustup.rs +$STD bash index.html -y --profile minimal +echo 'export PATH=~/.cargo/bin:$PATH' >>~/.bashrc +export PATH=~/.cargo/bin:$PATH +rm index.html +msg_ok "Installed Rust" + +msg_info "Building Vaultwarden ${VAULT} (Patience)" +$STD git clone https://github.com/dani-garcia/vaultwarden +cd vaultwarden +$STD cargo build --features "sqlite,mysql,postgresql" --release +msg_ok "Built Vaultwarden ${VAULT}" + +$STD addgroup --system vaultwarden +$STD adduser --system --home /opt/vaultwarden --shell /usr/sbin/nologin --no-create-home --gecos 'vaultwarden' --ingroup vaultwarden --disabled-login --disabled-password vaultwarden +mkdir -p /opt/vaultwarden/bin +mkdir -p /opt/vaultwarden/data +cp target/release/vaultwarden /opt/vaultwarden/bin/ + +msg_info "Downloading Web-Vault ${WEBVAULT}" +$STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz +$STD tar -xzf bw_web_$WEBVAULT.tar.gz -C /opt/vaultwarden/ +msg_ok "Downloaded Web-Vault ${WEBVAULT}" + +cat </opt/vaultwarden/.env +ADMIN_TOKEN=$(openssl rand -base64 48) +ROCKET_ADDRESS=0.0.0.0 +DATA_FOLDER=/opt/vaultwarden/data +DATABASE_MAX_CONNS=10 +WEB_VAULT_FOLDER=/opt/vaultwarden/web-vault +WEB_VAULT_ENABLED=true +EOF + +msg_info "Creating Service" +chown -R vaultwarden:vaultwarden /opt/vaultwarden/ +chown root:root /opt/vaultwarden/bin/vaultwarden +chmod +x /opt/vaultwarden/bin/vaultwarden +chown -R root:root /opt/vaultwarden/web-vault/ +chmod +r /opt/vaultwarden/.env + +service_path="/etc/systemd/system/vaultwarden.service" +echo "[Unit] +Description=Bitwarden Server (Powered by Vaultwarden) +Documentation=https://github.com/dani-garcia/vaultwarden +After=network.target +[Service] +User=vaultwarden +Group=vaultwarden +EnvironmentFile=-/opt/vaultwarden/.env +ExecStart=/opt/vaultwarden/bin/vaultwarden +LimitNOFILE=65535 +LimitNPROC=4096 +PrivateTmp=true +PrivateDevices=true +ProtectHome=true +ProtectSystem=strict +DevicePolicy=closed +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +RestrictNamespaces=yes +RestrictRealtime=yes +MemoryDenyWriteExecute=yes +LockPersonality=yes +WorkingDirectory=/opt/vaultwarden +ReadWriteDirectories=/opt/vaultwarden/data +AmbientCapabilities=CAP_NET_BIND_SERVICE +[Install] +WantedBy=multi-user.target" >$service_path +systemctl daemon-reload +$STD systemctl enable --now vaultwarden.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 3a858e4b29a31defce2d8918602b67f6f5863c85 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:26:38 -0500 Subject: [PATCH 0665/3335] Delete photoprism-v5-install.sh --- photoprism-v5-install.sh | 220 --------------------------------------- 1 file changed, 220 deletions(-) delete mode 100644 photoprism-v5-install.sh diff --git a/photoprism-v5-install.sh b/photoprism-v5-install.sh deleted file mode 100644 index 384c0074..00000000 --- a/photoprism-v5-install.sh +++ /dev/null @@ -1,220 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -silent() { "$@" > /dev/null 2>&1; } -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y gcc -$STD apt-get install -y g++ -$STD apt-get install -y git -$STD apt-get install -y gnupg -$STD apt-get install -y make -$STD apt-get install -y zip -$STD apt-get install -y unzip -$STD apt-get install -y exiftool -$STD apt-get install -y ffmpeg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -wget -qL https://deb.nodesource.com/setup_18.x -$STD bash setup_18.x -rm setup_18.x -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get -y install nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Golang (Patience)" -$STD wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz -$STD tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local -$STD ln -s /usr/local/go/bin/go /usr/local/bin/go -$STD go install github.com/tianon/gosu@latest -$STD go install golang.org/x/tools/cmd/goimports@latest -$STD go install github.com/psampaz/go-mod-outdated@latest -$STD go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest -$STD go install github.com/mikefarah/yq/v4@latest -$STD go install github.com/kyoh86/richgo@latest -cp /root/go/bin/* /usr/local/go/bin/ -cp /usr/local/go/bin/richgo /usr/local/bin/richgo -cp /usr/local/go/bin/gosu /usr/local/sbin/gosu -chown root:root /usr/local/sbin/gosu -chmod 755 /usr/local/sbin/gosu -msg_ok "Installed Golang" - -msg_info "Installing Tensorflow" -if [[ "$AVX" =~ avx2 ]]; then - $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz - $STD tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz -elif [[ "$AVX" =~ avx ]]; then - $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz - $STD tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz -else - $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz - $STD tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz -fi -$STD ldconfig -msg_ok "Installed Tensorflow" - -msg_info "Cloning PhotoPrism" -mkdir -p /opt/photoprism/bin -mkdir -p /var/lib/photoprism/storage -$STD git clone https://github.com/photoprism/photoprism.git -cd photoprism -$STD git checkout release -msg_ok "Cloned PhotoPrism" - -msg_info "Building PhotoPrism (Patience)" -$STD make -B -$STD ./scripts/build.sh prod /opt/photoprism/bin/photoprism -$STD cp -r assets/ /opt/photoprism/ -msg_ok "Built PhotoPrism" - -env_path="/var/lib/photoprism/.env" -echo " -PHOTOPRISM_AUTH_MODE='password' -PHOTOPRISM_ADMIN_PASSWORD='changeme' -PHOTOPRISM_HTTP_HOST='0.0.0.0' -PHOTOPRISM_HTTP_PORT='2342' -PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' -PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' -PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' -PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' -" >$env_path - -msg_info "Creating Service" -service_path="/etc/systemd/system/photoprism.service" - -echo "[Unit] -Description=PhotoPrism service -After=network.target - -[Service] -Type=forking -User=root -WorkingDirectory=/opt/photoprism -EnvironmentFile=/var/lib/photoprism/.env -ExecStart=/opt/photoprism/bin/photoprism up -d -ExecStop=/opt/photoprism/bin/photoprism down - -[Install] -WantedBy=multi-user.target" >$service_path -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -rm -rf /var/{cache,log}/* \ - /photoprism \ - /go1.19.3.linux-amd64.tar.gz \ - /libtensorflow-linux-avx2-1.15.2.tar.gz \ - /libtensorflow-linux-avx-1.15.2.tar.gz \ - /libtensorflow-linux-cpu-1.15.2.tar.gz -msg_ok "Cleaned" - -msg_info "Starting PhotoPrism" -$STD systemctl enable --now photoprism -msg_ok "Started PhotoPrism" From 14dcfe29f6b6ad98f52238bc03b1ad904e046f0d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 11:27:25 -0500 Subject: [PATCH 0666/3335] Create photoprism-v5-install.sh --- install/photoprism-v5-install.sh | 220 +++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 install/photoprism-v5-install.sh diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh new file mode 100644 index 00000000..384c0074 --- /dev/null +++ b/install/photoprism-v5-install.sh @@ -0,0 +1,220 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gcc +$STD apt-get install -y g++ +$STD apt-get install -y git +$STD apt-get install -y gnupg +$STD apt-get install -y make +$STD apt-get install -y zip +$STD apt-get install -y unzip +$STD apt-get install -y exiftool +$STD apt-get install -y ffmpeg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +wget -qL https://deb.nodesource.com/setup_18.x +$STD bash setup_18.x +rm setup_18.x +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get -y install nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Golang (Patience)" +$STD wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz +$STD tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +$STD go install github.com/tianon/gosu@latest +$STD go install golang.org/x/tools/cmd/goimports@latest +$STD go install github.com/psampaz/go-mod-outdated@latest +$STD go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest +$STD go install github.com/mikefarah/yq/v4@latest +$STD go install github.com/kyoh86/richgo@latest +cp /root/go/bin/* /usr/local/go/bin/ +cp /usr/local/go/bin/richgo /usr/local/bin/richgo +cp /usr/local/go/bin/gosu /usr/local/sbin/gosu +chown root:root /usr/local/sbin/gosu +chmod 755 /usr/local/sbin/gosu +msg_ok "Installed Golang" + +msg_info "Installing Tensorflow" +if [[ "$AVX" =~ avx2 ]]; then + $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz + $STD tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz +elif [[ "$AVX" =~ avx ]]; then + $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz + $STD tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz +else + $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz + $STD tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz +fi +$STD ldconfig +msg_ok "Installed Tensorflow" + +msg_info "Cloning PhotoPrism" +mkdir -p /opt/photoprism/bin +mkdir -p /var/lib/photoprism/storage +$STD git clone https://github.com/photoprism/photoprism.git +cd photoprism +$STD git checkout release +msg_ok "Cloned PhotoPrism" + +msg_info "Building PhotoPrism (Patience)" +$STD make -B +$STD ./scripts/build.sh prod /opt/photoprism/bin/photoprism +$STD cp -r assets/ /opt/photoprism/ +msg_ok "Built PhotoPrism" + +env_path="/var/lib/photoprism/.env" +echo " +PHOTOPRISM_AUTH_MODE='password' +PHOTOPRISM_ADMIN_PASSWORD='changeme' +PHOTOPRISM_HTTP_HOST='0.0.0.0' +PHOTOPRISM_HTTP_PORT='2342' +PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' +PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' +PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' +PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' +" >$env_path + +msg_info "Creating Service" +service_path="/etc/systemd/system/photoprism.service" + +echo "[Unit] +Description=PhotoPrism service +After=network.target + +[Service] +Type=forking +User=root +WorkingDirectory=/opt/photoprism +EnvironmentFile=/var/lib/photoprism/.env +ExecStart=/opt/photoprism/bin/photoprism up -d +ExecStop=/opt/photoprism/bin/photoprism down + +[Install] +WantedBy=multi-user.target" >$service_path +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /var/{cache,log}/* \ + /photoprism \ + /go1.19.3.linux-amd64.tar.gz \ + /libtensorflow-linux-avx2-1.15.2.tar.gz \ + /libtensorflow-linux-avx-1.15.2.tar.gz \ + /libtensorflow-linux-cpu-1.15.2.tar.gz +msg_ok "Cleaned" + +msg_info "Starting PhotoPrism" +$STD systemctl enable --now photoprism +msg_ok "Started PhotoPrism" From 77ea6abde8ed674cd017c54b3aa4aff6469a9f3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 15:23:16 -0500 Subject: [PATCH 0667/3335] Create adguard-v5.sh --- ct/adguard-v5.sh | 376 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 ct/adguard-v5.sh diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh new file mode 100644 index 00000000..b87bdd93 --- /dev/null +++ b/ct/adguard-v5.sh @@ -0,0 +1,376 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___ __ __ + / | ____/ /___ ___v5______ __________/ / + / /| |/ __ / __ / / / / __ / ___/ __ / + / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / +/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ + /____/ + +EOF +} +echo -e "Loading..." +APP="Adguard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/AdGuardHome ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping AdguardHome" +systemctl stop AdGuardHome +msg_ok "Stopped AdguardHome" + +msg_info "Updating AdguardHome" +wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz +tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null +mkdir -p adguard-backup +cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ +cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome +cp -r adguard-backup/* /opt/AdGuardHome/ +msg_ok "Updated AdguardHome" + +msg_info "Starting AdguardHome" +systemctl start AdGuardHome +msg_ok "Started AdguardHome" + +msg_info "Cleaning Up" +rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup +msg_ok "Cleaned" +msg_ok "Update Successfull" +exit +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 09350d5067bad326788e2b691a3feca7c386f416 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 15:24:51 -0500 Subject: [PATCH 0668/3335] Create adguard-v5-install.sh --- install/adguard-v5-install.sh | 120 ++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 install/adguard-v5-install.sh diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh new file mode 100644 index 00000000..637375f6 --- /dev/null +++ b/install/adguard-v5-install.sh @@ -0,0 +1,120 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing AdGuard Home" +wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh +$STD bash install.sh +rm install.sh +msg_ok "Installed AdGuard Home" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From a483f4bd06675d09d0995e7a2b6554b26830f656 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 16:54:05 -0500 Subject: [PATCH 0669/3335] Update homeassistant-core-v5.sh combine initialize, update and hacs --- ct/homeassistant-core-v5.sh | 43 ++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 76ff5b92..ef3f59dd 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -79,7 +79,7 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No Home Assistant Core Installation Found!"; exit fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC to ${STABLE} Or, Beta to ${BETA}. Proceed?" 10 58); then + if (whiptail --title "${APP} LXC TOOLS" --yesno "Tools to Initialize, Update and Install HACS. Proceed?" 10 58); then echo "User selected Yes" else clear @@ -315,6 +315,20 @@ function install_script() { function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ + "1" "Initialize" ON \ + "2" "Update" OFF \ + "3" "HACS" OFF \ + 3>&1 1>&2 2>&3) + +if [ "$UPD" == "1" ]; then +clear +header_info +echo -e "\n LOG VIEWER - Go to http://${IP}:8123 to setup \n" +cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass +exit +fi +if [ "$UPD" == "2" ]; then if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then clear header_info @@ -338,13 +352,13 @@ pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" msg_info "Setting Dependency Versions" -if [ "${BR}" == "--pre " ]; then -sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -else -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -fi + if [ "${BR}" == "--pre " ]; then + sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt + sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json + else + sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt + sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json + fi sleep 2 msg_ok "Set Dependency Versions" @@ -355,6 +369,19 @@ msg_ok "Started Home Assistant" msg_ok "Update Successful" echo -e "\n Go to http://${IP}:8123 \n" exit +fi +if [ "$UPD" == "3" ]; then +clear +header_info +msg_info "Installing Home Assistant Comunity Store (HACS)" +apt update &>/dev/null +apt install unzip &>/dev/null +cd .homeassistant +wget -O - https://get.hacs.xyz | bash - &>/dev/null +msg_ok "Installed Home Assistant Comunity Store (HACS)" +echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" +exit +fi } clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi From 3b66ad0fcb1575833baaefe31de0c124501f8737 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 17:47:36 -0500 Subject: [PATCH 0670/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b222837e..a5ec895a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,17 @@ # Change Log All notable changes to this project will be documented in this file. +## 2022-12-31 + +### Changed + +- **v5 Sccripts** (Testing before moving forward) + - Adguard Home LXC + - Docker LXC + - Home Assistant Core LXC + - PhotoPrism LXC + - Vaultwarden LXC + ## 2022-12-27 ### Changed From 4b71001ea269de2f2fec9f5af06223062205a081 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 17:55:20 -0500 Subject: [PATCH 0671/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a5ec895a..33730f30 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Changed -- **v5 Sccripts** (Testing before moving forward) +- **v5 Sccripts** (Testing before moving forward https://github.com/tteck/Proxmox/discussions/881) - Adguard Home LXC - Docker LXC - Home Assistant Core LXC From e13909d86ed0c628c2c00c7dda7891627d360e9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 18:23:45 -0500 Subject: [PATCH 0672/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 33730f30..53db4db6 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Changed -- **v5 Sccripts** (Testing before moving forward https://github.com/tteck/Proxmox/discussions/881) +- **v5 Scripts** (Testing before moving forward https://github.com/tteck/Proxmox/discussions/881) - Adguard Home LXC - Docker LXC - Home Assistant Core LXC From 08e6a95a2731a0bb6ce2f876165ead3e53aa4d85 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 19:01:24 -0500 Subject: [PATCH 0673/3335] Update adguard-v5.sh --- ct/adguard-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index b87bdd93..7255389e 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -30,6 +30,7 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset From 0a7b8629ea7d8a3f4ab4c9d0a3ea455dc1e94e1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 19:44:14 -0500 Subject: [PATCH 0674/3335] Create shinobi-v5.sh --- ct/shinobi-v5.sh | 367 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 367 insertions(+) create mode 100644 ct/shinobi-v5.sh diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh new file mode 100644 index 00000000..27c98ae5 --- /dev/null +++ b/ct/shinobi-v5.sh @@ -0,0 +1,367 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ __ _ __ _ + / ___// /_ (_)___v4____ / /_ (_) + \__ \/ __ \/ / __ \/ __ \/ __ \/ / + ___/ / / / / / / / / /_/ / /_/ / / +/____/_/ /_/_/_/ /_/\____/_.___/_/ + +EOF +} +echo -e "Loading..." +APP="Shinobi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="22.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/Shinobi ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" ON \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating Shinobi LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Shinobi LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8080/super${CL} \n" From 14db7a3e08b7daf7410aa1ca0f30c8299b097a8c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 19:45:28 -0500 Subject: [PATCH 0675/3335] Create shinobi-v5-install.sh --- install/shinobi-v5-install.sh | 178 ++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 install/shinobi-v5-install.sh diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh new file mode 100644 index 00000000..b0a00306 --- /dev/null +++ b/install/shinobi-v5-install.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update --fix-missing +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1) +if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then + apt install sudo wget -y + sudo apt install -y software-properties-common + sudo add-apt-repository universe -y + apt update -y + apt update --fix-missing -y +fi + +msg_info "Installing Dependencies" +$STD apt-get install -y curl sudo git +$STD apt-get install -y make zip net-tools +$STD apt-get install -y gcc g++ cmake +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +wget -qL https://deb.nodesource.com/setup_18.x +$STD bash setup_18.x +rm setup_18.x +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing FFMPEG" +$STD apt-get install -y ffmpeg +msg_ok "Installed FFMPEG" + +msg_info "Clonning Shinobi" +cd /opt +$STD git clone https://gitlab.com/Shinobi-Systems/Shinobi.git -b master Shinobi +cd Shinobi +gitVersionNumber=$(git rev-parse HEAD) +theDateRightNow=$(date) +touch version.json +chmod 777 version.json +echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json +msg_ok "Cloned Shinobi" + +msg_info "Installing Database" +sqlpass="" +echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections +echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections +$STD apt-get install -y mariadb-server +service mysql start +sqluser="root" +mysql -e "source sql/user.sql" || true +mysql -e "source sql/framework.sql" || true +msg_ok "Installed Database" +cp conf.sample.json conf.json +cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') +sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json +cp super.sample.json super.json + +msg_info "Installing Shinobi" +$STD npm i npm -g +$STD npm install --unsafe-perm +$STD npm install pm2@latest -g +chmod -R 755 . +touch INSTALL/installed.txt +ln -s /opt/Shinobi/INSTALL/shinobi /usr/bin/shinobi +node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null +$STD pm2 start camera.js +$STD pm2 start cron.js +$STD pm2 startup +$STD pm2 save +$STD pm2 list +msg_ok "Installed Shinobi" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 475649dad9244abbe3845b83b28ade48791c1153 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 20:09:32 -0500 Subject: [PATCH 0676/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 53db4db6..227a0893 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - Docker LXC - Home Assistant Core LXC - PhotoPrism LXC + - Shinobi - Vaultwarden LXC ## 2022-12-27 From 2f2683fd9c571e643209b9166f7952d9e2a3a98b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 20:31:20 -0500 Subject: [PATCH 0677/3335] Update shinobi-v5.sh add update --- ct/shinobi-v5.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 27c98ae5..43892a32 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -319,8 +319,11 @@ function update_script() { clear header_info msg_info "Updating Shinobi LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +cd /home/Shinobi +sh UPDATE.sh +pm2 flush +pm2 restart camera +pm2 restart cron msg_ok "Updated Shinobi LXC" exit } From bb5cf805d9d2a4f2086ed2675d771a37be6143d2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 20:36:40 -0500 Subject: [PATCH 0678/3335] Update shinobi-v5.sh --- ct/shinobi-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 43892a32..be99877d 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -319,7 +319,7 @@ function update_script() { clear header_info msg_info "Updating Shinobi LXC" -cd /home/Shinobi +cd /opt/Shinobi sh UPDATE.sh pm2 flush pm2 restart camera From cbd076508d96d7c7b535f9991b77fc335b99ba41 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 31 Dec 2022 21:11:25 -0500 Subject: [PATCH 0679/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 227a0893..7c4331cc 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file. - Docker LXC - Home Assistant Core LXC - PhotoPrism LXC - - Shinobi + - Shinobi NVR LXC - Vaultwarden LXC ## 2022-12-27 From 01b2069280525ff3d9cbbc609cfd386d9a4c4482 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 08:42:22 -0500 Subject: [PATCH 0680/3335] Update vaultwarden-v5.sh adjust build resources --- ct/vaultwarden-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index fb314d38..65c34c46 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -12,8 +12,8 @@ EOF echo -e "Loading..." APP="Vaultwarden" var_disk="6" -var_cpu="2" -var_ram="3072" +var_cpu="4" +var_ram="4096" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') From 6c7d5141a5b0f30ff26ea976c3a8e7545d914dba Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 08:43:31 -0500 Subject: [PATCH 0681/3335] Update photoprism-v5.sh adjust build resources --- ct/photoprism-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 398908b6..4d9fc8a5 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -12,8 +12,8 @@ EOF echo -e "Loading..." APP="PhotoPrism" var_disk="8" -var_cpu="2" -var_ram="3072" +var_cpu="4" +var_ram="4096" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') From ba98f45614dee14ff9b10e1150c2de31f072c1ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 10:19:43 -0500 Subject: [PATCH 0682/3335] Create homeassistant-v5.sh --- ct/homeassistant-v5.sh | 412 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 ct/homeassistant-v5.sh diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh new file mode 100644 index 00000000..13041638 --- /dev/null +++ b/ct/homeassistant-v5.sh @@ -0,0 +1,412 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ ___ _ __ __ + / / / /___v5____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + +EOF +} +echo -e "Loading..." +APP="Home Assistant" +var_disk="16" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +NEXTID=$(pvesh get /cluster/nextid) +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /root/hass_config ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Yes" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Update ALL Containers" ON \ + "2" "Remove ALL Unused Images" OFF \ + 3>&1 1>&2 2>&3) +clear +header_info +if [ "$UPD" == "1" ]; then +msg_info "Updating All Containers" +CONTAINER_LIST="${1:-$(docker ps -q)}" +for container in ${CONTAINER_LIST}; do + CONTAINER_IMAGE="$(docker inspect --format "{{.Config.Image}}" --type container ${container})" + RUNNING_IMAGE="$(docker inspect --format "{{.Image}}" --type container "${container}")" + docker pull "${CONTAINER_IMAGE}" + LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" + if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then + echo "Updating ${container} image ${CONTAINER_IMAGE}" + DOCKER_COMMAND="$(runlike "${container}")" + docker rm --force "${container}" + eval ${DOCKER_COMMAND} + fi +done +msg_ok "Updated All Containers" +exit +fi +if [ "$UPD" == "2" ]; then +msg_info "Removing ALL Unused Images" +docker image prune -af +msg_ok "Removed ALL Unused Images" +exit +fi +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" +else +FEATURES="keyctl=1,nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export ST=$FUSE +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +if [ "$CT_TYPE" == "0" ]; then +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL} +Portainer should be reachable by going to the following URL. + ${BL}http://${IP}:9000${CL}\n" From 8476dadf24e099492f2869dd07560229d35ef909 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 10:21:17 -0500 Subject: [PATCH 0683/3335] Create homeassistant-v5-install.sh --- install/homeassistant-v5-install.sh | 178 ++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 install/homeassistant-v5-install.sh diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh new file mode 100644 index 00000000..cb1fa779 --- /dev/null +++ b/install/homeassistant-v5-install.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing runlike" +$STD apt-get install -y python3-pip +$STD pip3 install runlike +msg_ok "Installed runlike" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core") +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") + +msg_info "Installing Docker $DOCKER_LATEST_VERSION" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD sh <(curl -sSL https://get.docker.com) +msg_ok "Installed Docker $DOCKER_LATEST_VERSION" + +msg_info "Pulling Portainer $PORTAINER_LATEST_VERSION Image" +$STD docker pull portainer/portainer-ce:latest +msg_ok "Pulled Portainer $PORTAINER_LATEST_VERSION Image" + +msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" +$STD docker volume create portainer_data +$STD docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest +msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" + +msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image" +$STD docker pull homeassistant/home-assistant:stable +msg_ok "Pulled Home Assistant $CORE_LATEST_VERSION Image" + +msg_info "Installing Home Assistant $CORE_LATEST_VERSION" +$STD docker volume create hass_config +$STD docker run -d \ + --name homeassistant \ + --privileged \ + --restart unless-stopped \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /dev:/dev \ + -v hass_config:/config \ + -v /etc/localtime:/etc/localtime:ro \ + --net=host \ + homeassistant/home-assistant:stable + mkdir /root/hass_config +msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 92e4c446ef3908c9ce84fb26ba20dd446e1ad9fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 10:22:28 -0500 Subject: [PATCH 0684/3335] Update homeassistant-v5.sh switch branch --- ct/homeassistant-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 13041638..7791ece8 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -400,7 +400,7 @@ fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ From 4a997ef40b788d2846d3858d00b380072a1d3404 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 10:41:11 -0500 Subject: [PATCH 0685/3335] Update homeassistant-v5.sh add install hacs --- ct/homeassistant-v5.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 7791ece8..13530f91 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -321,6 +321,7 @@ function update_script() { UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ "1" "Update ALL Containers" ON \ "2" "Remove ALL Unused Images" OFF \ + "3" "Install HACS" OFF \ 3>&1 1>&2 2>&3) clear header_info @@ -348,6 +349,18 @@ docker image prune -af msg_ok "Removed ALL Unused Images" exit fi +if [ "$UPD" == "3" ]; then +clear +header_info +msg_info "Installing Home Assistant Comunity Store (HACS)" +apt update &>/dev/null +apt install unzip &>/dev/null +cd /var/lib/docker/volumes/hass_config/_data +wget -O - https://get.hacs.xyz | bash - +msg_ok "Installed Home Assistant Comunity Store (HACS)" +echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" +exit +fi } clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi From f6395c6550256047d4f70f602f39a1be72b1344a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 10:57:25 -0500 Subject: [PATCH 0686/3335] Update homeassistant-v5.sh --- ct/homeassistant-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 13530f91..76923192 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -318,7 +318,7 @@ function install_script() { fi } function update_script() { -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ "1" "Update ALL Containers" ON \ "2" "Remove ALL Unused Images" OFF \ "3" "Install HACS" OFF \ From 31b8c786cb0f0e16934c6c95197365fe1c98bd7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 11:11:24 -0500 Subject: [PATCH 0687/3335] Delete latest-update-menu.sh prune --- misc/latest-update-menu.sh | 209 ------------------------------------- 1 file changed, 209 deletions(-) delete mode 100644 misc/latest-update-menu.sh diff --git a/misc/latest-update-menu.sh b/misc/latest-update-menu.sh deleted file mode 100644 index 90d6f25b..00000000 --- a/misc/latest-update-menu.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/env bash - -while true; do - read -p "This will create a New Update Menu for Home Assistant Container LXC. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -set -o errexit -rm -rf /root/update.sh update update-containers.sh -echo -e "\e[1;92m Creating New Update Menu Script... \e[0m" -if [ -f /usr/local/lib/python3.9/dist-packages/runlike/runlike.py ]; then - echo -e "\e[1;92m pip3/runlike Already Installed! \e[0m" -else - apt-get update &>/dev/null - echo -e "\e[1;92m Installing pip3... \e[0m" - apt-get install -y python3-pip &>/dev/null - echo -e "\e[1;92m Installing runlike... \e[0m" - pip3 install runlike &>/dev/null -fi -echo -e "\e[1;92m Creating Update Script... \e[0m" -if [ -d /root/hass_config ]; then - echo -e "\e[1;92m There's Already (hass_config) Folder! \e[0m" -else - mkdir /root/hass_config -fi -UPDATE_PATH='/root/update' -UPDATE_CONTAINERS_PATH='/root/update-containers.sh' -cat >$UPDATE_PATH <<'EOF' -#!/bin/sh -set -o errexit -show_menu(){ - normal=`echo "\033[m"` - safe=`echo "\033[32m"` - menu=`echo "\033[36m"` - number=`echo "\033[33m"` - bgred=`echo "\033[41m"` - fgred=`echo "\033[31m"` - hostname -I - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${safe} Switch to Stable Branch ${normal}\n" - printf "${menu}**${number} 2)${number} Switch to Beta Branch ${normal}\n" - printf "${menu}**${number} 3)${fgred} Switch to Dev Branch ${normal}\n" - printf "${menu}**${number} 4)${safe} Backup Home Assistant Data (to root) ${normal}\n" - printf "${menu}**${number} 5)${number} Restore Home Assistant Data ${normal}\n" - printf "${menu}**${number} 6)${fgred} Edit Home Assistant Configuration ${normal}\n" - printf "${menu}**${number} 7)${safe} Restart Home Assistant ${normal}\n" - printf "${menu}**${number} 8)${safe} Just Update Containers ${normal}\n" - printf "${menu}**${number} 9)${number} Remove Unused Images ${normal}\n" - printf "${menu}**${number} 10)${safe} Update Host OS ${normal}\n" - printf "${menu}**${number} 11)${safe} Reboot Host OS ${normal}\n" - printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu and enter or ${fgred}x to exit. ${normal}" - read opt -} -option_picked(){ - msgcolor=`echo "\033[01;31m"` - normal=`echo "\033[00;00m"` - message=${@:-"${normal}Error: No message passed"} - printf "${msgcolor}${message}${normal}\n" -} -clear -show_menu -while [ $opt != '' ] - do - if [ $opt = '' ]; then - exit; - else - case $opt in - 1) clear; - option_picked "Switching to Stable Branch"; - TAG=stable - break; - ;; - 2) clear; - option_picked "Switching to Beta Branch"; - TAG=beta - break; - ;; - 3) while true; do - read -p "Are you sure you want to Switch to Dev Branch? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Switching to Dev Branch"; - TAG=dev - break; - ;; - 4) clear; - option_picked "Backing up Home Assistant Data to root (hass_config)"; - rm -r hass_config; - cp -pR /var/lib/docker/volumes/hass_config/ /root/; - sleep 2; - clear; - show_menu; - ;; - 5) while true; do - read -p "Are you sure you want to Restore Home Assistant Data? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Restoring Home Assistant Data from root (hass_config)"; - rm -r /var/lib/docker/volumes/hass_config/_data; - cp -pR /root/hass_config/_data /var/lib/docker/volumes/hass_config/; - sleep 2; - clear; - show_menu; - ;; - 6) while true; do - read -p "Are you sure you want to Edit Home Assistant Configuration? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Editing Home Assistant Configuration"; - nano /var/lib/docker/volumes/hass_config/_data/configuration.yaml; - clear; - show_menu; - ;; - 7) clear; - option_picked "Restarting Home Assistant"; - docker restart homeassistant; - exit; - ;; - 8) clear; - option_picked "Just Updating Containers"; - ./update-containers.sh; - sleep 2; - clear; - show_menu; - ;; - 9) clear; - option_picked "Removing Unused Images"; - docker image prune -af; - sleep 2; - clear; - show_menu; - ;; - 10) clear; - option_picked "Updating Host OS"; - apt update && apt upgrade -y; - sleep 2; - clear; - show_menu; - ;; - 11) clear; - option_picked "Reboot Host OS"; - reboot; - exit; - ;; - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose an option from the menu"; - show_menu; - ;; - esac - fi - done -docker pull homeassistant/home-assistant:$TAG -docker rm --force homeassistant -docker run -d \ - --name homeassistant \ - --privileged \ - --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:$TAG -EOF -sudo chmod +x /root/update -cat >$UPDATE_CONTAINERS_PATH <<'EOF' -#!/bin/bash -set -o errexit -CONTAINER_LIST="${1:-$(docker ps -q)}" -for container in ${CONTAINER_LIST}; do - CONTAINER_IMAGE="$(docker inspect --format "{{.Config.Image}}" --type container ${container})" - RUNNING_IMAGE="$(docker inspect --format "{{.Image}}" --type container "${container}")" - docker pull "${CONTAINER_IMAGE}" - LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" - if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then - echo "Updating ${container} image ${CONTAINER_IMAGE}" - DOCKER_COMMAND="$(runlike "${container}")" - docker rm --force "${container}" - eval ${DOCKER_COMMAND} - fi -done -EOF -sudo chmod +x /root/update-containers.sh -echo -e "\e[1;92m Finished. Type ./update in the LXC console\e[0m" From 2f6cf1addc5cdfa287c57bccaf6f27ae12dbf4e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:26:54 -0500 Subject: [PATCH 0688/3335] Delete hacs-core.sh prune --- misc/hacs-core.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 misc/hacs-core.sh diff --git a/misc/hacs-core.sh b/misc/hacs-core.sh deleted file mode 100644 index 0479d932..00000000 --- a/misc/hacs-core.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi -echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" - -while true; do - read -p "Start the HACS Install Script (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -apt update &>/dev/null -apt install unzip &>/dev/null -cd .homeassistant -wget -O - https://get.hacs.xyz | bash - - -# To install HACS run the following from the container (LXC) console -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacs-core.sh)" -# Then add the integration in HA From ac4877334e5b1208a3410a9030bcbc1e5cd7501b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:27:15 -0500 Subject: [PATCH 0689/3335] Delete hacs.sh prune --- misc/hacs.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 misc/hacs.sh diff --git a/misc/hacs.sh b/misc/hacs.sh deleted file mode 100644 index e48dbf82..00000000 --- a/misc/hacs.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi -echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" - -while true; do - read -p "Start the HACS Install Script (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -apt update &>/dev/null -apt install unzip &>/dev/null -cd /var/lib/docker/volumes/hass_config/_data -wget -O - https://get.hacs.xyz | bash - - -# To install HACS run the following from the container (LXC) console -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacs.sh)" -# Then add the integration in HA From edd5e451e04cce9d5db1533e7e832a821fcfaad9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:28:10 -0500 Subject: [PATCH 0690/3335] Delete photoprism-update.sh prune --- misc/photoprism-update.sh | 107 -------------------------------------- 1 file changed, 107 deletions(-) delete mode 100644 misc/photoprism-update.sh diff --git a/misc/photoprism-update.sh b/misc/photoprism-update.sh deleted file mode 100644 index 143eb9a2..00000000 --- a/misc/photoprism-update.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -set -e -RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-4) }') - -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -PP=$(echo "\e[1;35m") - -while true; do - read -p "Update PhotoPrism LXC. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${PP} - _____ _ _ _____ _ - | __ \| | | | | __ \ (_) - | |__) | |__ ___ | |_ ___ | |__) | __ _ ___ _ __ ___ - | ___/| _ \ / _ \| __/ _ \| ___/ __| / __| _ _ \ - | | | | | | (_) | || (_) | | | | | \__ \ | | | | | - |_| |_| |_|\___/ \__\___/|_| |_| |_|___/_| |_| |_| - ${RD} UPDATE -${CL}" -} - -header_info -show_menu() { - printf " ${YW} 1)${GN} Release Branch ${CL}\n" - printf " ${YW} 2)${YW} Develop Branch ${CL}\n" - - printf "Please choose a Install Branch and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked() { - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ]; do - case $opt in - 1) - clear - header_info - option_picked "Using Release Branch" - BR="release" - break - ;; - 2) - clear - header_info - option_picked "Using Develop Branch" - BR="develop" - break - ;; - - x) - exit - ;; - \n) - exit - ;; - *) - clear - option_picked "Please choose a Install Branch from the menu" - show_menu - ;; - esac -done - -echo -en "${GN} Stopping PhotoPrism... " -sudo systemctl stop photoprism -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cloning PhotoPrism ${BR} branch... " -git clone https://github.com/photoprism/photoprism.git &>/dev/null -cd photoprism -git checkout ${BR} &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Building PhotoPrism ${BR} branch... " -sudo make all &>/dev/null -sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null -sudo rm -rf /opt/photoprism/assets -sudo cp -r assets/ /opt/photoprism/ &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleaning... " -cd ~ -rm -rf photoprism -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting PhotoPrism... " -sudo systemctl start photoprism -echo -e "${CM}${CL} \n" - -echo -e "${GN} Finished ${CL} \n " From 9261df49f82e41eeb10a8f2095381a1a4f204b0e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:28:42 -0500 Subject: [PATCH 0691/3335] Delete vaultwarden-update.sh prune --- misc/vaultwarden-update.sh | 55 -------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 misc/vaultwarden-update.sh diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh deleted file mode 100644 index 2a0c9436..00000000 --- a/misc/vaultwarden-update.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -set -e -VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -function update_info { - echo -e "${BL} - __ __ _ _ _ - \ \ / / | | | | | - \ \ / /_ _ _ _| | |___ ____ _ _ __ __| | ___ _ __ - \ \/ / _ | | | | | __\ \ /\ / / _ | __/ _ |/ _ \ _ \ - \ / (_| | |_| | | |_ \ V V / (_| | | | (_| | __/ | | | - \/ \__,_|\__,_|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_| - ${VAULT} UPDATE -${CL}" -} - -update_info -while true; do - read -p "This will Update Vaultwarden to $VAULT (Ensure you set 2vCPU 3072MiB RAM Min.). Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -sleep 2 -echo -e "${GN} Stopping Vaultwarden... ${CL}" -systemctl stop vaultwarden.service -sleep 1 - -echo -e "${GN} Updating (Building) to ${VAULT} (Patience)... ${CL}" -git clone https://github.com/dani-garcia/vaultwarden &>/dev/null -cd vaultwarden -cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null -DIR=/usr/bin/vaultwarden -if [ -d "$DIR" ]; then - cp target/release/vaultwarden /usr/bin/ -else - cp target/release/vaultwarden /opt/vaultwarden/bin/ -fi -echo -e "${GN} Starting Vaultwarden ${VAULT}... ${CL}" -systemctl start vaultwarden.service -sleep 1 - -echo -e "${GN} Cleaning up... ${CL}" -cd ~ && rm -rf vaultwarden - -echo -e "${GN} Finished Update (Ensure you set resources back to normal settings)${CL}" From 61bf8aa2d56a4024d94de5a156832fb6a1dc69f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:29:01 -0500 Subject: [PATCH 0692/3335] Delete web-vault-update.sh prune --- misc/web-vault-update.sh | 50 ---------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 misc/web-vault-update.sh diff --git a/misc/web-vault-update.sh b/misc/web-vault-update.sh deleted file mode 100644 index 5b2e61b9..00000000 --- a/misc/web-vault-update.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -function update_info { - echo -e "${BL} - __ __ _ _ _ - \ \ / / | | | | | - \ \ /\ / /__| |__ ________ ____ _ _ _| | |_ - \ \/ \/ / _ \ _ \______\ \ / / _ | | | | | __| - \ /\ / __/ |_) | \ V / (_| | |_| | | |_ - \/ \/ \___|_.__/ \_/ \__,_|\__,_|_|\__| - ${VWRELEASE} UPDATE -${CL}" -} -update_info -while true; do - read -p "This will Update Web-Vault to $VWRELEASE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -sleep 2 -echo -e "${GN} Stopping Vaultwarden... ${CL}" -systemctl stop vaultwarden.service -sleep 1 - -echo -e "${GN} Updating to ${VWRELEASE}... ${CL}" -curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null -if [ -d "/var/lib/vaultwarden" ]; then - tar -xzf bw_web_$VWRELEASE.tar.gz -C /var/lib/vaultwarden/ &>/dev/null -else - tar -zxf bw_web_$VWRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null -fi - -echo -e "${GN} Cleaning up... ${CL}" -rm bw_web_$VWRELEASE.tar.gz - -echo -e "${GN} Starting Vaultwarden... ${CL}" -systemctl start vaultwarden.service -sleep 1 -echo -e "${GN} Finished Update ${CL}" From e12e6e25543461e656720ba079fce7ffc2ee3310 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:47:26 -0500 Subject: [PATCH 0693/3335] Update shinobi-v5.sh --- ct/shinobi-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index be99877d..dd10e026 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -2,7 +2,7 @@ function header_info { cat <<"EOF" _____ __ _ __ _ - / ___// /_ (_)___v4____ / /_ (_) + / ___// /_ (_)___v5____ / /_ (_) \__ \/ __ \/ / __ \/ __ \/ __ \/ / ___/ / / / / / / / / /_/ / /_/ / / /____/_/ /_/_/_/ /_/\____/_.___/_/ From 8a697b817489060173659039fa018eabf5c7e291 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 17:25:23 -0500 Subject: [PATCH 0694/3335] Update photoprism-v5-install.sh tweaking --- install/photoprism-v5-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 384c0074..352d6096 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -97,9 +97,7 @@ $STD apt-get install -y ffmpeg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -wget -qL https://deb.nodesource.com/setup_18.x -$STD bash setup_18.x -rm setup_18.x +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 62d843dc0a676165c0716a0ad2fc11c273c48844 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 17:26:05 -0500 Subject: [PATCH 0695/3335] Update shinobi-v5-install.sh tweaking --- install/shinobi-v5-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index b0a00306..73e5eadb 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -97,9 +97,7 @@ $STD apt-get install -y gcc g++ cmake msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -wget -qL https://deb.nodesource.com/setup_18.x -$STD bash setup_18.x -rm setup_18.x +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From c1d460c1501652e454f1903e029f5b8600e6f39e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 18:12:02 -0500 Subject: [PATCH 0696/3335] Create zigbee2mqtt-v5.sh --- ct/zigbee2mqtt-v5.sh | 402 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 402 insertions(+) create mode 100644 ct/zigbee2mqtt-v5.sh diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh new file mode 100644 index 00000000..af31077f --- /dev/null +++ b/ct/zigbee2mqtt-v5.sh @@ -0,0 +1,402 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ _ __ ___ __ _______ ____________ +/__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ + / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / + / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / +/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ + v5 /____/ 🐝 + +EOF +} +echo -e "Loading..." +APP="Zigbee2MQTT" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/zigbee2mqtt ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +cd /opt/zigbee2mqtt +msg_info "Checking for Backup Directory" +if [ -d data-backup ]; then + echo "ERROR: Backup directory exists. May be previous restoring was failed?" + echo "1. Save 'data-backup' and 'data' dirs to safe location to make possibility to restore config later." + echo "2. Manually delete 'data-backup' dir and try again." + exit 1 +fi +msg_ok "No Backup Directory Exists" + +msg_info "Stopping Zigbee2MQTT" +systemctl stop zigbee2mqtt +msg_ok "Stopped Zigbee2MQTT" + +msg_info "Creating Backup of Configuration" +cp -R data data-backup +msg_ok "Created Backup of Configuration" + +msg_info "Updating Zigbee2MQTT" +git pull &>/dev/null +msg_ok "Updated Zigbee2MQTT" + +msg_info "Installing Dependencies" +npm ci &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Restoring Configuration" +cp -R data-backup/* data +rm -rf data-backup +msg_ok "Restored Configuration" + +msg_info "Starting Zigbee2MQTT" +systemctl start zigbee2mqtt +msg_ok "Started Zigbee2MQTT" +msg_ok "Update Successful" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 8e5c90245dfb446d6645cee7bc11ea279cb6330b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 18:13:16 -0500 Subject: [PATCH 0697/3335] Create zigbee2mqtt-v5-install.sh --- install/zigbee2mqtt-v5-install.sh | 163 ++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 install/zigbee2mqtt-v5-install.sh diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh new file mode 100644 index 00000000..81452490 --- /dev/null +++ b/install/zigbee2mqtt-v5-install.sh @@ -0,0 +1,163 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Setting up Zigbee2MQTT Repository" +$STD git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt +msg_ok "Set up Zigbee2MQTT Repository" + +read -r -p "Switch to Edge/dev branch? (y/N) " prompt +if [[ $prompt == "y" ]]; then + DEV="y" +else + DEV="n" +fi + +msg_info "Installing Zigbee2MQTT" +cd /opt/zigbee2mqtt +if [[ $DEV == "y" ]]; then +$STD git checkout dev +fi +$STD npm ci +msg_ok "Installed Zigbee2MQTT" + +msg_info "Creating Service" +service_path="/etc/systemd/system/zigbee2mqtt.service" +echo "[Unit] +Description=zigbee2mqtt +After=network.target +[Service] +Environment=NODE_ENV=production +ExecStart=/usr/bin/npm start +WorkingDirectory=/opt/zigbee2mqtt +StandardOutput=inherit +StandardError=inherit +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable zigbee2mqtt.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 0aeffb93251b60f4879c8756818cb16d7aaffe68 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 18:14:58 -0500 Subject: [PATCH 0698/3335] Create zwave-js-ui-v5-install.sh --- install/zwave-js-ui-v5-install.sh | 140 ++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 install/zwave-js-ui-v5-install.sh diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh new file mode 100644 index 00000000..601d9082 --- /dev/null +++ b/install/zwave-js-ui-v5-install.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing Z-Wave JS UI" +mkdir /opt/zwave-js-ui +cd /opt/zwave-js-ui +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +$STD wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip +$STD unzip zwave-js-ui-${RELEASE}-linux.zip +msg_ok "Installed Z-Wave JS UI" + +msg_info "Creating Service" +service_path="/etc/systemd/system/zwave-js-ui.service" +echo "[Unit] +Description=zwave-js-ui +Wants=network-online.target +After=network-online.target +[Service] +User=root +WorkingDirectory=/opt/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux +[Install] +WantedBy=multi-user.target" >$service_path +systemctl start zwave-js-ui +$STD systemctl enable zwave-js-ui +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm zwave-js-ui-${RELEASE}-linux.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 5053a545ee97926b60563c5316969bd6b42e715b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 18:16:18 -0500 Subject: [PATCH 0699/3335] Create zwave-js-ui-v5.sh --- ct/zwave-js-ui-v5.sh | 387 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 ct/zwave-js-ui-v5.sh diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh new file mode 100644 index 00000000..0abaf0de --- /dev/null +++ b/ct/zwave-js-ui-v5.sh @@ -0,0 +1,387 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ _______ __ ______ +/__ /_ ______ __v5 _____ / / ___/ / / / / _/ + / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / + / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / +/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ + +EOF +} +echo -e "Loading..." +APP="Zwave-JS-UI" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/zwave-js-ui ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +msg_info "Stopping Z-wave JS UI" +systemctl stop zwave-js-ui.service +msg_ok "Stopped Z-wave JS UI" + +msg_info "Updating Z-wave JS UI" +wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null +unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null +\cp -R zwave-js-ui-linux /opt/zwave-js-ui +msg_ok "Updated Z-wave JS UI" + +msg_info "Starting Z-wave JS UI" +systemctl enable --now zwave-js-ui.service +msg_ok "Started Z-wave JS UI" + +msg_info "Cleanup" +rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store +msg_ok "Cleaned" +msg_ok "Updated Successfully!\n" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8091${CL} \n" From 9d4543859c6ee8f28fb400afd882d2b6ed080dcc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 19:40:59 -0500 Subject: [PATCH 0700/3335] Update vaultwarden-v5.sh get admin token in updates --- ct/vaultwarden-v5.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 65c34c46..756b6439 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -315,15 +315,16 @@ WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/relea grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ "1" "VaultWarden $VAULT" ON \ "2" "Web-Vault $WVRELEASE" OFF \ + "3" "Get Admin Token" OFF \ 3>&1 1>&2 2>&3) clear header_info -echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" if [ "$UPD" == "1" ]; then +echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" msg_info "Stopping Vaultwarden" systemctl stop vaultwarden.service msg_ok "Stopped Vaultwarden" @@ -373,6 +374,10 @@ msg_ok "Started Vaultwarden" msg_ok "$WVRELEASE Update Successful" exit; fi +if [ "$UPD" == "3" ]; then +cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" +exit +fi } clear From d837f80df674c739409ac539cfd4dcd55b042543 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 19:46:09 -0500 Subject: [PATCH 0701/3335] Update vaultwarden-v5.sh --- ct/vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 756b6439..b0c24459 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -318,7 +318,7 @@ WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/relea UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ "1" "VaultWarden $VAULT" ON \ "2" "Web-Vault $WVRELEASE" OFF \ - "3" "Get Admin Token" OFF \ + "3" "Show Admin Token" OFF \ 3>&1 1>&2 2>&3) clear From 8de8fdddb5b0febacadde8353278c6bd6767c26c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 20:33:39 -0500 Subject: [PATCH 0702/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index ef3f59dd..d4c9ddb2 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -316,8 +316,8 @@ function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ - "1" "Initialize" ON \ - "2" "Update" OFF \ + "1" "Initialize" OFF \ + "2" "Update" ON \ "3" "HACS" OFF \ 3>&1 1>&2 2>&3) From 277a0df9436c65fcbcfc78363b8417f9864b1e6f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 20:41:11 -0500 Subject: [PATCH 0703/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index d4c9ddb2..48f56625 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -317,8 +317,8 @@ function update_script() { IP=$(hostname -I | awk '{print $1}') UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ "1" "Initialize" OFF \ - "2" "Update" ON \ - "3" "HACS" OFF \ + "2" "Update Core" ON \ + "3" "Install HACS" OFF \ 3>&1 1>&2 2>&3) if [ "$UPD" == "1" ]; then From 3e85d59cdb4e35330acba9ef6be5d4703db9a4f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 20:55:04 -0500 Subject: [PATCH 0704/3335] Delete adguard-update.sh prune --- misc/adguard-update.sh | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 misc/adguard-update.sh diff --git a/misc/adguard-update.sh b/misc/adguard-update.sh deleted file mode 100644 index f3018cf1..00000000 --- a/misc/adguard-update.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -echo -e "\nStarting Update\n" -sleep 3 -wget -q --show-progress https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz -tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null -systemctl stop AdGuardHome -mkdir -p adguard-backup -cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ -cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome -cp -r adguard-backup/* /opt/AdGuardHome/ -systemctl start AdGuardHome -rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup -echo -e "\nFinished\n" From 7cad46820a08477c820992ff426fa836af0fee13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 20:56:18 -0500 Subject: [PATCH 0705/3335] Delete zwave-js-ui-update.sh prune --- misc/zwave-js-ui-update.sh | 85 -------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 misc/zwave-js-ui-update.sh diff --git a/misc/zwave-js-ui-update.sh b/misc/zwave-js-ui-update.sh deleted file mode 100644 index e52fad51..00000000 --- a/misc/zwave-js-ui-update.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -set -e -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} -clear -cat <<"EOF" - _____ _______ __ ______ -/__ /_ ______ __ _____ / / ___/ / / / / _/ - / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / - / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / -/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ - UPDATE - -EOF - -while true; do - read -p "This will update ZWave JS UI to $RELEASE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -if [ ! -d /opt/zwave-js-ui ]; then - msg_error "No Zwave JS UI Install Detected!" - exit -fi - -msg_info "Stopping Z-wave JS UI" -systemctl stop zwave-js-ui.service -msg_ok "Stopped Z-wave JS UI" - -msg_info "Updating Z-wave JS UI" -wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -\cp -R zwave-js-ui-linux /opt/zwave-js-ui -msg_ok "Updated Z-wave JS UI" - -msg_info "Updating Z-wave JS UI service file" -cat </etc/systemd/system/zwave-js-ui.service -[Unit] -Description=zwave-js-ui -Wants=network-online.target -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux -[Install] -WantedBy=multi-user.target -EOF -systemctl daemon-reload -msg_ok "Updated Z-wave JS UI service file" - -msg_info "Cleanup" -rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store -msg_ok "Cleaned" - -msg_info "Starting Z-wave JS UI" -systemctl enable --now zwave-js-ui.service -msg_info "Started Z-wave JS UI" - -msg_ok "Completed Successfully!\n" From 87203859d57b15da95217ab6251189bd9ecf2b14 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 20:57:45 -0500 Subject: [PATCH 0706/3335] Delete core-update.sh prune --- misc/core-update.sh | 84 --------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 misc/core-update.sh diff --git a/misc/core-update.sh b/misc/core-update.sh deleted file mode 100644 index b9a547ab..00000000 --- a/misc/core-update.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env bash -clear -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi -set -e -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -function header_info { - cat <<"EOF" - _ _ _ _ ___ - /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___ _ __ ___ - / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ -/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ -\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| - UPDATE -EOF -} -PY=$(ls /srv/homeassistant/lib/) -IP=$(hostname -I | awk '{print $1}') -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') -BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -if (whiptail --title "CORE UPDATE" --yesno "This will update Home Assistant Core. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then - clear - header_info - echo -e "${GN}Updating to Version ${BETA}${CL}" - BR="--pre " -else - clear - header_info - echo -e "${GN}Updating to Version ${STABLE}${CL}" - BR="" -fi -if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi - -msg_info "Stopping Home Assistant" -systemctl stop homeassistant -msg_ok "Stopped Home Assistant" - -msg_info "Updating Home Assistant" -source /srv/homeassistant/bin/activate -pip install ${BR}--upgrade homeassistant &>/dev/null -msg_ok "Updated Home Assistant" - -msg_info "Setting Dependency Versions" -if [ "${BR}" == "--pre " ]; then -sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -else -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -fi -sleep 2 -msg_ok "Set Dependency Versions" - -msg_info "Starting Home Assistant" -systemctl start homeassistant -sleep 2 -msg_ok "Started Home Assistant" -msg_ok "Update Successful" -echo -e "\n Go to http://${IP}:8123 \n" From 0a73bc84140b5b2eb320b73498831e655a95a018 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 22:11:58 -0500 Subject: [PATCH 0707/3335] Create paperless-ngx-v5.sh --- ct/paperless-ngx-v5.sh | 429 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 429 insertions(+) create mode 100644 ct/paperless-ngx-v5.sh diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh new file mode 100644 index 00000000..49f780b0 --- /dev/null +++ b/ct/paperless-ngx-v5.sh @@ -0,0 +1,429 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____ _____ ___ _____/ /__v5__________ ____ ____ __ __ + / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ + / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < +/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| + /_/ /____/ + +EOF +} +echo -e "Loading..." +APP="Paperless-ngx" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/paperless ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +SER=/etc/systemd/system/paperless-task-queue.service + +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Update Paperless-ngx to $RELEASE" ON \ + "2" "Paperless-ngx Credentials" OFF \ + 3>&1 1>&2 2>&3) +clear +header_info +if [ "$UPD" == "1" ]; then +msg_info "Stopping Paperless-ngx" +systemctl stop paperless-consumer paperless-webserver paperless-scheduler + if [ -f "$SER" ]; then + systemctl stop paperless-task-queue.service + fi +sleep 1 +msg_ok "Stopped Paperless-ngx" + +msg_info "Updating to ${RELEASE}" + if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null + wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null + tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null + cp -r /opt/paperless/paperless.conf paperless-ngx/ + cp -r paperless-ngx/* /opt/paperless/ + cd /opt/paperless + sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt + pip install -r requirements.txt &>/dev/null + cd /opt/paperless/src + /usr/bin/python3 manage.py migrate &>/dev/null + if [ -f "$SER" ]; then + msg_ok "paperless-task-queue.service Exists." + else +cat </etc/systemd/system/paperless-task-queue.service +[Unit] +Description=Paperless Celery Workers +Requires=redis.service +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless worker --loglevel INFO +[Install] +WantedBy=multi-user.target +EOF +systemctl enable paperless-task-queue &>/dev/null +msg_ok "paperless-task-queue.service Created." + fi +cat </etc/systemd/system/paperless-scheduler.service +[Unit] +Description=Paperless Celery beat +Requires=redis.service +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless beat --loglevel INFO +[Install] +WantedBy=multi-user.target +EOF +msg_ok "Updated to ${RELEASE}" + +msg_info "Cleaning up" +cd ~ +rm paperless-ngx-$RELEASE.tar.xz +rm -rf paperless-ngx +msg_ok "Cleaned" + +msg_info "Starting Paperless-ngx" +systemctl daemon-reload +systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service +sleep 1 +msg_ok "Started Paperless-ngx" +msg_ok "Updated Successfully!\n" +exit +fi +if [ "$UPD" == "2" ]; then +clear +header_info +cat paperless.creds +exit +fi +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From 86baaf0b31dc16ae913f15ff2d43d480f3733761 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 22:13:23 -0500 Subject: [PATCH 0708/3335] Create paperless-ngx-v5-install.sh --- install/paperless-ngx-v5-install.sh | 288 ++++++++++++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 install/paperless-ngx-v5-install.sh diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh new file mode 100644 index 00000000..ce87d088 --- /dev/null +++ b/install/paperless-ngx-v5-install.sh @@ -0,0 +1,288 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Paperless-ngx Dependencies" +$STD apt-get install -y --no-install-recommends \ + python3 \ + python3-pip \ + python3-dev \ + imagemagick \ + fonts-liberation \ + optipng \ + gnupg \ + libpq-dev \ + libmagic-dev \ + mime-support \ + libzbar0 \ + poppler-utils \ + default-libmysqlclient-dev \ + sudo +msg_ok "Installed Paperless-ngx Dependencies" + +msg_info "Installing OCR Dependencies" +$STD apt-get install -y --no-install-recommends \ + unpaper \ + ghostscript \ + icc-profiles-free \ + qpdf \ + liblept5 \ + libxml2 \ + pngquant \ + zlib1g \ + tesseract-ocr \ + tesseract-ocr-eng +msg_ok "Installed OCR Dependencies" + +msg_info "Installing Extra Dependencies" +$STD apt-get install -y --no-install-recommends \ + redis \ + postgresql \ + build-essential \ + python3-setuptools \ + python3-wheel +msg_ok "Installed Extra Dependencies" + +msg_info "Installing JBIG2" +$STD apt-get install -y --no-install-recommends \ + automake \ + libtool \ + pkg-config \ + git \ + curl \ + libtiff-dev \ + libpng-dev \ + libleptonica-dev + +$STD git clone https://github.com/agl/jbig2enc /opt/jbig2enc +cd /opt/jbig2enc +$STD bash ./autogen.sh +$STD bash ./configure +$STD make +$STD make install +rm -rf /opt/jbig2enc +msg_ok "Installed JBIG2" + +msg_info "Installing Paperless-ngx (Patience)" +Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) +cd /opt +$STD wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz +$STD tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ +mv paperless-ngx paperless +rm paperless-ngx-$Paperlessngx.tar.xz +cd /opt/paperless + +## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file +sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt + +$STD pip install --upgrade pip +$STD pip install -r requirements.txt +msg_ok "Installed Paperless-ngx" + +msg_info "Setting up database" +DB_USER=paperless +DB_PASS="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)" +DB_NAME=paperlessdb + +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" + +echo "Paperless-ngx Database User" >>~/paperless.creds +echo $DB_USER >>~/paperless.creds +echo "Paperless-ngx Database Password" >>~/paperless.creds +echo $DB_PASS >>~/paperless.creds +echo "Paperless-ngx Database Name" >>~/paperless.creds +echo $DB_NAME >>~/paperless.creds + +/bin/bash -c "mkdir -p {consume,media}" + +sed -i -e 's|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=paperlessdb|' /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf + +cd /opt/paperless/src +$STD /usr/bin/python3 manage.py migrate +msg_ok "Set up database" + +msg_info "Setting up admin Paperless-ngx User & Password" +## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations +cat <>~/paperless.creds +echo "Paperless-ngx WebUI User" >>~/paperless.creds +echo admin >>~/paperless.creds +echo "Paperless-ngx WebUI Password" >>~/paperless.creds +echo $DB_PASS >>~/paperless.creds +msg_ok "Set up admin Paperless-ngx User & Password" + +msg_info "Creating Services" +cat </etc/systemd/system/paperless-scheduler.service +[Unit] +Description=Paperless Celery beat +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless beat --loglevel INFO + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/paperless-task-queue.service +[Unit] +Description=Paperless Celery Workers +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless worker --loglevel INFO + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/paperless-consumer.service +[Unit] +Description=Paperless consumer +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=python3 manage.py document_consumer + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/paperless-webserver.service +[Unit] +Description=Paperless webserver +After=network.target +Wants=network.target +Requires=redis.service + +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=/usr/local/bin/gunicorn -c /opt/paperless/gunicorn.conf.py paperless.asgi:application + +[Install] +WantedBy=multi-user.target +EOF + +sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml + +systemctl daemon-reload +$STD systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service + +msg_ok "Created Services" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 0128a240e11d064351f4b6464b0f5326a5eb8f55 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 22:30:40 -0500 Subject: [PATCH 0709/3335] Delete paperless-ngx-update.sh prune --- misc/paperless-ngx-update.sh | 110 ----------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 misc/paperless-ngx-update.sh diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh deleted file mode 100644 index 9ab62db6..00000000 --- a/misc/paperless-ngx-update.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env bash -clear -RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -SER=/etc/systemd/system/paperless-task-queue.service -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -e - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -cat <<"EOF" - ____ __ - / __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __ - / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ - / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < -/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| - /_/ UPDATE /____/ -EOF - -while true; do - read -p "This will Update Paperless-ngx to $RELEASE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -sleep 2 -msg_info "Stopping Paperless-ngx" -systemctl stop paperless-consumer paperless-webserver paperless-scheduler -if [ -f "$SER" ]; then - systemctl stop paperless-task-queue.service -fi -sleep 1 -msg_ok "Stopped Paperless-ngx" - -msg_info "Updating to ${RELEASE}" -if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null -wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null -tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null -cp -r /opt/paperless/paperless.conf paperless-ngx/ -cp -r paperless-ngx/* /opt/paperless/ -cd /opt/paperless -sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt -pip install -r requirements.txt &>/dev/null -cd /opt/paperless/src -/usr/bin/python3 manage.py migrate &>/dev/null -if [ -f "$SER" ]; then - msg_ok "paperless-task-queue.service Exists." -else -cat </etc/systemd/system/paperless-task-queue.service -[Unit] -Description=Paperless Celery Workers -Requires=redis.service -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless worker --loglevel INFO -[Install] -WantedBy=multi-user.target -EOF -systemctl enable paperless-task-queue &>/dev/null -msg_ok "paperless-task-queue.service Created." -fi -cat </etc/systemd/system/paperless-scheduler.service -[Unit] -Description=Paperless Celery beat -Requires=redis.service -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless beat --loglevel INFO -[Install] -WantedBy=multi-user.target -EOF -msg_ok "Updated to ${RELEASE}" - -msg_info "Cleaning up" -cd ~ -rm paperless-ngx-$RELEASE.tar.xz -rm -rf paperless-ngx -msg_ok "Cleaned" - -msg_info "Starting Paperless-ngx" -systemctl daemon-reload -systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service -sleep 1 -msg_ok "Finished Update" -echo -e "\n${BL}It may take a minute or so for Paperless-ngx to become available.${CL}\n" From 99d8cb4e623237fb2adc5866b82924fc870366ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 23:09:50 -0500 Subject: [PATCH 0710/3335] Create esphome-v5.sh --- ct/esphome-v5.sh | 366 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 366 insertions(+) create mode 100644 ct/esphome-v5.sh diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh new file mode 100644 index 00000000..b2d8d894 --- /dev/null +++ b/ct/esphome-v5.sh @@ -0,0 +1,366 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___________ ____ __ __ + / ____/ ___// __ \/ / / /___v5____ ___ ___ + / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ + / /___ ___/ / ____/ __ / /_/ / / / / / / __/ +/_____//____/_/ /_/ /_/\____/_/ /_/ /_/\___/ + +EOF +} +echo -e "Loading..." +APP="ESPHome" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /usr/local/bin/esphome ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Stopping ESPHome" +systemctl stop esphomeDashboard +msg_ok "Stopped ESPHome" + +msg_info "Updating ESPHome" +pip3 install esphome --upgrade &>/dev/null +msg_ok "Updated ESPHome" + +msg_info "Starting ESPHome" +systemctl stop esphomeDashboard +msg_ok "Started ESPHome" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6052${CL} \n" From 36462296d3360e8a19fb15e528bf446be1f35d90 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 23:11:27 -0500 Subject: [PATCH 0711/3335] Create esphome-v5-install.sh --- install/esphome-v5-install.sh | 140 ++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 install/esphome-v5-install.sh diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh new file mode 100644 index 00000000..22f1a6f2 --- /dev/null +++ b/install/esphome-v5-install.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing pip3" +$STD apt-get install -y python3-pip +msg_ok "Installed pip3" + +msg_info "Installing ESPHome" +$STD pip3 install esphome +msg_ok "Installed ESPHome" + +msg_info "Installing ESPHome Dashboard" +$STD pip3 install tornado esptool + +service_path="/etc/systemd/system/esphomeDashboard.service" +echo "[Unit] +Description=ESPHome Dashboard +After=network.target +[Service] +ExecStart=/usr/local/bin/esphome /root/config/ dashboard +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable esphomeDashboard.service +systemctl start esphomeDashboard +msg_ok "Installed ESPHome Dashboard" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From fbe5a0bed69943711a6c347763da174369df61c8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 08:06:33 -0500 Subject: [PATCH 0712/3335] Update homeassistant-v5.sh rename --- ct/homeassistant-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 76923192..651d322b 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -86,7 +86,7 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No ${APP} Installation Found!"; exit fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + if (whiptail --title "${APP} LXC TOOLS" --yesno "This provides ${APP} Tools. Proceed?" 10 58); then echo "User selected Yes" else clear From 3f75be8ce51dc7c017a47a2159653a25be81920c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 09:20:34 -0500 Subject: [PATCH 0713/3335] Update paperless-ngx-v5.sh tweak --- ct/paperless-ngx-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 49f780b0..fb3aa3f6 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -86,8 +86,8 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No ${APP} Installation Found!"; exit fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" + if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then + echo "User selected support" else clear echo -e "⚠ User exited script \n" From 19fdc661f5c8849db1eaf58886e81f40ee7bdcdd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 09:22:34 -0500 Subject: [PATCH 0714/3335] Update paperless-ngx-v5-install.sh tweak --- install/paperless-ngx-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index ce87d088..d9bf955e 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -173,7 +173,7 @@ echo $DB_PASS >>~/paperless.creds echo "Paperless-ngx Database Name" >>~/paperless.creds echo $DB_NAME >>~/paperless.creds -/bin/bash -c "mkdir -p {consume,media}" +mkdir -p {consume,media} sed -i -e 's|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=paperlessdb|' /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf @@ -181,7 +181,7 @@ SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf cd /opt/paperless/src -$STD /usr/bin/python3 manage.py migrate +$STD python3 manage.py migrate msg_ok "Set up database" msg_info "Setting up admin Paperless-ngx User & Password" From f4113c4129331881d7b49d26b84310818ddca653 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 09:27:37 -0500 Subject: [PATCH 0715/3335] Update homeassistant-core-v5.sh tweak --- ct/homeassistant-core-v5.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 48f56625..ce167db9 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -74,22 +74,22 @@ function PVE_CHECK() { fi } -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /srv/homeassistant ]]; then - msg_error "No Home Assistant Core Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC TOOLS" --yesno "Tools to Initialize, Update and Install HACS. Proceed?" 10 58); then - echo "User selected Yes" +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) else clear echo -e "⚠ User exited script \n" exit fi fi -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /srv/homeassistant ]]; then + msg_error "No Home Assistant Core Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC SUPPORT" --yesno "Initialize, Update or Install HACS. Proceed?" 10 58); then + echo "User selected Support" else clear echo -e "⚠ User exited script \n" From e45acf93bf009142c2c46e7ca1ad3f93da9885e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 09:32:57 -0500 Subject: [PATCH 0716/3335] Update homeassistant-v5.sh tweak --- ct/homeassistant-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 651d322b..e54c59af 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -86,8 +86,8 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No ${APP} Installation Found!"; exit fi - if (whiptail --title "${APP} LXC TOOLS" --yesno "This provides ${APP} Tools. Proceed?" 10 58); then - echo "User selected Yes" + if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then + echo "User selected support" else clear echo -e "⚠ User exited script \n" From 2deeaffd69b9662d321b9ca398a2b1c0bd634388 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 09:35:41 -0500 Subject: [PATCH 0717/3335] Update vaultwarden-v5.sh tweak --- ct/vaultwarden-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index b0c24459..f7e9b34e 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -84,8 +84,8 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No ${APP} Installation Found!"; exit fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP}. Proceed?" 10 58); then - echo "User selected Update" + if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then + echo "User selected support" else clear echo -e "⚠ User exited script \n" From 0880352c1a969b06a33378bad8f3fab5abd65b5a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 09:57:48 -0500 Subject: [PATCH 0718/3335] Update docker-v5.sh tweak --- ct/docker-v5.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 04c639dc..50ddd2b7 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -81,7 +81,7 @@ if command -v pveversion >/dev/null 2>&1; then fi if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/docker ]]; then - msg_error "No Docker Installation Found!"; + msg_error "No ${APP} Installation Found!"; exit fi if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then @@ -317,10 +317,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Docker LXC" +msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Docker LXC" +msg_ok "Updated ${APP} LXC" exit } clear From 3413c4e6e40d4813f5eea28c2319d308b7dc81ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 10:33:10 -0500 Subject: [PATCH 0719/3335] Create mqtt-v5.sh --- ct/mqtt-v5.sh | 358 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 ct/mqtt-v5.sh diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh new file mode 100644 index 00000000..9b8f137c --- /dev/null +++ b/ct/mqtt-v5.sh @@ -0,0 +1,358 @@ +#!/usr/bin/env bash +function header_info { +cat <<"EOF" + __ ___ ____ _ ____________ + / |/ /___v5_____/ __ \__ __(_)_ __/_ __/___ + / /|_/ / __ \/ ___/ / / / / / / / / / / / / __ \ + / / / / /_/ (__ ) /_/ / /_/ / / / / / / / /_/ / +/_/ /_/\____/____/\___\_\__,_/_/ /_/ /_/ \____/ + +EOF +} +echo -e "Loading..." +APP="MQTT" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 96bafed52efa5fad957bd12cecde87d7a7154cb0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 10:34:19 -0500 Subject: [PATCH 0720/3335] Create mqtt-v5-install.sh --- install/mqtt-v5-install.sh | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 install/mqtt-v5-install.sh diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh new file mode 100644 index 00000000..8ab82ce6 --- /dev/null +++ b/install/mqtt-v5-install.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing Mosquitto MQTT Broker" +$STD wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key +$STD apt-key add mosquitto-repo.gpg.key +cd /etc/apt/sources.list.d/ +$STD wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list +$STD apt-get update +$STD apt-get -y install mosquitto +$STD apt-get -y install mosquitto-clients +msg_ok "Installed Mosquitto MQTT Broker" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 79a4c050d737ab5ed0d54502c5bebd0a77bb7fd2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 14:45:34 -0500 Subject: [PATCH 0721/3335] Create node-red-v5.sh --- ct/node-red-v5.sh | 398 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 398 insertions(+) create mode 100644 ct/node-red-v5.sh diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh new file mode 100644 index 00000000..c0b801b8 --- /dev/null +++ b/ct/node-red-v5.sh @@ -0,0 +1,398 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ __ ____ __ + / | / /___ ____/ /__ v5 / __ \___ ____/ / + / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / + / /| / /_/ / /_/ / __/ / _, _/ __/ /_/ / +/_/ |_/\____/\__,_/\___/ /_/ |_|\___/\__,_/ + +EOF +} +echo -e "Loading..." +APP="Node-Red" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /root/.node-red ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then + echo "User selected support" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Update ${APP}" ON \ + "2" "Install Themes" OFF \ + 3>&1 1>&2 2>&3) +clear +header_info +if [ "$UPD" == "1" ]; then +msg_info "Stopping ${APP}" +systemctl stop nodered +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +npm install -g --unsafe-perm node-red &>/dev/null +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start nodered +msg_ok "Started ${APP}" +msg_ok "Update Successful" +exit +fi +if [ "$UPD" == "2" ]; then +clear +header_info +THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ + "dark" "" OFF \ + "dracula" "" OFF \ + "midnight-red" "" ON \ + "oled" "" OFF \ + "solarized-dark" "" OFF \ + "solarized-light" "" OFF \ + 3>&1 1>&2 2>&3) +clear +header_info +msg_info "Installing ${THEME} Theme" +cd /root/.node-red +sed -i 's|//theme: "",|theme: "",|g' /root/.node-red/settings.js +npm install @node-red-contrib-themes/${THEME} &>/dev/null +sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js +msg_ok "Installed ${THEME} Theme" + +msg_info "Restarting ${APP}" +systemctl restart nodered +msg_ok "Restarted ${APP}" +exit +fi +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:1880${CL} \n" From de8e2a02f639f3b1d9a643ef6fc40accf95c81eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 14:47:09 -0500 Subject: [PATCH 0722/3335] Create node-red-v5-install.sh --- install/node-red-v5-install.sh | 150 +++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 install/node-red-v5-install.sh diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh new file mode 100644 index 00000000..a6613d6e --- /dev/null +++ b/install/node-red-v5-install.sh @@ -0,0 +1,150 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Node-Red" +$STD npm install -g --unsafe-perm node-red +msg_ok "Installed Node-Red" + +msg_info "Creating Service" +service_path="/etc/systemd/system/nodered.service" +echo "[Unit] +Description=Node-RED +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/node-red --max-old-space-size=128 -v +Restart=on-failure +KillSignal=SIGINT + +SyslogIdentifier=node-red +StandardOutput=syslog + +WorkingDirectory=/root/ +User=root +Group=root + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now nodered.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From a109366472a36ba0652ff6dd23f2601570b65d6c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 15:34:59 -0500 Subject: [PATCH 0723/3335] Delete node-red-themes.sh prune --- misc/node-red-themes.sh | 146 ---------------------------------------- 1 file changed, 146 deletions(-) delete mode 100644 misc/node-red-themes.sh diff --git a/misc/node-red-themes.sh b/misc/node-red-themes.sh deleted file mode 100644 index 1a813bc1..00000000 --- a/misc/node-red-themes.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env bash -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/node-red-themes.sh)" -set -o errexit -show_menu() { - YW=$(echo "\033[33m") - RD=$(echo "\033[01;31m") - BL=$(echo "\033[36m") - CM='\xE2\x9C\x94\033' - GN=$(echo "\033[1;92m") - CL=$(echo "\033[m") - echo -e "${RD} Backup your Node-Red flows before running this script!!${CL} \n " - while true; do - read -p "This will Install Node-Red Themes. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac - done - clear - echo -e "${RD} Backup your Node-Red flows before installing any theme!!${CL} \n " - printf "\n${BL}*********************************************${CL}\n" - printf "${BL}**${YW} 1)${GN} Default Theme ${CL}\n" - printf "${BL}**${YW} 2)${GN} Dark Theme ${CL}\n" - printf "${BL}**${YW} 3)${GN} Dracula Theme ${CL}\n" - printf "${BL}**${YW} 4)${GN} Midnight-Red Theme ${CL}\n" - printf "${BL}**${YW} 5)${GN} Oled Theme ${CL}\n" - printf "${BL}**${YW} 6)${GN} Solarized-Dark Theme ${CL}\n" - printf "${BL}**${YW} 7)${GN} Solarized-Light Theme ${CL}\n" - printf "${BL}*********************************************${CL}\n" - printf "Please choose a theme from the menu and enter or ${RD}x to exit. ${CL}" - read opt -} - -option_picked() { - msgcolor=$(echo "\033[01;31m") - normal=$(echo "\033[00;00m") - message=${@:-"${CL}Error: No message passed"} - printf "${RD}${message}${CL}\n" -} - -clear -show_menu -while [ "$opt" != " " ]; do - case $opt in - 1) - clear - option_picked "Installing Default Theme" - THEME= - JS=// - break - ;; - 2) - clear - option_picked "Installing Dark Theme" - THEME=dark - break - ;; - 3) - clear - option_picked "Installing Dracula Theme" - THEME=dracula - break - ;; - 4) - clear - option_picked "Installing Midnight-Red Theme" - THEME=midnight-red - break - ;; - 5) - clear - option_picked "Installing Oled Theme" - THEME=oled - break - ;; - 6) - clear - option_picked "Installing Solarized-Dark Theme" - THEME=solarized-dark - break - ;; - 7) - clear - option_picked "Installing Solarized-Light Theme" - THEME=solarized-light - break - ;; - - x) - exit - ;; - \n) - exit - ;; - *) - clear - option_picked "Please choose a theme from the menu" - show_menu - ;; - esac -done -echo -en "${GN} Installing ${THEME} Theme... " -cd /root/.node-red -if [ "${THEME}" = "" ]; then - echo -e "${CM}${CL} \r" -else - npm install @node-red-contrib-themes/${THEME} &>/dev/null - echo -e "${CM}${CL} \r" -fi -echo -en "${GN} Writing Settings... " -cat </root/.node-red/settings.js -module.exports = { uiPort: process.env.PORT || 1880, - mqttReconnectTime: 15000, - serialReconnectTime: 15000, - debugMaxLength: 1000, - functionGlobalContext: { - }, - exportGlobalContextKeys: false, - - // Configure the logging output - logging: { - console: { - level: "info", - metrics: false, - audit: false - } - }, - - // Customising the editor - editorTheme: { - ${JS}theme: "${THEME}" - }, - projects: { - // To enable the Projects feature, set this value to true - enabled: false - } -} -EOF -echo -e "${CM}${CL} \r" - -echo -en "${GN} Restarting Node-Red... " -echo -e "${CM}${CL} \r" -systemctl restart nodered -echo -en "${GN} Finished... ${CL} \n" -exit From 4a8e00adf74e5dd744dc18512767207e47a07398 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 16:42:47 -0500 Subject: [PATCH 0724/3335] Create emqx-v5.sh --- ct/emqx-v5.sh | 359 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 359 insertions(+) create mode 100644 ct/emqx-v5.sh diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh new file mode 100644 index 00000000..7efa5a96 --- /dev/null +++ b/ct/emqx-v5.sh @@ -0,0 +1,359 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ________ _______v5 _ __ + / ____/ |/ / __ \ | |/ / + / __/ / /|_/ / / / / | / + / /___/ / / / /_/ / / | +/_____/_/ /_/\___\_\/_/|_| + +EOF +} +echo -e "Loading..." +APP="EMQX" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:18083${CL} \n" From a4b723d64f31f9d3b92c93e5019b942eb50b78aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 16:43:50 -0500 Subject: [PATCH 0725/3335] Create emqx-v5-install.sh --- install/emqx-v5-install.sh | 118 +++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 install/emqx-v5-install.sh diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh new file mode 100644 index 00000000..cc8f968f --- /dev/null +++ b/install/emqx-v5-install.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing EMQX" +$STD bash <(curl -fsSL https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh) +$STD apt-get install -y emqx +$STD systemctl enable --now emqx +msg_ok "Installed EMQX" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 86a346aeaf26181eca41f2b361ff335a34e71a8e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 17:50:31 -0500 Subject: [PATCH 0726/3335] Create haos-vm-tteck.sh --- vm/haos-vm-tteck.sh | 276 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 vm/haos-vm-tteck.sh diff --git a/vm/haos-vm-tteck.sh b/vm/haos-vm-tteck.sh new file mode 100644 index 00000000..668325c2 --- /dev/null +++ b/vm/haos-vm-tteck.sh @@ -0,0 +1,276 @@ +#!/usr/bin/env bash +echo -e "Loading..." +GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +NEXTID=$(pvesh get /cluster/nextid) +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +YW=`echo "\033[33m"` +BL=`echo "\033[36m"` +HA=`echo "\033[1;34m"` +RD=`echo "\033[01;31m"` +BGN=`echo "\033[4;92m"` +GN=`echo "\033[1;92m"` +DGN=`echo "\033[32m"` +CL=`echo "\033[m"` +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + [ ! -z ${VMID-} ] && cleanup_vmid + exit $EXIT +} +function cleanup_vmid() { + if $(qm status $VMID &>/dev/null); then + if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then + qm stop $VMID + fi + qm destroy $VMID + fi +} +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit +fi +if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi +function header_info { +cat <<"EOF" + __ __ ___ _ __ __ ____ _____ + / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ + +EOF +} +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function default_settings() { + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + HN=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" +} +function advanced_settings() { +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 4 \ +"$STABLE" "Stable" ON \ +"$BETA" "Beta" OFF \ +"$DEV" "Dev" OFF \ +"$LATEST" "Latest" OFF \ +3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi +VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; +fi +VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; +else + if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; +fi +CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; +fi +RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; +fi +BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; +else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; +fi +MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ -z $MAC1 ]; then MAC="$GEN_MAC"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"; +else + if [ $exitstatus = 0 ]; then MAC="$MAC1"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"; fi +fi +VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi +fi +if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" +else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" +fi +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +function start_script() { +if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} +start_script +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi +STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then +msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the HAOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +if [ "$BRANCH" == "$DEV" ]; then +URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +else +URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +fi +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" +msg_info "Extracting KVM Disk Image" +unxz $FILE +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in + nfs|dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; + btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_FORMAT="subvol" + DISK_IMPORT="-format raw" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done +msg_ok "Extracted KVM Disk Image" +msg_info "Creating HAOS VM" +qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ + -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ + -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null +qm set $VMID \ + -boot order=scsi0 >/dev/null +qm set $VMID -description "# Home Assistant OS +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null +msg_ok "Created HAOS VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then +msg_info "Starting Home Assistant OS VM" +qm start $VMID +msg_ok "Started Home Assistant OS VM" +fi +msg_ok "Completed Successfully!\n" From 0f71fadbd5958fe7fa6c914f6e50dbded45541d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 18:28:18 -0500 Subject: [PATCH 0727/3335] Update haos-vm-v4.sh tweak --- vm/haos-vm-v4.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index d4890df0..6ff12f64 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -1,6 +1,18 @@ #!/usr/bin/env bash -echo -e "Loading..." -GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +function header_info { +cat <<"EOF" + __ __ ___ _ __ __ ____ _____ + / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ + +EOF +} +clear +header_info +echo -e "\n Loading..." +GEN_MAC=$(echo 'AE 1A 60'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') @@ -64,16 +76,7 @@ else echo -e "⚠ User exited script \n" exit fi -function header_info { -cat <<"EOF" - __ __ ___ _ __ __ ____ _____ - / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ - / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ -EOF -} function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." From 4fd380b34c19a0020b4ee029cd41bbd02c57ca74 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 18:29:37 -0500 Subject: [PATCH 0728/3335] Delete haos-vm-tteck.sh --- vm/haos-vm-tteck.sh | 276 -------------------------------------------- 1 file changed, 276 deletions(-) delete mode 100644 vm/haos-vm-tteck.sh diff --git a/vm/haos-vm-tteck.sh b/vm/haos-vm-tteck.sh deleted file mode 100644 index 668325c2..00000000 --- a/vm/haos-vm-tteck.sh +++ /dev/null @@ -1,276 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') -NEXTID=$(pvesh get /cluster/nextid) -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -HA=`echo "\033[1;34m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - [ ! -z ${VMID-} ] && cleanup_vmid - exit $EXIT -} -function cleanup_vmid() { - if $(qm status $VMID &>/dev/null); then - if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then - qm stop $VMID - fi - qm destroy $VMID - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" - echo "Exiting..." - sleep 3 - exit -fi -if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { -cat <<"EOF" - __ __ ___ _ __ __ ____ _____ - / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ - / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - HN=haos${STABLE} - echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" - CORE_COUNT="2" - echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" -} -function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 4 \ -"$STABLE" "Stable" ON \ -"$BETA" "Beta" OFF \ -"$DEV" "Dev" OFF \ -"$LATEST" "Latest" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; -fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $MAC1 ]; then MAC="$GEN_MAC"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"; -else - if [ $exitstatus = 0 ]; then MAC="$MAC1"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"; fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" -else - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" - START_VM="no" -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} -function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} -start_script -msg_info "Validating Storage" -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi -STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content images | awk 'NR>1') -VALID=$(pvesm status -content images | awk 'NR>1') -if [ -z "$VALID" ]; then -msg_error "Unable to detect a valid storage location." - exit -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the HAOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" -if [ "$BRANCH" == "$DEV" ]; then -URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -else -URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -fi -sleep 2 -msg_ok "${CL}${BL}${URL}${CL}" -wget -q --show-progress $URL -echo -en "\e[1A\e[0K" -FILE=$(basename $URL) -msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" -msg_info "Extracting KVM Disk Image" -unxz $FILE -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DISK_IMPORT="-format qcow2" - ;; - btrfs) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_FORMAT="subvol" - DISK_IMPORT="-format raw" - ;; -esac -for i in {0,1}; do - disk="DISK$i" - eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} - eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} -done -msg_ok "Extracted KVM Disk Image" -msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ - -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null -qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ - -scsi0 ${DISK1_REF},discard=on,size=32G,ssd=1 >/dev/null -qm set $VMID \ - -boot order=scsi0 >/dev/null -qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}(${HN})" -if [ "$START_VM" == "yes" ]; then -msg_info "Starting Home Assistant OS VM" -qm start $VMID -msg_ok "Started Home Assistant OS VM" -fi -msg_ok "Completed Successfully!\n" From 588b7b5942f21ca5265be9d7cd54bfa0dbe0fd7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 19:09:02 -0500 Subject: [PATCH 0729/3335] Update haos-vm-v4.sh set minimum PVE version 7.2 --- vm/haos-vm-v4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 6ff12f64..ee2c7cd2 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -62,9 +62,9 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then +if [ `pveversion | grep "pve-manager/7.2" | wc -l` -ne 1 ]; then echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" + echo "Requires PVE Version: =>7.2" echo "Exiting..." sleep 3 exit From b402e0d5fe7b68d14fae5ecef769f45fabece532 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 19:54:25 -0500 Subject: [PATCH 0730/3335] Update haos-vm-v4.sh --- vm/haos-vm-v4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index ee2c7cd2..6c321bfb 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -62,7 +62,7 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7.2" | wc -l` -ne 1 ]; then +if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then echo "⚠ This version of Proxmox Virtual Environment is not supported" echo "Requires PVE Version: =>7.2" echo "Exiting..." From 1a876727af51c06f1365a1c20910fcf3c5f2f357 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 20:18:51 -0500 Subject: [PATCH 0731/3335] Update haos-vm-v4.sh fix minimum PVE check --- vm/haos-vm-v4.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 6c321bfb..85e12e84 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -62,13 +62,15 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then +if [ `pveversion | grep "pve-manager/7.2" | wc -l` -ne 1 ]; then + if [ `pveversion | grep "pve-manager/7.3" | wc -l` -ne 1 ]; then echo "⚠ This version of Proxmox Virtual Environment is not supported" echo "Requires PVE Version: =>7.2" echo "Exiting..." sleep 3 exit -fi + fi +fi if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" else From a0f9a1c20de708094229dfca90e924e1ac980018 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 2 Jan 2023 20:37:59 -0500 Subject: [PATCH 0732/3335] Update haos-vm-v4.sh tweak --- vm/haos-vm-v4.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index 85e12e84..c66b2e6f 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -62,14 +62,12 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7.2" | wc -l` -ne 1 ]; then - if [ `pveversion | grep "pve-manager/7.3" | wc -l` -ne 1 ]; then +if [ `pveversion | grep "pve-manager/7.2\|7.3" | wc -l` -ne 1 ]; then echo "⚠ This version of Proxmox Virtual Environment is not supported" echo "Requires PVE Version: =>7.2" echo "Exiting..." sleep 3 exit - fi fi if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" From cdf10a1c95388f3c473ec136e90b5cbbf710f644 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 07:15:12 -0500 Subject: [PATCH 0733/3335] Update vaultwarden-v5.sh remove update redirects --- ct/vaultwarden-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index f7e9b34e..2f7d16ae 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -330,9 +330,9 @@ systemctl stop vaultwarden.service msg_ok "Stopped Vaultwarden" msg_info "Updating VaultWarden to $VAULT (Patience)" -git clone https://github.com/dani-garcia/vaultwarden &>/dev/null +git clone https://github.com/dani-garcia/vaultwarden cd vaultwarden -cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null +cargo build --features "sqlite,mysql,postgresql" --release DIR=/usr/bin/vaultwarden if [ -d "$DIR" ]; then cp target/release/vaultwarden /usr/bin/ From f0964ac751d4d4d0e51f588ba43b5dd21b30a964 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 07:29:03 -0500 Subject: [PATCH 0734/3335] Update homeassistant-core-v5.sh Dependency Version issue fixed in Beta --- ct/homeassistant-core-v5.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index ce167db9..195be24c 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -351,16 +351,10 @@ source /srv/homeassistant/bin/activate pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" -msg_info "Setting Dependency Versions" - if [ "${BR}" == "--pre " ]; then - sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt - sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json - else + if [ "${BR}" == "" ]; then sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json fi -sleep 2 -msg_ok "Set Dependency Versions" msg_info "Starting Home Assistant" systemctl start homeassistant From c26fe0e79058db8ae73dd5b31eafa20c308af030 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 07:53:28 -0500 Subject: [PATCH 0735/3335] Update adguard-v5.sh add endpoint in notes --- ct/adguard-v5.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 7255389e..ed6b2621 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -370,6 +370,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC +Setup http://${IP}:3000 +http://${IP} ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" From 7f076f04629aaf1ea5bd79919f16fcafeab40324 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 07:56:44 -0500 Subject: [PATCH 0736/3335] Update adguard-v5.sh tweak --- ct/adguard-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index ed6b2621..0f9fd64b 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -371,6 +371,7 @@ lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/ IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC Setup http://${IP}:3000 + http://${IP} ### https://tteck.github.io/Proxmox/ " From 8484a5fd27ffe4df40c9e559af26564f5f0a9431 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 08:01:23 -0500 Subject: [PATCH 0737/3335] Update adguard-v5.sh tweak --- ct/adguard-v5.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 0f9fd64b..92aaeabf 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -370,9 +370,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -Setup http://${IP}:3000 - -http://${IP} +### Setup http://${IP}:3000 +### http://${IP} ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" From 313f1d7c8462eed2ff8e5dfd024e6722ef894b37 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 08:05:05 -0500 Subject: [PATCH 0738/3335] Update adguard-v5.sh tweak --- ct/adguard-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 92aaeabf..7066f8ac 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -370,8 +370,8 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -### Setup http://${IP}:3000 -### http://${IP} +#### Setup http://${IP}:3000 +#### http://${IP} ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" From 2827c54ef87a038818f32fe01f67f5d45a17b8b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 08:25:02 -0500 Subject: [PATCH 0739/3335] Update adguard-v5.sh revert endpoint in notes --- ct/adguard-v5.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 7066f8ac..7255389e 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -370,8 +370,6 @@ msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC -#### Setup http://${IP}:3000 -#### http://${IP} ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" From 44168d628f0ffdfd74602c9765e8cfb089341d3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 09:00:43 -0500 Subject: [PATCH 0740/3335] Create uptimekuma-v5.sh --- ct/uptimekuma-v5.sh | 377 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 ct/uptimekuma-v5.sh diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh new file mode 100644 index 00000000..2bbad0d6 --- /dev/null +++ b/ct/uptimekuma-v5.sh @@ -0,0 +1,377 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ __ _ __ __ + / / / /___ / /_(_)___ ___ ___ v5 / //_/_ ______ ___ ____ _ + / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / +/ /_/ / /_/ / /_/ / / / / / / __/ / /| / /_/ / / / / / / /_/ / +\____/ .___/\__/_/_/ /_/ /_/\___/ /_/ |_\__,_/_/ /_/ /_/\__,_/ + /_/ + +EOF +} +echo -e "Loading..." +APP="Uptime Kuma" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/uptime-kuma ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping ${APP}" +sudo systemctl stop uptime-kuma &>/dev/null +msg_ok "Stopped ${APP}" + +cd /opt/uptime-kuma + +msg_info "Pulling ${APP} ${LATEST}" +git fetch --all &>/dev/null +git checkout $LATEST --force &>/dev/null +git pull &>/dev/null +msg_ok "Pulled ${APP} ${LATEST}" + +msg_info "Updating ${APP} to ${LATEST}" +npm install --production &>/dev/null +npm run download-dist &>/dev/null +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +sudo systemctl start uptime-kuma &>/dev/null +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3001${CL} \n" From 0a910530aafc7118c118292a82294cca71e54db3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 09:02:07 -0500 Subject: [PATCH 0741/3335] Create uptimekuma-v5-install.sh --- install/uptimekuma-v5-install.sh | 147 +++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 install/uptimekuma-v5-install.sh diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh new file mode 100644 index 00000000..87e80bc2 --- /dev/null +++ b/install/uptimekuma-v5-install.sh @@ -0,0 +1,147 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD sudo apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Uptime Kuma" +$STD git clone https://github.com/louislam/uptime-kuma.git +mv uptime-kuma /opt/uptime-kuma +cd /opt/uptime-kuma +$STD npm run setup +msg_ok "Installed Uptime Kuma" + +msg_info "Creating Service" +service_path="/etc/systemd/system/uptime-kuma.service" +echo "[Unit] +Description=uptime-kuma + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/uptime-kuma +ExecStart=/usr/bin/npm start + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now uptime-kuma.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 8dcfdff45757302de49251ecd049eb878cd794d2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 10:22:39 -0500 Subject: [PATCH 0742/3335] Update uptimekuma-v5.sh tweak --- ct/uptimekuma-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 2bbad0d6..b867ffe4 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -311,6 +311,7 @@ function install_script() { function update_script() { clear header_info +LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Stopping ${APP}" sudo systemctl stop uptime-kuma &>/dev/null msg_ok "Stopped ${APP}" From fb7c87245c1ef3017890b8bd655f07503514d64a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 10:44:48 -0500 Subject: [PATCH 0743/3335] Update uptimekuma-v5.sh --- ct/uptimekuma-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index b867ffe4..6a5c16a1 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -321,7 +321,6 @@ cd /opt/uptime-kuma msg_info "Pulling ${APP} ${LATEST}" git fetch --all &>/dev/null git checkout $LATEST --force &>/dev/null -git pull &>/dev/null msg_ok "Pulled ${APP} ${LATEST}" msg_info "Updating ${APP} to ${LATEST}" From 2b88f1567ce1e5fe32e660f2b820dd8f747b2f01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 10:47:50 -0500 Subject: [PATCH 0744/3335] Delete uptimekuma-update.sh prune --- misc/uptimekuma-update.sh | 74 --------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 misc/uptimekuma-update.sh diff --git a/misc/uptimekuma-update.sh b/misc/uptimekuma-update.sh deleted file mode 100644 index be946ea7..00000000 --- a/misc/uptimekuma-update.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash -ex -LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Uptime Kuma" -while true; do - read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${DGN} - _ _ _ _ _ __ - | | | | | | (_) | |/ / - | | | |_v3_ | |_ _ _ __ ___ ___ | ' /_ _ _ __ ___ __ _ - | | | | _ \| __| | _ _ \ / _ \ | <| | | | _ _ \ / _ | - | |__| | |_) | |_| | | | | | | __/ | . \ |_| | | | | | | (_| | - \____/| .__/ \__|_|_| |_| |_|\___| |_|\_\__,_|_| |_| |_|\__,_| - | | - |_| UPDATE -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -if [ ! -d "/opt/uptime-kuma" ]; then - echo -e "No Uptime Kuma Directory Found." - exit -fi - -msg_info "Stopping ${APP}" -sudo systemctl stop uptime-kuma &>/dev/null -msg_ok "Stopped ${APP}" - -cd /opt/uptime-kuma - -msg_info "Pulling ${APP} ${LATEST}" -git fetch --all &>/dev/null -git checkout $LATEST --force &>/dev/null -git pull &>/dev/null -msg_ok "Pulled ${APP} ${LATEST}" - -msg_info "Updating ${APP} to ${LATEST}" -npm install --production &>/dev/null -npm run download-dist &>/dev/null -msg_ok "Updated ${APP}" - -msg_info "Starting ${APP}" -sudo systemctl start uptime-kuma &>/dev/null -msg_ok "Started ${APP}" - -msg_ok "Done!" From 3c651637d8aac9caa3878172810baef98c3d251e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 11:32:21 -0500 Subject: [PATCH 0745/3335] Create pihole-v5-install.sh --- install/pihole-v5-install.sh | 138 +++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 install/pihole-v5-install.sh diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh new file mode 100644 index 00000000..300ed2d8 --- /dev/null +++ b/install/pihole-v5-install.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +export DEBIAN_FRONTEND=noninteractive +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y ufw +$STD apt-get install -y ntp +msg_ok "Installed Dependencies" + +msg_info "Installing Pi-hole" +mkdir -p /etc/pihole/ +cat </etc/pihole/setupVars.conf +PIHOLE_INTERFACE=eth0 +PIHOLE_DNS_1=8.8.8.8 +PIHOLE_DNS_2=8.8.4.4 +QUERY_LOGGING=true +INSTALL_WEB_SERVER=true +INSTALL_WEB_INTERFACE=true +LIGHTTPD_ENABLED=true +CACHE_SIZE=10000 +DNS_FQDN_REQUIRED=true +DNS_BOGUS_PRIV=true +DNSMASQ_LISTENING=local +WEBPASSWORD=$(openssl rand -base64 48) +BLOCKING_ENABLED=true +EOF + +$STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended +msg_ok "Installed Pi-hole" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 78580ba07408e2097b0fbbad65f0cf9d8dea14b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 11:34:24 -0500 Subject: [PATCH 0746/3335] Create pihole-v5.sh --- ct/pihole-v5.sh | 360 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/pihole-v5.sh diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh new file mode 100644 index 00000000..0de027c9 --- /dev/null +++ b/ct/pihole-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ ____ __ ______ __ ______ + / __ \/ _/ / / / / __ \/ / / ____/ + / /_/ // /___/ /_/ / / / / / / __/ + / ____// /___/ __ / /_/ / /v5_/ /___ +/_/ /___/ /_/ /_/\____/_____/_____/ + +EOF +} +echo -e "Loading..." +APP="Pihole" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/admin${CL} \n" From f00f6b31daa3c635c76f04ba1e4e4e4e828eeb6d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 11:38:18 -0500 Subject: [PATCH 0747/3335] Update pihole-v5.sh --- ct/pihole-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 0de027c9..3357d5c0 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -81,7 +81,7 @@ if command -v pveversion >/dev/null 2>&1; then fi fi if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; exit fi From 7f910107d391aca413aad68011a8450361eba8d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 12:12:53 -0500 Subject: [PATCH 0748/3335] Update vaultwarden-v5.sh --- ct/vaultwarden-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 2f7d16ae..6f69bed5 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -330,6 +330,7 @@ systemctl stop vaultwarden.service msg_ok "Stopped Vaultwarden" msg_info "Updating VaultWarden to $VAULT (Patience)" +cd ~ && rm -rf vaultwarden git clone https://github.com/dani-garcia/vaultwarden cd vaultwarden cargo build --features "sqlite,mysql,postgresql" --release From 8c9b48f15c4781712f66fccb3b520c46cab29dc7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 12:34:19 -0500 Subject: [PATCH 0749/3335] Update vaultwarden-v5.sh revert "remove update redirects" --- ct/vaultwarden-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 6f69bed5..d157cd11 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -331,9 +331,9 @@ msg_ok "Stopped Vaultwarden" msg_info "Updating VaultWarden to $VAULT (Patience)" cd ~ && rm -rf vaultwarden -git clone https://github.com/dani-garcia/vaultwarden +git clone https://github.com/dani-garcia/vaultwarden &>/dev/null cd vaultwarden -cargo build --features "sqlite,mysql,postgresql" --release +cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null DIR=/usr/bin/vaultwarden if [ -d "$DIR" ]; then cp target/release/vaultwarden /usr/bin/ From 1b7e8c2a2dadd17b29c26a99c2c23fd0c6100037 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 12:58:41 -0500 Subject: [PATCH 0750/3335] Create heimdalldashboard-v5.sh --- ct/heimdalldashboard-v5.sh | 439 +++++++++++++++++++++++++++++++++++++ 1 file changed, 439 insertions(+) create mode 100644 ct/heimdalldashboard-v5.sh diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh new file mode 100644 index 00000000..becc47e9 --- /dev/null +++ b/ct/heimdalldashboard-v5.sh @@ -0,0 +1,439 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ _ _ _ ___ _ _ _ + /\ /\___(_)_ __ ___ __| | __ _| | | / \__ _ ___| |__ | |__ ___ __ _ _ __ __| | + / /_/ / _ \ | '_ ` _ \ / _` |/ _` | | | / /\ / _` / __| '_ \| '_ \ / _ \ / _` | '__/ _` | +/ __ / __/ | | | | | | (_| | (_| | | |v5/ /_// (_| \__ \ | | | |_) | (_) | (_| | | | (_| | +\/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_| /___,' \__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_| + +EOF +} +echo -e "Loading..." +APP="Heimdall Dashboard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/Heimdall ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping ${APP}" +systemctl disable heimdall.service &>/dev/null +systemctl stop heimdall +sleep 1 +msg_ok "Stopped ${APP}" + +msg_info "Backing up Data" +if [ -d "/opt/Heimdall-2.4.6" ]; then + cp -R /opt/Heimdall-2.4.6/database database-backup + cp -R /opt/Heimdall-2.4.6/public public-backup +elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then + cp -R /opt/Heimdall-2.4.7b/database database-backup + cp -R /opt/Heimdall-2.4.7b/public public-backup +elif [[ -d "/opt/Heimdall-2.4.8" ]]; then + cp -R /opt/Heimdall-2.4.8/database database-backup + cp -R /opt/Heimdall-2.4.8/public public-backup +else + cp -R /opt/Heimdall/database database-backup + cp -R /opt/Heimdall/public public-backup +fi +sleep 1 +msg_ok "Backed up Data" + +RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +msg_info "Updating Heimdall Dashboard to ${RELEASE}" +curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null +tar xvzf ${RELEASE}.tar.gz &>/dev/null +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +if [ ! -d "/opt/Heimdall" ]; then + mv Heimdall-${VER} /opt/Heimdall +else + cp -R Heimdall-${VER}/* /opt/Heimdall +fi + +service_path="/etc/systemd/system/heimdall.service" +echo "[Unit] +Description=Heimdall +After=network.target +[Service] +Restart=always +RestartSec=5 +Type=simple +User=root +WorkingDirectory=/opt/Heimdall +ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 +TimeoutStopSec=30 +[Install] +WantedBy=multi-user.target" >$service_path +msg_ok "Updated Heimdall Dashboard to ${RELEASE}" + +msg_info "Restoring Data" +cp -R database-backup/* /opt/Heimdall/database +cp -R public-backup/* /opt/Heimdall/public +sleep 1 +msg_ok "Restored Data" + +msg_info "Cleanup" +if [ -d "/opt/Heimdall-2.4.6" ]; then + rm -rf /opt/Heimdall-2.4.6 + rm -rf /opt/v2.4.6.tar.gz +elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then + rm -rf /opt/Heimdall-2.4.7b + rm -rf /opt/v2.4.7b.tar.gz +elif [[ -d "/opt/Heimdall-2.4.8" ]]; then + rm -rf /opt/Heimdall-2.4.8 + rm -rf /opt/v2.4.8.tar.gz +fi + +rm -rf ${RELEASE}.tar.gz +rm -rf Heimdall-${VER} +rm -rf public-backup +rm -rf database-backup +rm -rf Heimdall +sleep 1 +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl enable --now heimdall.service &>/dev/null +sleep 2 +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7990${CL} \n" From 7bb1329a801eca8feb532d572171f45517d460ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 13:00:03 -0500 Subject: [PATCH 0751/3335] Create heimdalldashboard-v5-install.sh --- install/heimdalldashboard-v5-install.sh | 151 ++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 install/heimdalldashboard-v5-install.sh diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh new file mode 100644 index 00000000..41185b39 --- /dev/null +++ b/install/heimdalldashboard-v5-install.sh @@ -0,0 +1,151 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing PHP" +$STD apt-get install -y php +$STD apt-get install -y php-sqlite3 +$STD apt-get install -y php-zip +msg_ok "Installed PHP" + +RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +msg_info "Installing Heimdall Dashboard ${RELEASE}" +$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" +$STD tar xvzf ${RELEASE}.tar.gz +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') +rm -rf ${RELEASE}.tar.gz +mv Heimdall-${VER} /opt/Heimdall +msg_ok "Installed Heimdall Dashboard ${RELEASE}" + +msg_info "Creating Service" +service_path="/etc/systemd/system/heimdall.service" +echo "[Unit] +Description=Heimdall +After=network.target + +[Service] +Restart=always +RestartSec=5 +Type=simple +User=root +WorkingDirectory=/opt/Heimdall +ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 +TimeoutStopSec=30 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD sudo systemctl enable --now heimdall.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From fbbe3e64c1f0449c424217a861378c8a739cd7c3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 13:00:42 -0500 Subject: [PATCH 0752/3335] Update heimdalldashboard-v5.sh --- ct/heimdalldashboard-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index becc47e9..5ed5886b 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -429,7 +429,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ From acb4d7c0e8b815bf818d169a2c483ed6b38b65de Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 14:29:38 -0500 Subject: [PATCH 0753/3335] Create grafana-v5-install.sh --- install/grafana-v5-install.sh | 131 ++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 install/grafana-v5-install.sh diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh new file mode 100644 index 00000000..7647e08f --- /dev/null +++ b/install/grafana-v5-install.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +$STD apt-get install -y apt-transport-https +$STD apt-get install -y software-properties-common +msg_ok "Installed Dependencies" + +msg_info "Setting up Grafana Repository" +$STD apt-key add <(curl -fsSL https://packages.grafana.com/gpg.key) +cat </etc/apt/sources.list.d/grafana.list +deb https://packages.grafana.com/oss/deb stable main +EOF +msg_ok "Set up Grafana Repository" + +msg_info "Installing Grafana" +$STD apt-get update +$STD apt-get install -y grafana +msg_ok "Installed Grafana" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi +systemctl start grafana-server +$STD systemctl enable grafana-server.service + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 2062a81b0bfedeb5f526a62cd6957e4f442f5a71 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 14:31:18 -0500 Subject: [PATCH 0754/3335] Create grafana-v5.sh --- ct/grafana-v5.sh | 360 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/grafana-v5.sh diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh new file mode 100644 index 00000000..9eace3c6 --- /dev/null +++ b/ct/grafana-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ ____ + / ____/________ _/ __/___ _____v5____ _ + / / __/ ___/ __ / /_/ __ / __ \/ __ / +/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / +\____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ + +EOF +} +echo -e "Loading..." +APP="Grafana" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From b18212e89e07b1fa089ba2f77becfcf3edfeafd4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 15:58:26 -0500 Subject: [PATCH 0755/3335] Create wireguard-v5.sh --- ct/wireguard-v5.sh | 408 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 408 insertions(+) create mode 100644 ct/wireguard-v5.sh diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh new file mode 100644 index 00000000..33cfc4cd --- /dev/null +++ b/ct/wireguard-v5.sh @@ -0,0 +1,408 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ ___ ______ __ +| | / (_)_______ / ____/_ ______ __________/ / +| | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ / +| |/ |/ / / / / __/ /_/ / /_/ / /_/ / / / /_/ / +|__/|__/_/_/ v5\___/\____/\__,_/\__,_/_/ \__,_/ + +EOF +} +echo -e "Loading..." +APP="Wireguard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/pivpn/wireguard ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Update ${APP} LXC" ON \ + "2" "Install WGDashboard" OFF \ + 3>&1 1>&2 2>&3) +clear +header_info +if [ "$UPD" == "1" ]; then +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +fi +if [ "$UPD" == "2" ]; then +IP=$(hostname -I | awk '{print $1}') +msg_info "Installing pip3" +apt-get install -y python3-pip &>/dev/null +pip install flask &>/dev/null +pip install ifcfg &>/dev/null +pip install flask_qrcode &>/dev/null +pip install icmplib &>/dev/null +msg_ok "Installed pip3" + +msg_info "Installing WGDashboard" +WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + +git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null +cd /etc/wgdashboard/src +sudo chmod u+x wgd.sh +sudo ./wgd.sh install &>/dev/null +sudo chmod -R 755 /etc/wireguard +msg_ok "Installed WGDashboard" + +msg_info "Creating Service" +service_path="/etc/systemd/system/wg-dashboard.service" +echo "[Unit] +After=netword.service + +[Service] +WorkingDirectory=/etc/wgdashboard/src +ExecStart=/usr/bin/python3 /etc/wgdashboard/src/dashboard.py +Restart=always + + +[Install] +WantedBy=default.target" >$service_path +chmod 664 /etc/systemd/system/wg-dashboard.service +systemctl daemon-reload +systemctl enable wg-dashboard.service &>/dev/null +systemctl start wg-dashboard.service &>/dev/null +msg_ok "Created Service" +echo -e "WGDashboard should be reachable by going to the following URL. + ${BL}http://${IP}:10086${CL} admin|admin \n" +exit +fi +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 7720c05b2837f57af6db918366894810aff73fe5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 15:58:54 -0500 Subject: [PATCH 0756/3335] Update wireguard-v5.sh --- ct/wireguard-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 33cfc4cd..aa13e0b2 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -400,7 +400,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ From edc1e16bf1e4b452cd3c4c82d358e80daa68083a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 16:00:07 -0500 Subject: [PATCH 0757/3335] Create wireguard-v5-install.sh --- install/wireguard-v5-install.sh | 136 ++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 install/wireguard-v5-install.sh diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh new file mode 100644 index 00000000..10da01e4 --- /dev/null +++ b/install/wireguard-v5-install.sh @@ -0,0 +1,136 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +OPTIONS_PATH='/options.conf' +cat >$OPTIONS_PATH <<'EOF' +IPv4dev=eth0 +install_user=root +VPN=wireguard +pivpnNET=10.6.0.0 +subnetClass=24 +ALLOWED_IPS="0.0.0.0/0, ::0/0" +pivpnMTU=1420 +pivpnPORT=51820 +pivpnDNS1=1.1.1.1 +pivpnDNS2=8.8.8.8 +pivpnHOST= +pivpnPERSISTENTKEEPALIVE=25 +UNATTUPG=1 +EOF + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gunicorn +msg_ok "Installed Dependencies" + +msg_info "Installing WireGuard (using pivpn.io)" +$STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf +msg_ok "Installed WireGuard" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 66da79154cac6d5b5f57632b8bf65608302418b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 17:23:42 -0500 Subject: [PATCH 0758/3335] Create jellyfin-v5.sh --- ct/jellyfin-v5.sh | 381 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 381 insertions(+) create mode 100644 ct/jellyfin-v5.sh diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh new file mode 100644 index 00000000..06d532e0 --- /dev/null +++ b/ct/jellyfin-v5.sh @@ -0,0 +1,381 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ____ _____ + / /__ / / /_v5__/ __(_)___ + __ / / _ \/ / / / / / /_/ / __ \ +/ /_/ / __/ / / /_/ / __/ / / / / +\____/\___/_/_/\__, /_/ /_/_/ /_/ + /____/ + +EOF +} +echo -e "Loading..." +APP="Jellyfin" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /usr/lib/jellyfin ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file +EOF +fi +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8096${CL}\n" From 61123bbd0781927d020c191d284ed2c863cf3cc2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 3 Jan 2023 17:24:51 -0500 Subject: [PATCH 0759/3335] Create jellyfin-v5-install.sh --- install/jellyfin-v5-install.sh | 160 +++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 install/jellyfin-v5-install.sh diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh new file mode 100644 index 00000000..7038cd18 --- /dev/null +++ b/install/jellyfin-v5-install.sh @@ -0,0 +1,160 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y apt-transport-https +$STD apt-get install -y software-properties-common +msg_ok "Installed Dependencies" + +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 \ + beignet-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 "Setting Up Jellyfin Repository" +$STD add-apt-repository universe -y +$STD apt-key add <(curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key) +cat </etc/apt/sources.list.d/jellyfin.list +deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal main +EOF +msg_ok "Set Up Jellyfin Repository" + +msg_info "Installing Jellyfin" +$STD apt-get update +$STD apt install jellyfin-server -y +$STD apt install jellyfin-ffmpeg -y +msg_ok "Installed Jellyfin" + +msg_info "Creating Service" +cat <<'EOF' >/lib/systemd/system/jellyfin.service +[Unit] +Description = Jellyfin Media Server +After = network.target +[Service] +Type = simple +EnvironmentFile = /etc/default/jellyfin +User = root +ExecStart = /usr/bin/jellyfin +Restart = on-failure +TimeoutSec = 15 +[Install] +WantedBy = multi-user.target +EOF +ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From fd25ff3b7a27cf93d7f868d90ca3e4502396fe34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:10:07 -0500 Subject: [PATCH 0760/3335] Create wikijs-v5-install.sh --- install/wikijs-v5-install.sh | 163 +++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 install/wikijs-v5-install.sh diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh new file mode 100644 index 00000000..3b7a1cea --- /dev/null +++ b/install/wikijs-v5-install.sh @@ -0,0 +1,163 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Wiki.js" +mkdir -p /opt/wikijs +cd /opt/wikijs +$STD wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz +tar xzf wiki-js.tar.gz +rm wiki-js.tar.gz + +cat </opt/wikijs/config.yml +bindIP: 0.0.0.0 +port: 3000 +db: + type: sqlite + storage: /opt/wikijs/db.sqlite +logLevel: info +logFormat: default +dataPath: /opt/wikijs/data +bodyParserLimit: 5mb +EOF +$STD npm rebuild sqlite3 +msg_ok "Installed Wiki.js" + +msg_info "Creating Service" +service_path="/etc/systemd/system/wikijs.service" + +echo "[Unit] +Description=Wiki.js +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/node server +Restart=always +User=root +Environment=NODE_ENV=production +WorkingDirectory=/opt/wikijs + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now wikijs +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From c9d8bff31577a09ebc22ae0db86c01b469fd7bda Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:11:28 -0500 Subject: [PATCH 0761/3335] Create wikijs-v5.sh --- ct/wikijs-v5.sh | 373 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 ct/wikijs-v5.sh diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh new file mode 100644 index 00000000..772a9212 --- /dev/null +++ b/ct/wikijs-v5.sh @@ -0,0 +1,373 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ ___ __ _ _ +| | v5 / (_) /__(_) (_)____ +| | /| / / / //_/ / / / ___/ +| |/ |/ / / ,< / / / (__ ) +|__/|__/_/_/|_/_(_)_/ /____/ + /___/ + +EOF +} +echo -e "Loading..." +APP="Wikijs" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/wikijs ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping ${APP}" +systemctl stop wikijs +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +cp /opt/wiki/config.yml ~/config.yml.bak +rm -rf /opt/wiki/* +cd /opt/wiki +wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null +tar xzf wiki-js.tar.gz +cp ~/config.yml.bak ./config.yml +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl stop wikijs +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 6ba1afdd45c0c7f85b470745929da097c8c50eca Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:12:31 -0500 Subject: [PATCH 0762/3335] Create whoogle-v5.sh --- ct/whoogle-v5.sh | 359 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 359 insertions(+) create mode 100644 ct/whoogle-v5.sh diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh new file mode 100644 index 00000000..aeda75c5 --- /dev/null +++ b/ct/whoogle-v5.sh @@ -0,0 +1,359 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ ____ ______ ____ ________ ______ +| | v5 / / / / / __ \/ __ \/ ____/ / / ____/ +| | /| / / /_/ / / / / / / / / __/ / / __/ +| |/ |/ / __ / /_/ / /_/ / /_/ / /___/ /___ +|__/|__/_/ /_/\____/\____/\____/_____/_____/ + +EOF +} +echo -e "Loading..." +APP="Whoogle" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /usr/local/bin/whoogle-search ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +pip3 install whoogle-search --upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From ac6bfab23841b809bf19cdc52cf298e02883f996 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:13:30 -0500 Subject: [PATCH 0763/3335] Create whoogle-v5-install.sh --- install/whoogle-v5-install.sh | 135 ++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 install/whoogle-v5-install.sh diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh new file mode 100644 index 00000000..c8cb5ed3 --- /dev/null +++ b/install/whoogle-v5-install.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing pip3" +$STD apt-get install -y python3-pip +msg_ok "Installed pip3" + +msg_info "Installing Whoogle" +$STD pip install brotli +$STD pip install whoogle-search + +service_path="/etc/systemd/system/whoogle.service" +echo "[Unit] +Description=Whoogle-Search +After=network.target +[Service] +ExecStart=/usr/local/bin/whoogle-search --host 0.0.0.0 +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path + +$STD systemctl enable --now whoogle.service +msg_ok "Installed Whoogle" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 771af5224f3295dbeb7c95035f7342e28c98f1ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:14:28 -0500 Subject: [PATCH 0764/3335] Create unifi-v5-install.sh --- install/unifi-v5-install.sh | 127 ++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 install/unifi-v5-install.sh diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh new file mode 100644 index 00000000..6b8f7bfd --- /dev/null +++ b/install/unifi-v5-install.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +#https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +read -r -p "Local Controller? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + LOCAL="--local-controller" +else + LOCAL="" +fi + +msg_info "Installing UniFi Network Application (Patience)" +wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh +$STD bash unifi-latest.sh --skip --add-repository $LOCAL +msg_ok "Installed UniFi Network Application" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From def818b9339e9ab6d561f31e85b73f85ac64e73b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:15:49 -0500 Subject: [PATCH 0765/3335] Create unifi-v5.sh --- ct/unifi-v5.sh | 360 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/unifi-v5.sh diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh new file mode 100644 index 00000000..2f7ca498 --- /dev/null +++ b/ct/unifi-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ _ _____ + / / / /_v5 (_) __(_) + / / / / __ \/ / /_/ / +/ /_/ / / / / / __/ / +\____/_/ /_/_/_/ /_/ + +EOF +} +echo -e "Loading..." +APP="Unifi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /usr/lib/unifi ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP}" +wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh +bash unifi-update.sh +msg_ok "Updated ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP}${CL} should be reachable by going to the following URL. + ${BL}https://${IP}:8443${CL} \n" From 95530edc10a9e2210c3a6be310de0d7f555d78c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:16:52 -0500 Subject: [PATCH 0766/3335] Create umbrel-v5.sh --- ct/umbrel-v5.sh | 373 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 ct/umbrel-v5.sh diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh new file mode 100644 index 00000000..a3b29936 --- /dev/null +++ b/ct/umbrel-v5.sh @@ -0,0 +1,373 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ __ __ + / / / /___ ___v5/ /_ ________ / / + / / / / __ `__ \/ __ \/ ___/ _ \/ / +/ /_/ / / / / / / /_/ / / / __/ / +\____/_/ /_/ /_/_.___/_/ \___/_/ + +EOF +} +echo -e "Loading..." +APP="Umbrel" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /root/umbrel ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" +else +FEATURES="keyctl=1,nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export ST=$FUSE +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL (reboot is required before app installs). + ${BL}http://${IP} ${CL} \n" From 97e08ba8e144ba74db60accad7d90d61461e1a45 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:17:47 -0500 Subject: [PATCH 0767/3335] Create umbrel-v5-install.sh --- install/umbrel-v5-install.sh | 134 +++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 install/umbrel-v5-install.sh diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh new file mode 100644 index 00000000..e14653a6 --- /dev/null +++ b/install/umbrel-v5-install.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +cat >$DOCKER_CONFIG_PATH <<'EOF' +{ + "log-driver": "journald" +} +EOF + +msg_info "Installing Umbrel (Patience)" +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +fi +$STD bash <(curl -fsSL https://umbrel.sh) +systemctl daemon-reload +$STD systemctl enable --now umbrel-startup.service +msg_ok "Installed Umbrel" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 0d7f88d1086e47f844079c2db3552b4a32611419 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:19:13 -0500 Subject: [PATCH 0768/3335] Create ubuntu-v5-install.sh --- install/ubuntu-v5-install.sh | 134 +++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 install/ubuntu-v5-install.sh diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh new file mode 100644 index 00000000..e14653a6 --- /dev/null +++ b/install/ubuntu-v5-install.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +cat >$DOCKER_CONFIG_PATH <<'EOF' +{ + "log-driver": "journald" +} +EOF + +msg_info "Installing Umbrel (Patience)" +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +fi +$STD bash <(curl -fsSL https://umbrel.sh) +systemctl daemon-reload +$STD systemctl enable --now umbrel-startup.service +msg_ok "Installed Umbrel" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From e6a3a8b37d7316697e5b66c35c5ea22698ee3efe Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:20:16 -0500 Subject: [PATCH 0769/3335] Create ubuntu-v5.sh --- ct/ubuntu-v5.sh | 361 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 ct/ubuntu-v5.sh diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh new file mode 100644 index 00000000..039e5f49 --- /dev/null +++ b/ct/ubuntu-v5.sh @@ -0,0 +1,361 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ____ __ + / / / / /_v5__ ______ / /___ __ + / / / / __ \/ / / / __ \/ __/ / / / +/ /_/ / /_/ / /_/ / / / / /_/ /_/ / +\____/_.___/\__,_/_/ /_/\__/\__,_/ + +EOF +} +echo -e "Loading..." +APP="Ubuntu" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="ubuntu" +var_version="22.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" ON \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 75157905cdfb09b0964d4fc5d5f794f3b0c08830 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:21:35 -0500 Subject: [PATCH 0770/3335] Create trilium-v5.sh --- ct/trilium-v5.sh | 379 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 ct/trilium-v5.sh diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh new file mode 100644 index 00000000..1d705081 --- /dev/null +++ b/ct/trilium-v5.sh @@ -0,0 +1,379 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ _ ___ + /_ __/_v5_(_) (_)_ ______ ___ + / / / ___/ / / / / / / __ `__ \ + / / / / / / / / /_/ / / / / / / +/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ + +EOF +} +echo -e "Loading..." +APP="Trilium" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/trilium/ ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Stopping ${APP}" +systemctl stop trilium.service +sleep 1 +msg_ok "Stopped ${APP}" + +msg_info "Updating to v${RELEASE}" +wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null +cp -r trilium-linux-x64-server/* /opt/trilium/ +msg_ok "Updated to v${RELEASE}" + +msg_info "Cleaning up" +rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl start trilium.service +sleep 1 +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" From 2bb7a48eff1e3c82602fd8b6ee9234acdf8e1df9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:22:38 -0500 Subject: [PATCH 0771/3335] Create trilium-v5-install.sh --- install/trilium-v5-install.sh | 143 ++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 install/trilium-v5-install.sh diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh new file mode 100644 index 00000000..936eb6c6 --- /dev/null +++ b/install/trilium-v5-install.sh @@ -0,0 +1,143 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Installing Trilium" +wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +$STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz +mv trilium-linux-x64-server /opt/trilium +msg_ok "Installed Trilium" + +msg_info "Creating Service" +service_path="/etc/systemd/system/trilium.service" + +echo "[Unit] +Description=Trilium Daemon +After=syslog.target network.target + +[Service] +User=root +Type=simple +ExecStart=/opt/trilium/trilium.sh +WorkingDirectory=/opt/trilium/ +TimeoutStopSec=20 +Restart=always + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q trilium +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz +msg_ok "Cleaned" From 9b5d7da849306abe63205c7166ba13d5d1d6431f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:23:28 -0500 Subject: [PATCH 0772/3335] Create technitiumdns-v5-install.sh --- install/technitiumdns-v5-install.sh | 118 ++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 install/technitiumdns-v5-install.sh diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh new file mode 100644 index 00000000..e3645c7c --- /dev/null +++ b/install/technitiumdns-v5-install.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing Technitium DNS" +$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) +msg_ok "Installed Technitium DNS" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d6d3dcfc390fba2a857655b5a6f9a2d75c3de658 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:24:55 -0500 Subject: [PATCH 0773/3335] Create technitiumdns-v5.sh --- ct/technitiumdns-v5.sh | 422 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 422 insertions(+) create mode 100644 ct/technitiumdns-v5.sh diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh new file mode 100644 index 00000000..245bd0e8 --- /dev/null +++ b/ct/technitiumdns-v5.sh @@ -0,0 +1,422 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ __ _ __ _ ____ _ _______ + /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ v5 / __ \/ | / / ___/ + / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ + / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / +/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ + +EOF +} +echo -e "Loading..." +APP="Technitium DNS" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/dns ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +dotnetDir="/opt/dotnet" +dnsDir="/etc/dns" +dnsTar="/etc/dns/DnsServerPortable.tar.gz" +dnsUrl="https://download.technitium.com/dns/DnsServerPortable.tar.gz" + +mkdir -p $dnsDir +installLog="$dnsDir/install.log" +echo "" >$installLog + +echo "" +echo "===============================" +echo "Technitium DNS Server Update" +echo "===============================" + +if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then + dotnetFound="yes" +else + dotnetFound="no" +fi + +if [ -d $dotnetDir ]; then + dotnetUpdate="yes" + echo "Updating .NET 7 Runtime..." +fi + +curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 7.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1 + +if [ ! -f "/usr/bin/dotnet" ]; then + ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1 +fi + +if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then + if [ "$dotnetUpdate" = "yes" ]; then + echo ".NET 7 Runtime was updated successfully!" + fi +else + echo "Failed to update .NET 7 Runtime. Please try again." + exit 1 +fi + +if curl -o $dnsTar --fail $dnsUrl >>$installLog 2>&1; then + if [ -d $dnsDir ]; then + echo "Updating Technitium DNS Server..." + fi + + tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1 + + if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]; then + if [ -f "/etc/systemd/system/dns.service" ]; then + echo "Restarting systemd service..." + systemctl restart dns.service >>$installLog 2>&1 + fi + + echo "" + echo "Technitium DNS Server was updated successfully!" + else + echo "" + echo "Failed to update Technitium DNS Server: systemd was not detected." + exit 1 + fi +else + echo "" + echo "Failed to download Technitium DNS Server from: $dnsUrl" + exit 1 +fi +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5380${CL} \n" From 9374dab4a5674cb637df89aa8720911b4c0c2b13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:47:09 -0500 Subject: [PATCH 0774/3335] Delete trilium-update.sh prune --- misc/trilium-update.sh | 47 ------------------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 misc/trilium-update.sh diff --git a/misc/trilium-update.sh b/misc/trilium-update.sh deleted file mode 100644 index 5670c49e..00000000 --- a/misc/trilium-update.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -function update_info { - cat <<"EOF" - ______ _ ___ - /_ __/____(_) (_)_ ______ ___ - / / / ___/ / / / / / / __ `__ \ - / / / / / / / / /_/ / / / / / / -/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ - UPDATE - -EOF -} -update_info -while true; do - read -p "This will Update Trilium to v$RELEASE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -sleep 2 -echo -e "${GN} Stopping Trilium... ${CL}" -systemctl stop trilium.service -sleep 1 - -echo -e "${GN} Updating to v${RELEASE}... ${CL}" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz - -tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null -cp -r trilium-linux-x64-server/* /opt/trilium/ -echo -e "${GN} Cleaning up... ${CL}" -rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server - -echo -e "${GN} Starting Trilium... ${CL}" -systemctl start trilium.service -sleep 1 -echo -e "${GN} Finished Update ${CL}" From 0c493fc586fd5b6d65afb8bc4b0e7079f6e89532 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:47:42 -0500 Subject: [PATCH 0775/3335] Delete technitiumdns-update.sh prune --- misc/technitiumdns-update.sh | 67 ------------------------------------ 1 file changed, 67 deletions(-) delete mode 100644 misc/technitiumdns-update.sh diff --git a/misc/technitiumdns-update.sh b/misc/technitiumdns-update.sh deleted file mode 100644 index 88494319..00000000 --- a/misc/technitiumdns-update.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -set -e -dotnetDir="/opt/dotnet" -dnsDir="/etc/dns" -dnsTar="/etc/dns/DnsServerPortable.tar.gz" -dnsUrl="https://download.technitium.com/dns/DnsServerPortable.tar.gz" - -mkdir -p $dnsDir -installLog="$dnsDir/install.log" -echo "" >$installLog - -echo "" -echo "===============================" -echo "Technitium DNS Server Update" -echo "===============================" - -if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then - dotnetFound="yes" -else - dotnetFound="no" -fi - -if [ -d $dotnetDir ]; then - dotnetUpdate="yes" - echo "Updating .NET 7 Runtime..." -fi - -curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 7.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1 - -if [ ! -f "/usr/bin/dotnet" ]; then - ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1 -fi - -if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then - if [ "$dotnetUpdate" = "yes" ]; then - echo ".NET 7 Runtime was updated successfully!" - fi -else - echo "Failed to update .NET 7 Runtime. Please try again." - exit 1 -fi - -if curl -o $dnsTar --fail $dnsUrl >>$installLog 2>&1; then - if [ -d $dnsDir ]; then - echo "Updating Technitium DNS Server..." - fi - - tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1 - - if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]; then - if [ -f "/etc/systemd/system/dns.service" ]; then - echo "Restarting systemd service..." - systemctl restart dns.service >>$installLog 2>&1 - fi - - echo "" - echo "Technitium DNS Server was updated successfully!" - else - echo "" - echo "Failed to update Technitium DNS Server: systemd was not detected." - exit 1 - fi -else - echo "" - echo "Failed to download Technitium DNS Server from: $dnsUrl" - exit 1 -fi From 06093e9588707eaace258cb58124264410dc0616 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 09:48:02 -0500 Subject: [PATCH 0776/3335] Delete unifi-update.sh prune --- misc/unifi-update.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 misc/unifi-update.sh diff --git a/misc/unifi-update.sh b/misc/unifi-update.sh deleted file mode 100644 index 6befdb24..00000000 --- a/misc/unifi-update.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -APP="UniFi Update" -while true; do - read -p "This will run ${APP}. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${RD} - _ _ _ ______ _ - | | | | (_) ____(_) - | | | |_ __ _| |__ _ - | | | | _ \| | __| | | - | |__| | | | | | | | | - \____/|_| |_|_|_| |_| - UPDATE -${CL}" -} - -header_info -sleep 3 -wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh && bash unifi-update.sh From c2efd82b0215846ffea7a72cb35c805921078458 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 11:09:45 -0500 Subject: [PATCH 0777/3335] Create debian-v5-install.sh --- install/debian-v5-install.sh | 112 +++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 install/debian-v5-install.sh diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh new file mode 100644 index 00000000..13ff3d34 --- /dev/null +++ b/install/debian-v5-install.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d4dc586b583325906b00183a21af32ee3a74c41e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 11:11:08 -0500 Subject: [PATCH 0778/3335] Create debian-v5.sh --- ct/debian-v5.sh | 353 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 353 insertions(+) create mode 100644 ct/debian-v5.sh diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh new file mode 100644 index 00000000..5483076f --- /dev/null +++ b/ct/debian-v5.sh @@ -0,0 +1,353 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __________ _______ _ __ + / __ \/ ____/ __ )/ _/ | / | / / + / / / / __/ / __ |/ // /| | / |/ / + / /_/ / /_v5/ /_/ // // ___ |/ /| / +/_____/_____/_____/___/_/ |_/_/ |_/ + +EOF +} +echo -e "Loading..." +APP="Debian" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 2fc71ff407c520854496caeeff19771d4154e168 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 16:38:41 -0500 Subject: [PATCH 0779/3335] Create nginxproxymanager-v5-install.sh --- install/nginxproxymanager-v5-install.sh | 279 ++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 install/nginxproxymanager-v5-install.sh diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh new file mode 100644 index 00000000..25de6ad9 --- /dev/null +++ b/install/nginxproxymanager-v5-install.sh @@ -0,0 +1,279 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get update +$STD apt-get -y install \ + sudo \ + curl \ + gnupg \ + make \ + g++ \ + gcc \ + ca-certificates \ + apache2-utils \ + logrotate \ + build-essential \ + python3-dev \ + git \ + lsb-release +msg_ok "Installed Dependencies" + +msg_info "Installing Python" +$STD apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv +$STD pip3 install --upgrade setuptools +$STD pip3 install --upgrade pip +$STD python3 -m venv /opt/certbot/ +if [ "$(getconf LONG_BIT)" = "32" ]; then + $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 +fi +$STD python3 -m pip install --no-cache-dir cffi certbot +msg_ok "Installed Python" + +msg_info "Installing Openresty" +$STD apt-key add <(curl -fsSL https://openresty.org/package/pubkey.gpg) +cat </etc/apt/sources.list.d/openresty.list +deb http://openresty.org/package/debian bullseye openresty +EOF +$STD apt-get -y update +$STD apt-get -y install --no-install-recommends openresty +msg_ok "Installed Openresty" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Yarn" +$STD npm install --global yarn +msg_ok "Installed Yarn" + +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Downloading Nginx Proxy Manager v${RELEASE}" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz +cd ./nginx-proxy-manager-${RELEASE} +msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" + +msg_info "Setting up Enviroment" +ln -sf /usr/bin/python3 /usr/bin/python +ln -sf /usr/bin/certbot /opt/certbot/bin/certbot +ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx +ln -sf /usr/local/openresty/nginx/ /etc/nginx + +sed -i "s+0.0.0+${RELEASE}+g" backend/package.json +sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json + +sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf +NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") +for NGINX_CONF in $NGINX_CONFS; do + sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" +done + +mkdir -p /var/www/html /etc/nginx/logs +cp -r docker/rootfs/var/www/html/* /var/www/html/ +cp -r docker/rootfs/etc/nginx/* /etc/nginx/ +cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini +cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager +ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf +rm -f /etc/nginx/conf.d/dev.conf + +mkdir -p /tmp/nginx/body \ + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp + +chmod -R 777 /var/cache/nginx +chown root /tmp/nginx + +echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf + +if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then + echo -en "${GN} Generating dummy SSL Certificate... " + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null +fi + +mkdir -p /app/global /app/frontend/images +cp -r backend/* /app +cp -r global/* /app/global +msg_ok "Set up Enviroment" + +msg_info "Building Frontend" +cd ./frontend +export NODE_ENV=development +$STD yarn install --network-timeout=30000 +$STD yarn build +cp -r dist/* /app/frontend +cp -r app-images/* /app/frontend/images +msg_ok "Built Frontend" + +msg_info "Initializing Backend" +rm -rf /app/config/default.json +if [ ! -f /app/config/production.json ]; then + cat <<'EOF' >/app/config/production.json +{ + "database": { + "engine": "knex-native", + "knex": { + "client": "sqlite3", + "connection": { + "filename": "/data/database.sqlite" + } + } + } +} +EOF +fi +cd /app +export NODE_ENV=development +$STD yarn install --network-timeout=30000 +msg_ok "Initialized Backend" + +msg_info "Creating Service" +cat <<'EOF' >/lib/systemd/system/npm.service +[Unit] +Description=Nginx Proxy Manager +After=network.target +Wants=openresty.service + +[Service] +Type=simple +Environment=NODE_ENV=production +ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge +ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 +WorkingDirectory=/app +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Starting Services" +$STD systemctl enable --now openresty +$STD systemctl enable --now npm +msg_ok "Started Services" + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 614c6aa95b50a629a7688e7b29a32e115ef86a6f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 16:40:13 -0500 Subject: [PATCH 0780/3335] Create nginxproxymanager-v5.sh --- ct/nginxproxymanager-v5.sh | 469 +++++++++++++++++++++++++++++++++++++ 1 file changed, 469 insertions(+) create mode 100644 ct/nginxproxymanager-v5.sh diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh new file mode 100644 index 00000000..ac5fb686 --- /dev/null +++ b/ct/nginxproxymanager-v5.sh @@ -0,0 +1,469 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ _ ____ __ ___ + / | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____ + / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ + / /| / /_/ / / / / /> < / ____/ / / /_/ /> &2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /lib/systemd/system/npm.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Stopping Services" +systemctl stop openresty +systemctl stop npm +msg_ok "Stopped Services" + +msg_info "Cleaning Old Files" + rm -rf /app \ + /var/www/html \ + /etc/nginx \ + /var/log/nginx \ + /var/lib/nginx \ + /var/cache/nginx &>/dev/null +msg_ok "Cleaned Old Files" + +msg_info "Downloading NPM v${RELEASE}" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null +cd nginx-proxy-manager-${RELEASE} +msg_ok "Downloaded NPM v${RELEASE}" + +msg_info "Setting up Enviroment" +ln -sf /usr/bin/python3 /usr/bin/python +ln -sf /usr/bin/certbot /opt/certbot/bin/certbot +ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx +ln -sf /usr/local/openresty/nginx/ /etc/nginx +sed -i "s+0.0.0+${RELEASE}+g" backend/package.json +sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json +sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf +NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") +for NGINX_CONF in $NGINX_CONFS; do + sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" +done +mkdir -p /var/www/html /etc/nginx/logs +cp -r docker/rootfs/var/www/html/* /var/www/html/ +cp -r docker/rootfs/etc/nginx/* /etc/nginx/ +cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini +cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager +ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf +rm -f /etc/nginx/conf.d/dev.conf +mkdir -p /tmp/nginx/body \ + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp +chmod -R 777 /var/cache/nginx +chown root /tmp/nginx +echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf +if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then + echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null +fi +mkdir -p /app/global /app/frontend/images +cp -r backend/* /app +cp -r global/* /app/global +msg_ok "Setup Enviroment" + +msg_info "Building Frontend" +cd ./frontend +export NODE_ENV=development +yarn install --network-timeout=30000 &>/dev/null +yarn build &>/dev/null +cp -r dist/* /app/frontend +cp -r app-images/* /app/frontend/images +msg_ok "Built Frontend" + + +msg_info "Initializing Backend" +rm -rf /app/config/default.json &>/dev/null +if [ ! -f /app/config/production.json ]; then + cat <<'EOF' >/app/config/production.json +{ + "database": { + "engine": "knex-native", + "knex": { + "client": "sqlite3", + "connection": { + "filename": "/data/database.sqlite" + } + } + } +} +EOF +fi +cd /app +export NODE_ENV=development +yarn install --network-timeout=30000 &>/dev/null +msg_ok "Initialized Backend" + +msg_info "Starting Services" +systemctl enable npm &>/dev/null +systemctl start openresty +systemctl start npm +msg_ok "Started Services" + +msg_info "Cleaning up" +rm -rf nginx-proxy-manager-${RELEASE} +msg_ok "Cleaned" + +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:81${CL} \n" From 2a5b620d00fdd116a4c9db445b9b8243ecaa77ef Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 16:57:15 -0500 Subject: [PATCH 0781/3335] Create yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 117 +++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 install/yunohost-v5-install.sh diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh new file mode 100644 index 00000000..29262c7f --- /dev/null +++ b/install/yunohost-v5-install.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing YunoHost (Patience)" +$STD bash <(curl -fsSL https://install.yunohost.org) -a +$STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' +msg_ok "Installed YunoHost" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 00f7f194e1a98855dac1bb53a6fb5207a880adbe Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 16:58:25 -0500 Subject: [PATCH 0782/3335] Create yunohost-v5.sh --- ct/yunohost-v5.sh | 355 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 ct/yunohost-v5.sh diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh new file mode 100644 index 00000000..9a5d9ee6 --- /dev/null +++ b/ct/yunohost-v5.sh @@ -0,0 +1,355 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" +__ __ __ __ __ +\ \/ /_ ______v5____ / / / /___ _____/ /_ + \ / / / / __ \/ __ \/ /_/ / __ \/ ___/ __/ + / / /_/ / / / / /_/ / __ / /_/ (__ ) /_ +/_/\__,_/_/ /_/\____/_/ /_/\____/____/\__/ + +EOF +} +echo -e "Loading..." +APP="YunoHost" +var_disk="20" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/ ${CL}" From b73200e11a72a95bc7080f786bdf1677afee07ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 17:24:19 -0500 Subject: [PATCH 0783/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7c4331cc..e701762e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-1-04 + +### Changed + +- **YunoHost LXC** + - NEW Script + ## 2022-12-31 ### Changed From 1d6aaca35aa2277feab86b005e6e7f391b2c5d0f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 17:24:44 -0500 Subject: [PATCH 0784/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index e701762e..9ec9f85c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,7 +3,7 @@ # Change Log All notable changes to this project will be documented in this file. -## 2023-1-04 +## 2023-01-04 ### Changed From 77a16af2c2c7d8ac0952602ac1dc7080dfe13e0c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 17:32:17 -0500 Subject: [PATCH 0785/3335] Update post-pbs-install.sh --- misc/post-pbs-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index 7b29e5f4..b96dbb93 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -94,7 +94,7 @@ fi read -r -p "Disable Subscription Nag? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then msg_info "Disabling Subscription Nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag" fi From 3582365cedcc0600735f6ddd18e068840eae56ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 17:38:39 -0500 Subject: [PATCH 0786/3335] Update homeassistant-core-v5.sh HA team fixed dependency issues. Remove temp fix --- ct/homeassistant-core-v5.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 195be24c..32191909 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -351,11 +351,6 @@ source /srv/homeassistant/bin/activate pip install ${BR}--upgrade homeassistant &>/dev/null msg_ok "Updated Home Assistant" - if [ "${BR}" == "" ]; then - sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt - sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json - fi - msg_info "Starting Home Assistant" systemctl start homeassistant sleep 2 From 43022d00b3335ac51d8afb22faca1677b20f192e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 17:39:24 -0500 Subject: [PATCH 0787/3335] Update homeassistant-core-v5-install.sh HA team fixed dependency issues. Remove temp fix --- install/homeassistant-core-v5-install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 1ee82a65..3c88bd62 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -148,10 +148,6 @@ $STD pip install psycopg2-binary $STD pip install homeassistant msg_ok "Installed Home Assistant-Core" -# fix for inconsistent versions, hopefully the HA team will get this fixed -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json - msg_info "Creating Service" cat </etc/systemd/system/homeassistant.service [Unit] From cbad086cda12ec7e6791699ea42dbdc5e3417ecc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 18:21:16 -0500 Subject: [PATCH 0788/3335] Update post-pbs-install.sh --- misc/post-pbs-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index b96dbb93..7b29e5f4 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -94,7 +94,7 @@ fi read -r -p "Disable Subscription Nag? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then msg_info "Disabling Subscription Nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag" fi From dab84ea29cf844569e0140338b34a6bab0ee4b34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Jan 2023 19:01:46 -0500 Subject: [PATCH 0789/3335] Delete npm_update.sh prune --- misc/npm_update.sh | 175 --------------------------------------------- 1 file changed, 175 deletions(-) delete mode 100644 misc/npm_update.sh diff --git a/misc/npm_update.sh b/misc/npm_update.sh deleted file mode 100644 index af3cef7e..00000000 --- a/misc/npm_update.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") - -function update_info { - echo -e "${RD} - _ _ _____ __ __ - | \ | | | __ \ | \/ | - | \| | | |__) | | \ / | - | | | ___/ | |\/| | - | |\ | | | | | | | - |_| \_| |_| |_| |_| - UPDATE v${RELEASE} -${CL}" -} - -update_info - -while true; do - read -p "This will update Nginx Proxy Manager to v${RELEASE}. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -update_info -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap 'die "Script interrupted."' INT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} - -if [ -f /lib/systemd/system/npm.service ]; then - echo -en "${GN} Prep For Update... " - sleep 2 - echo -e "${CM}${CL} \r" - echo -en "${GN} Stopping Services... " - systemctl stop openresty - systemctl stop npm - echo -e "${CM}${CL} \r" - - echo -en "${GN} Cleaning Old Files... " - rm -rf /app \ - /var/www/html \ - /etc/nginx \ - /var/log/nginx \ - /var/lib/nginx \ - /var/cache/nginx &>/dev/null - echo -e "${CM}${CL} \r" -else - echo -en "${RD} No NPM to Update! ${CL}" - exit -fi - -echo -en "${GN} Downloading NPM v${RELEASE}... " -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null -cd ./nginx-proxy-manager-${RELEASE} -echo -e "${CM}${CL} \r" - -echo -en "${GN} Setting up Enviroment... " -ln -sf /usr/bin/python3 /usr/bin/python -ln -sf /usr/bin/certbot /opt/certbot/bin/certbot -ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx -ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+${RELEASE}+g" backend/package.json -sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json -sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf -NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") -for NGINX_CONF in $NGINX_CONFS; do - sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" -done -mkdir -p /var/www/html /etc/nginx/logs -cp -r docker/rootfs/var/www/html/* /var/www/html/ -cp -r docker/rootfs/etc/nginx/* /etc/nginx/ -cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini -cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager -ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf -rm -f /etc/nginx/conf.d/dev.conf -mkdir -p /tmp/nginx/body \ - /run/nginx \ - /data/nginx \ - /data/custom_ssl \ - /data/logs \ - /data/access \ - /data/nginx/default_host \ - /data/nginx/default_www \ - /data/nginx/proxy_host \ - /data/nginx/redirection_host \ - /data/nginx/stream \ - /data/nginx/dead_host \ - /data/nginx/temp \ - /var/lib/nginx/cache/public \ - /var/lib/nginx/cache/private \ - /var/cache/nginx/proxy_temp -chmod -R 777 /var/cache/nginx -chown root /tmp/nginx -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf -echo -e "${CM}${CL} \r" - -if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null -fi - -mkdir -p /app/global /app/frontend/images -cp -r backend/* /app -cp -r global/* /app/global - -echo -en "${GN} Building Frontend... " -cd ./frontend -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -yarn build &>/dev/null -cp -r dist/* /app/frontend -cp -r app-images/* /app/frontend/images -echo -e "${CM}${CL} \r" - -echo -en "${GN} Initializing Backend... " -rm -rf /app/config/default.json &>/dev/null -if [ ! -f /app/config/production.json ]; then - cat <<'EOF' >/app/config/production.json -{ - "database": { - "engine": "knex-native", - "knex": { - "client": "sqlite3", - "connection": { - "filename": "/data/database.sqlite" - } - } - } -} -EOF -fi -cd /app -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting Services... " -systemctl enable npm &>/dev/null -systemctl start openresty -systemctl start npm -echo -e "${CM}${CL} \r" - -IP=$(hostname -I | cut -f1 -d ' ') -echo -e "${GN}Successfully Updated Nginx Proxy Manager to ${RD}${RELEASE}${CL}. - NPM should be reachable at ${BL}http://${IP}:81 ${CL} - - " From 8e35fdadca14db1dc7de74647e937e18280e0574 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 10:56:25 -0500 Subject: [PATCH 0790/3335] Create syncthing-v5.sh --- ct/syncthing-v5.sh | 361 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 ct/syncthing-v5.sh diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh new file mode 100644 index 00000000..a24cedc2 --- /dev/null +++ b/ct/syncthing-v5.sh @@ -0,0 +1,361 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ __ __ _ + / ___/__ ______v5_____/ /_/ /_ (_)___ ____ _ + \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ + ___/ / /_/ / / / / /__/ /_/ / / / / / / / /_/ / +/____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / + /____/ /____/ + +EOF +} +echo -e "Loading..." +APP="Syncthing" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8384 ${CL} \n" From c36c5cd1ec639240c95697d85499667cdcf79c54 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 10:58:07 -0500 Subject: [PATCH 0791/3335] Create syncthing-v5-install.sh --- install/syncthing-v5-install.sh | 127 ++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 install/syncthing-v5-install.sh diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh new file mode 100644 index 00000000..42f34a10 --- /dev/null +++ b/install/syncthing-v5-install.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing Syncthing" +curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg +cat </etc/apt/sources.list.d/syncthing.list +deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable +EOF +$STD apt-get update +$STD apt-get install -y syncthing +$STD systemctl enable syncthing@root.service +systemctl start syncthing@root.service +sleep 5 +sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml +systemctl restart syncthing@root.service +msg_ok "Installed Syncthing" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From e90ed19caffcdd775befedfade160dbd613d44f4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 11:28:01 -0500 Subject: [PATCH 0792/3335] Update syncthing-install.sh code refactoring --- install/syncthing-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index c16488f6..f4f9d2ec 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -92,6 +92,10 @@ echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https:// apt-get update &>/dev/null apt-get install -y syncthing &>/dev/null systemctl enable syncthing@root.service &>/dev/null +systemctl start syncthing@root.service +sleep 5 +sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml +systemctl restart syncthing@root.service msg_ok "Installed Syncthing" PASS=$(grep -w "root" /etc/shadow | cut -b6) From f15fca3e2ce2226f9d81b9ad1900ba57bd125453 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 12:57:32 -0500 Subject: [PATCH 0793/3335] Create scrypted-v5-install.sh --- install/scrypted-v5-install.sh | 208 +++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 install/scrypted-v5-install.sh diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh new file mode 100644 index 00000000..1a08672c --- /dev/null +++ b/install/scrypted-v5-install.sh @@ -0,0 +1,208 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get -y install software-properties-common apt-utils +$STD apt-get -y update +$STD apt-get -y upgrade +$STD apt-get -y install \ + build-essential \ + gcc \ + gir1.2-gtk-3.0 \ + libcairo2-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libjpeg-dev \ + libgif-dev \ + libopenjp2-7 \ + libpango1.0-dev \ + librsvg2-dev \ + pkg-config \ + curl \ + sudo +msg_ok "Installed Dependencies" + +msg_info "Installing GStreamer" +$STD apt-get -y install \ + gstreamer1.0-tools \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer-plugins-bad1.0-dev \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-libav \ + gstreamer1.0-alsa +msg_ok "Installed GStreamer" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Python3" +$STD apt-get -y install \ + python3 \ + python3-dev \ + python3-gi \ + python3-gst-1.0 \ + python3-matplotlib \ + python3-numpy \ + python3-opencv \ + python3-pil \ + python3-pip \ + python3-setuptools \ + python3-skimage \ + python3-wheel +$STD python3 -m pip install --upgrade pip +$STD python3 -m pip install aiofiles debugpy typing_extensions typing +msg_ok "Installed Python3" + +read -r -p "Would you like to add Coral Edge TPU support? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + CORAL="Y" +else + CORAL="N" +fi + +if [[ $CORAL == "Y" ]]; then +msg_info "Adding Coral Edge TPU Support" +$STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) +cat </etc/apt/sources.list.d/coral-edgetpu.list +deb https://packages.cloud.google.com/apt coral-edgetpu-stable main +EOF +$STD apt-get -y update +$STD apt-get -y install libedgetpu1-std +msg_ok "Coral Edge TPU Support Added" +fi + +msg_info "Installing Scrypted" +$STD sudo -u root npx -y scrypted@latest install-server +msg_info "Installed Scrypted" + +msg_info "Creating Service" +service_path="/etc/systemd/system/scrypted.service" +echo "[Unit] +Description=Scrypted service +After=network.target + +[Service] +User=root +Group=root +Type=simple +ExecStart=/usr/bin/npx -y scrypted serve +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now scrypted.service +msg_ok "Created Service" +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 6385d1d1fe1d8abbebe8fc2e72a0fafd4a5bf8d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 12:58:49 -0500 Subject: [PATCH 0794/3335] Create scrypted-v5.sh --- ct/scrypted-v5.sh | 375 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 375 insertions(+) create mode 100644 ct/scrypted-v5.sh diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh new file mode 100644 index 00000000..b03095b5 --- /dev/null +++ b/ct/scrypted-v5.sh @@ -0,0 +1,375 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ __ __ + / ___/____________v5______ / /____ ____/ / + \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / + ___/ / /__/ / / /_/ / /_/ / /_/ __/ /_/ / +/____/\___/_/ \__, / .___/\__/\___/\__,_/ + /____/_/ + +EOF +} +echo -e "Loading..." +APP="Scrypted" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/scrypted.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:10443${CL} \n" From da2ca3ce781acadf94b444ac167408b2485202a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 12:59:56 -0500 Subject: [PATCH 0795/3335] Create prometheus-v5.sh --- ct/prometheus-v5.sh | 360 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/prometheus-v5.sh diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh new file mode 100644 index 00000000..30b211dc --- /dev/null +++ b/ct/prometheus-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ __ + / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ + / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ + / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ ) +/_/ v5/_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ + +EOF +} +echo -e "Loading..." +APP="Prometheus" +var_disk="4" +var_cpu="1" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/prometheus.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9090${CL} \n" From b49f5370f3f7749bef636df89d32ace3eb822a24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:01:06 -0500 Subject: [PATCH 0796/3335] Create prometheus-v5-install.sh --- install/prometheus-v5-install.sh | 149 +++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 install/prometheus-v5-install.sh diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh new file mode 100644 index 00000000..f46343fa --- /dev/null +++ b/install/prometheus-v5-install.sh @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing Prometheus" +RELEASE=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +mkdir -p /etc/prometheus +mkdir -p /var/lib/prometheus +$STD wget https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-amd64.tar.gz +$STD tar -xvf prometheus-${RELEASE}.linux-amd64.tar.gz +cd prometheus-${RELEASE}.linux-amd64 +mv prometheus promtool /usr/local/bin/ +mv consoles/ console_libraries/ /etc/prometheus/ +mv prometheus.yml /etc/prometheus/prometheus.yml +msg_ok "Installed Prometheus" + +msg_info "Creating Service" +service_path="/etc/systemd/system/prometheus.service" +echo "[Unit] +Description=Prometheus +Wants=network-online.target +After=network-online.target + +[Service] +User=root +Restart=always +Type=simple +ExecStart=/usr/local/bin/prometheus \ + --config.file=/etc/prometheus/prometheus.yml \ + --storage.tsdb.path=/var/lib/prometheus/ \ + --web.console.templates=/etc/prometheus/consoles \ + --web.console.libraries=/etc/prometheus/console_libraries \ + --web.listen-address=0.0.0.0:9090 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD sudo systemctl enable --now prometheus +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/prometheus-${RELEASE}.linux-amd64 /root/prometheus-${RELEASE}.linux-amd64.tar.gz +msg_ok "Cleaned" From 1c778f2c2bb783ddd2805a153edc840ba6fe2c82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:05:10 -0500 Subject: [PATCH 0797/3335] Update vaultwarden-v5.sh fix for older installs --- ct/vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index d157cd11..c2695c4a 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -80,7 +80,7 @@ if command -v pveversion >/dev/null 2>&1; then fi fi if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/vaultwarden ]]; then + if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then msg_error "No ${APP} Installation Found!"; exit fi From 44a1e88842e979bb350f453938de4ee4c6bf79fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:22:36 -0500 Subject: [PATCH 0798/3335] Create postgresql-v5.sh --- ct/postgresql-v5.sh | 358 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 ct/postgresql-v5.sh diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh new file mode 100644 index 00000000..c5cacfde --- /dev/null +++ b/ct/postgresql-v5.sh @@ -0,0 +1,358 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ _____ ____ __ + / __ \____ _____/ /_____ _________ / ___// __ \ / / + / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / + / ____/ /_/ (__ ) /_/ /_/ / / / __/__/ / /_/ / / /___ +/_/ \____/____/\__/\__, /_/v5 \___/____/\___\_\/_____/ + /____/ +EOF +} +echo -e "Loading..." +APP="PostgreSQL" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 83252cbfa30665d793c52c60b435e587f33337dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:23:48 -0500 Subject: [PATCH 0799/3335] Create postgresql-v5-install.sh --- install/postgresql-v5-install.sh | 241 +++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 install/postgresql-v5-install.sh diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh new file mode 100644 index 00000000..7ab0e05f --- /dev/null +++ b/install/postgresql-v5-install.sh @@ -0,0 +1,241 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL Repository" +sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +$STD apt-key add <(curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc) +msg_ok "Setup PostgreSQL Repository" + +msg_info "Installing PostgreSQL" +$STD apt-get update +$STD apt-get install -y postgresql + +cat </etc/postgresql/15/main/pg_hba.conf +# PostgreSQL Client Authentication Configuration File +local all postgres peer +# TYPE DATABASE USER ADDRESS METHOD +# "local" is for Unix domain socket connections only +local all all peer +# IPv4 local connections: +host all all 127.0.0.1/32 scram-sha-256 +host all all 0.0.0.0/24 md5 +# IPv6 local connections: +host all all ::1/128 scram-sha-256 +host all all 0.0.0.0/0 md5 +# Allow replication connections from localhost, by a user with the +# replication privilege. +local replication all peer +host replication all 127.0.0.1/32 scram-sha-256 +host replication all ::1/128 scram-sha-256 +EOF + +cat </etc/postgresql/15/main/postgresql.conf +# ----------------------------- +# PostgreSQL configuration file +# ----------------------------- + +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ + +data_directory = '/var/lib/postgresql/15/main' +hba_file = '/etc/postgresql/15/main/pg_hba.conf' +ident_file = '/etc/postgresql/15/main/pg_ident.conf' +external_pid_file = '/var/run/postgresql/15-main.pid' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ + +# - Connection Settings - + +listen_addresses = '*' +port = 5432 +max_connections = 100 +unix_socket_directories = '/var/run/postgresql' + +# - SSL - + +ssl = on +ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' +ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ + +shared_buffers = 128MB +dynamic_shared_memory_type = posix + +#------------------------------------------------------------------------------ +# WRITE-AHEAD LOG +#------------------------------------------------------------------------------ + +max_wal_size = 1GB +min_wal_size = 80MB + +#------------------------------------------------------------------------------ +# REPORTING AND LOGGING +#------------------------------------------------------------------------------ + +# - What to Log - + +log_line_prefix = '%m [%p] %q%u@%d ' +log_timezone = 'Etc/UTC' + +#------------------------------------------------------------------------------ +# PROCESS TITLE +#------------------------------------------------------------------------------ + +cluster_name = '15/main' + +#------------------------------------------------------------------------------ +# CLIENT CONNECTION DEFAULTS +#------------------------------------------------------------------------------ + +# - Locale and Formatting - + +datestyle = 'iso, mdy' +timezone = 'Etc/UTC' +lc_messages = 'C' +lc_monetary = 'C' +lc_numeric = 'C' +lc_time = 'C' +default_text_search_config = 'pg_catalog.english' + +#------------------------------------------------------------------------------ +# CONFIG FILE INCLUDES +#------------------------------------------------------------------------------ + +include_dir = 'conf.d' +EOF + +sudo systemctl restart postgresql +msg_ok "Installed PostgreSQL" + +read -r -p "Would you like to add Adminer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ADMINER="Y" +else + ADMINER="N" +fi + +if [[ $ADMINER == "Y" ]]; then + msg_info "Installing Adminer" + $STD apt install -y adminer + $STD sudo a2enconf adminer + $STD systemctl reload apache2 + msg_ok "Installed Adminer" +fi + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 5765b0c800a32254e4fbc441ced7c0158554cfb6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:30:21 -0500 Subject: [PATCH 0800/3335] Update vaultwarden-v5.sh fix for older installs --- ct/vaultwarden-v5.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index c2695c4a..c16b0a8b 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -376,7 +376,12 @@ msg_ok "$WVRELEASE Update Successful" exit; fi if [ "$UPD" == "3" ]; then -cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" +DIR=/usr/bin/vaultwarden + if [ -d "$DIR" ]; then + cat /usr/bin/vaultwarden/.env | grep "ADMIN_TOKEN" + else + cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" + fi exit fi } From a62ae77a517df06817996230a1365de64b1d0ad8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:35:49 -0500 Subject: [PATCH 0801/3335] Create plex-v5.sh --- ct/plex-v5.sh | 380 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 380 insertions(+) create mode 100644 ct/plex-v5.sh diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh new file mode 100644 index 00000000..fc40ecfb --- /dev/null +++ b/ct/plex-v5.sh @@ -0,0 +1,380 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ __ ___ ___ _____ + / __ \/ /__ _ __ / |/ /__v5____/ (_)___ _ / ___/___ ______ _____ _____ + / /_/ / / _ \| |/_/ / /|_/ / _ \/ __ / / __ `/ \__ \/ _ \/ ___/ | / / _ \/ ___/ + / ____/ / __/> < / / / / __/ /_/ / / /_/ / ___/ / __/ / | |/ / __/ / +/_/ /_/\___/_/|_| /_/ /_/\___/\__,_/_/\__,_/ /____/\___/_/ |___/\___/_/ + +EOF +} +echo -e "Loading..." +APP="Plex" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file +EOF +fi +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:32400/web${CL}\n" From 4336e422012f1db3412ed01c495543ab8edafc34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 13:36:47 -0500 Subject: [PATCH 0802/3335] Create plex-v5-install.sh --- install/plex-v5-install.sh | 139 +++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 install/plex-v5-install.sh diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh new file mode 100644 index 00000000..2a5cb5c2 --- /dev/null +++ b/install/plex-v5-install.sh @@ -0,0 +1,139 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 \ + beignet-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 "Setting Up Plex Media Server Repository" +$STD apt-key add <(curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key) +cat </etc/apt/sources.list.d/plexmediaserver.list +deb [arch=amd64] https://downloads.plex.tv/repo/deb/ public main +EOF +msg_ok "Set Up Plex Media Server Repository" + +msg_info "Installing Plex Media Server" +$STD apt-get update +$STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver +msg_ok "Installed Plex Media Server" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d9e02063ce245d33e3cfab9bc044c36ea1799f29 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 14:19:22 -0500 Subject: [PATCH 0803/3335] Update vaultwarden-v5.sh --- ct/vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index c16b0a8b..154540d4 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -378,7 +378,7 @@ fi if [ "$UPD" == "3" ]; then DIR=/usr/bin/vaultwarden if [ -d "$DIR" ]; then - cat /usr/bin/vaultwarden/.env | grep "ADMIN_TOKEN" + cat cat /etc/vaultwarden.env | grep "ADMIN_TOKEN" else cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" fi From 9411a14f08092eb514fee8bd56676337527988b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 14:26:56 -0500 Subject: [PATCH 0804/3335] Update vaultwarden-v5.sh --- ct/vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 154540d4..816f8cb9 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -378,7 +378,7 @@ fi if [ "$UPD" == "3" ]; then DIR=/usr/bin/vaultwarden if [ -d "$DIR" ]; then - cat cat /etc/vaultwarden.env | grep "ADMIN_TOKEN" + cat /etc/vaultwarden.env | grep "ADMIN_TOKEN" else cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" fi From bf6c1f03bcf4b0ce7bb968645ef08825efd0e242 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 15:38:06 -0500 Subject: [PATCH 0805/3335] Create openhab-v5.sh --- ct/openhab-v5.sh | 361 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 ct/openhab-v5.sh diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh new file mode 100644 index 00000000..7259e024 --- /dev/null +++ b/ct/openhab-v5.sh @@ -0,0 +1,361 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ _____ ____ + ____v5____ ___ ____ / / / / | / __ ) + / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | +/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / +\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/ + /_/ + +EOF +} +echo -e "Loading..." +APP="openHAB" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" From 4ad99239f50f13be7215b8541ceaff98ccb7cb83 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 15:39:16 -0500 Subject: [PATCH 0806/3335] Create openhab-v5-install.sh --- install/openhab-v5-install.sh | 134 ++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 install/openhab-v5-install.sh diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh new file mode 100644 index 00000000..f5df107e --- /dev/null +++ b/install/openhab-v5-install.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +$STD apt-get install -y apt-transport-https +msg_ok "Installed Dependencies" + +msg_info "Installing Azul Zulu" +$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 +wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb +$STD apt-get install ./zulu-repo_1.0.0-3_all.deb +$STD apt-get update +$STD apt-get -y install zulu11-jdk +msg_ok "Installed Azul Zulu" + +msg_info "Installing openHAB" +curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg +mv openhab.gpg /usr/share/keyrings +chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg +sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list' +$STD apt update +$STD apt-get -y install openhab +systemctl daemon-reload +$STD systemctl enable --now openhab.service +msg_ok "Installed openHAB" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From b8145ae0cf8aa87157d9f3df065a28080476ecbf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:00:20 -0500 Subject: [PATCH 0807/3335] Create omv-v5.sh --- ct/omv-v5.sh | 371 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 371 insertions(+) create mode 100644 ct/omv-v5.sh diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh new file mode 100644 index 00000000..ff71fa08 --- /dev/null +++ b/ct/omv-v5.sh @@ -0,0 +1,371 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ ___ ___ _ __ ____ + / __ \____v5___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ + / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ +/ /_/ / /_/ / __/ / / / / / / __/ /_/ / / /_/ /| |/ / /_/ / /_/ / / /_ +\____/ .___/\___/_/ /_/_/ /_/\___/\__,_/_/\__,_/ |___/\__,_/\__,_/_/\__/ + /_/ + +EOF +} +echo -e "Loading..." +APP="OMV" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" From 67a5d9db545f28fa850085717657f7e196f0773c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:01:19 -0500 Subject: [PATCH 0808/3335] Create omv-v5-install.sh --- install/omv-v5-install.sh | 135 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 install/omv-v5-install.sh diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh new file mode 100644 index 00000000..c3a10912 --- /dev/null +++ b/install/omv-v5-install.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +export DEBIAN_FRONTEND=noninteractive +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing OpenMediaVault (Patience)" +wget -q -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key +$STD apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null + +cat <>/etc/apt/sources.list.d/openmediavault.list +deb https://packages.openmediavault.org/public shaitan main +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main +## Uncomment the following line to add software from the proposed repository. +# deb https://packages.openmediavault.org/public shaitan-proposed main +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main +## This software is not part of OpenMediaVault, but is offered by third-party +## developers as a service to OpenMediaVault users. +# deb https://packages.openmediavault.org/public shaitan partner +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner +EOF +$STD apt-get update +$STD apt-get -y install openmediavault-keyring +$STD apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends install openmediavault +omv-confdbadm populate +msg_ok "Installed OpenMediaVault" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From f80668d25727adc088c4b2820fd51389cc0c11f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:17:26 -0500 Subject: [PATCH 0809/3335] Create nocodb-v5.sh --- ct/nocodb-v5.sh | 363 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 363 insertions(+) create mode 100644 ct/nocodb-v5.sh diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh new file mode 100644 index 00000000..adc7d0c3 --- /dev/null +++ b/ct/nocodb-v5.sh @@ -0,0 +1,363 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ ____ ____ + / | / /___ ____v5___ / __ \/ __ ) + / |/ / __ \/ ___/ __ \/ / / / __ | + / /| / /_/ / /__/ /_/ / /_/ / /_/ / +/_/ |_/\____/\___/\____/_____/_____/ + +EOF +} +echo -e "Loading..." +APP="NocoDB" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/nocodb.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP}" +cd /opt/nocodb +npm uninstall -s --save nocodb &>/dev/null +npm install -s --save nocodb &>/dev/null +systemctl restart nocodb.service +msg_ok "Updated ${APP}" +msg_ok "Update Successfull" + +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080/dashboard${CL} \n" From 92f7b58e89e6530364060f3586b18718e03ff226 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:20:31 -0500 Subject: [PATCH 0810/3335] Create nocodb-v5-install.sh --- install/nocodb-v5-install.sh | 147 +++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 install/nocodb-v5-install.sh diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh new file mode 100644 index 00000000..967a506e --- /dev/null +++ b/install/nocodb-v5-install.sh @@ -0,0 +1,147 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD sudo apt-get install -y nodejs git make g++ gcc +msg_ok "Installed Node.js" + +msg_info "Installing NocoDB" +$STD git clone https://github.com/nocodb/nocodb-seed +mv nocodb-seed /opt/nocodb +cd /opt/nocodb +$STD npm install +msg_ok "Installed NocoDB" + +msg_info "Creating Service" +service_path="/etc/systemd/system/nocodb.service" +echo "[Unit] +Description=nocodb + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/nocodb +ExecStart=/usr/bin/npm start + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now nocodb.service &>/dev/null +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 49ccdfc55a79e9425b1d3c00b346484817642c0b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:29:58 -0500 Subject: [PATCH 0811/3335] Update omv-v5.sh --- ct/omv-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index ff71fa08..5db16487 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -82,7 +82,7 @@ if command -v pveversion >/dev/null 2>&1; then fi fi if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then msg_error "No ${APP} Installation Found!"; exit fi From b3bcfbf2750b02a516c3dba4b0ad2624a9323241 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:42:47 -0500 Subject: [PATCH 0812/3335] Create omada-v5.sh --- ct/omada-v5.sh | 358 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 ct/omada-v5.sh diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh new file mode 100644 index 00000000..e97af3d9 --- /dev/null +++ b/ct/omada-v5.sh @@ -0,0 +1,358 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____ ___v5____ _____/ /___ _ + / / / / __ __ \/ __ / __ / __ / +/ /_/ / / / / / / /_/ / /_/ / /_/ / +\____/_/ /_/ /_/\__,_/\__,_/\__,_/ + +EOF +} +echo -e "Loading..." +APP="Omada" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/tplink ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:8043${CL} \n" From e4b4a3408a329fab6333e922b6ab21b8524f6d25 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 16:44:09 -0500 Subject: [PATCH 0813/3335] Create omada-v5-install.sh --- install/omada-v5-install.sh | 124 ++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 install/omada-v5-install.sh diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh new file mode 100644 index 00000000..898c75a4 --- /dev/null +++ b/install/omada-v5-install.sh @@ -0,0 +1,124 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get -y install curl +$STD apt-get -y install sudo +$STD apt-get -y install gnupg +$STD apt-get -y install openjdk-8-jre-headless +$STD apt-get -y install jsvc +wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb +$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb +msg_ok "Installed Dependencies" + +msg_info "Installing Omada Controller v5.7.4" +wget -qL https://static.tp-link.com/upload/software/2022/202211/20221121/Omada_SDN_Controller_v5.7.4_Linux_x64.deb +$STD dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb +msg_ok "Installed Omada Controller" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Omada_SDN_Controller_v5.7.4_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 24f121446527a4c834dffe69560911026c2735be Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Jan 2023 17:14:37 -0500 Subject: [PATCH 0814/3335] Delete nocodb-update.sh prune --- misc/nocodb-update.sh | 84 ------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 misc/nocodb-update.sh diff --git a/misc/nocodb-update.sh b/misc/nocodb-update.sh deleted file mode 100644 index 3cc7494c..00000000 --- a/misc/nocodb-update.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env bash -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="NocoDB" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - read -p "This will Update ${APP}. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${YW} - _ _ _____ ____ - | \ | | | __ \| _ \ - | \| | ___ v3___ ___ | | | | |_) | - | |/ _ \ / __/ _ \| | | | _ < - | |\ | (_) | (_| (_) | |__| | |_) | - |_| \_|\___/ \___\___/|_____/|____/ - UPDATE -${CL}" -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_info "Updating ${APP}" -cd /opt/nocodb -npm uninstall -s --save nocodb &>/dev/null -npm install -s --save nocodb &>/dev/null -msg_ok "Updated ${APP}" - -read -p "${APP} LXC needs to reboot to apply the update. Reboot now? " -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]]; then - reboot=yes -else - reboot=no -fi - -if [ "$reboot" == "yes" ]; then - msg_info "Rebooting ${APP} LXC" - reboot -fi - -if [ "$reboot" == "no" ]; then - msg_ok "Finished Updating ${APP}. Reboot to apply the update." -fi From 849c65dc631b8491e9631d64c2cb33e8f3804608 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 00:53:08 -0500 Subject: [PATCH 0815/3335] Update homeassistant-core-v5.sh tweak --- ct/homeassistant-core-v5.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 32191909..010d5ee2 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Home Assistant-Core" var_disk="8" From 3a6d7cb0cb6de3d8c9d3d6aa5ea8b8f2e78a9f9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 01:17:13 -0500 Subject: [PATCH 0816/3335] small tweak --- ct/adguard-v5.sh | 2 ++ ct/debian-v5.sh | 2 ++ ct/docker-v5.sh | 2 ++ ct/emqx-v5.sh | 2 ++ ct/esphome-v5.sh | 2 ++ ct/grafana-v5.sh | 2 ++ ct/heimdalldashboard-v5.sh | 2 ++ ct/homeassistant-v5.sh | 2 ++ ct/jellyfin-v5.sh | 2 ++ ct/mqtt-v5.sh | 2 ++ ct/nginxproxymanager-v5.sh | 2 ++ ct/nocodb-v5.sh | 2 ++ ct/node-red-v5.sh | 2 ++ ct/omada-v5.sh | 2 ++ ct/omv-v5.sh | 2 ++ ct/openhab-v5.sh | 2 ++ ct/paperless-ngx-v5.sh | 2 ++ ct/photoprism-v5.sh | 2 ++ ct/pihole-v5.sh | 2 ++ ct/plex-v5.sh | 2 ++ ct/postgresql-v5.sh | 2 ++ ct/prometheus-v5.sh | 2 ++ ct/scrypted-v5.sh | 2 ++ ct/shinobi-v5.sh | 2 ++ ct/syncthing-v5.sh | 2 ++ ct/technitiumdns-v5.sh | 2 ++ ct/trilium-v5.sh | 2 ++ ct/ubuntu-v5.sh | 2 ++ ct/umbrel-v5.sh | 2 ++ ct/unifi-v5.sh | 2 ++ ct/uptimekuma-v5.sh | 2 ++ ct/vaultwarden-v5.sh | 2 ++ ct/whoogle-v5.sh | 2 ++ ct/wikijs-v5.sh | 2 ++ ct/wireguard-v5.sh | 2 ++ ct/yunohost-v5.sh | 2 ++ ct/zigbee2mqtt-v5.sh | 2 ++ ct/zwave-js-ui-v5.sh | 2 ++ 38 files changed, 76 insertions(+) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 7255389e..a9b1d654 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Adguard" var_disk="2" diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 5483076f..ff89f394 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Debian" var_disk="2" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 50ddd2b7..9bfefa5d 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Docker" var_disk="4" diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 7efa5a96..516dcb11 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="EMQX" var_disk="4" diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index b2d8d894..c0075256 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="ESPHome" var_disk="4" diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 9eace3c6..f44e350b 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Grafana" var_disk="2" diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 5ed5886b..1893c29b 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Heimdall Dashboard" var_disk="2" diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index e54c59af..3d438741 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Home Assistant" var_disk="16" diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 06d532e0..eeece3f7 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Jellyfin" var_disk="8" diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 9b8f137c..f755ee24 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -9,6 +9,8 @@ cat <<"EOF" EOF } +clear +header_info echo -e "Loading..." APP="MQTT" var_disk="2" diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index ac5fb686..5f6dc182 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Nginx Proxy Manager" var_disk="4" diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index adc7d0c3..2e100e69 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="NocoDB" var_disk="4" diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index c0b801b8..4ab0b95e 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Node-Red" var_disk="4" diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index e97af3d9..2d68c82e 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Omada" var_disk="8" diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 5db16487..23f9be1e 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="OMV" var_disk="4" diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 7259e024..42edfccf 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="openHAB" var_disk="8" diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index fb3aa3f6..6b034fb2 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Paperless-ngx" var_disk="4" diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 4d9fc8a5..5a697f43 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="PhotoPrism" var_disk="8" diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 3357d5c0..b5728a0e 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Pihole" var_disk="2" diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index fc40ecfb..f437089b 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Plex" var_disk="8" diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index c5cacfde..02acf365 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -9,6 +9,8 @@ function header_info { /____/ EOF } +clear +header_info echo -e "Loading..." APP="PostgreSQL" var_disk="4" diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 30b211dc..bdddfc63 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Prometheus" var_disk="4" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index b03095b5..eaa3cb62 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Scrypted" var_disk="8" diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index dd10e026..bf576ece 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Shinobi" var_disk="8" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index a24cedc2..480b4529 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Syncthing" var_disk="8" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 245bd0e8..bbc02657 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Technitium DNS" var_disk="2" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 1d705081..7a49b2bf 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Trilium" var_disk="2" diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 039e5f49..bcbc59a0 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Ubuntu" var_disk="2" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index a3b29936..b63fa1ba 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Umbrel" var_disk="8" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 2f7ca498..e94cf63f 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Unifi" var_disk="8" diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 6a5c16a1..5ba683a2 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Uptime Kuma" var_disk="4" diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 816f8cb9..beed903f 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Vaultwarden" var_disk="6" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index aeda75c5..a68174af 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Whoogle" var_disk="2" diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 772a9212..ebf035af 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Wikijs" var_disk="2" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index aa13e0b2..d5432e0a 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Wireguard" var_disk="2" diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 9a5d9ee6..401b5a8a 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -9,6 +9,8 @@ __ __ __ __ __ EOF } +clear +header_info echo -e "Loading..." APP="YunoHost" var_disk="20" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index af31077f..26382ab0 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -10,6 +10,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Zigbee2MQTT" var_disk="4" diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 0abaf0de..ce3b0d83 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="Zwave-JS-UI" var_disk="4" From 120da5bea6b6beaaa145346a0bbe2a9282df38ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 10:27:15 -0500 Subject: [PATCH 0817/3335] Update ubuntu-v5-install.sh fix --- install/ubuntu-v5-install.sh | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index e14653a6..03415a4b 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -86,32 +86,10 @@ $STD apt-get install -y curl $STD apt-get install -y sudo msg_ok "Installed Dependencies" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF - -msg_info "Installing Umbrel (Patience)" -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -fi -$STD bash <(curl -fsSL https://umbrel.sh) -systemctl daemon-reload -$STD systemctl enable --now umbrel-startup.service -msg_ok "Installed Umbrel" - PASS=$(grep -w "root" /etc/shadow | cut -b6) if [[ $PASS != $ ]]; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname + chmod -x /etc/update-motd.d/* touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -128,6 +106,7 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config systemctl restart sshd fi + msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean From 2eb375a516a545e7acbd33fb6a8fb9d41bab009c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 10:36:13 -0500 Subject: [PATCH 0818/3335] Update wikijs-v5.sh fix path --- ct/wikijs-v5.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index ebf035af..465d6f82 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -318,9 +318,9 @@ systemctl stop wikijs msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" -cp /opt/wiki/config.yml ~/config.yml.bak -rm -rf /opt/wiki/* -cd /opt/wiki +cp /opt/wikijs/config.yml ~/config.yml.bak +rm -rf /opt/wikijs/* +cd /opt/wikijs wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null tar xzf wiki-js.tar.gz cp ~/config.yml.bak ./config.yml From 91da8137545c286751e71ac9bd0c1a6f03a284b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 12:54:41 -0500 Subject: [PATCH 0819/3335] Update yunohost-v5-install.sh adjust dependencies --- install/yunohost-v5-install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 29262c7f..a1f498f9 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -81,13 +81,17 @@ $STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo +$STD apt-get install -y \ +curl \ +sudo \ +apt-transport-https \ +lsb-release \ +ca-certificates msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" $STD bash <(curl -fsSL https://install.yunohost.org) -a -$STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' +wget -s -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg msg_ok "Installed YunoHost" PASS=$(grep -w "root" /etc/shadow | cut -b6) From f10275f8da092783d1dbec95968caae80d8bcb9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 13:00:12 -0500 Subject: [PATCH 0820/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index a1f498f9..f2783bd5 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -82,11 +82,11 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y \ -curl \ -sudo \ -apt-transport-https \ -lsb-release \ -ca-certificates + curl \ + sudo \ + apt-transport-https \ + lsb-release \ + ca-certificates msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" From 2e697748882c3242c554ff8bdcc966d545b1b0f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 13:01:12 -0500 Subject: [PATCH 0821/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index f2783bd5..d454382a 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -91,7 +91,7 @@ msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" $STD bash <(curl -fsSL https://install.yunohost.org) -a -wget -s -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg +wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg msg_ok "Installed YunoHost" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 796822d451c4933f16acae2bd9cdc42d93905950 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 13:26:42 -0500 Subject: [PATCH 0822/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index d454382a..a3897aae 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -81,12 +81,11 @@ $STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ - sudo \ - apt-transport-https \ - lsb-release \ - ca-certificates +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y apt-transport-https +$STD apt-get install -y lsb-release +$STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" From 9a56cba0d916221a8ca77b3edd57dc00fbf3c0b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 14:28:29 -0500 Subject: [PATCH 0823/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index a3897aae..298f5469 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -90,7 +90,7 @@ msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" $STD bash <(curl -fsSL https://install.yunohost.org) -a -wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg +$STD wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg msg_ok "Installed YunoHost" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 26da03b58ee776e629838528bddb72be3a925d4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 14:49:08 -0500 Subject: [PATCH 0824/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 298f5469..a2fbcbe0 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -89,8 +89,8 @@ $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" +wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg $STD bash <(curl -fsSL https://install.yunohost.org) -a -$STD wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg msg_ok "Installed YunoHost" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 0d26ac813b83da9d137fc8bd5f26a58e1b8564f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 14:59:03 -0500 Subject: [PATCH 0825/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index a2fbcbe0..55163f04 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release $STD apt-get install -y ca-certificates From 57452c3defda3fb10877e3981b4d64278c7d46be Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Jan 2023 15:07:55 -0500 Subject: [PATCH 0826/3335] Update yunohost-v5-install.sh --- install/yunohost-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 55163f04..19eeec06 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y gnupg $STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release From 94dc697f2a37d278a8b9855f59767eade7fa04cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 09:47:30 -0500 Subject: [PATCH 0827/3335] Create emby-v5.sh --- ct/emby-v5.sh | 393 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 393 insertions(+) create mode 100644 ct/emby-v5.sh diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh new file mode 100644 index 00000000..47f97452 --- /dev/null +++ b/ct/emby-v5.sh @@ -0,0 +1,393 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ __ + / ____/___ v5_ / /_ __ __ + / __/ / __ __ \/ __ \/ / / / + / /___/ / / / / / /_/ / /_/ / +/_____/_/ /_/ /_/_.___/\__, / + /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Emby" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/emby-server ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +msg_info "Stopping ${APP}" +systemctl stop emby-server +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null +dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null +rm emby-server-deb_${LATEST}_amd64.deb +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start emby-server +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file +EOF +fi +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8096${CL}\n" From aef6478a9709815c6e57450ef9f1829a2331d5bf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 09:48:39 -0500 Subject: [PATCH 0828/3335] Create emby-v5-install.sh --- install/emby-v5-install.sh | 134 +++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 install/emby-v5-install.sh diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh new file mode 100644 index 00000000..8caf588b --- /dev/null +++ b/install/emby-v5-install.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 \ + beignet-opencl-icd + + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" +fi + +LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + +msg_info "Installing Emby" +wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb +$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb +msg_ok "Installed Emby" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm emby-server-deb_${LATEST}_amd64.deb +msg_ok "Cleaned" From 31db188ccaa7bf832c8bb9caae5a5c230a24e9f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 10:05:16 -0500 Subject: [PATCH 0829/3335] Update and rename nextcloudpi-install.sh to nextcloudpi-v5-install.sh --- ...pi-install.sh => nextcloudpi-v5-install.sh} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename install/{nextcloudpi-install.sh => nextcloudpi-v5-install.sh} (90%) diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-v5-install.sh similarity index 90% rename from install/nextcloudpi-install.sh rename to install/nextcloudpi-v5-install.sh index ec0729d7..45f6b6d3 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -19,7 +19,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR - +silent() { "$@" > /dev/null 2>&1; } function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -76,19 +76,19 @@ alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +$STD apt-get update +$STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null +$STD apt-get install -y curl +$STD apt-get install -y sudo msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" -curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php -sudo service apache2 restart +service apache2 restart msg_ok "Installed NextCloudPi" PASS=$(grep -w "root" /etc/shadow | cut -b6) @@ -113,6 +113,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then fi msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null +$STD apt-get autoremove +$STD apt-get autoclean msg_ok "Cleaned" From d66e0aa0595c5568b91d4f0a139429d329f002cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 10:10:01 -0500 Subject: [PATCH 0830/3335] Create nextcloudpi-install.sh --- install/nextcloudpi-install.sh | 118 +++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 install/nextcloudpi-install.sh diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh new file mode 100644 index 00000000..ec0729d7 --- /dev/null +++ b/install/nextcloudpi-install.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +apt-get install -y curl &>/dev/null +apt-get install -y sudo &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Installing NextCloudPi (Patience)" +curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null +sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php +sudo service apache2 restart +msg_ok "Installed NextCloudPi" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" From 6527e93d240b4895f123dbe0d9df29bd478e5c15 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 10:26:47 -0500 Subject: [PATCH 0831/3335] Create nextcloudpi-v5.sh --- ct/nextcloudpi-v5.sh | 362 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 ct/nextcloudpi-v5.sh diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh new file mode 100644 index 00000000..21a33b6f --- /dev/null +++ b/ct/nextcloudpi-v5.sh @@ -0,0 +1,362 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ __ ________ ______ _ + / | / /__ _ __/ /_/ ____/ /___ __v5______/ / __ \(_) + / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / + / /| / __/> &2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}https://${IP}/${CL} \n" From 1dc7c180d303bea8ee337de51dbd700f3f697ce9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 11:21:31 -0500 Subject: [PATCH 0832/3335] Delete emby-update.sh prune --- misc/emby-update.sh | 52 --------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 misc/emby-update.sh diff --git a/misc/emby-update.sh b/misc/emby-update.sh deleted file mode 100644 index 85f7bc83..00000000 --- a/misc/emby-update.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash -LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Emby" -while true; do - read -p "This will Update ${APP} to ${LATEST}. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - cat <<"EOF" - ______ __ - / ____/___ ___ / /_ __ __ - / __/ / __ __ \/ __ \/ / / / - / /___/ / / / / / /_/ / /_/ / -/_____/_/ /_/ /_/_.___/\__, / - UPDATE /____/ -EOF -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_info "Updating ${APP}" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null -systemctl stop emby-server -dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null -systemctl start emby-server -rm emby-server-deb_${LATEST}_amd64.deb -msg_ok "Updated ${APP}" From 025c7f45ce3cd20fb25bced82860b2c0612c077a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 11:57:13 -0500 Subject: [PATCH 0833/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 010d5ee2..5ac794f1 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -317,10 +317,11 @@ function install_script() { function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 4 \ "1" "Initialize" OFF \ "2" "Update Core" ON \ "3" "Install HACS" OFF \ + "4" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) if [ "$UPD" == "1" ]; then @@ -373,6 +374,35 @@ msg_ok "Installed Home Assistant Comunity Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit fi +if [ "$UPD" == "4" ]; then +clear +header_info +msg_info "Installing FileBrowser" +curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null +filebrowser config init -a '0.0.0.0' &>/dev/null +filebrowser config set -a '0.0.0.0' &>/dev/null +filebrowser users add admin changeme --perm.admin &>/dev/null +msg_ok "Installed FileBrowser on $hostname" + +msg_info "Creating Service" +service_path="/etc/systemd/system/filebrowser.service" +echo "[Unit] +Description=Filebrowser +After=network-online.target +[Service] +User=root +WorkingDirectory=/root/ +ExecStart=/usr/local/bin/filebrowser -r / +[Install] +WantedBy=default.target" >$service_path + +systemctl enable --now filebrowser.service &>/dev/null +msg_ok "Created Service" + +msg_ok "Completed Successfully!\n" +echo -e "FileBrowser should be reachable by going to the following URL. + ${BL}http://$IP:8080${CL} \n" +exit } clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi From c59c795b1ce68f6dc91f205a90cf2cf256df8d82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:01:28 -0500 Subject: [PATCH 0834/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 5ac794f1..cfe06b12 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -403,7 +403,9 @@ msg_ok "Completed Successfully!\n" echo -e "FileBrowser should be reachable by going to the following URL. ${BL}http://$IP:8080${CL} \n" exit +fi } + clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi From 240695d613e80ff8b9b8f0141fba1391a115f2f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:04:18 -0500 Subject: [PATCH 0835/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index cfe06b12..f793b868 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -317,7 +317,7 @@ function install_script() { function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 4 \ + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 15 58 4 \ "1" "Initialize" OFF \ "2" "Update Core" ON \ "3" "Install HACS" OFF \ From ead749947267918c44a75c5fa3a3a94e05ba8042 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:16:42 -0500 Subject: [PATCH 0836/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index f793b868..6c26cb99 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -382,7 +382,7 @@ curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bas filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null -msg_ok "Installed FileBrowser on $hostname" +msg_ok "Installed FileBrowser" msg_info "Creating Service" service_path="/etc/systemd/system/filebrowser.service" From 0882f89db6d79aec93b5b07cfca6d7e9d6e8a996 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:21:14 -0500 Subject: [PATCH 0837/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 6c26cb99..01d835e6 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -392,7 +392,7 @@ After=network-online.target [Service] User=root WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r / +ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant [Install] WantedBy=default.target" >$service_path @@ -401,7 +401,7 @@ msg_ok "Created Service" msg_ok "Completed Successfully!\n" echo -e "FileBrowser should be reachable by going to the following URL. - ${BL}http://$IP:8080${CL} \n" + ${BL}http://$IP:8080${CL} admin|changeme\n" exit fi } From 7417027d0fc72915cb18446d62e1378754d3544e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:36:45 -0500 Subject: [PATCH 0838/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 01d835e6..35e73e5b 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -90,7 +90,7 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No Home Assistant Core Installation Found!"; exit fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "Initialize, Update or Install HACS. Proceed?" 10 58); then + if (whiptail --title "${APP} LXC SUPPORT" --yesno "Initialize, Update Core, Install HACS or FileBrowser. Proceed?" 10 58); then echo "User selected Support" else clear From de15171b094b9a590347ec5085bb618dcca72134 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:41:59 -0500 Subject: [PATCH 0839/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 35e73e5b..51c2da41 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -369,7 +369,7 @@ msg_info "Installing Home Assistant Comunity Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null cd .homeassistant -wget -O - https://get.hacs.xyz | bash - &>/dev/null +bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null msg_ok "Installed Home Assistant Comunity Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit From a5d75b921ddb777652c86925d6a0ce6861897dc0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:50:32 -0500 Subject: [PATCH 0840/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 51c2da41..ce077d53 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -90,7 +90,7 @@ if ! command -v pveversion >/dev/null 2>&1; then msg_error "No Home Assistant Core Installation Found!"; exit fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "Initialize, Update Core, Install HACS or FileBrowser. Proceed?" 10 58); then + if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC" 10 58); then echo "User selected Support" else clear From 5fb0e81effa65a52daca2297b1c9d406257f1c96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 12:51:10 -0500 Subject: [PATCH 0841/3335] Update homeassistant-v5.sh --- ct/homeassistant-v5.sh | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 3d438741..c83f05b5 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -320,10 +320,11 @@ function install_script() { fi } function update_script() { -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ +UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 15 58 4 \ "1" "Update ALL Containers" ON \ "2" "Remove ALL Unused Images" OFF \ "3" "Install HACS" OFF \ + "4" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) clear header_info @@ -358,11 +359,42 @@ msg_info "Installing Home Assistant Comunity Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null cd /var/lib/docker/volumes/hass_config/_data -wget -O - https://get.hacs.xyz | bash - +bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null msg_ok "Installed Home Assistant Comunity Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit fi +if [ "$UPD" == "4" ]; then +clear +header_info +msg_info "Installing FileBrowser" +curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null +filebrowser config init -a '0.0.0.0' &>/dev/null +filebrowser config set -a '0.0.0.0' &>/dev/null +filebrowser users add admin changeme --perm.admin &>/dev/null +msg_ok "Installed FileBrowser" + +msg_info "Creating Service" +service_path="/etc/systemd/system/filebrowser.service" +echo "[Unit] +Description=Filebrowser +After=network-online.target +[Service] +User=root +WorkingDirectory=/root/ +ExecStart=/usr/local/bin/filebrowser -r / +[Install] +WantedBy=default.target" >$service_path + +systemctl enable --now filebrowser.service &>/dev/null +msg_ok "Created Service" + +msg_ok "Completed Successfully!\n" +echo -e "FileBrowser should be reachable by going to the following URL. + ${BL}http://$IP:8080${CL} admin|changeme\n" +exit +fi +} } clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi From f88f59cc42cc2157ec033369e706dfe8b294a048 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 15:54:03 -0500 Subject: [PATCH 0842/3335] Update homeassistant-v5.sh --- ct/homeassistant-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index c83f05b5..cb0745a6 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -395,7 +395,7 @@ echo -e "FileBrowser should be reachable by going to the following URL. exit fi } -} + clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi From 232c9d03f0bdaea4416c76c430b3a78fd06bc15f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 16:40:04 -0500 Subject: [PATCH 0843/3335] Update homeassistant-v5.sh --- ct/homeassistant-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index cb0745a6..2979ae73 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -367,6 +367,7 @@ fi if [ "$UPD" == "4" ]; then clear header_info +IP=$(hostname -I | awk '{print $1}') msg_info "Installing FileBrowser" curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null From 2172a2031ae02b8c8fa7e78b019954dc06b66e9f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 20:21:24 -0500 Subject: [PATCH 0844/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index ce077d53..45dc9abb 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -317,7 +317,7 @@ function install_script() { function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 15 58 4 \ + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Initialize" OFF \ "2" "Update Core" ON \ "3" "Install HACS" OFF \ From 891e6ef1e20e98040b3dac018be2ef02e81274c8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 20:42:08 -0500 Subject: [PATCH 0845/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 45dc9abb..ed7518a8 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -323,10 +323,9 @@ function update_script() { "3" "Install HACS" OFF \ "4" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) - -if [ "$UPD" == "1" ]; then clear header_info +if [ "$UPD" == "1" ]; then echo -e "\n LOG VIEWER - Go to http://${IP}:8123 to setup \n" cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass exit @@ -363,8 +362,6 @@ echo -e "\n Go to http://${IP}:8123 \n" exit fi if [ "$UPD" == "3" ]; then -clear -header_info msg_info "Installing Home Assistant Comunity Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null @@ -375,8 +372,6 @@ echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integrat exit fi if [ "$UPD" == "4" ]; then -clear -header_info msg_info "Installing FileBrowser" curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null From 6a132e0305f0065d4fe2fb19990d6a9f92a4d901 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 20:43:08 -0500 Subject: [PATCH 0846/3335] Update homeassistant-v5.sh --- ct/homeassistant-v5.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 2979ae73..01b3ec40 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -320,7 +320,7 @@ function install_script() { fi } function update_script() { -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 15 58 4 \ + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update ALL Containers" ON \ "2" "Remove ALL Unused Images" OFF \ "3" "Install HACS" OFF \ @@ -353,8 +353,6 @@ msg_ok "Removed ALL Unused Images" exit fi if [ "$UPD" == "3" ]; then -clear -header_info msg_info "Installing Home Assistant Comunity Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null @@ -365,8 +363,6 @@ echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integrat exit fi if [ "$UPD" == "4" ]; then -clear -header_info IP=$(hostname -I | awk '{print $1}') msg_info "Installing FileBrowser" curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null From 091bc88d44d0abd6a3b38168801ec86fefc28c9e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 21:04:04 -0500 Subject: [PATCH 0847/3335] Small Tweak --- ct/node-red-v5.sh | 2 +- ct/paperless-ngx-v5.sh | 2 +- ct/vaultwarden-v5.sh | 2 +- ct/wireguard-v5.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 4ab0b95e..f1ab8ffc 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -309,7 +309,7 @@ function install_script() { fi } function update_script() { -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update ${APP}" ON \ "2" "Install Themes" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 6b034fb2..469e764c 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -313,7 +313,7 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') SER=/etc/systemd/system/paperless-task-queue.service -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update Paperless-ngx to $RELEASE" ON \ "2" "Paperless-ngx Credentials" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index beed903f..8da83b3b 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -317,7 +317,7 @@ WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/relea grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "VaultWarden $VAULT" ON \ "2" "Web-Vault $WVRELEASE" OFF \ "3" "Show Admin Token" OFF \ diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index d5432e0a..5c6a2ddf 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -310,7 +310,7 @@ function install_script() { } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update ${APP} LXC" ON \ "2" "Install WGDashboard" OFF \ 3>&1 1>&2 2>&3) From 6ec035f346df52f540db736f66297f2fabc4fc03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 21:06:00 -0500 Subject: [PATCH 0848/3335] tweak --- ct/node-red-v5.sh | 2 +- ct/paperless-ngx-v5.sh | 2 +- ct/vaultwarden-v5.sh | 2 +- ct/wireguard-v5.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index f1ab8ffc..c9665f5a 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -309,7 +309,7 @@ function install_script() { fi } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install Themes" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 469e764c..1c6abd8e 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -313,7 +313,7 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') SER=/etc/systemd/system/paperless-task-queue.service -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update Paperless-ngx to $RELEASE" ON \ "2" "Paperless-ngx Credentials" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 8da83b3b..484b6cf8 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -317,7 +317,7 @@ WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/relea grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ "1" "VaultWarden $VAULT" ON \ "2" "Web-Vault $WVRELEASE" OFF \ "3" "Show Admin Token" OFF \ diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 5c6a2ddf..ed69d7ee 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -310,7 +310,7 @@ function install_script() { } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP} LXC" ON \ "2" "Install WGDashboard" OFF \ 3>&1 1>&2 2>&3) From e7d298ca3bd0ad42c9999d651ceb2052f52d6f30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 21:10:04 -0500 Subject: [PATCH 0849/3335] tweak --- ct/node-red-v5.sh | 2 -- ct/paperless-ngx-v5.sh | 3 +-- ct/vaultwarden-v5.sh | 1 - ct/wireguard-v5.sh | 1 + 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index c9665f5a..81173327 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -331,8 +331,6 @@ msg_ok "Update Successful" exit fi if [ "$UPD" == "2" ]; then -clear -header_info THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ "dark" "" OFF \ "dracula" "" OFF \ diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 1c6abd8e..15a1b86e 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -382,12 +382,11 @@ msg_ok "Updated Successfully!\n" exit fi if [ "$UPD" == "2" ]; then -clear -header_info cat paperless.creds exit fi } + clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 484b6cf8..af50e1f4 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -357,7 +357,6 @@ echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" exit; fi if [ "$UPD" == "2" ]; then - msg_info "Stopping Vaultwarden" systemctl stop vaultwarden.service msg_ok "Stopped Vaultwarden" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index ed69d7ee..a7cae47a 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -369,6 +369,7 @@ echo -e "WGDashboard should be reachable by going to the following URL. exit fi } + clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi From e387388c87bd013b8cda691fdcbcafd4745da8d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 23:47:08 -0500 Subject: [PATCH 0850/3335] Update ubuntu-v5.sh --- ct/ubuntu-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index bcbc59a0..5433958e 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -130,7 +130,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" OFF \ "22.04" "Jammy" ON \ @@ -138,7 +138,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) From e04913f9839d6b766995a62f7b70a050634034d2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 23:48:31 -0500 Subject: [PATCH 0851/3335] Update emby-v5.sh --- ct/emby-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 47f97452..d437d570 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -142,7 +142,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) From 2a87fea9924aa7746bd0d01f4bb20f033cb3ca32 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Jan 2023 23:56:54 -0500 Subject: [PATCH 0852/3335] whiptail tweaks --- ct/adguard-v4.sh | 2 +- ct/adguard-v5.sh | 2 +- ct/alpine-v4.sh | 2 +- ct/archlinux-v4.sh | 2 +- ct/blocky-v4.sh | 2 +- ct/casaos-v4.sh | 2 +- ct/changedetection-v4.sh | 2 +- ct/daemonsync-v4.sh | 2 +- ct/dashy-v4.sh | 2 +- ct/debian-v4.sh | 2 +- ct/debian-v5.sh | 2 +- ct/deconz-v4.sh | 2 +- ct/docker-v4.sh | 2 +- ct/docker-v5.sh | 2 +- ct/emby-v4.sh | 2 +- ct/emqx-v4.sh | 2 +- ct/emqx-v5.sh | 2 +- ct/esphome-v4.sh | 2 +- ct/esphome-v5.sh | 2 +- ct/grafana-v4.sh | 2 +- ct/grafana-v5.sh | 2 +- ct/grocy-v4.sh | 2 +- ct/heimdalldashboard-v4.sh | 2 +- ct/heimdalldashboard-v5.sh | 2 +- ct/homeassistant-core-v4.sh | 2 +- ct/homeassistant-core-v5.sh | 2 +- ct/homeassistant-v4.sh | 2 +- ct/homeassistant-v5.sh | 2 +- ct/homebridge-v4.sh | 2 +- ct/homepage-v4.sh | 2 +- ct/hyperion-v4.sh | 2 +- ct/influxdb-v4.sh | 2 +- ct/iobroker-v4.sh | 2 +- ct/jellyfin-v4.sh | 4 ++-- ct/jellyfin-v5.sh | 4 ++-- ct/k0s-v4.sh | 2 +- ct/keycloak-v4.sh | 2 +- ct/magicmirror-v4.sh | 2 +- ct/mariadb-v4.sh | 2 +- ct/meshcentral-v4.sh | 2 +- ct/motioneye-v4.sh | 2 +- ct/mqtt-v4.sh | 2 +- ct/mqtt-v5.sh | 2 +- ct/n8n-v4.sh | 2 +- ct/navidrome-v4.sh | 2 +- ct/nextcloudpi-v4.sh | 2 +- ct/nextcloudpi-v5.sh | 2 +- ct/nginx-proxy-manager-v4.sh | 2 +- ct/nginxproxymanager-v5.sh | 2 +- ct/nocodb-v4.sh | 2 +- ct/nocodb-v5.sh | 2 +- ct/node-red-v4.sh | 2 +- ct/node-red-v5.sh | 2 +- ct/omada-v4.sh | 4 ++-- ct/omada-v5.sh | 4 ++-- ct/omv-v4.sh | 2 +- ct/omv-v5.sh | 2 +- ct/openhab-v4.sh | 2 +- ct/openhab-v5.sh | 2 +- ct/paperless-ngx-v4.sh | 2 +- ct/paperless-ngx-v5.sh | 2 +- ct/photoprism-v4.sh | 2 +- ct/photoprism-v5.sh | 2 +- ct/pihole-v4.sh | 2 +- ct/pihole-v5.sh | 2 +- ct/plex-v4.sh | 4 ++-- ct/plex-v5.sh | 4 ++-- ct/podman-homeassistant-v4.sh | 2 +- ct/podman-v4.sh | 2 +- ct/postgresql-v4.sh | 2 +- ct/postgresql-v5.sh | 2 +- ct/prometheus-v4.sh | 2 +- ct/prometheus-v5.sh | 2 +- ct/scrypted-v4.sh | 2 +- ct/scrypted-v5.sh | 2 +- ct/shinobi-v4.sh | 2 +- ct/shinobi-v5.sh | 2 +- ct/syncthing-v4.sh | 2 +- ct/syncthing-v5.sh | 2 +- ct/technitiumdns-v4.sh | 2 +- ct/technitiumdns-v5.sh | 2 +- ct/trilium-v4.sh | 2 +- ct/trilium-v5.sh | 2 +- ct/ubuntu-v4.sh | 2 +- ct/umbrel-v4.sh | 2 +- ct/umbrel-v5.sh | 2 +- ct/unifi-v4.sh | 2 +- ct/unifi-v5.sh | 2 +- ct/uptimekuma-v4.sh | 2 +- ct/uptimekuma-v5.sh | 2 +- ct/vaultwarden-v4.sh | 2 +- ct/vaultwarden-v5.sh | 2 +- ct/whoogle-v4.sh | 2 +- ct/whoogle-v5.sh | 2 +- ct/wikijs-v4.sh | 2 +- ct/wikijs-v5.sh | 2 +- ct/wireguard-v4.sh | 2 +- ct/wireguard-v5.sh | 2 +- ct/yunohost-v5.sh | 2 +- ct/zigbee2mqtt-v4.sh | 2 +- ct/zigbee2mqtt-v5.sh | 2 +- ct/zwave-js-ui-v4.sh | 2 +- ct/zwave-js-ui-v5.sh | 2 +- vm/haos-vm-v4.sh | 2 +- 104 files changed, 110 insertions(+), 110 deletions(-) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index 1b65ff63..c430c632 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index a9b1d654..19253057 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -132,7 +132,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/alpine-v4.sh b/ct/alpine-v4.sh index 74ca977f..a95cc37d 100644 --- a/ct/alpine-v4.sh +++ b/ct/alpine-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/archlinux-v4.sh b/ct/archlinux-v4.sh index 0c88369e..001ab7ff 100644 --- a/ct/archlinux-v4.sh +++ b/ct/archlinux-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index 122669b1..7c681676 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index b6c9364a..59da684a 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -107,7 +107,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/changedetection-v4.sh b/ct/changedetection-v4.sh index db179033..61bec458 100644 --- a/ct/changedetection-v4.sh +++ b/ct/changedetection-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index 33bc978f..d8d5fca0 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index 4f777b81..d824ab70 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 25501b0e..7f6c9410 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index ff89f394..d357e70c 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -129,7 +129,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 0a373336..7740e731 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index fcaf2469..6e18ded5 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 9bfefa5d..05a3e7d1 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index c1461b71..0c381a19 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -114,7 +114,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index 21499816..64779851 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 516dcb11..1c7fd2d7 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index ff206eec..e6f44de4 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index c0075256..08853e26 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index f72fd3cf..f6de91c3 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index f44e350b..d8e30cfa 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 3c0f7e0e..90e9cd22 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index 6c4b3492..af75b933 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 1893c29b..6105a6b5 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index 684577a7..93a64643 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index ed7518a8..c4a108af 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -137,7 +137,7 @@ function default_settings() { } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 23577ce7..80218197 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 01b3ec40..f2c18915 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -137,7 +137,7 @@ function default_settings() { } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index ff5edd74..2c3eaa77 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index a7713489..5b7430fe 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh index 80f618eb..d9125d52 100644 --- a/ct/hyperion-v4.sh +++ b/ct/hyperion-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index 81b5457e..b1ca3aa8 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 17f878fe..4b54689b 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index 37905cd7..aab2b0a2 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -114,7 +114,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index eeece3f7..1c500c18 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -136,7 +136,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -144,7 +144,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/k0s-v4.sh b/ct/k0s-v4.sh index 7e8ac4ba..8254c26c 100644 --- a/ct/k0s-v4.sh +++ b/ct/k0s-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 4702c46e..3266c386 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index ff4c7365..6c172502 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index 20a1ff7a..cf31225e 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 8de241a6..54c21a91 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index f8a8663b..41ead7e5 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh index 0518991c..16d80e43 100644 --- a/ct/mqtt-v4.sh +++ b/ct/mqtt-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index f755ee24..bff59605 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -131,7 +131,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index f09ea205..8cff0d8d 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index ed513d68..893f9311 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index 84ed147c..e0a70b50 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 21a33b6f..511f39f8 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index 6cc5cb1b..a6ab98ad 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 5f6dc182..ccb6d296 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 7503fb7a..2406fd20 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 2e100e69..1b6510da 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index 2ca913de..fec6b066 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 81173327..0a207309 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index 2b48b2a4..f4db3280 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -113,7 +113,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 2d68c82e..ef01599e 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -142,7 +142,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index 9aa13239..e279912a 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 23f9be1e..a9a5366a 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index 75d60950..2c1e1541 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 42edfccf..033c762c 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index b51119b6..6ed7022c 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 15a1b86e..9e6d1c24 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index fc5b8c7f..e645f8f2 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 5a697f43..5e5a9961 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -132,7 +132,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index e6a8b6d8..492692bc 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index b5728a0e..9e8bb637 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index 6566426f..9f12ecb5 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -114,7 +114,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index f437089b..944e9165 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -135,7 +135,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ @@ -143,7 +143,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 9aaa9f40..36a5fef9 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -108,7 +108,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/podman-v4.sh b/ct/podman-v4.sh index 49878c07..1a28ea73 100644 --- a/ct/podman-v4.sh +++ b/ct/podman-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index cee3ec14..771d0568 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 02acf365..e1412d2f 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 3cc52e25..474cc21e 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index bdddfc63..490bd911 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index 77f84839..e8d364c9 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index eaa3cb62..788759d7 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh index 08b8fcb9..427e7e7a 100644 --- a/ct/shinobi-v4.sh +++ b/ct/shinobi-v4.sh @@ -114,7 +114,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index bf576ece..94d0b2f8 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -142,7 +142,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index 85da6fc5..c66e96e1 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 480b4529..892c06f1 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index 70716601..d726ba0c 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index bbc02657..696fdd95 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index 4342cf70..3a9ebe38 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 7a49b2bf..54cbf786 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 755af1cd..4c47da6d 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -113,7 +113,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 859696e8..2d663fca 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -107,7 +107,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index b63fa1ba..047ec077 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -135,7 +135,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index b0a9bfd4..bf24121e 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index e94cf63f..02550614 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index 297aae54..630b2b04 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 5ba683a2..a82870c4 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index a57b2191..f4ec98da 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index af50e1f4..0a607672 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -133,7 +133,7 @@ function default_settings() { } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 422e9d46..41cc947e 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -104,7 +104,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index a68174af..08741c4c 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index 486100a7..bb5ad6b3 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 465d6f82..c38f34d1 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index 95bfda0a..dd3b594f 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -106,7 +106,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index a7cae47a..824e6f7c 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 401b5a8a..a1382e7f 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -129,7 +129,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 53a0cc5b..46a81164 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 26382ab0..5c8348f4 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -134,7 +134,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 5928e9b9..317f5841 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -105,7 +105,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index ce3b0d83..1b5fb451 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -133,7 +133,7 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ 3>&1 1>&2 2>&3) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index c66b2e6f..8dbf2889 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -129,7 +129,7 @@ if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMI else if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; fi -MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "i440fx" "Machine i440fx" ON \ "q35" "Machine q35" OFF \ 3>&1 1>&2 2>&3) From 33017199339b50366d4d0367137b6d05845746fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:51:26 -0500 Subject: [PATCH 0853/3335] Create navidrome-v5-install.sh --- install/navidrome-v5-install.sh | 168 ++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 install/navidrome-v5-install.sh diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh new file mode 100644 index 00000000..a6230259 --- /dev/null +++ b/install/navidrome-v5-install.sh @@ -0,0 +1,168 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies (patience)" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y ffmpeg +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Installing Navidrome" +install -d -o root -g root /opt/navidrome +install -d -o root -g root /var/lib/navidrome +$STD wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz +$STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ +chown -R root:root /opt/navidrome +mkdir -p /music +cat </var/lib/navidrome/navidrome.toml +MusicFolder = '/music' +EOF +msg_ok "Installed Navidrome" + +msg_info "Creating Service" +service_path="/etc/systemd/system/navidrome.service" + +echo "[Unit] +Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic +After=remote-fs.target network.target +AssertPathExists=/var/lib/navidrome + +[Service] +User=root +Group=root +Type=simple +ExecStart=/opt/navidrome/navidrome --configfile '/var/lib/navidrome/navidrome.toml' +WorkingDirectory=/var/lib/navidrome +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +DevicePolicy=closed +NoNewPrivileges=yes +PrivateTmp=yes +PrivateUsers=yes +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap +ReadWritePaths=/var/lib/navidrome +ProtectSystem=full + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl daemon-reload +$STD systemctl enable --now navidrome.service + +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/Navidrome.tar.gz +msg_ok "Cleaned" From 0f40096eed72b82f750bb9eec1eca75bb2e3a1ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:52:37 -0500 Subject: [PATCH 0854/3335] Create n8n-v5-install.sh --- install/n8n-v5-install.sh | 140 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 install/n8n-v5-install.sh diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh new file mode 100644 index 00000000..64f241d5 --- /dev/null +++ b/install/n8n-v5-install.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing n8n (Patience)" +$STD npm install --global n8n +msg_ok "Installed n8n" + +msg_info "Creating Service" +cat </etc/systemd/system/n8n.service +[Unit] +Description=n8n + +[Service] +Type=simple +ExecStart=n8n start +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now n8n +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 4058222b23791e5a7b06353328437f5d4a751f90 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:55:46 -0500 Subject: [PATCH 0855/3335] Create motioneye-v5-install.sh --- install/motioneye-v5-install.sh | 148 ++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 install/motioneye-v5-install.sh diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh new file mode 100644 index 00000000..f6a1e5e4 --- /dev/null +++ b/install/motioneye-v5-install.sh @@ -0,0 +1,148 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y cifs-utils +msg_ok "Installed Dependencies" + +msg_info "Installing Motion" +$STD apt-get install -y motion +systemctl stop motion +$STD systemctl disable motion +msg_ok "Installed Motion" + +msg_info "Installing FFmpeg" +$STD apt-get install -y ffmpeg v4l-utils +msg_ok "Installed FFmpeg" + +msg_info "Installing Python" +$STD apt-get update +$STD apt-get install -y python2 +curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py +$STD python2 get-pip.py +$STD apt-get install -y libffi-dev libzbar-dev libzbar0 +$STD apt-get install -y python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev +msg_ok "Installed Python" + +msg_info "Installing MotionEye" +$STD apt-get update +$STD pip install motioneye +mkdir -p /etc/motioneye +cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf +mkdir -p /var/lib/motioneye +msg_ok "Installed MotionEye" + +msg_info "Creating Service" +cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service +$STD systemctl enable motioneye +systemctl start motioneye +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 653de892517f48720a4530fa6f2edda27fca3f86 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:56:43 -0500 Subject: [PATCH 0856/3335] Create meshcentral-v5-install.sh --- install/meshcentral-v5-install.sh | 129 ++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 install/meshcentral-v5-install.sh diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh new file mode 100644 index 00000000..ebc598f8 --- /dev/null +++ b/install/meshcentral-v5-install.sh @@ -0,0 +1,129 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing MeshCentral" +mkdir /opt/meshcentral +cd /opt/meshcentral +$STD npm install meshcentral +$STD node node_modules/meshcentral --install +msg_ok "Installed MeshCentral" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From b05aa11bc9d31c02abaf68f6b37e69f652bd516a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:57:40 -0500 Subject: [PATCH 0857/3335] Create mariadb-v5-install.sh --- install/mariadb-v5-install.sh | 135 ++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 install/mariadb-v5-install.sh diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh new file mode 100644 index 00000000..83f6d689 --- /dev/null +++ b/install/mariadb-v5-install.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing MariaDB" +$STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup) +$STD apt-get update +$STD apt-get install -y mariadb-server +msg_ok "Installed MariaDB" + +read -r -p "Would you like to add Adminer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + ADMINER="Y" +else + ADMINER="N" +fi + +if [[ $ADMINER == "Y" ]]; then + msg_info "Installing Adminer" + $STD apt install -y adminer + $STD a2enconf adminer + systemctl reload apache2 + msg_ok "Installed Adminer" +fi + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From b2e17c04953080e2a21332c8ded0428408ddc738 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:58:36 -0500 Subject: [PATCH 0858/3335] Create magicmirror-v5-install.sh --- install/magicmirror-v5-install.sh | 241 ++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 install/magicmirror-v5-install.sh diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh new file mode 100644 index 00000000..3405239b --- /dev/null +++ b/install/magicmirror-v5-install.sh @@ -0,0 +1,241 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Setting up MagicMirror Repository" +$STD git clone https://github.com/MichMich/MagicMirror /opt/magicmirror +msg_ok "Set up MagicMirror Repository" + +msg_info "Installing MagicMirror" +cd /opt/magicmirror +$STD npm install --only=prod --omit=dev + +cat </opt/magicmirror/config/config.js +let config = { + address: "0.0.0.0", + port: 8080, + basePath: "/", + ipWhitelist: [], + useHttps: false, + httpsPrivateKey: "", + httpsCertificate: "", + language: "en", + locale: "en-US", + logLevel: ["INFO", "LOG", "WARN", "ERROR"], + timeFormat: 24, + units: "metric", + serverOnly: true, + modules: [ + { + module: "alert", + }, + { + module: "updatenotification", + position: "top_bar" + }, + { + module: "clock", + position: "top_left" + }, + { + module: "calendar", + header: "US Holidays", + position: "top_left", + config: { + calendars: [ + { + symbol: "calendar-check", + url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" + } + ] + } + }, + { + module: "compliments", + position: "lower_third" + }, + { + module: "weather", + position: "top_right", + config: { + weatherProvider: "openweathermap", + type: "current", + location: "New York", + locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city + apiKey: "YOUR_OPENWEATHER_API_KEY" + } + }, + { + module: "weather", + position: "top_right", + header: "Weather Forecast", + config: { + weatherProvider: "openweathermap", + type: "forecast", + location: "New York", + locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city + apiKey: "YOUR_OPENWEATHER_API_KEY" + } + }, + { + module: "newsfeed", + position: "bottom_bar", + config: { + feeds: [ + { + title: "New York Times", + url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml" + } + ], + showSourceTitle: true, + showPublishDate: true, + broadcastNewsFeeds: true, + broadcastNewsUpdates: true + } + }, + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") {module.exports = config;} +EOF +msg_ok "Installed MagicMirror" + +msg_info "Creating Service" +service_path="/etc/systemd/system/magicmirror.service" +echo "[Unit] +Description=Magic Mirror +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +WorkingDirectory=/opt/magicmirror/ +ExecStart=/usr/bin/node serveronly + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now magicmirror +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From ad525d9bd4722aa59418193c5de0a792796c2394 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 13:59:41 -0500 Subject: [PATCH 0859/3335] Create keycloak-v5-install.sh --- install/keycloak-v5-install.sh | 136 +++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 install/keycloak-v5-install.sh diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh new file mode 100644 index 00000000..032c6a6b --- /dev/null +++ b/install/keycloak-v5-install.sh @@ -0,0 +1,136 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y openjdk-11-jdk +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) }') +msg_info "Installing Keycloak v$RELEASE" +cd /opt +wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz +$STD tar -xvf keycloak-$RELEASE.tar.gz +mv keycloak-$RELEASE keycloak +msg_ok "Installed Keycloak" + +msg_info "Creating Service" +service_path="/etc/systemd/system/keycloak.service" +echo "[Unit] +Description=Keycloak +After=network-online.target +[Service] +User=root +WorkingDirectory=/opt/keycloak +ExecStart=/opt/keycloak/bin/kc.sh start-dev +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now keycloak.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 59597dbf8f6d6a8b814c6c168fd59593203fb49c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:00:59 -0500 Subject: [PATCH 0860/3335] Create iobroker-v5-install.sh --- install/iobroker-v5-install.sh | 118 +++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 install/iobroker-v5-install.sh diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh new file mode 100644 index 00000000..c25ff672 --- /dev/null +++ b/install/iobroker-v5-install.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing ioBroker (Patience)" +$STD bash <(curl -fsSL https://iobroker.net/install.sh) +msg_ok "Installed ioBroker" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 8a1b797b8117ab7dd488f9750199385f5e4c6d21 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:02:39 -0500 Subject: [PATCH 0861/3335] Create influxdb-v5-install.sh --- install/influxdb-v5-install.sh | 154 +++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 install/influxdb-v5-install.sh diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh new file mode 100644 index 00000000..dcd61d3d --- /dev/null +++ b/install/influxdb-v5-install.sh @@ -0,0 +1,154 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y lsb-base +$STD apt-get install -y lsb-release +$STD apt-get install -y gnupg2 +msg_ok "Installed Dependencies" + +msg_info "Setting up InfluxDB Repository" +$STD apt-key add <(curl -fsSL https://repos.influxdata.com/influxdb.key) +cat </etc/apt/sources.list.d/influxdb.list +deb https://repos.influxdata.com/debian bullseye stable +EOF +msg_ok "Set up InfluxDB Repository" + +read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt +if [[ $prompt == "2" ]]; then + INFLUX="2" +else + INFLUX="1" +fi + +msg_info "Installing InfluxDB" +$STD apt-get update +if [[ $INFLUX == "2" ]]; then + $STD apt-get install -y influxdb2 +else + $STD apt-get install -y influxdb +fi +$STD systemctl enable --now influxdb +msg_ok "Installed InfluxDB" + +read -r -p "Would you like to add Telegraf? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + TELEGRAF="Y" +else + TELEGRAF="N" +fi + +if [[ $TELEGRAF == "Y" ]]; then + msg_info "Installing Telegraf" + $STD apt-get install -y telegraf + msg_ok "Installed Telegraf" +fi + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9df08670e0b779c5d9b13c486769aac497f734f4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:04:21 -0500 Subject: [PATCH 0862/3335] Create hyperion-v5-install.sh --- install/hyperion-v5-install.sh | 125 +++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 install/hyperion-v5-install.sh diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh new file mode 100644 index 00000000..fca9b2d9 --- /dev/null +++ b/install/hyperion-v5-install.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y lsb-release +$STD apt-get install -y gpg +$STD apt-get install -y apt-transport-https +msg_ok "Installed Dependencies" + +msg_info "Installing Hyperion" +wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg +cat </etc/apt/sources.list.d/hyperion.list +deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ bullseye main +EOF +$STD apt-get update +$STD apt-get install -y hyperion +$STD systemctl enable --now hyperion@root.service +msg_ok "Installed Hyperion" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove >/dev/null +$STD apt-get autoclean >/dev/null +msg_ok "Cleaned" From ccc8f1c5c03729064fe620dd4426d98f048e7a1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:06:06 -0500 Subject: [PATCH 0863/3335] Create navidrome-v5.sh --- ct/navidrome-v5.sh | 373 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 ct/navidrome-v5.sh diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh new file mode 100644 index 00000000..53750da7 --- /dev/null +++ b/ct/navidrome-v5.sh @@ -0,0 +1,373 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ __ _ __ + / | / /___ __ v5__(_)___/ /________ ____ ___ ___ + / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ + / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ +/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Navidrome" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/navidrome ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Stopping ${APP}" +systemctl stop navidrome.service +msg_ok "Stopped Navidrome" + +msg_info "Updating to v${RELEASE}" +wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null +msg_ok "Updated ${APP}" +rm Navidrome.tar.gz + +msg_info "${GN} Starting ${APP}" +systemctl start navidrome.service +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:4533${CL} \n" From ff7e51ca4c0d0d28b0e86f62991e351a175fe2d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:07:10 -0500 Subject: [PATCH 0864/3335] Create n8n-v5.sh --- ct/n8n-v5.sh | 362 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 ct/n8n-v5.sh diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh new file mode 100644 index 00000000..de9aef30 --- /dev/null +++ b/ct/n8n-v5.sh @@ -0,0 +1,362 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___ + / _ \ + _ __ | (_) |_v5_ + | _ \ > _ <| _ \ + | | | | (_) | | | | + |_| |_|\___/|_| |_| + +EOF +} +clear +header_info +echo -e "Loading..." +APP="n8n" +var_disk="3" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/n8n.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +npm update -g n8n &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5678${CL} \n" From 29a52c8fa89360d85bca0be897e8031d5aa12773 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:08:22 -0500 Subject: [PATCH 0865/3335] Create motioneye-v5.sh --- ct/motioneye-v5.sh | 361 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 ct/motioneye-v5.sh diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh new file mode 100644 index 00000000..94b1d14a --- /dev/null +++ b/ct/motioneye-v5.sh @@ -0,0 +1,361 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ___ __ _ + / |/ /___ / /_(_)___ ____v5___ __ _____ + / /|_/ / __ \/ __/ / __ \/ __ \/ _ \/ / / / _ \ + / / / / /_/ / /_/ / /_/ / / / / __/ /_/ / __/ +/_/ /_/\____/\__/_/\____/_/ /_/\___/\__, /\___/ + /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Motioneye" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/motioneye.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +pip install motioneye --upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8765${CL} \n" From 2f77898de3c155d9c2d0c284f3c9720058531707 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:11:43 -0500 Subject: [PATCH 0866/3335] Create meshcentral-v5.sh --- ct/meshcentral-v5.sh | 362 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 ct/meshcentral-v5.sh diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh new file mode 100644 index 00000000..6f83cd69 --- /dev/null +++ b/ct/meshcentral-v5.sh @@ -0,0 +1,362 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ___ __ ______ __ __ + / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / + / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / + / / / / __(__ ) / / / /___/ __/ / / / /_/ / / /_/ / / +/_/ /_/\___/____/_/ /_/\____/\___/_/ /_/\__/_/ v5\__,_/_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="MeshCentral" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/meshcentral ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" From 667a34b11afec9fc0ba1e9c8a850e684f13cd09c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:12:52 -0500 Subject: [PATCH 0867/3335] Create mariadb-v5.sh --- ct/mariadb-v5.sh | 360 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/mariadb-v5.sh diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh new file mode 100644 index 00000000..72d2af41 --- /dev/null +++ b/ct/mariadb-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ___ _ ____ ____ + / |/ /___ ______(_)___ _/ __ \/ __ ) + / /|_/ / __ / ___/ / __ / / / / __ | + / / / / /_/ / / / / /_/ / /_/ / /_/ / +/_/ /_/\__,_/_/v5/_/\__,_/_____/_____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="MariaDB" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From dda940d8f6e8336f7ffaf888d61f05d1f91262d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:14:27 -0500 Subject: [PATCH 0868/3335] Create magicmirror-v5.sh --- ct/magicmirror-v5.sh | 364 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 ct/magicmirror-v5.sh diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh new file mode 100644 index 00000000..74e32759 --- /dev/null +++ b/ct/magicmirror-v5.sh @@ -0,0 +1,364 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ___ _ __ ____ + / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ + / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ + / / / / /_/ / /_/ / / /__/ / / / / / / / / /_/ / / +/_/ /_/\__,_/\__, /_/\___/_/ /_/_/_/ /_/ \____/_/ + /____/ v5 + +EOF +} +clear +header_info +echo -e "Loading..." +APP="MagicMirror" +var_disk="3" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/magicmirror ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +cd /opt/magicmirror +git pull &>/dev/null +npm install --only=prod --omit=dev &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" From 7577965e6255014d49faa2baac056bea0aa91b39 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:15:59 -0500 Subject: [PATCH 0869/3335] Create keycloak-v5.sh --- ct/keycloak-v5.sh | 363 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 363 insertions(+) create mode 100644 ct/keycloak-v5.sh diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh new file mode 100644 index 00000000..78dfca0a --- /dev/null +++ b/ct/keycloak-v5.sh @@ -0,0 +1,363 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ __ __ + / //_/__v5__ _______/ /___ ____ _/ /__ + / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ + / /| / __/ /_/ / /__/ / /_/ / /_/ / ,< +/_/ |_\___/\__, /\___/_/\____/\__,_/_/|_| + /____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Keycloak" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/keycloak.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" From a41f82172fee54929fd616394282f4cf8a188087 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:17:22 -0500 Subject: [PATCH 0870/3335] Create iobroker-v5.sh --- ct/iobroker-v5.sh | 362 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 ct/iobroker-v5.sh diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh new file mode 100644 index 00000000..f5e08b8e --- /dev/null +++ b/ct/iobroker-v5.sh @@ -0,0 +1,362 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ ____ __ + (_)___ / __ )_________ / /_____ _____ + / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ + / / /_/ / /_/ / / / /_/ / ,< / __/ / +/_/\____/_____/_/ v5\____/_/|_|\___/_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="ioBroker" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/iobroker ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8081${CL} \n" From 2e8b9db4ded961f45fb67993d813c7553de1cc1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:19:19 -0500 Subject: [PATCH 0871/3335] Create influxdb-v5.sh --- ct/influxdb-v5.sh | 360 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/influxdb-v5.sh diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh new file mode 100644 index 00000000..0c854a39 --- /dev/null +++ b/ct/influxdb-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ ______ ____ ____ + / _/_v5 / __/ /_ ___ __/ __ \/ __ ) + / // __ \/ /_/ / / / / |/_/ / / / __ | + _/ // / / / __/ / /_/ /> &2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From f76c939d88d0860863a0f8bee5a1ab4eac84aa4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 14:20:30 -0500 Subject: [PATCH 0872/3335] Create hyperion-v5.sh --- ct/hyperion-v5.sh | 377 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 ct/hyperion-v5.sh diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh new file mode 100644 index 00000000..ea2db61e --- /dev/null +++ b/ct/hyperion-v5.sh @@ -0,0 +1,377 @@ +#!/usr/bin/env bash +function header_info { +cat <<"EOF" + __ __ _ + / / / /_ ______v5___ _____(_)___ ____ + / /_/ / / / / __ \/ _ \/ ___/ / __ \/ __ \ + / __ / /_/ / /_/ / __/ / / / /_/ / / / / +/_/ /_/\__, / .___/\___/_/ /_/\____/_/ /_/ + /____/_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Hyperion" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL} \n" From 3320b6361091f7d45364cac951b4c10bb2ffe034 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 15:19:54 -0500 Subject: [PATCH 0873/3335] Delete navidrome-update.sh prune --- misc/navidrome-update.sh | 46 ---------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 misc/navidrome-update.sh diff --git a/misc/navidrome-update.sh b/misc/navidrome-update.sh deleted file mode 100644 index 333632cc..00000000 --- a/misc/navidrome-update.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -function update_info { - cat <<"EOF" - _ __ _ __ - / | / /___ __ __(_)___/ /________ ____ ___ ___ - / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ - / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ -/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ - UPDATE - -EOF -} -update_info -while true; do - read -p "This will Update Navidrome to v$RELEASE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -sleep 2 -echo -e "${GN} Stopping Navidrome... ${CL}" -systemctl stop navidrome.service -sleep 1 - -echo -e "${GN} Updating to v${RELEASE}... ${CL}" -wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null -tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null - -echo -e "${GN} Cleaning up... ${CL}" -rm Navidrome.tar.gz - -echo -e "${GN} Starting Navidrome... ${CL}" -systemctl start navidrome.service -sleep 1 -echo -e "${GN} Finished Update ${CL}" From bbe75faf40544ebf1206b51635663c9ad094a055 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 15:20:54 -0500 Subject: [PATCH 0874/3335] Delete heimdalldashboard-all-update.sh prune --- misc/heimdalldashboard-all-update.sh | 118 --------------------------- 1 file changed, 118 deletions(-) delete mode 100644 misc/heimdalldashboard-all-update.sh diff --git a/misc/heimdalldashboard-all-update.sh b/misc/heimdalldashboard-all-update.sh deleted file mode 100644 index e7b1de62..00000000 --- a/misc/heimdalldashboard-all-update.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env bash -set -e -PP=$(echo "\e[1;35m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -while true; do - read -p "This will Update Heimdall Dashboard. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${PP} - _ _ _ _ _ _ _____ _ _ _ - | | | | (_) | | | | | | __ \ | | | | | | - | |__| | ___ _ _ __ ___ __| | __ _| | | | | | | __ _ ___| |__ | |__ ___ __ _ _ __ __| | - | __ |/ _ \ | _ _ \ / _ |/ _ | | | | | | |/ _ / __| _ \| _ \ / _ \ / _ | __/ _ | - | | | | __/ | | | | | | (_| | (_| | | | | |__| | (_| \__ \ | | | |_) | (_) | (_| | | | (_| | - |_| |_|\___|_|_| |_| |_|\__,_|\__,_|_|_| |_____/ \__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_| - ${RD}UPDATE -${CL}" -} - -header_info - -echo -en "${GN} Stopping Heimdall Dashboard... " -systemctl disable heimdall.service &>/dev/null -systemctl stop heimdall -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Backing up Data... " -if [ -d "/opt/Heimdall-2.4.6" ]; then - cp -R /opt/Heimdall-2.4.6/database database-backup - cp -R /opt/Heimdall-2.4.6/public public-backup -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - cp -R /opt/Heimdall-2.4.7b/database database-backup - cp -R /opt/Heimdall-2.4.7b/public public-backup -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - cp -R /opt/Heimdall-2.4.8/database database-backup - cp -R /opt/Heimdall-2.4.8/public public-backup -else - cp -R /opt/Heimdall/database database-backup - cp -R /opt/Heimdall/public public-backup -fi -sleep 1 -echo -e "${CM}${CL} \r" - -RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -echo -en "${GN} Updating Heimdall Dashboard to ${RELEASE}... " -curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null -tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -if [ ! -d "/opt/Heimdall" ]; then - mv Heimdall-${VER} /opt/Heimdall -else - cp -R Heimdall-${VER}/* /opt/Heimdall -fi -echo -e "${CM}${CL} \r" - -service_path="/etc/systemd/system/heimdall.service" -echo "[Unit] -Description=Heimdall -After=network.target - -[Service] -Restart=always -RestartSec=5 -Type=simple -User=root -WorkingDirectory=/opt/Heimdall -ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 -TimeoutStopSec=30 - -[Install] -WantedBy=multi-user.target" >$service_path - -echo -en "${GN} Restoring Data... " -cp -R database-backup/* /opt/Heimdall/database -cp -R public-backup/* /opt/Heimdall/public -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleanup... " -if [ -d "/opt/Heimdall-2.4.6" ]; then - rm -rf /opt/Heimdall-2.4.6 - rm -rf /opt/v2.4.6.tar.gz -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - rm -rf /opt/Heimdall-2.4.7b - rm -rf /opt/v2.4.7b.tar.gz -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - rm -rf /opt/Heimdall-2.4.8 - rm -rf /opt/v2.4.8.tar.gz -fi - -rm -rf ${RELEASE}.tar.gz -rm -rf Heimdall-${VER} -rm -rf public-backup -rm -rf database-backup -rm -rf Heimdall -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting Heimdall Dashboard... " -systemctl enable --now heimdall.service &>/dev/null -sleep 2 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Finished! ${CL}\n" From b839862989718c2780c62313280c81d3db9cbca5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 15:35:22 -0500 Subject: [PATCH 0875/3335] Create homepage-v5-install.sh --- install/homepage-v5-install.sh | 148 +++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 install/homepage-v5-install.sh diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh new file mode 100644 index 00000000..b477f518 --- /dev/null +++ b/install/homepage-v5-install.sh @@ -0,0 +1,148 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Installed Node.js" + +msg_info "Installing Homepage" +$STD git clone https://github.com/benphelps/homepage.git /opt/homepage +cd /opt/homepage +mkdir -p config +$STD pnpm install +$STD pnpm build +msg_ok "Installed Homepage" + +msg_info "Creating Service" +service_path="/etc/systemd/system/homepage.service" +echo "[Unit] +Description=Homepage +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +WorkingDirectory=/opt/homepage/ +ExecStart=pnpm start +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now homepage +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 0a0a67151e49d27707cad27cb33823a27bbf5fc4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 15:37:29 -0500 Subject: [PATCH 0876/3335] Create homepage-v5.sh --- ct/homepage-v5.sh | 368 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 368 insertions(+) create mode 100644 ct/homepage-v5.sh diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh new file mode 100644 index 00000000..08342af6 --- /dev/null +++ b/ct/homepage-v5.sh @@ -0,0 +1,368 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ + / / / /___ ____ ___ ___ ____ ____ _____ ____ + / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ + / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ +/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ + /_/ v5 /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Homepage" +var_disk="3" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/homepage.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP}" +if ! command -v pnpm >/dev/null 2>&1; then + npm install -g pnpm &>/dev/null +fi +cd /opt/homepage +systemctl stop homepage +git pull --force &>/dev/null +pnpm install &>/dev/null +pnpm build &>/dev/null +systemctl start homepage +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 330669c54293e17d85e195e1c5008e1e68bab192 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 15:45:38 -0500 Subject: [PATCH 0877/3335] Delete homepage-update.sh prune --- misc/homepage-update.sh | 72 ----------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 misc/homepage-update.sh diff --git a/misc/homepage-update.sh b/misc/homepage-update.sh deleted file mode 100644 index 49a65168..00000000 --- a/misc/homepage-update.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -APP="Homepage" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -while true; do - read -p "This will Update ${APP}. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - cat <<"EOF" - __ __ - / / / /___ ____ ___ ___ ____ ____ _____ ____ - / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ - / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ -/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ - /_/ UPDATE /____/ -EOF -} - -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_info "Updating ${APP}" -if ! command -v pnpm >/dev/null 2>&1; then - npm install -g pnpm &>/dev/null -fi -cd /opt/homepage -systemctl stop homepage -git pull --force &>/dev/null -pnpm install &>/dev/null -pnpm build &>/dev/null -systemctl start homepage -msg_ok "Updated ${APP}" From 32e38c12499a4de0a265b8a5948e3922f21626ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 17:29:36 -0500 Subject: [PATCH 0878/3335] Create podman-homeassistant-v5-install.sh --- install/podman-homeassistant-v5-install.sh | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 install/podman-homeassistant-v5-install.sh diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh new file mode 100644 index 00000000..5f302e48 --- /dev/null +++ b/install/podman-homeassistant-v5-install.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing Podman" +$STD apt-get -y install podman +$STD systemctl enable --now podman.socket +msg_ok "Installed Podman" + +msg_info "Pulling Home Assistant Image" +$STD podman pull docker.io/homeassistant/home-assistant:stable +msg_ok "Pulled Home Assistant Image" + +msg_info "Installing Home Assistant" +$STD podman volume create hass_config +$STD podman run -d \ + --name homeassistant \ + --restart unless-stopped \ + -v /dev:/dev \ + -v hass_config:/config \ + -v /etc/localtime:/etc/localtime:ro \ + -v /etc/timezone:/etc/timezone:ro \ + --net=host \ + homeassistant/home-assistant:stable +podman generate systemd \ + --new --name homeassistant \ + >/etc/systemd/system/homeassistant.service +$STD systemctl enable --now homeassistant +msg_ok "Installed Home Assistant" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From da6b03cd1f0dba6a57c1ba2e51d8f362fda0ba98 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 17:31:30 -0500 Subject: [PATCH 0879/3335] Create podman-homeassistant-v5.sh --- ct/podman-homeassistant-v5.sh | 386 ++++++++++++++++++++++++++++++++++ 1 file changed, 386 insertions(+) create mode 100644 ct/podman-homeassistant-v5.sh diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh new file mode 100644 index 00000000..22bc0292 --- /dev/null +++ b/ct/podman-homeassistant-v5.sh @@ -0,0 +1,386 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____ ____/ /___ ___ ____ _____ + / /_/ / __ \/ __ / __ __ \/ __ / __ \ + / ____/ /_/ / /_/ / / / / / / /_/ / / / / + __ __ /_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/__ __ + / / / /___ ____ ___ ___ v5 / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Podman-Home Assistant" +var_disk="16" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +else + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +fi +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL} \n" From 2d8a304d57a7916555397d47e2dc384dfe416456 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 17:49:36 -0500 Subject: [PATCH 0880/3335] Update podman-homeassistant-v5.sh --- ct/podman-homeassistant-v5.sh | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 22bc0292..43d158ec 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -314,15 +314,61 @@ function install_script() { } function update_script() { + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + "1" "Update Podman" ON \ + "2" "Install HACS" OFF \ + "3" "Install FileBrowser" OFF \ + 3>&1 1>&2 2>&3) clear header_info +if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit +if [ "$UPD" == "2" ]; then +msg_info "Installing Home Assistant Comunity Store (HACS)" +apt update &>/dev/null +apt install unzip &>/dev/null +cd /var/lib/containers/storage/volumes/hass_config/_data +bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null +msg_ok "Installed Home Assistant Comunity Store (HACS)" +echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" +exit +fi +if [ "$UPD" == "3" ]; then +IP=$(hostname -I | awk '{print $1}') +msg_info "Installing FileBrowser" +curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null +filebrowser config init -a '0.0.0.0' &>/dev/null +filebrowser config set -a '0.0.0.0' &>/dev/null +filebrowser users add admin changeme --perm.admin &>/dev/null +msg_ok "Installed FileBrowser" + +msg_info "Creating Service" +service_path="/etc/systemd/system/filebrowser.service" +echo "[Unit] +Description=Filebrowser +After=network-online.target +[Service] +User=root +WorkingDirectory=/root/ +ExecStart=/usr/local/bin/filebrowser -r / +[Install] +WantedBy=default.target" >$service_path + +systemctl enable --now filebrowser.service &>/dev/null +msg_ok "Created Service" + +msg_ok "Completed Successfully!\n" +echo -e "FileBrowser should be reachable by going to the following URL. + ${BL}http://$IP:8080${CL} admin|changeme\n" +exit +fi } + clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi From df2c70a65f7086e282bbf3b34c8ac9b80a424770 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 18:03:13 -0500 Subject: [PATCH 0881/3335] Delete podman.md prune --- misc/podman.md | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 misc/podman.md diff --git a/misc/podman.md b/misc/podman.md deleted file mode 100644 index 34b45371..00000000 --- a/misc/podman.md +++ /dev/null @@ -1,11 +0,0 @@ -

- -Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. Similar to Docker, Podman is an open source project. Anybody can check out the source code for the program. Contrary to Docker, Podman does not require a daemon process to launch and manage containers. This is an important difference between the two projects. - -Podman seeks to improve on some of Docker’s drawbacks. For one, Podman does not require a daemon running as root. In fact, Podman containers run with the same permissions as the user who launched them. This addresses a significant security concern, although you can still run containers with root permissions if you really want to. - -Podman seeks to be a drop-in replacement for Docker as far as the CLI is concerned. The developers boast that most users can simply use alias docker=podman and continue running the same familiar commands. The container image format is also fully compatible between Docker and Podman, so existing containers built on Dockerfiles will work with Podman. - -Another key difference is that, it handles running containers, but not building them (non-monolithic). The goal here is to have a set of container standards that any application can be developed to support, rather than relying on a single monolithic application such as Docker to perform all duties. - -https://www.liquidweb.com/kb/podman-vs-docker/ ___ https://github.com/containers/podman-compose ___ https://podman.io/ From 499dfd734aaadb4cd5dcf9e48a1bef176e108204 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Jan 2023 18:03:34 -0500 Subject: [PATCH 0882/3335] Delete podman_hacs.sh prune --- misc/podman_hacs.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 misc/podman_hacs.sh diff --git a/misc/podman_hacs.sh b/misc/podman_hacs.sh deleted file mode 100644 index 10d5b1bf..00000000 --- a/misc/podman_hacs.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi -echo -e "\e[1;33m This script will install Home Assistant Community Store (HACS) \e[0m" - -while true; do - read -p "Start the HACS Install Script (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -apt update &>/dev/null -apt install unzip &>/dev/null -cd /var/lib/containers/storage/volumes/hass_config/_data -wget -O - https://get.hacs.xyz | bash - - -# To install HACS run the following from the container (LXC) console -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/podman_hacs.sh)" -# Then add the integration in HA From b4fe32dcd7e26624754dda8047bc42bc666458d1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 10:11:16 -0500 Subject: [PATCH 0883/3335] Update umbrel-v5-install.sh adjust daemon.json --- install/umbrel-v5-install.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index e14653a6..0de53375 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -86,21 +86,18 @@ $STD apt-get install -y curl $STD apt-get install -y sudo msg_ok "Installed Dependencies" +msg_info "Installing Umbrel (Patience)" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF - -msg_info "Installing Umbrel (Patience)" if [ "$ST" == "yes" ]; then VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') cd /usr/local/bin curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 chmod 755 /usr/local/bin/fuse-overlayfs cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi $STD bash <(curl -fsSL https://umbrel.sh) systemctl daemon-reload From bc75366de036e68e8d9155292d9e8b57e2a4051c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:22:08 -0500 Subject: [PATCH 0884/3335] Create homebridge-v5-install.sh --- install/homebridge-v5-install.sh | 130 +++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 install/homebridge-v5-install.sh diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh new file mode 100644 index 00000000..af5fdd30 --- /dev/null +++ b/install/homebridge-v5-install.sh @@ -0,0 +1,130 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs gcc g++ make python net-tools +msg_ok "Installed Node.js" + +msg_info "Installing Homebridge" +$STD npm install -g --unsafe-perm homebridge homebridge-config-ui-x +msg_info "Installed Homebridge" + +msg_info "Creating Service" +$STD hb-service install --user homebridge +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 50a94e5c473d6e84939aa765453f8564a6d26c6b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:23:18 -0500 Subject: [PATCH 0885/3335] Create grocy-v5-install.sh --- install/grocy-v5-install.sh | 157 ++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 install/grocy-v5-install.sh diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh new file mode 100644 index 00000000..85ee376c --- /dev/null +++ b/install/grocy-v5-install.sh @@ -0,0 +1,157 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y apache2 +$STD apt-get install -y unzip +$STD apt-get install -y apt-transport-https +$STD apt-get install -y lsb-release +msg_ok "Installed Dependencies" + +msg_info "Installing PHP 8.1" +curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg +sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +$STD apt-get update +$STD apt-get install -y php8.1 +$STD apt-get install -y libapache2-mod-php8.1 +$STD apt-get install -y php8.1-sqlite3 +$STD apt-get install -y php8.1-gd +$STD apt-get install -y php8.1-intl +$STD apt-get install -y php8.1-mbstring +msg_ok "Installed PHP 8.1" + +msg_info "Installing grocy" +wget -q https://releases.grocy.info/latest +$STD unzip latest -d /var/www/html +chown -R www-data:www-data /var/www/html +cp /var/www/html/config-dist.php /var/www/html/data/config.php +chmod +x /var/www/html/update.sh + +cat </etc/apache2/sites-available/grocy.conf + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html/public + ErrorLog /var/log/apache2/error.log + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + +EOF + +$STD a2dissite 000-default.conf +$STD a2ensite grocy.conf +$STD a2enmod rewrite +systemctl reload apache2 +msg_ok "Installed grocy" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/latest +msg_ok "Cleaned" From 60a022099fc654b415e6d39c06cf121aabf68f3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:24:20 -0500 Subject: [PATCH 0886/3335] Create deconz-v5-install.sh --- install/deconz-v5-install.sh | 143 +++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 install/deconz-v5-install.sh diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh new file mode 100644 index 00000000..691f8f65 --- /dev/null +++ b/install/deconz-v5-install.sh @@ -0,0 +1,143 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting Phoscon Repository" +$STD apt-key add <(curl -fsSL http://phoscon.de/apt/deconz.pub.key) +sh -c "echo 'deb [arch=amd64] http://phoscon.de/apt/deconz $(lsb_release -cs) main' > /etc/apt/sources.list.d/deconz.list" +msg_ok "Setup Phoscon Repository" + +msg_info "Installing deConz" +$STD apt-get update +$STD apt-get install -y deconz +msg_ok "Installed deConz" + +msg_info "Creating Service" +service_path="/lib/systemd/system/deconz.service" +echo "[Unit] +Description=deCONZ: ZigBee gateway -- REST API +Wants=deconz-init.service deconz-update.service +StartLimitIntervalSec=0 + +[Service] +User=root +ExecStart=/usr/bin/deCONZ -platform minimal --http-port=80 +Restart=on-failure +RestartSec=30 +AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now deconz +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9faed9ab99850a189668c59dc6d19ae63419e319 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:25:25 -0500 Subject: [PATCH 0887/3335] Create dashy-v5-install.sh --- install/dashy-v5-install.sh | 151 ++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 install/dashy-v5-install.sh diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh new file mode 100644 index 00000000..3e6391e8 --- /dev/null +++ b/install/dashy-v5-install.sh @@ -0,0 +1,151 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs git make g++ gcc +msg_ok "Installed Node.js" + +msg_info "Installing Yarn" +$STD npm install --global yarn +msg_ok "Installed Yarn" + +msg_info "Installing Dashy (Patience)" +$STD git clone https://github.com/Lissy93/dashy.git +cd /dashy +$STD yarn +export NODE_OPTIONS=--max-old-space-size=1000 +$STD yarn build +msg_ok "Installed Dashy" + +msg_info "Creating Service" +cat </etc/systemd/system/dashy.service +[Unit] +Description=dashy + +[Service] +Type=simple +WorkingDirectory=/dashy +ExecStart=/usr/bin/yarn start +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable dashy +systemctl start dashy +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 898bb31497c1088467c561fa54df83e19b8c0ffe Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:26:15 -0500 Subject: [PATCH 0888/3335] Create daemonsync-v5-install.sh --- install/daemonsync-v5-install.sh | 121 +++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 install/daemonsync-v5-install.sh diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh new file mode 100644 index 00000000..557f6505 --- /dev/null +++ b/install/daemonsync-v5-install.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y g++-multilib +msg_ok "Installed Dependencies" + +msg_info "Installing Daemon Sync Server" +wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb +$STD dpkg -i daemonsync_2.2.0.0059_amd64.deb +msg_ok "Installed Daemon Sync Server" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf daemonsync_2.2.0.0059_amd64.deb +$STD apt-get autoremove >/dev/null +$STD apt-get autoclean >/dev/null +msg_ok "Cleaned" From ff55edbf7cbcf63e4226773693b3c95bbb49b267 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:27:13 -0500 Subject: [PATCH 0889/3335] Create changedetection-v5-install.sh --- install/changedetection-v5-install.sh | 133 ++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 install/changedetection-v5-install.sh diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh new file mode 100644 index 00000000..c2835894 --- /dev/null +++ b/install/changedetection-v5-install.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y pip +msg_ok "Installed Dependencies" + +msg_info "Installing Change Detection" +mkdir /opt/changedetection +$STD pip3 install changedetection.io +msg_ok "Installed Change Detection" + +msg_info "Creating Service" +cat </etc/systemd/system/changedetection.service +[Unit] +Description=Change Detection +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/opt/changedetection +ExecStart=changedetection.io -d /opt/changedetection -p 5000 +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now changedetection +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 79c20ba91e36c3ff8e3a75ba5907cfc40c080c6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:28:04 -0500 Subject: [PATCH 0890/3335] Create casaos-v5-install.sh --- install/casaos-v5-install.sh | 131 +++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 install/casaos-v5-install.sh diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh new file mode 100644 index 00000000..7ff88b3b --- /dev/null +++ b/install/casaos-v5-install.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing CasaOS (Patience)" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD bash <(curl -fsSL https://get.casaos.io) +msg_ok "Installed CasaOS" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + rm /etc/motd + rm /etc/update-motd.d/10-uname + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 2bedefd00bc17637e206dec9e8046725e41f060b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:29:14 -0500 Subject: [PATCH 0891/3335] Create blocky-v5-install.sh --- install/blocky-v5-install.sh | 374 +++++++++++++++++++++++++++++++++++ 1 file changed, 374 insertions(+) create mode 100644 install/blocky-v5-install.sh diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh new file mode 100644 index 00000000..dbb72503 --- /dev/null +++ b/install/blocky-v5-install.sh @@ -0,0 +1,374 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing Blocky" +systemctl stop systemd-resolved +$STD systemctl disable systemd-resolved.service +RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz +mkdir -p /opt/blocky +tar -xf blocky_${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky +rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz +cat </opt/blocky/config.yml +upstream: + # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query + # format for resolver: [net:]host:[port][/path]. net could be empty (default, shortcut for tcp+udp), tcp+udp, tcp, udp, tcp-tls or https (DoH). If port is empty, default port will be used (53 for udp and tcp, 853 for tcp-tls, 443 for https (Doh)) + # this configuration is mandatory, please define at least one external DNS resolver + default: + # example for tcp+udp IPv4 server (https://digitalcourage.de/) + #- 5.9.164.112 + # Cloudflare + - 1.1.1.1 + # example for DNS-over-TLS server (DoT) + #- tcp-tls:fdns1.dismail.de:853 + # example for DNS-over-HTTPS (DoH) + #- https://dns.digitale-gesellschaft.ch/dns-query + # optional: use client name (with wildcard support: * - sequence of any characters, [0-9] - range) + # or single ip address / client subnet as CIDR notation + #laptop*: + #- 123.123.123.123 + +# optional: timeout to query the upstream resolver. Default: 2s +#upstreamTimeout: 2s + +# optional: If true, blocky will fail to start unless at least one upstream server per group is reachable. Default: false +#startVerifyUpstream: true + +# optional: Determines how blocky will create outgoing connections. This impacts both upstreams, and lists. +# accepted: dual, v4, v6 +# default: dual +#connectIPVersion: dual + +# optional: custom IP address(es) for domain name (with all sub-domains). Multiple addresses must be separated by a comma +# example: query "printer.lan" or "my.printer.lan" will return 192.168.178.3 +#customDNS: + #customTTL: 1h + # optional: if true (default), return empty result for unmapped query types (for example TXT, MX or AAAA if only IPv4 address is defined). + # if false, queries with unmapped types will be forwarded to the upstream resolver + #filterUnmappedTypes: true + # optional: replace domain in the query with other domain before resolver lookup in the mapping + #rewrite: + #example.com: printer.lan + #mapping: + #printer.lan: 192.168.178.3,2001:0db8:85a3:08d3:1319:8a2e:0370:7344 + +# optional: definition, which DNS resolver(s) should be used for queries to the domain (with all sub-domains). Multiple resolvers must be separated by a comma +# Example: Query client.fritz.box will ask DNS server 192.168.178.1. This is necessary for local network, to resolve clients by host name +#conditional: + # optional: if false (default), return empty result if after rewrite, the mapped resolver returned an empty answer. If true, the original query will be sent to the upstream resolver + # Example: The query "blog.example.com" will be rewritten to "blog.fritz.box" and also redirected to the resolver at 192.168.178.1. If not found and if was set to , the original query "blog.example.com" will be sent upstream. + # Usage: One usecase when having split DNS for internal and external (internet facing) users, but not all subdomains are listed in the internal domain. + #fallbackUpstream: false + # optional: replace domain in the query with other domain before resolver lookup in the mapping + #rewrite: + #example.com: fritz.box + #mapping: + #fritz.box: 192.168.178.1 + #lan.net: 192.168.178.1,192.168.178.2 + +# optional: use black and white lists to block queries (for example ads, trackers, adult pages etc.) +blocking: + # definition of blacklist groups. Can be external link (http/https) or local file + blackLists: + ads: + - https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt + - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts + - http://sysctl.org/cameleon/hosts + - https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt + - | + # inline definition with YAML literal block scalar style + # hosts format + someadsdomain.com + special: + - https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts + # definition of whitelist groups. Attention: if the same group has black and whitelists, whitelists will be used to disable particular blacklist entries. If a group has only whitelist entries -> this means only domains from this list are allowed, all other domains will be blocked + whiteLists: + ads: + - whitelist.txt + - | + # inline definition with YAML literal block scalar style + # hosts format + whitelistdomain.com + # this is a regex + /^banners?[_.-]/ + # definition: which groups should be applied for which client + clientGroupsBlock: + # default will be used, if no special definition for a client name exists + default: + - ads + - special + # use client name (with wildcard support: * - sequence of any characters, [0-9] - range) + # or single ip address / client subnet as CIDR notation + #laptop*: + #- ads + #192.168.178.1/24: + #- special + # which response will be sent, if query is blocked: + # zeroIp: 0.0.0.0 will be returned (default) + # nxDomain: return NXDOMAIN as return code + # comma separated list of destination IP addresses (for example: 192.100.100.15, 2001:0db8:85a3:08d3:1319:8a2e:0370:7344). Should contain ipv4 and ipv6 to cover all query types. Useful with running web server on this address to display the "blocked" page. + blockType: zeroIp + # optional: TTL for answers to blocked domains + # default: 6h + blockTTL: 1m + # optional: automatically list refresh period (in duration format). Default: 4h. + # Negative value -> deactivate automatically refresh. + # 0 value -> use default + refreshPeriod: 4h + # optional: timeout for list download (each url). Default: 60s. Use large values for big lists or slow internet connections + downloadTimeout: 4m + # optional: Download attempt timeout. Default: 60s + downloadAttempts: 5 + # optional: Time between the download attempts. Default: 1s + downloadCooldown: 10s + # optional: if failOnError, application startup will fail if at least one list can't be downloaded / opened. Default: blocking + #startStrategy: failOnError + +# optional: configuration for caching of DNS responses +caching: + # duration how long a response must be cached (min value). + # If <=0, use response's TTL, if >0 use this value, if TTL is smaller + # Default: 0 + minTime: 5m + # duration how long a response must be cached (max value). + # If <0, do not cache responses + # If 0, use TTL + # If > 0, use this value, if TTL is greater + # Default: 0 + maxTime: 30m + # Max number of cache entries (responses) to be kept in cache (soft limit). Useful on systems with limited amount of RAM. + # Default (0): unlimited + maxItemsCount: 0 + # if true, will preload DNS results for often used queries (default: names queried more than 5 times in a 2-hour time window) + # this improves the response time for often used queries, but significantly increases external traffic + # default: false + prefetching: true + # prefetch track time window (in duration format) + # default: 120 + prefetchExpires: 2h + # name queries threshold for prefetch + # default: 5 + prefetchThreshold: 5 + # Max number of domains to be kept in cache for prefetching (soft limit). Useful on systems with limited amount of RAM. + # Default (0): unlimited + #prefetchMaxItemsCount: 0 + +# optional: configuration of client name resolution +clientLookup: + # optional: this DNS resolver will be used to perform reverse DNS lookup (typically local router) + #upstream: 192.168.178.1 + # optional: some routers return multiple names for client (host name and user defined name). Define which single name should be used. + # Example: take second name if present, if not take first name + #singleNameOrder: + #- 2 + #- 1 + # optional: custom mapping of client name to IP addresses. Useful if reverse DNS does not work properly or just to have custom client names. + #clients: + #laptop: + #- 192.168.178.29 +# optional: configuration for prometheus metrics endpoint +prometheus: + # enabled if true + #enable: true + # url path, optional (default '/metrics') + #path: /metrics + +# optional: write query information (question, answer, client, duration etc.) to daily csv file +queryLog: + # optional one of: mysql, postgresql, csv, csv-client. If empty, log to console + #type: mysql + # directory (should be mounted as volume in docker) for csv, db connection string for mysql/postgresql + #target: db_user:db_password@tcp(db_host_or_ip:3306)/db_name?charset=utf8mb4&parseTime=True&loc=Local + #postgresql target: postgres://user:password@db_host_or_ip:5432/db_name + # if > 0, deletes log files which are older than ... days + #logRetentionDays: 7 + # optional: Max attempts to create specific query log writer, default: 3 + #creationAttempts: 1 + # optional: Time between the creation attempts, default: 2s + #creationCooldown: 2s + +# optional: Blocky can synchronize its cache and blocking state between multiple instances through redis. +redis: + # Server address and port + #address: redis:6379 + # Password if necessary + #password: passwd + # Database, default: 0 + #database: 2 + # Connection is required for blocky to start. Default: false + #required: true + # Max connection attempts, default: 3 + #connectionAttempts: 10 + # Time between the connection attempts, default: 1s + #connectionCooldown: 3s + +# optional: DNS listener port(s) and bind ip address(es), default 53 (UDP and TCP). Example: 53, :53, "127.0.0.1:5353,[::1]:5353" +port: 553 +# optional: Port(s) and bind ip address(es) for DoT (DNS-over-TLS) listener. Example: 853, 127.0.0.1:853 +#tlsPort: 853 +# optional: HTTPS listener port(s) and bind ip address(es), default empty = no http listener. If > 0, will be used for prometheus metrics, pprof, REST API, DoH... Example: 443, :443, 127.0.0.1:443 +#httpPort: 4000 +#httpsPort: 443 +# optional: Mininal TLS version that the DoH and DoT server will use +#minTlsServeVersion: 1.3 +# if https port > 0: path to cert and key file for SSL encryption. if not set, self-signed certificate will be generated +#certFile: server.crt +#keyFile: server.key +# optional: use this DNS server to resolve blacklist urls and upstream DNS servers. Useful if no DNS resolver is configured and blocky needs to resolve a host name. Format net:IP:port, net must be udp or tcp +#bootstrapDns: tcp+udp:1.1.1.1 + +filtering: +# optional: drop all queries with following query types. Default: empty + #queryTypes: + #- AAAA + +# optional: if path defined, use this file for query resolution (A, AAAA and rDNS). Default: empty +hostsFile: + # optional: Path to hosts file (e.g. /etc/hosts on Linux) + #filePath: /etc/hosts + # optional: TTL, default: 1h + #hostsTTL: 60m + # optional: Time between hosts file refresh, default: 1h + #refreshPeriod: 30m + # optional: Whether loopback hosts addresses (127.0.0.0/8 and ::1) should be filtered or not, default: false + #filterLoopback: true +# optional: Log level (one from debug, info, warn, error). Default: info +#logLevel: info +# optional: Log format (text or json). Default: text +#logFormat: text +# optional: log timestamps. Default: true +#logTimestamp: true +# optional: obfuscate log output (replace all alphanumeric characters with *) for user sensitive data like request domains or responses to increase privacy. Default: false +#logPrivacy: false + +# optional: add EDE error codes to dns response +#ede: + # enabled if true, Default: false + #enable: true +EOF +msg_ok "Installed Blocky" + +msg_info "Creating Service" +cat </etc/systemd/system/blocky.service +[Unit] +Description=Blocky +After=network.target +[Service] +User=root +WorkingDirectory=/opt/blocky +ExecStart=/opt/blocky/./blocky --config config.yml +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now blocky +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 69cd9880a656e590bfdc5610f9b347a3897f93ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:30:36 -0500 Subject: [PATCH 0892/3335] Create homebridge-v5.sh --- ct/homebridge-v5.sh | 362 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 ct/homebridge-v5.sh diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh new file mode 100644 index 00000000..3e8d27d1 --- /dev/null +++ b/ct/homebridge-v5.sh @@ -0,0 +1,362 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ______ __ _____________ ____ ________ ____________ + / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ + / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ + / __ / /_/ / / / / /___/ /_/ / _, _// // /_/ / /_/ / /___ +/_/ /_/\____/_/v5/_/_____/_____/_/ |_/___/_____/\____/_____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Homebridge" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8581${CL} \n" From 51935edf279b51cb552bdbc062e457eae5386d29 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:31:36 -0500 Subject: [PATCH 0893/3335] Create grocy-v5.sh --- ct/grocy-v5.sh | 361 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 ct/grocy-v5.sh diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh new file mode 100644 index 00000000..4c968ca2 --- /dev/null +++ b/ct/grocy-v5.sh @@ -0,0 +1,361 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __________ _______ __ + / __ / ___/ __ \/ ___/ / / / + / /_/ / / / /_/ / /__/ /_/ / + \__, /_/ v5\____/\___/\__, / +/____/ /____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="grocy" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP}" +bash /var/www/html/update.sh +msg_ok "Updated ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" From 82d1dd1d28c9be3e1c5dfe0d609c1a871aaca25d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:32:41 -0500 Subject: [PATCH 0894/3335] Create deconz-v5.sh --- ct/deconz-v5.sh | 376 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 ct/deconz-v5.sh diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh new file mode 100644 index 00000000..96f6c164 --- /dev/null +++ b/ct/deconz-v5.sh @@ -0,0 +1,376 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __________ _ _______ + ____/ /v5 / ____/ __ \/ | / /__ / + / __ / _ \/ / / / / / |/ / / / +/ /_/ / __/ /___/ /_/ / /| / / /__ +\__,_/\___/\____/\____/_/ |_/ /____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="deCONZ" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="ubuntu" +var_version="20.04" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL}\n" From 26c85937dbe6c5b69fe67e157c64bf1f9ae83789 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:33:49 -0500 Subject: [PATCH 0895/3335] Create dashy-v5.sh --- ct/dashy-v5.sh | 388 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 388 insertions(+) create mode 100644 ct/dashy-v5.sh diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh new file mode 100644 index 00000000..68308c59 --- /dev/null +++ b/ct/dashy-v5.sh @@ -0,0 +1,388 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____ ______/ /_ __ __ + / / / / __ / ___/ __ \/ / / / + / /_/ / /_/ (__ ) / / / /_/ / +/_____/\__,_/____/_/ /_/\__, / + v5 /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Dashy" +var_disk="3" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/dashy.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping ${APP}" +systemctl stop dashy +msg_ok "Stopped ${APP}" + +msg_info "Backing up conf.yml" +cd ~ +cp -R /dashy/public/conf.yml conf.yml +msg_ok "Backed up conf.yml" + +msg_info "Updating Dashy" +cd /dashy +git merge &>/dev/null +git pull origin master &>/dev/null +yarn &>/dev/null +yarn build &>/dev/null +msg_ok "Updated Dashy" + +msg_info "Restoring conf.yml" +cd ~ +cp -R conf.yml /dashy/public +msg_ok "Restored conf.yml" + +msg_info "Cleaning" +rm -rf conf.yml +msg_ok "Cleaned" + +msg_info "Starting Dashy" +systemctl start dashy +msg_ok "Started Dashy" +msg_ok "Update Successfull" +exit +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:4000${CL} \n" From 2e2a1ef35a7088400329df83cd39db1322263b45 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:34:46 -0500 Subject: [PATCH 0896/3335] Create daemonsync-v5.sh --- ct/daemonsync-v5.sh | 362 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 ct/daemonsync-v5.sh diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh new file mode 100644 index 00000000..9aeafa7a --- /dev/null +++ b/ct/daemonsync-v5.sh @@ -0,0 +1,362 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ _____ + / __ \____ ____ ____ ___ ____ ____ / ___/__v5______ _____ + / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ + / /_/ / /_/ / __/ / / / / / /_/ / / / / ___/ / /_/ / / / / /__ +/_____/\__,_/\___/_/ /_/ /_/\____/_/ /_/ /____/\__, /_/ /_/\___/ + /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Daemon Sync" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/daemonsync ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8084${CL} \n" From c314744a91d3e21406c6a68f53c2292fa997f822 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:35:40 -0500 Subject: [PATCH 0897/3335] Create changedetection-v5.sh --- ct/changedetection-v5.sh | 361 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 ct/changedetection-v5.sh diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh new file mode 100644 index 00000000..7facabc7 --- /dev/null +++ b/ct/changedetection-v5.sh @@ -0,0 +1,361 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ________ ____ __ __ _ + / ____/ /_v5____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ + / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ +/ /___/ / / / /_/ / / / / /_/ / __/ / /_/ / __/ /_/ __/ /__/ /_/ / /_/ / / / / +\____/_/ /_/\__,_/_/ /_/\__, /\___/ /_____/\___/\__/\___/\___/\__/_/\____/_/ /_/ + /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Change Detection" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/changedetection.service ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +pip3 install changedetection.io --upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From 5db986c0981a6e37b0097b64509d5864d74d5ee4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:36:30 -0500 Subject: [PATCH 0898/3335] Create casaos-v5.sh --- ct/casaos-v5.sh | 377 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 ct/casaos-v5.sh diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh new file mode 100644 index 00000000..6540b4d1 --- /dev/null +++ b/ct/casaos-v5.sh @@ -0,0 +1,377 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ ____ _____ + / ____/___ __v5______ _/ __ \/ ___/ + / / / __ `/ ___/ __ `/ / / /\__ \ +/ /___/ /_/ (__ ) /_/ / /_/ /___/ / +\____/\__,_/____/\__,_/\____//____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="CasaOS" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/docker ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + FUSE="yes" + else + echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + FUSE="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$FUSE" == "yes" ]; then +FEATURES="fuse=1,keyctl=1,nesting=1" +else +FEATURES="keyctl=1,nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export ST=$FUSE +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP} ${CL} \n" From 8ecfa0c7c8ab4c29c47b623dfe07b6075dfb714b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:37:31 -0500 Subject: [PATCH 0899/3335] Create blocky-v5.sh --- ct/blocky-v5.sh | 360 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 ct/blocky-v5.sh diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh new file mode 100644 index 00000000..d460035c --- /dev/null +++ b/ct/blocky-v5.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ __ + / __ )/ /___v5_____/ /____ __ + / __ / / __ \/ ___/ //_/ / / / + / /_/ / / /_/ / /__/ ,< / /_/ / +/_____/_/\____/\___/_/|_|\__, / + /____/ +EOF +} +clear +header_info +echo -e "Loading..." +APP="Blocky" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/blocky/ ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 68c7adf107b06baa95705cfb48ccd065fc676047 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 11:59:34 -0500 Subject: [PATCH 0900/3335] Delete dashy-update.sh prune --- misc/dashy-update.sh | 68 -------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 misc/dashy-update.sh diff --git a/misc/dashy-update.sh b/misc/dashy-update.sh deleted file mode 100644 index d9c3826f..00000000 --- a/misc/dashy-update.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -set -e -clear -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -while true; do - read -p "This will Update Dashy LXC. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${RD} - _____ _ - | __ \ | | - | | | | __ _ ___| |__ _ _ - | | | |/ _ / __| _ \| | | | - | |__| | (_| \__ \ | | | |_| | - |_____/ \__,_|___/_| |_|\__, | - UPDATE __/ | - |___/ -${CL}" -} - -header_info -echo -en "${GN} Stopping Dashy... " -systemctl stop dashy -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Backup conf.yml... " -cd ~ -cp -R /dashy/public/conf.yml conf.yml -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Updating Dashy... " -cd /dashy -git merge &>/dev/null -git pull origin master &>/dev/null -yarn &>/dev/null -yarn build &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Restoring conf.yml... " -cd ~ -cp -R conf.yml /dashy/public -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleaning... " -rm -rf conf.yml -sleep 1 -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting Dashy... " -systemctl start dashy -sleep 1 -echo -e "${CM}${CL} \r" - -echo -e "${GN} Finished ${CL}\n" From bf3bf3daa859c347ecbcbe48456baee9162c936c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:01:22 -0500 Subject: [PATCH 0901/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 9ec9f85c..62ee50d6 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-09 + +### Changed + +- **ALL LXC's** + - v5 + ## 2023-01-04 ### Changed From 411af1c39eab1b2660306d20e3edee0a7498ef81 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:08:25 -0500 Subject: [PATCH 0902/3335] Update and rename k0s-v4.sh to k0s-v5.sh --- ct/{k0s-v4.sh => k0s-v5.sh} | 84 +++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 22 deletions(-) rename ct/{k0s-v4.sh => k0s-v5.sh} (88%) diff --git a/ct/k0s-v4.sh b/ct/k0s-v5.sh similarity index 88% rename from ct/k0s-v4.sh rename to ct/k0s-v5.sh index 8254c26c..3e5ddf1a 100644 --- a/ct/k0s-v4.sh +++ b/ct/k0s-v5.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ ____ + / /__/ __ \__v4_ + / //_/ / / / ___/ + / ,< / /_/ (__ ) +/_/|_|\____/____/ + +EOF +} echo -e "Loading..." APP="k0s" var_disk="4" @@ -7,8 +17,7 @@ var_ram="2048" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) +var_install="${NSAPP}-v5-install" INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -20,6 +29,7 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -35,31 +45,22 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - __ ____ - / /__/ __ \__v4_ - / //_/ / / / ___/ - / ,< / /_/ (__ ) -/_/|_|\____/____/ - -EOF -} + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) if [[ $PVE != 1 ]]; then @@ -69,6 +70,30 @@ function PVE_CHECK() { exit fi } + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/k0s/k0s.yaml ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -102,6 +127,7 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -113,7 +139,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -254,9 +280,11 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" + VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -267,7 +295,7 @@ function advanced_settings() { advanced_settings fi } -function start_script() { +function install_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -278,8 +306,19 @@ function start_script() { advanced_settings fi } + +function update_script() { clear -start_script +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" @@ -289,6 +328,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export VERBOSE=$VERB +export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os From bdaaed3aaf67bdb3a362baf79d1dc730700de6fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:12:40 -0500 Subject: [PATCH 0903/3335] Update and rename k0s-install.sh to k0s-v5-install.sh --- install/{k0s-install.sh => k0s-v5-install.sh} | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename install/{k0s-install.sh => k0s-v5-install.sh} (88%) diff --git a/install/k0s-install.sh b/install/k0s-v5-install.sh similarity index 88% rename from install/k0s-install.sh rename to install/k0s-v5-install.sh index 1ed9806f..785160c7 100644 --- a/install/k0s-install.sh +++ b/install/k0s-v5-install.sh @@ -19,7 +19,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR - +silent() { "$@" > /dev/null 2>&1; } function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -76,20 +76,20 @@ alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +$STD apt-get update +$STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing k0s Kubernetes" -sh <(curl -sSLf https://get.k0s.sh) &>/dev/null -k0s install controller --single &>/dev/null -k0s start &>/dev/null +$STD bash <(curl -sSLf https://get.k0s.sh) +$STD k0s install controller --single +$STD k0s start mkdir -p /etc/k0s k0s config create > /etc/k0s/k0s.yaml msg_ok "Installed k0s Kubernetes" @@ -103,7 +103,7 @@ fi if [[ $HELM == "Y" ]]; then msg_info "Installing Helm" -curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash &>/dev/null +$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) msg_ok "Installed Helm" fi PASS=$(grep -w "root" /etc/shadow | cut -b6) @@ -128,6 +128,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then fi msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null +$STD apt-get autoremove +$STD apt-get autoclean msg_ok "Cleaned" From 2d50962d2515b378c19bcef01f05ffca5afb2253 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:15:45 -0500 Subject: [PATCH 0904/3335] Update k0s-v5.sh --- ct/k0s-v5.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 3e5ddf1a..47a801f0 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -9,6 +9,8 @@ function header_info { EOF } +clear +header_info echo -e "Loading..." APP="k0s" var_disk="4" From aa14ce6f7ef6e5cad1631efa73d1f272bdc62a40 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:19:12 -0500 Subject: [PATCH 0905/3335] Update k0s-v5.sh --- ct/k0s-v5.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 47a801f0..194d5d25 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash function header_info { cat <<"EOF" - __ ____ - / /__/ __ \__v4_ - / //_/ / / / ___/ - / ,< / /_/ (__ ) -/_/|_|\____/____/ - + __ ____ __ __ __ __ + / /__/ __ \_____ / //_/_ __/ /_ ___v5_________ ___ / /____ _____ + / //_/ / / / ___/ / ,< / / / / __ \/ _ \/ ___/ __ \/ _ \/ __/ _ \/ ___/ + / ,< / /_/ (__ ) / /| / /_/ / /_/ / __/ / / / / / __/ /_/ __(__ ) +/_/|_|\____/____/ /_/ |_\__,_/_.___/\___/_/ /_/ /_/\___/\__/\___/____/ + EOF } clear From 7289a21172c222852f732c03070da42d7c4db1ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 12:40:28 -0500 Subject: [PATCH 0906/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 62ee50d6..122f6b92 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **ALL LXC's** - v5 +- **k0s Kubernetes LXC** + - NEW Script ## 2023-01-04 From 79c4dd0dfe92fb72a9c98cb829d7a4fe773a49df Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 14:20:35 -0500 Subject: [PATCH 0907/3335] Update and rename archlinux-v4.sh to archlinux-v5.sh --- ct/{archlinux-v4.sh => archlinux-v5.sh} | 85 +++++++++++++++++++------ 1 file changed, 64 insertions(+), 21 deletions(-) rename ct/{archlinux-v4.sh => archlinux-v5.sh} (88%) diff --git a/ct/archlinux-v4.sh b/ct/archlinux-v5.sh similarity index 88% rename from ct/archlinux-v4.sh rename to ct/archlinux-v5.sh index 001ab7ff..c56f9b8a 100644 --- a/ct/archlinux-v4.sh +++ b/ct/archlinux-v5.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___ __ __ _ + / | __________/ /_ v5 / / (_)___ __ ___ __ + / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ + / ___ |/ / / /__/ / / / / /___/ / / / / /_/ /> < +/_/ |_/_/ \___/_/ /_/ /_____/_/_/ /_/\__,_/_/|_| + +EOF +} +clear +header_info echo -e "Loading..." APP="Arch Linux" var_disk="1" @@ -7,7 +19,7 @@ var_ram="512" var_os="archlinux" var_version="base" NSAPP=$(echo ${APP,,} | tr -d ' ') -NEXTID=$(pvesh get /cluster/nextid) +var_install="${NSAPP}-v5-install" INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -19,6 +31,7 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -34,31 +47,22 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ___ __ __ _ - / | __________/ /_ v4 / / (_)___ __ ___ __ - / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ - / ___ |/ / / /__/ / / / / /___/ / / / / /_/ /> < -/_/ |_/_/ \___/_/ /_/ /_____/_/_/ /_/\__,_/_/|_| - -EOF -} + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) if [[ $PVE != 1 ]]; then @@ -68,6 +72,30 @@ function PVE_CHECK() { exit fi } + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/pacman.d ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -97,10 +125,11 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -253,9 +282,11 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" + VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -266,7 +297,7 @@ function advanced_settings() { advanced_settings fi } -function start_script() { +function install_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -277,8 +308,19 @@ function start_script() { advanced_settings fi } + +function update_script() { clear -start_script +header_info +msg_info "Updating ${APP} LXC" +pacman-key --init +pacman-key --populate archlinux +pacman -Sy archlinux-keyring && pacman -Su +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" @@ -288,6 +330,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export VERBOSE=$VERB +export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os From ee09697ddb16a8c06fe18b754706140cf8c595a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 14:39:36 -0500 Subject: [PATCH 0908/3335] Update and rename alpine-v4.sh to alpine-v5.sh --- ct/{alpine-v4.sh => alpine-v5.sh} | 85 +++++++++++++++++++++++-------- 1 file changed, 64 insertions(+), 21 deletions(-) rename ct/{alpine-v4.sh => alpine-v5.sh} (88%) diff --git a/ct/alpine-v4.sh b/ct/alpine-v5.sh similarity index 88% rename from ct/alpine-v4.sh rename to ct/alpine-v5.sh index a95cc37d..ce28c2a8 100644 --- a/ct/alpine-v4.sh +++ b/ct/alpine-v5.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___ v5 __ _ + / | / /___ (_)___ ___ + / /| | / / __ \/ / __ \/ _ \ + / ___ |/ / /_/ / / / / / __/ +/_/ |_/_/ .___/_/_/ /_/\___/ + /_/ + +EOF +} +clear +header_info echo -e "Loading..." APP="Alpine" var_disk="0.1" @@ -7,7 +20,7 @@ var_ram="512" var_os="alpine" var_version="3.16" NSAPP=$(echo ${APP,,} | tr -d ' ') -NEXTID=$(pvesh get /cluster/nextid) +var_install="${NSAPP}-v5-install" INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -19,6 +32,7 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -34,32 +48,22 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ___ v4 __ _ - / | / /___ (_)___ ___ - / /| | / / __ \/ / __ \/ _ \ - / ___ |/ / /_/ / / / / / __/ -/_/ |_/_/ .___/_/_/ /_/\___/ - /_/ -EOF -} function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) if [[ $PVE != 1 ]]; then @@ -69,6 +73,30 @@ function PVE_CHECK() { exit fi } + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -98,10 +126,11 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -250,9 +279,11 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" + VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -263,7 +294,7 @@ function advanced_settings() { advanced_settings fi } -function start_script() { +function install_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -274,8 +305,19 @@ function start_script() { advanced_settings fi } + +function update_script() { clear -start_script +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" @@ -285,6 +327,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export VERBOSE=$VERB +export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os From 6a26f5991cfd98836c716207ce25a3cc1f7f5a1f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 14:44:12 -0500 Subject: [PATCH 0909/3335] Update alpine-v5.sh --- ct/alpine-v5.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index ce28c2a8..e43b5c22 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -84,7 +84,7 @@ if command -v pveversion >/dev/null 2>&1; then fi fi if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + if [[ ! -f /etc/alpine-release ]]; then msg_error "No ${APP} Installation Found!"; exit fi @@ -310,9 +310,8 @@ function update_script() { clear header_info msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" +apk update &>/dev/null +apk upgrade &>/dev/null msg_ok "Update Successfull" exit } From d0e43fa657e9cb113ed4aa290466dad1387f684a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 15:05:39 -0500 Subject: [PATCH 0910/3335] Update and rename podman-v4.sh to podman-v5.sh --- ct/{podman-v4.sh => podman-v5.sh} | 86 +++++++++++++++++++++++-------- 1 file changed, 64 insertions(+), 22 deletions(-) rename ct/{podman-v4.sh => podman-v5.sh} (88%) diff --git a/ct/podman-v4.sh b/ct/podman-v5.sh similarity index 88% rename from ct/podman-v4.sh rename to ct/podman-v5.sh index 1a28ea73..23cda1c9 100644 --- a/ct/podman-v4.sh +++ b/ct/podman-v5.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____v5____/ /___ ___ ____ _____ + / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ + / ____/ /_/ / /_/ / / / / / / /_/ / / / / +/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ + +EOF +} +clear +header_info echo -e "Loading..." APP="Podman" var_disk="4" @@ -7,8 +19,7 @@ var_ram="2048" var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) +var_install="${NSAPP}-v5-install" INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -20,6 +31,7 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -o errexit set -o errtrace set -o nounset @@ -35,31 +47,22 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ____ __ - / __ \____v4____/ /___ ___ ____ _____ - / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ - / ____/ /_/ / /_/ / / / / / / /_/ / / / / -/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ - -EOF -} + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + function PVE_CHECK() { PVE=$(pveversion | grep "pve-manager/7" | wc -l) if [[ $PVE != 1 ]]; then @@ -69,6 +72,30 @@ function PVE_CHECK() { exit fi } + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/systemd/system/podman.socket ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -102,6 +129,7 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -113,7 +141,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then @@ -254,9 +282,11 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" + VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" + VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -267,7 +297,7 @@ function advanced_settings() { advanced_settings fi } -function start_script() { +function install_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -278,8 +308,19 @@ function start_script() { advanced_settings fi } + +function update_script() { clear -start_script +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" @@ -289,6 +330,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export VERBOSE=$VERB +export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os From 60e5cec0bfee13ba441b2f13c96b6d4f5179846d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 15:10:13 -0500 Subject: [PATCH 0911/3335] Update and rename podman-install.sh to podman-v5-install.sh --- ...podman-install.sh => podman-v5-install.sh} | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) rename install/{podman-install.sh => podman-v5-install.sh} (74%) diff --git a/install/podman-install.sh b/install/podman-v5-install.sh similarity index 74% rename from install/podman-install.sh rename to install/podman-v5-install.sh index eabfdf02..82432ae6 100644 --- a/install/podman-install.sh +++ b/install/podman-v5-install.sh @@ -19,7 +19,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR - +silent() { "$@" > /dev/null 2>&1; } function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -76,47 +76,21 @@ alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +$STD apt-get update +$STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null +$STD apt-get install -y curl +$STD apt-get install -y sudo msg_ok "Installed Dependencies" msg_info "Installing Podman" -apt-get -y install podman &>/dev/null -systemctl enable --now podman.socket &>/dev/null +$STD apt-get -y install podman +$STD systemctl enable --now podman.socket echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf msg_ok "Installed Podman" -read -r -p "Would you like to add Portainer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - PORTAINER="Y" -else - PORTAINER="N" -fi - -if [[ $PORTAINER == "Y" ]]; then - msg_info "Installing Portainer" - podman run -d \ - --name portainer \ - --restart always \ - -v /var/run/podman/podman.sock:/var/run/docker.sock \ - -v portainer:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - -p 8000:8000 \ - -p 9000:9000 \ - portainer/portainer-ce:latest &>/dev/null - podman generate systemd \ - --new --name portainer \ - >/etc/systemd/system/portainer.service - systemctl enable portainer &>/dev/null - msg_ok "Installed Portainer" -fi - PASS=$(grep -w "root" /etc/shadow | cut -b6) if [[ $PASS != $ ]]; then msg_info "Customizing Container" @@ -139,6 +113,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then fi msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null +$STD apt-get autoremove +$STD apt-get autoclean msg_ok "Cleaned" From dd34b1dfc1f5527e1040db040e4602fcaae473bc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 15:12:32 -0500 Subject: [PATCH 0912/3335] Update podman-v5.sh --- ct/podman-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 23cda1c9..9ce8f0d8 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -83,7 +83,7 @@ if command -v pveversion >/dev/null 2>&1; then fi fi if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/podman.socket ]]; then + if [[ ! -f /etc/containers/registries.conf ]]; then msg_error "No ${APP} Installation Found!"; exit fi From 592f34b4fa9d6e42e986caa1539b1a94054653c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 15:26:22 -0500 Subject: [PATCH 0913/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 122f6b92..f9011dad 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file. - v5 - **k0s Kubernetes LXC** - NEW Script +- **Podman LXC** + - NEW Script ## 2023-01-04 From 75e422132405d8a8b9f146275dd7118720f2952a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 16:40:50 -0500 Subject: [PATCH 0914/3335] Update wikijs-v5-install.sh change node.js v16 --- install/wikijs-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 3b7a1cea..4806102b 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -88,7 +88,7 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From c448a4ba538f2dd7a2677150f25f4dac8007fb51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 21:33:57 -0500 Subject: [PATCH 0915/3335] Update plex-v5.sh add plexupdate option --- ct/plex-v5.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 944e9165..348bca7f 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -319,13 +319,24 @@ function install_script() { fi } function update_script() { +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \ + "1" "Update LXC" ON \ + "2" "Run plexupdate" OFF \ + 3>&1 1>&2 2>&3) + clear header_info +if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit +fi +if [ "$UPD" == "2" ]; then +bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)" +exit +fi } clear if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi From 7b238075350d25c4a34cc79e65d82a45c7867c57 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Jan 2023 22:12:45 -0500 Subject: [PATCH 0916/3335] Update plex-v5.sh add "plexupdate info >> https://github.com/mrworf/plexupdate" --- ct/plex-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 348bca7f..c6d04cf2 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -319,7 +319,7 @@ function install_script() { fi } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \ +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ "1" "Update LXC" ON \ "2" "Run plexupdate" OFF \ 3>&1 1>&2 2>&3) From 3f84544b09bea40433075eb5954c09e5ce2e0a58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 10:51:02 -0500 Subject: [PATCH 0917/3335] Update edge-kernel.sh tweak --- misc/edge-kernel.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 52f83213..7214595d 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -1,13 +1,24 @@ #!/usr/bin/env bash # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" +function header_info { +cat <<"EOF" + ____ _ ________ ______ __ __ __ __ + / __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____ + / /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/ + / ____/| |/ / /___ / /___/ /_/ / /_/ / __/ / /| / __/ / / / / / __/ (__ ) +/_/ |___/_____/ /_____/\__,_/\__, /\___/ /_/ |_\___/_/ /_/ /_/\___/_/____/ + /____/ + +EOF +} set -e KERNEL_ON=$(uname -r) PVE_KERNEL=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) EDGE_KERNEL=$(dpkg --list | grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) VER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-9) }') KER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-6) }') - clear +header_info while true; do read -p "This is a Proxmox Edge Kernel Tool, USE AT YOUR OWN RISK. Proceed(y/n)?" yn case $yn in @@ -17,16 +28,7 @@ while true; do esac done clear -function header_info { -cat <<"EOF" - ____ _ ________ ______ __ __ __ __ - / __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____ - / /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/ - / ____/| |/ / /___ / /___/ /_/ / /_/ / __/ / /| / __/ / / / / / __/ (__ ) -/_/ |___/_____/ /_____/\__,_/\__, /\___/ /_/ |_\___/_/ /_/ /_/\___/_/____/ - /____/ -EOF -} +header_info show_menu() { normal=$(echo "\033[m") safe=$(echo "\033[32m") From 7d3417b25aa000c37bb5674550c7e23e28627652 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 10:56:36 -0500 Subject: [PATCH 0918/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index d5f40dce..2c3031fd 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash -ex +function header_info { + cat <<"EOF" + ____ _ _____________ ____ __ ____ __ ____ + / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / + / ____/| |/ / /___ / / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/ /_/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + +EOF +} set -euo pipefail shopt -s inherit_errexit nullglob YW=$(echo "\033[33m") @@ -13,6 +23,7 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" clear +header_info echo -e "${BL}This script will Perform Post Install Routines.${CL}" while true; do read -p "Start the PVE7 Post Install Script (y/n)?" yn @@ -35,15 +46,6 @@ if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then sleep 3 exit fi -function header_info { - echo -e "${RD} - ____ _ _____________ ____ __ ____ __ ____ - / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / - / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / - / ____/| |/ / /___ / / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / -/_/ |___/_____/ /_/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ -${CL}" -} function msg_info() { local msg="$1" From f48837c643d2509c014cb06440b64b49477d0eaa Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 11:08:36 -0500 Subject: [PATCH 0919/3335] Update kernel-clean.sh tweak --- misc/kernel-clean.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index a7b6319d..5b072c18 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash -ex +function header_info { + cat <<"EOF" + __ __ __ ________ + / //_/__ _________ ___ / / / ____/ /__ ____ _____ + / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ + / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / +/_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ + +EOF +} set -euo pipefail shopt -s inherit_errexit nullglob YW=$(echo "\033[33m") @@ -14,7 +24,8 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" PARTY="🎉" current_kernel=$(uname -r) - +clear +header_info while true; do read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn case $yn in @@ -24,19 +35,6 @@ while true; do esac done clear - -function header_info { - echo -e "${RD} - _ __ _ _____ _ - | |/ / | | / ____| | - | / ___ _ __ _ __ ___| | | | | | ___ __ _ _ __ - | < / _ \ __| _ \ / _ \ | | | | |/ _ \/ _ | _ \ - | \ __/ | | | | | __/ | | |____| | __/ (_| | | | | - |_|\_\___|_| |_| |_|\___|_| \_____|_|\___|\__,_|_| |_| - -${CL}" -} - function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." From a8c22e0c67e7493a228f736982038a2d15c0acb2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 11:16:26 -0500 Subject: [PATCH 0920/3335] Update scaling-governor.sh tweak --- misc/scaling-governor.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 1d0774c2..e7eea1d2 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -1,5 +1,17 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + __________ __ __ + / ____/ __ \/ / / / + / / / /_/ / / / / +/ /___/ ____/ /_/ / +\____/_/ \____/ +Scaling Governors + +EOF +} clear +header_info set -e while true; do read -p "View CPU Scaling Governors. Proceed(y/n)?" yn @@ -10,17 +22,7 @@ while true; do esac done clear -function header_info { - echo -e " - _____ _____ _ _ - / ____| __ \| | | | - | | | |__) | | | | - | | | ___/| | | | - | |____| | | |__| | - \_____|_| \____/ - Scaling Governors -" -} + show_menu() { CL=$(echo "\033[m") GN=$(echo "\033[32m") From 35d1a9b6c525dcacb19cdfa08713d725f924eaf5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 11:31:30 -0500 Subject: [PATCH 0921/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 63b452c9..80bd78cc 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,20 +1,4 @@ #!/bin/bash -set -e -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -while true; do - read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear function header_info { cat <<"EOF" __ __ __ __ __ _ ________ @@ -26,8 +10,24 @@ function header_info { EOF } +set -e +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +CM='\xE2\x9C\x94\033' +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +clear header_info - +while true; do + read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +clear containers=$(pct list | tail -n +2 | cut -f1 -d' ') function update_container() { @@ -50,7 +50,7 @@ function update_container() { pct exec $container -- bash -c "yum -y update" fi } - +header_info read -p "Skip stopped containers? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then @@ -82,4 +82,6 @@ for container in $containers; do done wait rm -rf temp +clear +header_info echo -e "${GN} Finished, All Containers Updated. ${CL} \n" From 33ad41c028faa9113ae4d5981fa36c93d8fb9235 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 14:23:00 -0500 Subject: [PATCH 0922/3335] Add files via upload --- vm/haos.sh.gpg | Bin 0 -> 3852 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 vm/haos.sh.gpg diff --git a/vm/haos.sh.gpg b/vm/haos.sh.gpg new file mode 100644 index 0000000000000000000000000000000000000000..c887542bcb808d9e1094be86e8b595681a0ba1a1 GIT binary patch literal 3852 zcmV+n5A*Ph4Fm}T0@zj!h3-eJ)c?}!0jX8$yNUJ=oXwYmxoC)(Z=-E;yv3Ql#o_y8 zG6e6{C0!F_OsB*iD{;3irJB6QNi>6KQ+>BGd!&(!&#G&E@G&ZrTvoqrzDYb7MA?h}=S60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qG_%Vff&M4HtZB OV|9-rFHVs{mGX|rqg5RM literal 0 HcmV?d00001 From a7d3f03be5d61bbddaa2ba5f62a8fdcb4104372c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 14:55:44 -0500 Subject: [PATCH 0923/3335] Update add-tailscale-lxc.sh tweak --- misc/add-tailscale-lxc.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index e9a54a2d..73ee67ee 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +function header_info { +cat <<"EOF" + ______ _ __ __ + /_ __/___ _(_) /_____________ _/ /__ + / / / __ `/ / / ___/ ___/ __ `/ / _ \ + / / / /_/ / / (__ ) /__/ /_/ / / __/ +/_/ \__,_/_/_/____/\___/\__,_/_/\___/ + +EOF +} +clear +header_info echo -e "\e[1;33mThis script will add Tailscale to an existing LXC Container ONLY\e[0m" while true; do read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn @@ -37,9 +49,9 @@ lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF -msg "⏳ Installing Tailscale..." +msg "Installing Tailscale..." lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" &>/dev/null || exit -msg "⌛ Installed Tailscale" +msg "Installed Tailscale" sleep 2 msg "\e[1;32m ✔ Completed Successfully!\e[0m" msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console\e[0m" From ab832403713cf736d9ed8d56a3bdd6e9d52f98d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 10 Jan 2023 15:01:30 -0500 Subject: [PATCH 0924/3335] Update code-server.sh tweak --- misc/code-server.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/misc/code-server.sh b/misc/code-server.sh index dfadd067..cb55416b 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ __ _____ + / ____/___ ____/ /__ / ___/___ ______ _____ _____ + / / / __ \/ __ / _ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ +/ /___/ /_/ / /_/ / __/ ___/ / __/ / | |/ / __/ / +\____/\____/\__,_/\___/ /____/\___/_/ |___/\___/_/ + +EOF +} IP=$(hostname -I | awk '{print $1}') YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -28,7 +38,8 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } - +clear +header_info while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in @@ -37,18 +48,6 @@ while true; do *) echo "Please answer yes or no." ;; esac done -clear -function header_info { - echo -e "${BL} - ______ __ _____ - / ____/___ ____/ /__ / ___/___ ______ _____ _____ - / / / __ \/ __ / _ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ -/ /___/ /_/ / /_/ / __/ ___/ / __/ / | |/ / __/ / -\____/\____/\__,_/\___/ /____/\___/_/ |___/\___/_/ -${CL}" -} - -header_info function msg_info() { local msg="$1" From f8b11c9fa4534031b621562a3de070592ea2c093 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 07:00:10 -0500 Subject: [PATCH 0925/3335] Update pihole-v5.sh switch branch --- ct/pihole-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 9e8bb637..a153ed0f 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -352,7 +352,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/v5/install/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ From ee99360c80522607e7f4286c89793d4ce238cd01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 12:36:44 -0500 Subject: [PATCH 0926/3335] Update homeassistant-core-v5-install.sh Pre-Initialize --- install/homeassistant-core-v5-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 3c88bd62..37131755 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -146,6 +146,7 @@ $STD python3 -m pip install wheel $STD pip install mysqlclient $STD pip install psycopg2-binary $STD pip install homeassistant +mkdir -p /root/.homeassistant msg_ok "Installed Home Assistant-Core" msg_info "Creating Service" @@ -161,7 +162,7 @@ RestartForceExitStatus=100 [Install] WantedBy=multi-user.target EOF -$STD systemctl enable homeassistant +$STD systemctl enable --now homeassistant msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) From 7b7b7851080525e5c08a6e5c3ad04ee60dc4d5c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 12:46:25 -0500 Subject: [PATCH 0927/3335] Update homeassistant-core-v5.sh auto initialize --- ct/homeassistant-core-v5.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index c4a108af..8008bf97 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -317,20 +317,14 @@ function install_script() { function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Initialize" OFF \ - "2" "Update Core" ON \ - "3" "Install HACS" OFF \ - "4" "Install FileBrowser" OFF \ + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ + "1" "Update Core" ON \ + "2" "Install HACS" OFF \ + "3" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) clear header_info -if [ "$UPD" == "1" ]; then -echo -e "\n LOG VIEWER - Go to http://${IP}:8123 to setup \n" -cd /srv/homeassistant && python3 -m venv . && source bin/activate && hass -exit -fi -if [ "$UPD" == "2" ]; then +if [ "$UPD" == "1" ]; then if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then clear header_info @@ -361,7 +355,7 @@ msg_ok "Update Successful" echo -e "\n Go to http://${IP}:8123 \n" exit fi -if [ "$UPD" == "3" ]; then +if [ "$UPD" == "2" ]; then msg_info "Installing Home Assistant Comunity Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null @@ -371,7 +365,7 @@ msg_ok "Installed Home Assistant Comunity Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit fi -if [ "$UPD" == "4" ]; then +if [ "$UPD" == "3" ]; then msg_info "Installing FileBrowser" curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null @@ -454,5 +448,5 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable (after it's initialized) by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8123${CL}" From e4fc7869c5146fc7503014589d247b30137d9913 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 12:50:30 -0500 Subject: [PATCH 0928/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f9011dad..63ece923 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-11 + +### Changed + +- **Home Assistant Core LXC** + - Auto Initialize + ## 2023-01-09 ### Changed From abbd3a069b598adab555a5615efaf836971d7c14 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:10:36 -0500 Subject: [PATCH 0929/3335] Create cronicle-v5.sh --- ct/cronicle-v5.sh | 401 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 401 insertions(+) create mode 100644 ct/cronicle-v5.sh diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh new file mode 100644 index 00000000..f03b7f4b --- /dev/null +++ b/ct/cronicle-v5.sh @@ -0,0 +1,401 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ _ __ + / ____/________v5____ (_)____/ /__ + / / / ___/ __ \/ __ \/ / ___/ / _ \ +/ /___/ / / /_/ / / / / / /__/ / __/ +\____/_/ \____/_/ /_/_/\___/_/\___/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Cronicle" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +hostname="$(hostname)" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} Master LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + SERVER="y" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} SUPPORT" --yesno "Options to Update or Install ${APP} Worker on $hostname. Proceed?" 10 58); then + echo "User selected Support" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP}" ON \ + "2" "Install ${APP} Worker" OFF \ + 3>&1 1>&2 2>&3) + +clear +header_info +if [ "$UPD" == "1" ]; then +msg_info "Updating ${APP}" +/opt/cronicle/bin/control.sh upgrade &>/dev/null +msg_ok "Updated ${APP}" +exit +fi +if [ "$UPD" == "2" ]; then +LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +IP=$(hostname -I | awk '{print $1}') +msg_info "Installing Dependencies" + +apt-get install -y git &>/dev/null +apt-get install -y make &>/dev/null +apt-get install -y g++ &>/dev/null +apt-get install -y gcc &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + +msg_info "Installing Cronicle Worker" +mkdir -p /opt/cronicle +cd /opt/cronicle +tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 &>/dev/null +npm install &>/dev/null +node bin/build.js dist &>/dev/null +sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json +/opt/cronicle/bin/control.sh start &>/dev/null +cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null +chmod 775 /etc/init.d/cronicled +update-rc.d cronicled defaults &>/dev/null +msg_ok "Installed Cronicle Worker on $hostname" +echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" +exit +fi +} + +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export SERV=$SERVER +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Master should be reachable by going to the following URL. + ${BL}http://${IP}:3012${CL} admin|admin \n" From 8ffb8ba16d7ef115d755a1253adbec83e909a559 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:11:47 -0500 Subject: [PATCH 0930/3335] Create cronicle-v5-install.sh --- install/cronicle-v5-install.sh | 140 +++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 install/cronicle-v5-install.sh diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh new file mode 100644 index 00000000..5f1f8ff3 --- /dev/null +++ b/install/cronicle-v5-install.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Cronicle Master" +LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +IP=$(hostname -I | awk '{print $1}') +mkdir -p /opt/cronicle +cd /opt/cronicle +$STD tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 +$STD npm install +$STD node bin/build.js dist +sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json +if [[ $SERV == "y" ]]; then $STD /opt/cronicle/bin/control.sh setup; fi +$STD /opt/cronicle/bin/control.sh start +$STD cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled +chmod 775 /etc/init.d/cronicled +$STD update-rc.d cronicled defaults +msg_ok "Installed Cronicle Master" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 6789b685a6f5f425920ccb62bb8955ac72efadb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:34:35 -0500 Subject: [PATCH 0931/3335] Update cronicle-v5.sh add directory checks --- ct/cronicle-v5.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index f03b7f4b..f88bc6c0 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -316,12 +316,20 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb clear header_info if [ "$UPD" == "1" ]; then + if [[ ! -d /opt/cronicle ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi msg_info "Updating ${APP}" /opt/cronicle/bin/control.sh upgrade &>/dev/null msg_ok "Updated ${APP}" exit fi if [ "$UPD" == "2" ]; then + if [[ -d /opt/cronicle ]]; then + msg_error "${APP} Installation Found!"; + exit + fi LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) IP=$(hostname -I | awk '{print $1}') msg_info "Installing Dependencies" From 5c4cc1a4a59abdc033a159ce85157e96837fcde4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:45:53 -0500 Subject: [PATCH 0932/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 63ece923..15405049 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Home Assistant Core LXC** - Auto Initialize +- **Cronicle Master/Worker LXC** + - NEW Script ## 2023-01-09 From daa747e66b909b96f857e014b047c0fc00225d93 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:52:08 -0500 Subject: [PATCH 0933/3335] Update cronicle-v5-install.sh --- install/cronicle-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 5f1f8ff3..ebd00e41 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -97,7 +97,7 @@ msg_info "Installing Node.js" $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing Cronicle Master" +msg_info "Installing Cronicle Primary Server" LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) IP=$(hostname -I | awk '{print $1}') mkdir -p /opt/cronicle @@ -111,7 +111,7 @@ $STD /opt/cronicle/bin/control.sh start $STD cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled chmod 775 /etc/init.d/cronicled $STD update-rc.d cronicled defaults -msg_ok "Installed Cronicle Master" +msg_ok "Installed Cronicle Primary Server" PASS=$(grep -w "root" /etc/shadow | cut -b6) if [[ $PASS != $ ]]; then From aba51cc393b4844bd1a9340d142cf3f924e9dfb4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:52:54 -0500 Subject: [PATCH 0934/3335] Update cronicle-v5.sh --- ct/cronicle-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index f88bc6c0..366f1a15 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -405,5 +405,5 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "${APP} Master should be reachable by going to the following URL. +echo -e "${APP} Primary should be reachable by going to the following URL. ${BL}http://${IP}:3012${CL} admin|admin \n" From 487c46728fb4af82273d8838e4b6cb749e903d47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Jan 2023 19:53:22 -0500 Subject: [PATCH 0935/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 15405049..238e46d1 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file. - **Home Assistant Core LXC** - Auto Initialize -- **Cronicle Master/Worker LXC** +- **Cronicle Primary/Worker LXC** - NEW Script ## 2023-01-09 From 32d9d83bcffa8a3b354c04dda6dfb9ab47f3b94d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Jan 2023 09:48:24 -0500 Subject: [PATCH 0936/3335] Update filebrowser.sh tweak --- misc/filebrowser.sh | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index dc322299..893c834b 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash +function header_info { + cat <<"EOF" + _______ __ ____ + / ____(_) /__ / __ )_________ _ __________ _____ + / /_ / / / _ \/ __ / ___/ __ \ | /| / / ___/ _ \/ ___/ + / __/ / / / __/ /_/ / / / /_/ / |/ |/ (__ ) __/ / +/_/ /_/_/\___/_____/_/ \____/|__/|__/____/\___/_/ + +EOF +} IP=$(hostname -I | awk '{print $1}') YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -28,7 +38,8 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } - +clear +header_info while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in @@ -38,20 +49,7 @@ while true; do esac done clear -function header_info { - echo -e "${DGN} - - ______ _ _ ____ - | ____(_) | | _ \ - | |__ _| | ___| |_) |_ __ _____ _____ ___ _ __ - | __| | | |/ _ \ _ <| __/ _ \ \ /\ / / __|/ _ \ __| - | | | | | __/ |_) | | | (_) \ V V /\__ \ __/ | - |_| |_|_|\___|____/|_| \___/ \_/\_/ |___/\___|_| -${CL}" -} - header_info - function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -63,7 +61,7 @@ function msg_ok() { } msg_info "Installing ${APP}" -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null +bash <(curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh) &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null From 48babec3bd43598b5589d2034a7fced866b167b3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Jan 2023 10:51:43 -0500 Subject: [PATCH 0937/3335] Update wireguard-v5.sh tweak --- ct/wireguard-v5.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 824e6f7c..4d825bd5 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -325,6 +325,10 @@ msg_ok "Update Successfull" exit fi if [ "$UPD" == "2" ]; then + if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then + msg_error "Existing WGDashboard Installation Found!"; + exit + fi IP=$(hostname -I | awk '{print $1}') msg_info "Installing pip3" apt-get install -y python3-pip &>/dev/null From 28e198f56741d5f8a0e000da01041d982c8bade0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Jan 2023 11:27:26 -0500 Subject: [PATCH 0938/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 238e46d1..006aa53e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,4 @@ - + # Change Log All notable changes to this project will be documented in this file. From a84c54d3cc28c6fae840c7435d7e5f602ec52a2a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Jan 2023 13:33:22 -0500 Subject: [PATCH 0939/3335] Option to set MTU size (#930) * option to change mtu value --- ct/adguard-v5.sh | 15 ++++++++++++++- ct/alpine-v5.sh | 15 ++++++++++++++- ct/archlinux-v5.sh | 15 ++++++++++++++- ct/blocky-v5.sh | 15 ++++++++++++++- ct/casaos-v5.sh | 15 ++++++++++++++- ct/changedetection-v5.sh | 15 ++++++++++++++- ct/cronicle-v5.sh | 15 ++++++++++++++- ct/daemonsync-v5.sh | 15 ++++++++++++++- ct/dashy-v5.sh | 15 ++++++++++++++- ct/debian-v5.sh | 15 ++++++++++++++- ct/deconz-v5.sh | 15 ++++++++++++++- ct/docker-v5.sh | 15 ++++++++++++++- ct/emby-v5.sh | 15 ++++++++++++++- ct/emqx-v5.sh | 15 ++++++++++++++- ct/esphome-v5.sh | 15 ++++++++++++++- ct/grafana-v5.sh | 15 ++++++++++++++- ct/grocy-v5.sh | 15 ++++++++++++++- ct/heimdalldashboard-v5.sh | 15 ++++++++++++++- ct/homeassistant-core-v5.sh | 15 ++++++++++++++- ct/homeassistant-v5.sh | 15 ++++++++++++++- ct/homebridge-v5.sh | 15 ++++++++++++++- ct/homepage-v5.sh | 15 ++++++++++++++- ct/hyperion-v5.sh | 15 ++++++++++++++- ct/influxdb-v5.sh | 15 ++++++++++++++- ct/iobroker-v5.sh | 15 ++++++++++++++- ct/jellyfin-v5.sh | 15 ++++++++++++++- ct/k0s-v5.sh | 15 ++++++++++++++- ct/keycloak-v5.sh | 15 ++++++++++++++- ct/magicmirror-v5.sh | 15 ++++++++++++++- ct/mariadb-v5.sh | 15 ++++++++++++++- ct/meshcentral-v5.sh | 15 ++++++++++++++- ct/motioneye-v5.sh | 15 ++++++++++++++- ct/mqtt-v5.sh | 15 ++++++++++++++- ct/n8n-v5.sh | 15 ++++++++++++++- ct/navidrome-v5.sh | 15 ++++++++++++++- ct/nextcloudpi-v5.sh | 15 ++++++++++++++- ct/nginxproxymanager-v5.sh | 15 ++++++++++++++- ct/nocodb-v5.sh | 15 ++++++++++++++- ct/node-red-v5.sh | 15 ++++++++++++++- ct/omada-v5.sh | 15 ++++++++++++++- ct/omv-v5.sh | 15 ++++++++++++++- ct/openhab-v5.sh | 15 ++++++++++++++- ct/paperless-ngx-v5.sh | 15 ++++++++++++++- ct/photoprism-v5.sh | 15 ++++++++++++++- ct/pihole-v5.sh | 15 ++++++++++++++- ct/plex-v5.sh | 15 ++++++++++++++- ct/podman-homeassistant-v5.sh | 15 ++++++++++++++- ct/podman-v5.sh | 15 ++++++++++++++- ct/postgresql-v5.sh | 15 ++++++++++++++- ct/prometheus-v5.sh | 15 ++++++++++++++- ct/scrypted-v5.sh | 15 ++++++++++++++- ct/shinobi-v5.sh | 15 ++++++++++++++- ct/syncthing-v5.sh | 15 ++++++++++++++- ct/technitiumdns-v5.sh | 15 ++++++++++++++- ct/trilium-v5.sh | 15 ++++++++++++++- ct/ubuntu-v5.sh | 15 ++++++++++++++- ct/umbrel-v5.sh | 15 ++++++++++++++- ct/unifi-v5.sh | 15 ++++++++++++++- ct/uptimekuma-v5.sh | 15 ++++++++++++++- ct/vaultwarden-v5.sh | 15 ++++++++++++++- ct/whoogle-v5.sh | 15 ++++++++++++++- ct/wikijs-v5.sh | 15 ++++++++++++++- ct/wireguard-v5.sh | 15 ++++++++++++++- ct/yunohost-v5.sh | 15 ++++++++++++++- ct/zigbee2mqtt-v5.sh | 15 ++++++++++++++- ct/zwave-js-ui-v5.sh | 15 ++++++++++++++- 66 files changed, 924 insertions(+), 66 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 19253057..da147dfc 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -116,6 +116,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -225,6 +227,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -358,7 +371,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index e43b5c22..db759dd5 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -223,6 +225,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -337,7 +350,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index c56f9b8a..da561a1f 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index d460035c..59d2c74d 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 6540b4d1..740930aa 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -228,6 +230,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,7 +364,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 7facabc7..88aa8595 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -340,7 +353,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 366f1a15..f10caccb 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -115,6 +115,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -224,6 +226,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -388,7 +401,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 9aeafa7a..39305f4a 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 68308c59..eb18f3a7 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -367,7 +380,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index d357e70c..f4a14602 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -113,6 +113,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -222,6 +224,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -336,7 +349,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 96f6c164..4a50fe38 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 05a3e7d1..c90ee4b0 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -116,6 +116,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -348,7 +361,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index d437d570..1c8f4031 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -235,6 +237,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -360,7 +373,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 1c7fd2d7..053de5a0 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -340,7 +353,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 08853e26..647a05ca 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,7 +360,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index d8e30cfa..71c801d9 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 4c968ca2..1f45f898 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -340,7 +353,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 6105a6b5..466269e5 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -420,7 +433,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 8008bf97..46bf2b5f 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -120,6 +120,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -230,6 +232,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -417,7 +430,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index f2c18915..043eebb4 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -230,6 +232,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -416,7 +429,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 3e8d27d1..f635f3d6 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 08342af6..5e293376 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,7 +360,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index ea2db61e..f2b83c82 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -342,7 +355,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 0c854a39..18e5e1ef 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index f5e08b8e..e5863828 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 1c500c18..91b007ef 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -120,6 +120,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -237,6 +239,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -350,7 +363,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 194d5d25..7a578549 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 78dfca0a..f23f1c32 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -342,7 +355,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 74e32759..199ded64 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -343,7 +356,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 72d2af41..82f7c71a 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 6f83cd69..ac9500ff 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 94b1d14a..7d4fe34c 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -340,7 +353,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index bff59605..707624b8 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -115,6 +115,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -224,6 +226,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index de9aef30..69437e2a 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 53750da7..beab0978 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,7 +365,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 511f39f8..a993d3bc 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index ccb6d296..94954f7f 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -450,7 +463,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 1b6510da..1fd54974 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -344,7 +357,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 0a207309..3743a71a 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -377,7 +390,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index ef01599e..e6aa93bd 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -235,6 +237,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -339,7 +352,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index a9a5366a..e7ed0d62 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -342,7 +355,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 033c762c..401b85b7 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -342,7 +355,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 9e6d1c24..411463c0 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -409,7 +422,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 5e5a9961..4691eb67 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -116,6 +116,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -225,6 +227,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -362,7 +375,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index a153ed0f..a6e3e22f 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index c6d04cf2..537f8bf5 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -119,6 +119,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -236,6 +238,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -360,7 +373,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 43d158ec..995ca428 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -121,6 +121,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -230,6 +232,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -391,7 +404,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 9ce8f0d8..32670543 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index e1412d2f..73bf41f5 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 490bd911..8b46ddcf 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 788759d7..1070f901 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -342,7 +355,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 94d0b2f8..4e3f1107 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -235,6 +237,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,7 +364,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 892c06f1..4825b5ab 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -342,7 +355,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 696fdd95..9e55abd1 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -403,7 +416,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 54cbf786..88cdc017 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -360,7 +373,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 5433958e..6fb92d13 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -114,6 +114,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -231,6 +233,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -344,7 +357,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 047ec077..9a2b7b0e 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -228,6 +230,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -349,7 +362,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 02550614..d8f71fe2 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -341,7 +354,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index a82870c4..81f77d75 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -358,7 +371,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 0a607672..65002322 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -116,6 +116,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -409,7 +422,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 08741c4c..a92970eb 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -340,7 +353,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index c38f34d1..a8785853 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -354,7 +367,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 4d825bd5..333635b5 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -396,7 +409,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index a1382e7f..9a44f24e 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -113,6 +113,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -222,6 +224,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -336,7 +349,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 5c8348f4..1d4d9cc1 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -118,6 +118,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -227,6 +229,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -371,7 +384,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 1b5fb451..3b7394df 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -117,6 +117,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" SD="" echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" @@ -226,6 +228,17 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -354,7 +367,7 @@ export PCT_OPTIONS=" -hostname $HN $SD $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE From 4c829312ba5b0075539ad1a329145afeeb2713ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Jan 2023 13:37:58 -0500 Subject: [PATCH 0940/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 006aa53e..b31cefcf 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-12 + +### Changed + +- **ALL LXC's** + - Add an option to set MTU size (Advanced) + ## 2023-01-11 ### Changed From 3641028e1dcc97d18dfe9d1d8d3ce8e2f33b7e00 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Jan 2023 06:18:33 -0500 Subject: [PATCH 0941/3335] Update grafana-v5-install.sh Grafana packages will be served from a new repository --- install/grafana-v5-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 7647e08f..23fc0f5b 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -90,10 +90,8 @@ $STD apt-get install -y software-properties-common msg_ok "Installed Dependencies" msg_info "Setting up Grafana Repository" -$STD apt-key add <(curl -fsSL https://packages.grafana.com/gpg.key) -cat </etc/apt/sources.list.d/grafana.list -deb https://packages.grafana.com/oss/deb stable main -EOF +wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key +sh -c 'echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" > /etc/apt/sources.list.d/grafana.list' msg_ok "Set up Grafana Repository" msg_info "Installing Grafana" From 06e40224729b67982786195ad612103e2a608244 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Jan 2023 14:09:44 -0500 Subject: [PATCH 0942/3335] Create the arr's (#938) lidarr, prowlarr, radarr, readarr, sonarr, whisparr --- ct/lidarr-v5.sh | 370 ++++++++++++++++++++++++++++++++ ct/prowlarr-v5.sh | 370 ++++++++++++++++++++++++++++++++ ct/radarr-v5.sh | 370 ++++++++++++++++++++++++++++++++ ct/readarr-v5.sh | 370 ++++++++++++++++++++++++++++++++ ct/sonarr-v5.sh | 370 ++++++++++++++++++++++++++++++++ ct/whisparr-v5.sh | 371 +++++++++++++++++++++++++++++++++ install/lidarr-v5-install.sh | 144 +++++++++++++ install/prowlarr-v5-install.sh | 142 +++++++++++++ install/radarr-v5-install.sh | 142 +++++++++++++ install/readarr-v5-install.sh | 142 +++++++++++++ install/sonarr-v5-install.sh | 121 +++++++++++ install/whisparr-v5-install.sh | 142 +++++++++++++ 12 files changed, 3054 insertions(+) create mode 100644 ct/lidarr-v5.sh create mode 100644 ct/prowlarr-v5.sh create mode 100644 ct/radarr-v5.sh create mode 100644 ct/readarr-v5.sh create mode 100644 ct/sonarr-v5.sh create mode 100644 ct/whisparr-v5.sh create mode 100644 install/lidarr-v5-install.sh create mode 100644 install/prowlarr-v5-install.sh create mode 100644 install/radarr-v5-install.sh create mode 100644 install/readarr-v5-install.sh create mode 100644 install/sonarr-v5-install.sh create mode 100644 install/whisparr-v5-install.sh diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh new file mode 100644 index 00000000..aa63a68d --- /dev/null +++ b/ct/lidarr-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ _ __ + / / (_)___/ /___v5__________ + / / / / __ / __ `/ ___/ ___/ + / /___/ / /_/ / /_/ / / / / +/_____/_/\__,_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Lidarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8686${CL} \n" diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh new file mode 100644 index 00000000..dbf5a5e8 --- /dev/null +++ b/ct/prowlarr-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \_________ _ __/ /___v5__________ + / /_/ / ___/ __ \ | /| / / / __ `/ ___/ ___/ + / ____/ / / /_/ / |/ |/ / / /_/ / / / / +/_/ /_/ \____/|__/|__/_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Prowlarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9696${CL} \n" diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh new file mode 100644 index 00000000..ad68253e --- /dev/null +++ b/ct/radarr-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \____ _____/ /___v5__________ + / /_/ / __ `/ __ / __ `/ ___/ ___/ + / _, _/ /_/ / /_/ / /_/ / / / / +/_/ |_|\__,_/\__,_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Radarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7878${CL} \n" diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh new file mode 100644 index 00000000..a8e596d0 --- /dev/null +++ b/ct/readarr-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \___ ____ _____/ /___v5__________ + / /_/ / _ \/ __ `/ __ / __ `/ ___/ ___/ + / _, _/ __/ /_/ / /_/ / /_/ / / / / +/_/ |_|\___/\__,_/\__,_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Readarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8787${CL} \n" diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh new file mode 100644 index 00000000..2207fb65 --- /dev/null +++ b/ct/sonarr-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ + / ___/____ ____ ____v5__________ + \__ \/ __ \/ __ \/ __ `/ ___/ ___/ + ___/ / /_/ / / / / /_/ / / / / +/____/\____/_/ /_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Sonarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8989${CL} \n" diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh new file mode 100644 index 00000000..ed21646d --- /dev/null +++ b/ct/whisparr-v5.sh @@ -0,0 +1,371 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _ ____ _ +| | / / /_ (_)________ ____v5__________ +| | /| / / __ \/ / ___/ __ \/ __ `/ ___/ ___/ +| |/ |/ / / / / (__ ) /_/ / /_/ / / / / +|__/|__/_/ /_/_/____/ .___/\__,_/_/ /_/ + /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Whisparr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6969${CL} \n" diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh new file mode 100644 index 00000000..53d35fcc --- /dev/null +++ b/install/lidarr-v5-install.sh @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y sqlite3 +$STD apt-get install -y libchromaprint-tools +$STD apt-get install -y mediainfo +msg_ok "Installed Dependencies" + +msg_info "Installing Lidarr" +mkdir -p /var/lib/lidarr/ +chmod 775 /var/lib/lidarr/ +$STD wget --content-disposition 'https://lidarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Lidarr.master.*.tar.gz +mv Lidarr /opt +chmod 775 /opt/Lidarr +msg_ok "Installed Lidarr" + +msg_info "Creating Service" +cat </etc/systemd/system/lidarr.service +[Unit] +Description=Lidarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Lidarr/Lidarr -nobrowser -data=/var/lib/lidarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q lidarr +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Lidarr.master.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh new file mode 100644 index 00000000..71fcd5fb --- /dev/null +++ b/install/prowlarr-v5-install.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Prowlarr" +mkdir -p /var/lib/prowlarr/ +chmod 775 /var/lib/prowlarr/ +$STD wget --content-disposition 'https://prowlarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Prowlarr.master.*.tar.gz +mv Prowlarr /opt +chmod 775 /opt/Prowlarr +msg_ok "Installed Prowlarr" + +msg_info "Creating Service" +cat </etc/systemd/system/prowlarr.service +[Unit] +Description=Prowlarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Prowlarr/Prowlarr -nobrowser -data=/var/lib/prowlarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q prowlarr +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Prowlarr.master.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh new file mode 100644 index 00000000..63536c41 --- /dev/null +++ b/install/radarr-v5-install.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Radarr" +mkdir -p /var/lib/radarr/ +chmod 775 /var/lib/radarr/ +$STD wget --content-disposition 'https://radarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Radarr.master.*.tar.gz +mv Radarr /opt +chmod 775 /opt/Radarr +msg_ok "Installed Radarr" + +msg_info "Creating Service" +cat </etc/systemd/system/radarr.service +[Unit] +Description=Radarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Radarr/Radarr -nobrowser -data=/var/lib/radarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q radarr +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Radarr.master.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh new file mode 100644 index 00000000..4ab6fd6c --- /dev/null +++ b/install/readarr-v5-install.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Readarr" +mkdir -p /var/lib/readarr/ +chmod 775 /var/lib/readarr/ +$STD wget --content-disposition 'https://readarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Readarr.develop.*.tar.gz +mv Readarr /opt +chmod 775 /opt/Readarr +msg_ok "Installed Readarr" + +msg_info "Creating Service" +cat </etc/systemd/system/readarr.service +[Unit] +Description=Readarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Readarr/Readarr -nobrowser -data=/var/lib/readarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q readarr +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Readarr.develop.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh new file mode 100644 index 00000000..19deb39c --- /dev/null +++ b/install/sonarr-v5-install.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +$STD apt-get install -y ca-certificates +msg_ok "Installed Dependencies" + +msg_info "Installing Sonarr" +$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 +sh -c 'echo "deb https://apt.sonarr.tv/debian buster-develop main" > /etc/apt/sources.list.d/sonarr.list' +$STD apt-get update +$STD apt-get install -y sonarr +msg_ok "Installed Sonarr" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh new file mode 100644 index 00000000..f05cf265 --- /dev/null +++ b/install/whisparr-v5-install.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Whisparr" +mkdir -p /var/lib/whisparr/ +chmod 775 /var/lib/whisparr/ +$STD wget --content-disposition 'https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Whisparr.develop.*.tar.gz +mv Whisparr /opt +chmod 775 /opt/Whisparr +msg_ok "Installed Whisparr" + +msg_info "Creating Service" +cat </etc/systemd/system/whisparr.service +[Unit] +Description=whisparr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Whisparr/Whisparr -nobrowser -data=/var/lib/whisparr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q whisparr +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Whisparr.develop.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 2f8417c4ee43638258104fb7b333cefbd69ad86f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Jan 2023 14:13:25 -0500 Subject: [PATCH 0943/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b31cefcf..ca9e2e4c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,23 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-13 + +### Changed + +- **Lidarr LXC** + - NEW Script +- **Prowlarr LXC** + - NEW Script +- **Radarr LXC** + - NEW Script +- **Readarr LXC** + - NEW Script +- **Sonarr LXC** + - NEW Script +- **Whisparr LXC** + - NEW Script + ## 2023-01-12 ### Changed From cbd1c350458f1dcf9bbdeae0da226522a3340b47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Jan 2023 14:39:10 -0500 Subject: [PATCH 0944/3335] Update sonarr-v5-install.sh --- install/sonarr-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 19deb39c..9cb4a4b9 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -91,7 +91,7 @@ msg_info "Installing Sonarr" $STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 sh -c 'echo "deb https://apt.sonarr.tv/debian buster-develop main" > /etc/apt/sources.list.d/sonarr.list' $STD apt-get update -$STD apt-get install -y sonarr +$STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr msg_ok "Installed Sonarr" PASS=$(grep -w "root" /etc/shadow | cut -b6) From f351e7ef54ac749b2ff527409d4b6e4bb738f836 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Jan 2023 14:44:34 -0500 Subject: [PATCH 0945/3335] Update sonarr-v5-install.sh --- install/sonarr-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 9cb4a4b9..9d8a6585 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +export DEBIAN_FRONTEND=noninteractive if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") From 6ee0e2047a0ea8e521e95b0a0451f1ed313196b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 07:58:12 -0500 Subject: [PATCH 0946/3335] Update scrypted-v5-install.sh node v18 --- install/scrypted-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 1a08672c..27ae70da 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -116,7 +116,7 @@ $STD apt-get -y install \ msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 7c75036e3c246e5072e9fa9e22e3d9e5fd5a0e46 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 14:18:23 -0500 Subject: [PATCH 0947/3335] Update nextcloudpi-v5-install.sh fix shell access --- install/nextcloudpi-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 45f6b6d3..9aeeb72e 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -88,6 +88,7 @@ msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php +sed -i '{s|root:/usr/sbin/nologing|root:/bin/bash|g}' /etc/passwd service apache2 restart msg_ok "Installed NextCloudPi" From d632dd48d46efe913c4a35c2c8a96a0f7d195c28 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 14:42:36 -0500 Subject: [PATCH 0948/3335] Update nextcloudpi-v5-install.sh --- install/nextcloudpi-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 9aeeb72e..356f2a8c 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -88,7 +88,7 @@ msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php -sed -i '{s|root:/usr/sbin/nologing|root:/bin/bash|g}' /etc/passwd +sed -i '{s|root:/usr/sbin/nologin|root:/bin/bash|g}' /etc/passwd service apache2 restart msg_ok "Installed NextCloudPi" From 6b9da63d5b19b2091bfafaaeffe9f8c2f1282b7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 20:06:44 -0500 Subject: [PATCH 0949/3335] Create tdarr-v5.sh --- ct/tdarr-v5.sh | 370 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 ct/tdarr-v5.sh diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh new file mode 100644 index 00000000..20c495b2 --- /dev/null +++ b/ct/tdarr-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ __ + /_ __/___/ /___v5__________ + / / / __ / __ `/ ___/ ___/ + / / / /_/ / /_/ / / / / +/_/ \__,_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Tdarr" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8265${CL} \n" From e3bb3d8e84830ae0dd76d3be18a79511f37818b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 20:08:08 -0500 Subject: [PATCH 0950/3335] Create tdarr-v5-install.sh --- install/tdarr-v5-install.sh | 169 ++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 install/tdarr-v5-install.sh diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh new file mode 100644 index 00000000..0bce29cd --- /dev/null +++ b/install/tdarr-v5-install.sh @@ -0,0 +1,169 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing Tdarr" +mkdir -p /opt/tdarr +cd /opt/tdarr +wget -q https://f000.backblazeb2.com/file/tdarrs/versions/2.00.15/linux_x64/Tdarr_Updater.zip +$STD unzip Tdarr_Updater.zip +chmod +x Tdarr_Updater +$STD ./Tdarr_Updater +msg_ok "Installed Tdarr" + +msg_info "Creating Service" +service_path="/etc/systemd/system/tdarr-server.service" +echo "[Unit] +Description=Tdarr Server Daemon +After=network.target +# Enable if using ZFS, edit and enable if other FS mounting is required to access directory +#Requires=zfs-mount.service + +[Service] +User=root +Group=root + +Type=simple +WorkingDirectory=/opt/tdarr/Tdarr_Server +ExecStartPre=/opt/tdarr/Tdarr_Updater +ExecStart=/opt/tdarr/Tdarr_Server/Tdarr_Server +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path + +service_path="/etc/systemd/system/tdarr-node.service" +echo "[Unit] +Description=Tdarr Node Daemon +After=network.target +Requires=tdarr-server.service + +[Service] +User=root +Group=root + +Type=simple +WorkingDirectory=/opt/tdarr/Tdarr_Node +ExecStart=/opt/tdarr/Tdarr_Node/Tdarr_Node +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q tdarr-server.service +systemctl enable --now -q tdarr-node.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +rm -rf Tdarr_Updater.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 581f73637a854a4a50dfaf55568efda17cc242ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 20:11:26 -0500 Subject: [PATCH 0951/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ca9e2e4c..1acfe6c5 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-14 + +### Changed + +- **Tdarr LXC** + - NEW Script + ## 2023-01-13 ### Changed From bdcd1c40a3817ec40bfd35eb223f3d1ded7cbee1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 21:05:41 -0500 Subject: [PATCH 0952/3335] Create deluge-v5-install.sh --- install/deluge-v5-install.sh | 156 +++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 install/deluge-v5-install.sh diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh new file mode 100644 index 00000000..0ec88f4e --- /dev/null +++ b/install/deluge-v5-install.sh @@ -0,0 +1,156 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing pip3" +$STD apt-get install -y python3-pip +msg_ok "Installed pip3" + +msg_info "Installing Deluge" +$STD pip install deluge[all] +msg_ok "Installed Deluge" + +msg_info "Creating Service" +service_path="/etc/systemd/system/deluged.service" +echo "[Unit] +Description=Deluge Bittorrent Client Daemon +Documentation=man:deluged +After=network-online.target + +[Service] +Type=simple +UMask=007 +ExecStart=/usr/local/bin/deluged -d +Restart=on-failure +TimeoutStopSec=300 + +[Install] +WantedBy=multi-user.target" >$service_path + +service_path="/etc/systemd/system/deluge-web.service" +echo "[Unit] +Description=Deluge Bittorrent Client Web Interface +Documentation=man:deluge-web +After=deluged.service +Wants=deluged.service + +[Service] +Type=simple +UMask=027 +ExecStart=/usr/local/bin/deluge-web -d +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q deluged.service +systemctl enable --now -q deluge-web.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From bdd7afce64624ef1b9ffcb879aa13dfabdb49e84 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 21:06:58 -0500 Subject: [PATCH 0953/3335] Create deluge-v5.sh --- ct/deluge-v5.sh | 371 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 371 insertions(+) create mode 100644 ct/deluge-v5.sh diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh new file mode 100644 index 00000000..d77b8d36 --- /dev/null +++ b/ct/deluge-v5.sh @@ -0,0 +1,371 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ + / __ \___ / /_v5______ ____ + / / / / _ \/ / / / / __ `/ _ \ + / /_/ / __/ / /_/ / /_/ / __/ +/_____/\___/_/\__,_/\__, /\___/ + /____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Deluge" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8112${CL} \n" From 2150de088cdd51c461f107d5215f35f513060640 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 21:07:32 -0500 Subject: [PATCH 0954/3335] Update tdarr-v5.sh --- ct/tdarr-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 20c495b2..0de99210 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -362,7 +362,7 @@ pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} ${var_version} LXC +pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" From fc9b42bc5bcc02b4c4da813a867799582caed6e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Jan 2023 21:21:37 -0500 Subject: [PATCH 0955/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1acfe6c5..60905879 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. - **Tdarr LXC** - NEW Script +- **Deluge LXC** + - NEW Script ## 2023-01-13 From 313de1c3aa20f739b2b6102752bad3cf2e9e9816 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:48:57 -0500 Subject: [PATCH 0956/3335] Delete docker.png --- misc/images/docker.png | Bin 49776 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/docker.png diff --git a/misc/images/docker.png b/misc/images/docker.png deleted file mode 100644 index 210598c29e4e83090b4df0a8cd2ca424c37d61a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49776 zcmZs?W0Ymfwk|r;HY#n~wrz8!RaI%*wryLLMx||MrEOcU);)LaeQs;-$Hb2qBRaq6 z(GjksAc+8r0}B8E5TvEVQ~&@_t-t>>pdtT$JFjxc{QZHklhSqs01yZM`G6$TBH{u7 zeI(Li!fI{?7y3|sdg_Zg>Dk%ztLO>HB2v&n$Rf~E-%#QaNyOEZP?QEhUr7s~X>Lhx zX$y?|1B}7oXy)QKGw&7r0K_nV*ROZ;@*W6&=r%~ZjN&5j9&~$7^FMSP{c@sl zuXaT2Y;Cf69BpaR6R;JxGRH2L?iX}R4Cyg@CiIo-|GL(EX8a7`04Kwf;)=5)+7asWe~1E0f2isaZRpUPo+RY8HM26OL12RQ zLp3IUAJ(FMm1e^9r=>zXfY77vF4#R$GqJEf&&|2yYSyA5XCX*XQ4Ev$_f@VePzl?- z;6>{ORLiovFsLei8F~~EcgjgEDg)wIH-rInuPF^$2{#ExC>95i2YTgMGNydsrde_S zmy{r|vu{uhXPT~|mbMVQvut@KHPBr4Jdr)SU$;?t(>AMmB&ALFAn6k5UL0b)IdRGV z!$A-j4Af>io>T*_sBld}_#C??bfVow@)Vkm2<c@qeVY zoju`i8evBz^{o`d`RB|>bMWP5w8FPJ!xzPS`<`%tJB`s5r0#JC8fA_ z@^WN0D~gC%VtgBY-A@Y;a!W7`G`0`fKX{BMa95BMay(%qB;P2*vM5iR&Ns zg})k=8Z_gng-=AWb4$}DIQ6;ye;!i}5*6NV7|~x=8@1XjRI1LOnGFj0A6fiEW}T1SKdebjRsOjz9oBz25!AO4Zg9z>ybv z?k3`Ym>Ytj{?};!;dc~>Ak6*5)wn#Kl-ofT>Zipb$^{;r8JG005uZUoq583d59nn} zA9>2Ks`JcN%yDb_&?r+Pg8-95gq~1Q|2MtE{}>^3nAcVL;#Zr;&m;Tl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l@1*m*)exE}@`yb3;d@Z*Uq!|-5SY~y6b|UNT^D>%Zq5I7yTC^ku`mf^ z!|VhV!C<8qb?_Dq^~tLlK&=ZPG++}z^V>?Ek@K8@(ejWLE6f2`Xym+dcx=w<=S6)@xVqr<1#S0JN)6b?^hzVx13`IfH`F1+VZg7HlIcTxs0@pI^#j zIK%_0PGHvezgUW};F8PPf6*$@9;za}GmaQ@UXp$kPsm0QA}EuTT^B0}8!7s4=`i#z z{{RB1>yg>x3EnLvQgwU-RMkz zs;)<&!K#Yo7coGuZZfXy0Bq{(CHJ^c+l=MXN=WG_DW2-Lo4WGKj$E-<__fra_v<6?eKafXTRg2zkJ#j_`) zqFLkOrpw%ntr~U~l02F9m!AM>D7nuq>)Hj2J#)F-@~Y)=n`@R`B>{ ze3ol&`ork|ESA7ak${6fek9{++2A(sK=3AHZ!c~Bpmkj~IlVcZn%R!Qsi~=&qmb8# zaA8r0bRkD6&Sol|h%dSr*ixe&(4$_%ls3O+S}spBbN}s|RaHgh_^Uo&?hGV(#Z(FZ zSwneR5@#m$7#C;UWN|iEnF7mJ0du1}Sf4x>@tDbd3mA%+{Db(I*?R7l+488e_FIVN g|IW3K;n1JxXvO8YS5n4v5a7Qbl8O>FV#cBWAL})K+yDRo From 918914c1b6c558ac76ea2e3e53da337e4fa29547 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:49:08 -0500 Subject: [PATCH 0957/3335] Delete add_integration.png --- misc/images/add_integration.png | Bin 2749 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/add_integration.png diff --git a/misc/images/add_integration.png b/misc/images/add_integration.png deleted file mode 100644 index 64d19fd2a24fb2838def65c1fd723513bad01ed5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2749 zcmV;u3PSaXP)h~s!dhdiorz6bYhs&b8f~TlV>>l7 z*#6V$WK270(ljZdwp6256Vq&*hyhJ1f%S#T!-z;h1@`Xyp8m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r(IED From b2e0e57b90d8c8c3c24e1e35780d76859f6ed13e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:49:18 -0500 Subject: [PATCH 0958/3335] Delete adminer.png --- misc/images/adminer.png | Bin 139371 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/adminer.png diff --git a/misc/images/adminer.png b/misc/images/adminer.png deleted file mode 100644 index bede27577be12d9b28646562fdd8ebec0e7e67c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139371 zcmZs@Wn7g_*Z*xGpePbbcM2%5=?3XWS{mu@PLYO9cS|=&cZig9cXxN^GhCkMb>BYs z{}mtI!yL2cShHrW_5CgUKS>I`dV%%g(W6JNM1=We9zA;6{^-#Ye0W&!Kc(Ys;o!$( zYZ)QlM@4-&n~xq5JQCsmDCeNQlk~h=VieogeT`MSy%PtM4>^ubDhx`)G_(Kzs^o2dwO-QJ81i2?AXC#4{yxroa?&C-gRD?eQLEk zhNe3Jnf8eysl~A(UC!De`j$Hba2P@c~)XFHc_ zgXz9=#UXlHIA~ngmr0V%trwC_PYZ5;3OBd1U=-(7{QhTnbH#JHVrkjuC?xQ<#HiYJ z&QKl<7;)$>8sy1OAu#r$D7T{Xf2Q6VDKrOjl3dpyS7SW}(_vz!+&h><>eQ|lEGM?ML5sgOOB=Cd4*U1VdUDGO;%cES?8mlmy)&%$1g8)k? z#$biZC4K-dyN}h1@Y-H#EF|4{wwBv=Z$@CXD{5&g;x=6*TS{Y~J;>MQXvMKD5M4G` zmi$w#&GWV+hxaHy9FGZi=iNmU$+g?-Z2CF1WsuDNz6Eae!D zB?opUPv4MBLi33PZ~SaZ7n*-Zkn_EzS~(A5UNh{DCZ<$oD3nZO$#y)p%M}Q`$&-cK z3`HS>7GgmB;?+lTW!Gmf_iCwvB~!SHFAlXgm)g3EBzBxPhjgo?N_8x4Z!TELkIGri zW@7jBUp{H}yq9I+z8-3CZt>h}@kWp=xL{`(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z^H-bHp78x#{BlJDgIxs@&>~<@ zZ!;8VR{#4ZBm<0=x}x|eE2ZW{0R8fyXH^0v0FJk307;fD)jGg=b7|Op><%c8eza8D zqI9Zm4M@mcA;*KphHdvLmD1G1Lf2ve9jG_Ez)Jb9`SH9) z3-wQ)VgRRx*?JkJ^>Y~`01B#DvZ!)`=n7X~KNT2Ar)>eEJ08Gq8-FX+iXM>q3^$iY z#Z#<&M_*pX?*iB%9_aDl%RAVZ8-BdH(+xl;kI$~PZNOA}29zF@j(Swg{Ifm)xcAS* zHXltm*l;Se$FVZ&3YFulhW19dQKVEa^$HWZK35fw^ z0J1|ip-0O{q!Qo2vws9SRz|C%x2+B!W*$HV#o18GI!xPoDQ)mu=1u0~bKC{=H zi34JVYdYSp4)Ce@PnfviyUy>F>~KP>7x(h4_#))kvbvO%aV z{kr1=84*&ctr}q6-f#?%s`uM$#v_j1fe;kF!4y;PaJai>Hn z$J#;%Ba!1k9Y6+jjAMYj(IG%FNOm;yfW)`CFWcmQf&8Dq%v>^rEw|FoAwULwP$g*t zSfp}S^Ig87MBU5j&&-pq1fLo!4?{Zv?%{XhQ(M-Y;A3lp~axxL#{BI|xg&_4z^^ujb# zjZ}m@5f*+%Ak=r07p|@c^!Se@r~2r50BQ6T_i?oBL;0F=1(E)GHUcvzN-dmwY=yNoT zy(fhL Date: Sun, 15 Jan 2023 22:49:30 -0500 Subject: [PATCH 0959/3335] Delete adminer_logo-cl.png --- misc/images/adminer_logo-cl.png | Bin 14993 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/adminer_logo-cl.png diff --git a/misc/images/adminer_logo-cl.png b/misc/images/adminer_logo-cl.png deleted file mode 100644 index 0d3b6bd4c90ec7569dbc3f6ef727d4f8d0b7a6d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14993 zcmeI3RZ|=ctgzeS?(VR-!{Syb?(Xgj6qm(|ySux)I}~?{ySuyV_kQ>12b_y@kz{g{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t^IecHBUEv*Nw zRRI8g)8sfsRMuCP3X)i=_fqN)Ab|ozNUiNX;J@DL4nb9`MZlvVTVVW`t++1dT__Rl zeV6=n&hy@>i`{vL?OsMlx6m|Nc{nBek7!Lw>;fv2<}klv{H-$;e5*x@ zFE5xJq^F2*Xchm4cEmQ_x{bDev)O2{kN|9M-;t$D1~`+CsLahO2uwFqF#o2f95l>n zF1%SeiiE}YqAn)&EUKo;VMSb~sQt);1d%|k+QW^FU1m9zUqDiLdUn0jr zcvy=Mj|1V9NU0={;i;u;oMN}g^2j_{uNa^4!~o5t9~MKz76Qvf3?kf$A>5F?S9MQW zrB?#IxKqJ1pn2KNKOYfcncs@YedvgWSl2)&@QXZhQ<6*xu7881K*S|i{Sp*Q_$nM2 zxY6zCqV~sV@gm0|;2ebtNAa?I-eEw2r4YqTq9EO9lHov8eIh+a=&Rs!X{SVufKBtU ze4F_)Ya$IokjST(JT^=|oJTEwPy#!iGg`+2+aGp26Z0-I)kAh)OUYHf%!Udt-I@_` zf_!5lW@+vj3StHq>?mb1?|GhgH};8`)wq~DAF;uk^5q4DzRe#ZS?ce7(DFjnQA_ps z3*=7zd6r~TXsVf>p4#{$F;1Bz4|>|j~`V@$tEiOGvrix~R Date: Sun, 15 Jan 2023 22:49:41 -0500 Subject: [PATCH 0960/3335] Delete change.png --- misc/images/change.png | Bin 5753 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/change.png diff --git a/misc/images/change.png b/misc/images/change.png deleted file mode 100644 index 5543ec3e9623496d85062400384d3c90621eab76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5753 zcmV-<7KZ7GP)Py0Gf6~2RCr$Poqdp<)m_JbXW8s#H%TFVBNSr5v^DmHP)nh=+ggZs`Ck$!!*vGV<#h|m`O@tJq)+r}BT z&1bvEp0T0QM|mEx@$%iW;9kbVSi-(TNQJZrX+>Z3$;H@dhxao5Vt>czU7mk8unyPM zp5r^_Wv}u)!uv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jqr9k1)Os~BO;&G5F+;fyh=A8<5dz@&K?10~t4Dz)rGRseZ58Yt z!$U`MR)C3jMi_xZm^f665KQmtQD8|a;G82q`kQ);B8iuI$Iv7ujt*7b6mf6}6KcJ8 z^(e5U6mZTF&tyvo=}wX!QDBncVGHk1dhaRd=v_SuEGY$?b0jf1kDW7&*hX9dCZ0D@ ze2RtNd&@1iT+!d(KQ%l&{M^96KuZe&mUNK4#?O5UwA=0enVFgMr>Cc1LE-Yf_uflN z@)1pWlCrJwu1ludX1j(p#0_r$Ez3=RWOvGh9LnSdoa;K3F{he|P+cv@kzy$@!vyR@J!W$(L}fy{5m7C}8<}^5di- rDgFVFm3(=wuJ7B3UcITl)F|+OurWEf&a$F700000NkvXXu0mjff&COU From a97140b62687504ffc61c61e753b8f0b30945352 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:50:08 -0500 Subject: [PATCH 0961/3335] Delete changelog.png --- misc/images/changelog.png | Bin 2421 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/changelog.png diff --git a/misc/images/changelog.png b/misc/images/changelog.png deleted file mode 100644 index f762d00ee6a53d0987096a338da0e0523151a829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2421 zcmV-*35xcKP)Px;FG)l}R9HvNn0ruE*B!^dcVD0)zHmeVLrU5twoPqP-L9kJH~@afj&5PxI`4i-C}@Nz7v7bHqtrT z5IiIPZ&E!6foj&;L)XV7#QkDM@I*?B_=bUN??58f{z{`vK| zdv6GXLw1VV(b10W`jknbCIM>V^oa(x*LG_ZL~{aY#-$1}5+p=;JRUfm zPB=y!a5@}_T)Y@zv%_%p>Q(&eDnXM3f^(2IO1BKdFw6w7@lk)~j9K{j+?xyvWXNYXK1UWO8aM>)L%kFL$Q4Ma=6`YT)K1#8jS|OeECK2yr16Bo;{n+zhM4C z{P9prS^CawZb~5Y!A3S&pUU03LlgomR!b0!BpSt#KUt$uqqE~83JV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1_S=}QUala2 z8lZjECQn*kt)(+RiB1%|9;FiHr+KfMA8ufK{VOBUn#_~-Brw;L-~tSBogd~51e_Wr(dZdcwYkg}~ z>eRA%f|tCM)5{Z!0(f44Kq_hDdFh$nlQE?7fyhnz4e8lP-?}^x0GYwE-N5$C>SJ=mWpI+kS3(Z9G+y1G6;p>DTv=MUCA@qMtpuhTuvukZZ}G} zcagj;0Rk`L$z_jYe`9k1Di}x&V6IlHjqC2VUW|&09Lm38YE=fqT-XRMMx6 zQO5gxJ~$i>np=^?E;D}@wrt)Aoh}4%k3EW}=9X7Zo;cY$UZJ@F7G-8<6vxIcO_Cs# zQ^hDBnS}U?l1~!=scqap9i*R2Zy`q_pN}4g2;7b9mecm(2QR(;+6J6E|2fW_{!0V^ z$9NzOfLQ=$03_L%vIPHDT7puU^Z+RLY2|m5IY`w-$HqQ&tEcBv0OVL}|E3=k^Zh>x nnU8!Z`EUY9uA~Y8+@$^wf+lo|W<$Yl00000NkvXXu0mjfBt3h1 From 499b4d9c80052acfe11d22edfb861e4785882123 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:50:32 -0500 Subject: [PATCH 0962/3335] Delete discussions.png --- misc/images/discussions.png | Bin 17536 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/discussions.png diff --git a/misc/images/discussions.png b/misc/images/discussions.png deleted file mode 100644 index ea6678899a14853d59e2621fc2fbf124666209f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17536 zcmZs@Wl)=4*9IEg-JwWvcS><6#ob+kySuvyL&i!zcc6GnYr^P zGka&-B0S`qA+w5W0DuA@^HWUSEBm6` z+ll(cef#Cb+=8@>F*^?awa22Q^oW}83p(GwiT^08$5TT(le#(^2yJ~yJ?P!m=4`~* z4AzrKk!9lZ&7+g7Nx3J*zc>%+{X-pX|4W2^bb6U_V$1GNehlLYRmQlGn9=(|r6Nk1 zsH1T#38m5Z_VfKeoeZ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3tA;uo~`f-TAgZfOB*sV7nif)I%jGVh=In-wx|0mcK{$?WZ+>m&P(`*(Kp zo(_v$ag+YC%gl6JlP6bd$w;{ZB>yh`_>0r%OL_N2Iq;_2>shu-`{eG0186;u@Y;r zDtuv9VN?tL4}YNpJ7gMcL80`2MoS@mfP&C|L7XD@aK1P3^9W1rt{QZ9Z zzCPPGUu|KD(a@rOfFgi`(4MR$KoZSIL76f5ks0xiiw6*0D-rwi4v`-M0_WuPx zBP9cdcp0& z2ophQQ}F{4Ktb5Z)UyVw)3Et4!UQfThHc~if(W1>YzD%FusYwU_*ID#LI1Mge9IyN zC Date: Sun, 15 Jan 2023 22:51:07 -0500 Subject: [PATCH 0963/3335] Delete gamuntu1.png --- misc/images/gamuntu1.png | Bin 25791 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/gamuntu1.png diff --git a/misc/images/gamuntu1.png b/misc/images/gamuntu1.png deleted file mode 100644 index 3502838d710d1938a697515d0d2967a85acdcd32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25791 zcmV)YK&-!sP)PyA07*naRCr$OT?M>VRn}iSPTYL`=#*3}Y%xF`6x*@8J{@a}(XkV|b&MHf6i4jB z?nG2fL~M|**KzCA-rsNSb1ppLUEsof#Cz||Z-mD?vClqx?N$HvUj#aj&Kc;Ofh99Q zI_IKu20CY8=?ruVMCWSgoPicI&?yj|%b{}yIt8M04Rp>x>od@)Av#w^=L~deh_$;0 zq?8l@GypIG8VG=t03{9p*n|*w?T)7NX)Bt6P7P7O^&zF?0H6av7_6oe*Oh&xml;Z3 zYh%y0`x0;~0Y!tbBq6kxFl`~>Y_4SCDJ*PG1qdYoz#@dC3plLKTjenWodS`^WVLpx zlrjQN<6vPsyNFC`M{rV`fSaiV>BR_0gGv|tNtOV_$o_4~pQtO;?+LMh@kXhIrb|8c znh1qo()HLMgb;fThuC>}9y8D>5P3{i_Eae)0Z4ZjiOjxUy76FXC5Cfhl~F+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M8 zwX1&l-abwB>L;?mvH%2zVT0k0Zw7C7-{^|*7OFmFNJ@dVI}67|L!#`{guaT26;2EJOJf@_S+W-6an$PsaLhJKC zEFq-}QCDyXqylbO5C~OZjVm9tTGxJuvAXg3zi;)5v$epo0z?@U#evsvcZNG}2JV|! z-i!rp3low(Rx*wxYZ&(mq$rxH)}I(fv+uAP*F3@)LwVlnQDF-#OF)F6;E)-#L`?F?#;p_Un13GmHcR)5r@chZ`f%qvsIYdr-# z-@wn&XAw=EFZDCP<@u67s>I!j^@j>Msn8=Qh1@zQ z=G&NGIGanqnJMXjEO?rliFA#8V7$mUD@rrgDc$5=E0Ng8?f71(HQ!{cc`Dk|p!#%W z3seCy%efE|EZ0J5d=(TS=_~2`xNKOaFr`_r4Py#C4;iqt)m31YMvdTURX{{=P^ynq zISW()Q90XJ?;Jr3Q~?peL8(4cy>kRDPz6K;2c`N*m9sz<5S6oi_0AEr zKot-X9F*!KRn7ucKvd55)jLPf0#!gna8Rm`R5=S&0Z}>ISMMA_3;Z8UT&QMhG}`t6 O0000 Date: Sun, 15 Jan 2023 22:51:20 -0500 Subject: [PATCH 0964/3335] Delete gamuntu.png --- misc/images/gamuntu.png | Bin 1071038 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/gamuntu.png diff --git a/misc/images/gamuntu.png b/misc/images/gamuntu.png deleted file mode 100644 index b29f215865c839beda3fce5218517c7a63e27a2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1071038 zcmYhiWk8fo8#cVl(hW-2N=ph7(jbE1N+?Qq*U}9OOE=ObrINBVEDeh^i=fofDcwj( zzP{i0-p_sinE7%2nYqrGInMJqCR$VdB?%!tApig%QB`^I761T+{ojF)`}fNq^?NA* z0QkaAQBl**!U6!GO|vjHl}<{@F&Jh?p%OppynXoVppcw`t_XD(6`Z9I7Mv3NK|xHY zxd|mc%^wEDk9mNOO@YL?(Q2X^9f;$=SG7*c=Eg(w(Zonn5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1-qYZ1spCxYK>*#El1X-_j5>yO?g@N?HwJ)c50VZ!XU89 z>80+MkReYOTIrMQ46jXd>ALLmrBO%#!y&p#qdyU&MlJ8ZTn#7ZfrBAFX&sIJK<(?8aQzU|5@a;9zf(86%OXB8Fqu@!e+A2l?7 z+emS)%d-V_xYcSBTo#+jpKzjOeh)rj0DhNA{+9>*f5G~aGU9;cne=sb%VF5;L+xWr zrLlhC#n$YROZk1a>FRmHED0?Ails7~FD^K$&dnDlkw#hp@WR?J)@Jd-rsa(N4_ Date: Sun, 15 Jan 2023 22:52:17 -0500 Subject: [PATCH 0965/3335] Delete node-red-themes.png --- misc/images/node-red-themes.png | Bin 31933 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/node-red-themes.png diff --git a/misc/images/node-red-themes.png b/misc/images/node-red-themes.png deleted file mode 100644 index f7a7bdb8a2aa3ef4af5496a4e964c4d9c4344a1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31933 zcmeFZRajh0x3CKYhu|LE-Q9x*Xdpmvx8MYK4=zCijazVcm&RR#LvRZa-0gH$8@VyR2Tbwlarm4-;g0di^)L+QX}rslakX1 zRMS?LhL@KHgg3*7A}T}E;WTHJ`?br~5uYW0`o|# zw(R?!Wr7s*&Eg6Ww9076VZSqW zoP2XKmFE#9`#x$gp-6pG{*b!v*0MCf!atKF;p;gs?+I}7e_?AF_RJdp+x4v)h*z%axamVsVvn1k)yK9BWN~^9b zb$?$qU~m!07^R7iS;l6{G+WpAb=FWks*M`g%1Yx1pX1q6*Lv@H>FnWafe8D#DKju` zlo4?0?lRK4#GtUSM#^WZo~Asx{K%1WM~);5JCKvQPMV#hlapO% zCJ}$A#x`agbS>B$8kbCHu6pM1m zFJT^y+*pN)&mSHpW+u`54=Eb z);CCdY2w@RVCK)_luh9vyflk~WhwZw7SY57Upl2Vb9 z>rL)TuO=AOikkJ*%E&2{blkVOERMwU`fly+uV^buYxjok>vRR?mloDP*x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ster Date: Sun, 15 Jan 2023 22:52:39 -0500 Subject: [PATCH 0966/3335] Delete play_prism.png --- misc/images/play_prism.png | Bin 3691 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/play_prism.png diff --git a/misc/images/play_prism.png b/misc/images/play_prism.png deleted file mode 100644 index d97c16253300e640067c3c7f0a5924d9e363690d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3691 zcmV-x4wUhUP)Px@B}qg&TtffD!{1XF?m;%E5Hxc<{$ zJwBlOzYhrfPJ2R|J9*}oS7$Bo{=X;&VT_eqj?^CTqUzf;gaH%;7y)F&rTDUJ&h0ZD z3CsVT{b1L02ZC-mgdaNA56>mfsOq*SG^Y^=SOEqEL$<@!og3#apO<-KMF}bhOjjT% zWj}tuUxfl9h9oD4K~#Y$5QIQM2t4tr$8&6{%d2NEd}}(wK=u#uxqt?_fB^`ML|0X} zEwMQbD+oXV!zTQ1lFb1gd+MIdIM>o$?%y4nPC$_IA=Y(`RSyOu!Clp@BsZs#ywC|D z8zTQQl^{s9C#xQZYg?uxdHLHj9ymW8fFRh1$ru6j&~T6r5T9Pvr6jkc2Nhx1gsOws zg;*!s?(E62IoICoj4Q8152{lc2!j0>)7ve;V9JP_Rn>)3C=3q40K+>F1%UzxJa+fV zTzl$M^(hOhrYekZ5L6pWL9Z7v*+%q};mHmJ!N(E^o)@A* zIE}Qc^1ykcWdQ{8tGd8Bei-DmHqw9C+-Gx@nWc@%54|uEgB#B| z5gan98j>B16Y_2H@2&s_Ic);iVXi&(Kn`{;+mrG@{dg`umir=THK`g_Rx!&Bvd!~) z7dTtTZ4+@IE|h@hDDJn?9L{C63HP6loq5Rl%-$J`wjx9d z_r(4|@JWQKVFkoW6=Zwu(OWw%v_$jAZQ;$5oQ4@H(PR^Sk6se>jLND%kMx5giA~bWcEfNh%k@>5SP;hj@&hn z@#6}FNkbOOpG6;n3nx4h|%nqZ%kf~!VRhU8H+iV%#pj`Vy z6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P*}=};0h3f5mN|- z4FUvSZF!5#vVynKBcNaE*VHuu=%~16Y`wRzj@W^(ER!GzEw<8vNpe6t-mk06ZaH54uc-zglo1?+ z5R?SMrd8{_g>@l2a7%C~Sl3|$;fp>^UHRn+|AqpnpVI%O0)lh89&$dN3v61s-g|dl zqcMx59bsrynSdAptok&qvTxA0;(Pz8?VhSC5U(4-S?voziieFEHmqFlEvjo`YmBsn z&}lV-046!0?egpDlJA_X{&YG35at?z-JsZhLeL55v zS$gZ~_pbQ4=g9~V!Dj>aLVVKpXIE|T7S@vGHM*E;#2_|o@YSHMmYz8E&gOdnw8=P# zSX`5#`W3(5u;;$_8h*gvgCxCy3fSkvTBWY_mE3x!{!%PnY%-t2aKS;i&7piF>kkgF z&C@Xqt4KTC?;m)+ptFA3|8GN~jF`-~=_+1Zuvff_uQ@4S>c8+A@3#W7F023m002ov JPDHLkV1n56wjBTf From 6ed44e7d4435ee7921533b1e67d652af8348914c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:53:02 -0500 Subject: [PATCH 0967/3335] Delete pms-copy-data.png --- misc/images/pms-copy-data.png | Bin 25396 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/pms-copy-data.png diff --git a/misc/images/pms-copy-data.png b/misc/images/pms-copy-data.png deleted file mode 100644 index 073f90d7c0263475f5ab74298062edae12ce5f3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25396 zcmdqIRa9Kj(k&d4#v#yX;}+aKSa1sjcWvA)Sa1#6xCaQq-Q8&jZowru!6CTY-{hQc zeB(a+?|0k>2EBW)y_Zz2syXMX4p&l;Mn@q;dG+cQx~z)Nt?Tf*oKKvK8e!QnSN=rZ>Hq-n3rdC}iddWNgH7IkF z0KoktY9byT4t=k_PM(M^-QTwqBK{)rpRRm3hwa@GlA2qI7PgkIJ1Xtm{)`Ckj0x{# zG&`H-znQZU!JrU9!h9Y4iee26FqL3?E0y?-3V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1Hu)j~OEA9tgB7Dvm2<#cXk-BJhBGJR>D zvS^l8HtnN4k@OKJZ0#P`ycZ7(oKDNKqQcnQ-JP)7{y7oAz+=|vsD<`kPc{DJ_sG9` zoI~f?lhfAdBe_4EL=5Q4ttTE4xBV>xhaUVi3T%rX92`JR|5EMmFYnIWlk#~=(|i;} zn#>+AptSm8j2<q6n7q*&5nq&^%gODx0=Cji2>czH4-Rckj!>L{EP2wnz6$ z>XCD`%kh5u1c5u?XtwuU%(A%9Lm--;SHMtWN?b0$Bl{gk^mQmksO3e z0jl6zegL z3JlC%Xas7qVfak)Ogd24-8atvYX*;w4C#HoH7{}H3T7YlKLWhSOJl(Jsf>QKzOT0I zY7);YD=S-zjr}U=zq^c0>^)VC;CH=g_vGR9I`vyB*??^NrXwm}X-VP1iaX%yb=;Z{ z{&9nT)&iG=>8tazg|71WaDvrCldurU0T0)9(dMxa9AGsApk)}*$-xIJs0Xbe@3rY% zuz~{63Z8K3V_;xDxLm;%_(O6G%#F(xlndtuE2sf=t)g>|1+Tv)BxHjqO_C*VB35v1 zbD-^$;H%cR;7cL$Pq1QA1zPMMR5ButK9)8V41n>-zl&+VSkyY_Cc!L>dFcW^(KVBA ze^Ylua4fPX1q+v?m>GKfYst#%7?@ZllwcziuH;l+1&t55;C0@&(RNk>J1PYljf21a zmON;1L;FHMoopKVeH&h=MD`H<4?Sj-Ot6G`(Yimx z2h8@$vpuj=lNCb1i+e$4Pb-r*%B8UMy%3Ixh5OB1zWrO9DmN=w6c%hOO_u3G`~T}7 apW{%lmJ+6mYHVKte`?CwcRnh@pZ^>7DU%lf From 9ad5a37e27eb21c0078992c3c08e37ac715efdf0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:53:17 -0500 Subject: [PATCH 0968/3335] Delete update-menu.png --- misc/images/update-menu.png | Bin 41752 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/update-menu.png diff --git a/misc/images/update-menu.png b/misc/images/update-menu.png deleted file mode 100644 index 42e65b98fe8e4dc539c13caa6d24c2e119c0afd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41752 zcmdqJ^l?5>kRPbc1wv4-GQJ&_joG4&5-% zsOR~;yzcwDuRq}ViP!5mhCS=pd+l|6)>`j9p(;wUxY%Ua_wL=pm3t%o?%q8VvwQdM zb7G<+ubk1L-y#3pcYY@;d9QScV(Z?$XZPf!CDc6(cT+JyAeqVFbUdDqSObk&Mz01A zwY0PXOtia;i>x&V8ehCpf7HEOijwt{OhpULx##11G~%lK49w?Y39&|jiTiiZYqZ9^ zyr$M|V^Z{H*P*oTt?fcRWexWhA9%@?33=^2>nCDbBh-kGk2z6Zw_%d{)5|}b%#y(& zG*fWFE_VLw*2hq8J+xmRx&P;)1uE)W5O07SC*gno8F?pbVDjIgetnMY{(VBTNF#y) z)W1d|A~JJcAK>EtYcNg}+&68~IuAN(OaB^8CE{ZYV|cg8!ZlA~N1b_K8HW`m%#yh` zO_FbIMh~*i2-Kf-EYVW(3+E#z&bJ8KlwTw~#;2KwjQ)>49vH4CP z^|{RSQ9lQCr>u3T+Hy?bV(F7LCXcOQUb?Rk;tJNP?RR^6`7@lOe!H-Ul>7agNH2p% zmrUUKezo0vl0En`_w=w-`=~k{E9)o*@*iO(98STn+}kp9*wIhJKkMx z01=u6#l@@JMP=)sX}=gn@=h)x@2>k}P-Q5mi>Yg92+pp|D1k&vDPMEBq~gHtyQ zJh_u?D&-<`#}VJ*+_YRRClcrwHrdKFZO zvhUR+jnBl9if?e(>JK^&V<~;}{A>P5N*CO^tfi-$1TeRByl)cKKZUr2`gvK)h`;QK zc-m>#w6~5`nf*m5j3LdVBL}PO3y#!APjS{CFTJtEBqBCDvhX>ZHcwL#yt`P@F%BZO z3avzbZwT^xLrV>s*iYyzc&-n7sYREwRpOdej$WlYbYS7^{7|c%)U~cSUjPaNpXu*5 zY-WWw^SLkjoRbkIkiR46GC@uEyA#Yyae{P!sl7I7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2BpeH4jQ;btzH@-*Vty;lTKb>! h|Nl4pKR+R>hu)W3-=@n{)PR7GfgVh^LfhfVzW`43mhAul From 394195904b7b58ec5783a1ed12ab19ac7e3ba643 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Jan 2023 22:53:31 -0500 Subject: [PATCH 0969/3335] Delete social.png --- misc/images/social.png | Bin 19402 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/social.png diff --git a/misc/images/social.png b/misc/images/social.png deleted file mode 100644 index 396c884827d732554048eca39ba558119e61924d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19402 zcmV)rK$*XZP)PyA07*naRCr$PT?d#H<^6tVcW>)8suTq&0;2RPC><4hZ?VO$(Zq&bi7mDyMic)r ziN==15@U(R3U`1sX$L5X(gf+{IPPxi?e6@a_nVo$*}0i5cY6oue$SKO-OYS$zW4j} z-%mPc);<~emfwN=4*V#0K*|IBNBLdzi^}hS*a7M6W~ShA85q>sfn|H6kn)?J-+}xN zwCD~rE5OP7|7T2bVnJumuFiwJML%zTu%G%4NN1NfpA7!?xO#AF8-32q>Yw_a=hvU# zffm~V>Fk-!1Ms)UHUxJ964eE#Z#}7 zHv?I3rgT=0DfpXXis8sWn?{hI+enZqPaYZM)d9RFLx30Q0A8~{_xyk#`@sQT z5IkBtd)9%uU*{d}!uegDVw(3=1n^CDEGK(g7Y8ou;Sznlz9D?TaR|iC&$=n|TfHxa zrIk_3bvFs%1U4_tqe~rlpuboAx7OzFjAHJtI^1!TC-J*W=GKZ2a>}8~M=@)8fam0l zHmMW+h0Bh9Hm4S$Sd-~MljdahGG}zlk#1CmWxTpRoU{J@Q5m01RCGw^e^G;IJZD|! zq$7Tc_r@ti@qb$)`1@MxwKp2z1b4SWJ4&1q?(gqyVE(#iSpXMwb)kPNg%U*Kz^Z*Q zOj{Pf`{U~=wsFOIfal~4G`bUl<{g!zs;QGvR3M=$BIC;WwTC4#vfLP@L+!r?px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ErHAstjXK zRTw+=Mp0Sg#H%MYJ`rOQz&U9qbl`Y&xnx=-W=k;(B{lnO=@ef~z8Gr))notEW}Dg9 zn?$`;_d|Zr9zGjbd>|nc85SzQ&7hcUO>GCqIsZw{k_9hsncojRySPy3bHM4g!BHRy z#TT1GFLYw5DmPc|s>5gV_TaidZbwv>Fy`Y**zBw(s*0zQgqahSG|O5W(6s=M{Jb+p z4sQdO*P$@uaaIzJp?Yr^TYd;&{k9Nx*}CDwDW5bbc$w`7N&>hdzh>u~ofuGN<`!Fn zfDY~NWN8+s%8#DG%()%R4r4~4w+G|+!7S5*NxzCOw=6Q!9HwSRN#IqjKV~(ZK%I=Q zYns10c?R2&e$MAl zTw5K*rfordvakyCf3X9S97_UnVrn)UqLtgR^Zn=X-D^*wPe<_7>iyM!YOZE)F@pBuA2WgRj$2jbYCSqx3KOUyri zfbM{7bD&MtH|RHSDmsS0MrVTDWkZcWh85ojux!Ais2qGr#3qjc`;j41FCA5C?v|Phs+Wp-GZhq5Nl|Jh z7r{L0-Fy;Qx2}!_(J(U4wxN~B|F-#`v{#rx)C)YVCxm1A=0{A z_VcsZ(fVIkBfj)4xLgH@T=W9=9(ii^{bcZlbo9CPnu?DPXN~A2(Fd65} z{*NxP*C&M3(`jaK*&9Pg)#Hwyc#WmdN%UXUYVw~wYF)5gToxI8kNhL~9mwep{6B2h V* Date: Sun, 15 Jan 2023 22:53:58 -0500 Subject: [PATCH 0970/3335] Delete proxcord.png --- misc/images/proxcord.png | Bin 109791 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/proxcord.png diff --git a/misc/images/proxcord.png b/misc/images/proxcord.png deleted file mode 100644 index 619f32bd963eb07595000623adf5a61f5d2915c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109791 zcmeEsV~;Rg&+XW@ZQHiZYi!%LZQHhO+qP}boclSy<89J3>BrUX)$FcDD9DM!LSaDx z006*BN{A={003_O&mqA6%ak35*Zm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Jan 2023 22:55:40 -0500 Subject: [PATCH 0971/3335] Delete motioneye-256x256.png --- misc/images/motioneye-256x256.png | Bin 5256 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/motioneye-256x256.png diff --git a/misc/images/motioneye-256x256.png b/misc/images/motioneye-256x256.png deleted file mode 100644 index 2f0fbaf37a0401dcbd764c13e5d11c59b27f599d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5256 zcmZ{IcQl+|)b)%`^k_kpAX*q@W)MX0HG&YLMk2Zl2@;G>l&Hh#J&7brv?xKMccL?T z38D-UWO-tV7xy=&cd=REiBv-dvdJoCp)gubpC1sO9L2n3?gP**kpfxtir29e+c zAC8|*3_&2g6Mbz%6*V_)Xv!2UbrRTt1-iTxM^F40BQJ45GDaTRD2|>INB6+4F#m4< z?Z63crA~6k0|1Os(WPL~h;+s{GzB2UNTlI7|34CnnvzJH5zZY1PDC@Ogi!N9AQ6uP z2qumE2TQ^Lfqd4iRQd=sc?y<12}_xTp(bHKd_^UmG6gKDm_?DS*{hUE;1QOL5kq05 zl5x&~M<7ugy&{@04rKkK6;Htc>Eh^Vz!h+dJ50tv(NnmUio1d*j^Tt-006)MoB)I~ zI2d{oz>5K{03;v;?0_XS1}GM%a;1f%0_w$`U;st2BwRCLsna;QWDGnN$0>}%OhHjN zOOnZBV#!wx|7QRVlmHM;!cqZ;6XJl4BwT3{ICbFU3W>u5nEz1(u2L{?+>Rp`LtS|T z>Hs{+?jT$lc*dq4n7#ayvn z4dS19T*`lPKrXJjt8(D~8hiB!%mv62O`N$Z4JQgu1Kth5`Sg{UfAhlCg-Zv(Xj}vT z&FEj@fK`A27vnHM6DI!~B7nb=5JTZefZ1Ky1DZCC8yW5vCx@Hk)pP&}G2APJtNmY# z5+FsCz?b3N!$9`|Xjl2~8JO<;0`Ihrz=$yXc!qHMXZE~&s?eI`?o^**62(6Zleu%dmZ6b1jYGS^(QPo+MUXF&sahbxH~qm| zuc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l`f8 z#XHq2w#m@UjQoPMV`cL($3iFS>&K#0)ka42TF*iXrw|^68o7Kjb)ZA;1-G})-7D(6 z{p>ejhgI_y2S0?Wy)rY;Sh7M6J_@6H`7CN1Zwl>Ueu<6G2-bf&t+Z1bqs27A0h8|~ z3rV1#$Mqttq;D!%=U;!|mmZz=vpwXikvzZO+{(|`o6&1hC?^W7V*nn zaHPqD?VLEVQN)Fss2;09P4f6k9)&^xI)MyNRhIZfH*9&(FrAbx(V zBCkLcq${}o`dXT#MpRS4JoKZ@60w>je-yF+?DkrjKf8vIH-JV23hL8*LVREo^PQ%` zRx0eB671&K+C{bH9u*q z935cY3LEu(3yC<^Z&hkS9b5Ss7{d7YkVZb{WGzFn>`w^!j4q7l4e5}znhF<8ifVpt zeER5JiA{M8@P~xV7wuw?c7qQ3`R`vi)5*d2>uBj?Dfn(_c<<`v@yn?X^Xd5g5i+C) z3G?ZIO9qnIy~6mlF1m*s}jjlE)HEFBKtQA(h8@^p30XI;k&R zJHY%x!l|U(DqW4;;9w48i(M*kJeQ^_`h~O92e9O~4i&#KifmOk0Y$dm_unZUNNR$X zIQ%iJ`nDwT3LbAd8HPESB}d$>vUS`DV3F5hlgdx$K@O}cuoOWHDdG+gn{H~V&$%p8 z#%iMc_R@AEQ3sL2wg%)9Y{tR+WGmMAY&lc@DfUA9XHt`oFM>mkHQ{rDL%eh>@2_eN zPQP(k7LJD%mx=BUdng13sfR4Q7f9i;?aL5IC>1Um7Y*E3h-bFh)x^q+#363^uaz4EY13mawK zVapHXh2($3t|gRN5;*TXLuV*#DjW?TU6M82m4xzNBv|R6W_S0pz2HJ0YI;>K)G2*M zcxD^h&eZlJR_;xvZ?im`4B9|ArSxnZJCfUAc_!b-fSx QQw5} Date: Sun, 15 Jan 2023 22:56:21 -0500 Subject: [PATCH 0972/3335] Delete github-icon.png --- misc/images/github-icon.png | Bin 604 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/github-icon.png diff --git a/misc/images/github-icon.png b/misc/images/github-icon.png deleted file mode 100644 index cb9a01d02698d509569c02df327273f464ca8e8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 604 zcmV-i0;BzjP)Px%7D+@wR9Hvtm%nbpFc8MSzycdcEU>Y*V=HC`W=s}XBf(?v4v2{fiIEMAgcuoE z+p&FvsslwZ@<-sx5k_Ea$AMJs(2U9X?ss>eFSdhUew<&9kI(@1dY$d}dpM4R^?L2| zClU!T#t@Ik(d~9a`Ls6nJdZ7xORIvV(`od2JuBaVMqvWWbT%MH073|}N;$xYQmT!k z{SZ}f!KQ;y0z@6$1aSpWtJRoLcNFD6_mNB{(eL*!VqO8Lvfu4?7>~!kuS%s7$Tb`e zPd2i>+=>eTUFpvq21b_*RKVvDe+Qt^Xt4Qwu1s*TSYS4rg-u@DvP>p(nwX~wn3NxN z3pkl*Lm)stpGT|Jx+#0H$fScnfP1q42Z*Es*=!b_PUq(};JPk591hAr_voNdC?J>1 zUHFZ~Vi*htzW)BsAmTJp&w_Hf44$q0Xh$)C2SUi3SRhI-_VH@9LbKUKsZ=s*qF5{< zl}agXD5Z}8-o;1b-;ir!G#V*Ks!A8r=@jjD+X!d;8y;8Y2q7QB%Vx8|WHLduTE%v| z^%IXfo%|u)4mlJ60000 Date: Mon, 16 Jan 2023 11:02:06 -0500 Subject: [PATCH 0973/3335] Update kernel-clean.sh add pve-kernel-6.1 check --- misc/kernel-clean.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 5b072c18..824d708a 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -51,18 +51,23 @@ function check_root() { exit 1 else header_info - edge_kernel + other_kernel kernel_info kernel_clean fi } -function edge_kernel() { +function other_kernel() { if [[ "$current_kernel" == *"edge"* ]]; then echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" exit 1 fi + if [[ "$current_kernel" == *"6.1"* ]]; then + echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" + echo -e "\nAs 5.15 is the current default kernel in PVE 7.3 the package management directly depends on it, it's not possible to use this script while running 6.1 kernels. (the script tries to remove ALL old kernels) \n" + exit 1 + fi } function kernel_info() { From 5cc5358e3e15962e019073ee5f100483d3551111 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 16 Jan 2023 12:14:20 -0500 Subject: [PATCH 0974/3335] Delete file-manager.png --- misc/images/file-manager.png | Bin 160849 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/file-manager.png diff --git a/misc/images/file-manager.png b/misc/images/file-manager.png deleted file mode 100644 index 4acbe6df48995fcdf9b2fdf1d44cb00fbe799be0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160849 zcmZ_0by!qg+y5=yB0aQ#2uKamA|R5|NOz2McY~C~3?L#Yp&%gANH+rvA}vb8(A^!w z@NT`Y=Xsy&K91i%%yH~JvtzCETxWbgi&#x{MG`_f!aH~Fki1ZmdwJ&$7UIqwOlEvs z;7IjE&pY4)!}F!$^E>5344ZfE+`scePDaPiY$qGX&vYWCPFg_F!0z63stj%htyNsM z*nsm-O52x(Tx#w=eWua&MYHyTQ5K9~LBV{dD&EwdfdgseyNXAB;epnsms<|IQudUa zStR@O>sdFuwP({J$;%YeAMKU!CnqOa*?7t7>U?Bh&MWbKE-1ipPcCHP=BB8tt7D^$ zsxu|v#9;r3{r)w%CZ_T;0?x1y{K+q1rY3pr9h}4qw zD{yl15iB~PHudxWe}O+=dLw~Bg^-<$08ZYmBV7IjDP!mQ_gxm%Ehh1o*Vb%+2mBtQ z6~}~jvK4JP+XAlH)GHr#I8rtK?th=@?@v1p9**EbX%M`;Wic=i^mmDVUTFpoGaO27j`}enU>U@d`;{@|9iSBQ&;=(e*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f>IduE`ub+fcFQ|SyEKv3_XgIGQ`!V|eH0^< zy)zQIC{JRQFG+@ulfL%#)F_?fA@#ZYGPc@J=i1xbsa?wMM;a61dSylGS=K!mFAVEf z5n3##ic|?osPsG{{__n#fcN`^VuUxXZfx1uS%briiVxA0oqh>&Rp Date: Mon, 16 Jan 2023 12:14:35 -0500 Subject: [PATCH 0975/3335] Delete prome.png --- misc/images/prome.png | Bin 44686 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/prome.png diff --git a/misc/images/prome.png b/misc/images/prome.png deleted file mode 100644 index 0f6f3de4d29d5d914b93c7690ec229feb4f84f28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44686 zcmeENRa2bNmQ8>pNN`JVcXxMpcZcBa&}azmu1({OyL)hl;7)LN_vzeQH9ujV=Aj?H zuKMKcv-a9+%L!LfkVJ&Xf&cK~1ERE)n97F_A8-EsU_V3t8J*vV`0$}pU0O_7&C}rY z^-Gf3g4aHr04@jXw5CSNeP=-FPf8)^sQ?UVZW(Ktqtk3<#mvKOfwnq}iIYPCUcf|F z_WIJ&8Y{R-*E(8>%o__BezUMzA%zvo24pnc^ z!c2>|1J2Jo?>nD;?^zT2zMvaH$pyeMeWd7yN&E2s7ynl_$OsQul>_c}vV5ed=KJ`( z_h}qRuw)GeyQdUUcyP-Ud|Ts`jADGZ^82?*<1#`v^D!=6=^xOWGXpNqWO-Q~ z-gXinkN3Ocz7q%-4DFzm0G|a`mzO+n&&>lTuo2NMjiKnKbUmHDEKfzddEUL7ytb!J z(?NpopN{Y54B6~A7L64rKM1K!yPtTmX3NzwIev~XLjztXB3CF3 z-Yy+>C%WDjh^-yeYpX9zzvSG)y3=^Iq3v_X$>~%^Fzh~Bs_lxw}Za>ig1p$Qz5RNGj z6U8X76H4j@i(<+WX4MA!=B33WyYuzx`kl-Faturo?CRkmmY~K?(h@?PEU&3@vlBf* z5AZ7zypvuQ+z*000gJL5s-vGWEp)*fr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I&WH2JI8(u^)e| z*?4INdVgwbGdq4rQ6RSv*G|Y5Ak+7x_HX83aQDN0Ws;_xiFXf-@K;#l6NJT+I`Fj; zr_Ia!qfvr!8aY0dcYK#w7#eILQj%@6;kd0Bo%HKKeAwSJ_v3}ne?v6>=OW|&A3+E5 cJUhO7$R;cuhie#k{s4F=$g0YeNPqPIFVos+UjP6A From 30c820fd2a20d14790a9a4068bd9693856623973 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 16 Jan 2023 12:14:48 -0500 Subject: [PATCH 0976/3335] Delete omv.png --- misc/images/omv.png | Bin 2795 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/omv.png diff --git a/misc/images/omv.png b/misc/images/omv.png deleted file mode 100644 index b8de99c57387f34f2dcaa52fdf4cf9753d08b70f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2795 zcmbVOc~leU77q}1kbnpR@|*<94q1SNM7AtIkX05@L?MtMVM#(VtlBmN5hB}QLDUL$ z0Yq6`0M|Bxq9W9yh*A()Bh@M{NKruR8&vwzD!04ymu|VYD(~WaQC)GcryaMHi4o1crb${2$P}>Rk~km`%h}H5xnW*jzJdX`Y&T4V za{w+tK<6ZInb|^4Xm(&&Ty|0%nT_#q2V65Lu!0m0$O1A`l6fLZrW@vyUJ86(Vq-DD zClN5o4fENlO##6GoiF47&JND@aX11VAdwyL&dwwf!44qc@J?799*cLh$CD{eP81vt z`0`+2YeIHBC4}Mq#THDtVG=-4K*3@&GBO-893A+=?N~gSOvd5}SOUQwmarFP@jzCl zJx^q|tbxH1#R<6rkjv)*OBz|R{4~%F1AF>8gcLzQz+Z}aqA!VpQ-;lC39xtv95y9o zDXve_A~1yWA21PQrtQCP_geq34# zhX?vH+%WKs1DngHIFksDbOMp??aUx}IpOg%Cmhkm1xNJqa`L7ToEghH{tio{c@fAY z7e}g>3l)#|a;B2#cm|P9B#{|pZ_xC57tf3-eL{53or9y~EZcr@N6jAX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E#hHI0ih?q`u+!xMR+jpjx9dKyeHOX$l18{`y3vth z=C<%h7J~+dWa@JFJiCbXK5Etcpy=1Gdu6?U<`m@se+1uFC1~!w)f52CSU^8J77s|q zVxdma6~o-FHlV;m-ut#KKHa!iXMQxBTDPsVUCcB=CILf*xc%y7#De*fiYUuAoSsBl zc}e;f_4Y?vKl(1z=uz69JBERVE???^?DE_5$Mm3u!uc~$<8E=zm?A1^W=}BFfZk3$ z?Pg96y`7HQ-d)9H?xPL+LW+AEJk7Pa)5*FfmKGY5^uF4+-#@?Mhs2P(iZpE#32u>n zsuCn}gBr0|jXZ8{yLqF}6Kl^~@<`|AJT2s6l@I2gT)5W@y3={RoUP3`iyG9FjLAoe z*viQ9rw^p^NQAGyIEZQBS)&~?_~|+Qx6sn{#N_! z+w`r^+x|5nAzjZ)@7yyV0(o5uTtHdpAR3pbo4wL`o5^v2`7OZYooVru#jEU z-ZjkDs;$t?uh$17cA2UdcyrIx4;*}5)$PgqdWvOp-{=Tov0M^nh1W`a6Zv?~O8rEL z?08#`H>Nj1yt+Jk#jL7pqesun0Hw~B_dhLsd_ynax0RbK&~J8n!L+S0tj!_~p+^lG z!)GP(Ns0TO639OWFeQzw6qah$dB^H^PL2Kc){HnGBvwG6ns8k7x$23f-%nq!Kt?ky GM)GfN<%gdD From c4d2e1908e45f53d58cc235ed910cf4bd17561c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 16 Jan 2023 19:07:50 -0500 Subject: [PATCH 0977/3335] Update changedetection-v5-install.sh add dnspython --- install/changedetection-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index c2835894..313d35cc 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -89,6 +89,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Change Detection" mkdir /opt/changedetection $STD pip3 install changedetection.io +$STD python3 -m pip install dnspython==2.2.1 msg_ok "Installed Change Detection" msg_info "Creating Service" From 05c1661b6fc26849b5c4aa3838c30cb2e2476283 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Jan 2023 05:23:21 -0500 Subject: [PATCH 0978/3335] Update deluge-v5-install.sh add dependency --- install/deluge-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 0ec88f4e..43c0214f 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -91,6 +91,7 @@ msg_ok "Installed pip3" msg_info "Installing Deluge" $STD pip install deluge[all] +$STD pip install lbry-libtorrent msg_ok "Installed Deluge" msg_info "Creating Service" From fcadc60cda766daa8f099c682722e16a1c5e2d56 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Jan 2023 05:38:38 -0500 Subject: [PATCH 0979/3335] Create homer-v5.sh --- ct/homer-v5.sh | 394 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 394 insertions(+) create mode 100644 ct/homer-v5.sh diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh new file mode 100644 index 00000000..9f74ad24 --- /dev/null +++ b/ct/homer-v5.sh @@ -0,0 +1,394 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ + / / / /___ ____ ___v5___ _____ + / /_/ / __ \/ __ `__ \/ _ \/ ___/ + / __ / /_/ / / / / / / __/ / +/_/ /_/\____/_/ /_/ /_/\___/_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Homer" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping ${APP}" +systemctl stop homer +msg_ok "Stopped ${APP}" + +msg_info "Backing up conf.yml" +cd ~ +cp -R /opt/homer/assets/conf.yml conf.yml +msg_ok "Backed up conf.yml" + +msg_info "Updating ${APP}" +rm -rf /opt/homer/* +cd /opt/homer +wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip +unzip homer.zip &>/dev/null +msg_ok "Updated ${APP}" +msg_info "Restoring conf.yml" +cd ~ +cp -R conf.yml /opt/homer/assets +msg_ok "Restored conf.yml" + +msg_info "Cleaning" +rm -rf conf.yml /opt/homer/homer.zip +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl start homer +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8010${CL} \n" From 8265e5eddddf899ae5e80c329ee0c19bf6a321c4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Jan 2023 05:39:51 -0500 Subject: [PATCH 0980/3335] Create homer-v5-install.sh --- install/homer-v5-install.sh | 138 ++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 install/homer-v5-install.sh diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh new file mode 100644 index 00000000..d6c42232 --- /dev/null +++ b/install/homer-v5-install.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y unzip +$STD apt-get install -y pip +msg_ok "Installed Dependencies" + +msg_info "Installing Homer" +mkdir -p /opt/homer +cd /opt/homer +wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip +$STD unzip homer.zip +rm -rf homer.zip +cp assets/config.yml.dist assets/config.yml +msg_ok "Installed Homer" + +msg_info "Creating Service" +cat </etc/systemd/system/homer.service +[Unit] +Description=Homer Dashboard +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/opt/homer +ExecStart=python3 -m http.server 8010 +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now homer +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 1e2f8fb059fda88b9a81e4a43251638e17e5e55d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Jan 2023 05:47:22 -0500 Subject: [PATCH 0981/3335] Update homer-v5.sh --- ct/homer-v5.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 9f74ad24..4e117f5f 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -327,7 +327,7 @@ msg_ok "Stopped ${APP}" msg_info "Backing up conf.yml" cd ~ -cp -R /opt/homer/assets/conf.yml conf.yml +cp -R /opt/homer/assets/config.yml config.yml msg_ok "Backed up conf.yml" msg_info "Updating ${APP}" @@ -338,11 +338,11 @@ unzip homer.zip &>/dev/null msg_ok "Updated ${APP}" msg_info "Restoring conf.yml" cd ~ -cp -R conf.yml /opt/homer/assets +cp -R config.yml /opt/homer/assets msg_ok "Restored conf.yml" msg_info "Cleaning" -rm -rf conf.yml /opt/homer/homer.zip +rm -rf config.yml /opt/homer/homer.zip msg_ok "Cleaned" msg_info "Starting ${APP}" From 68ceabf85a3efb607d3c0ccd4d9c37eaa2b73b29 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Jan 2023 05:48:38 -0500 Subject: [PATCH 0982/3335] Update homer-v5.sh --- ct/homer-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 4e117f5f..bc702f38 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -325,10 +325,10 @@ msg_info "Stopping ${APP}" systemctl stop homer msg_ok "Stopped ${APP}" -msg_info "Backing up conf.yml" +msg_info "Backing up config.yml" cd ~ cp -R /opt/homer/assets/config.yml config.yml -msg_ok "Backed up conf.yml" +msg_ok "Backed up config.yml" msg_info "Updating ${APP}" rm -rf /opt/homer/* From 5fd5078f60afe1293848b7cb8fd64b7ff4bb74f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Jan 2023 05:50:34 -0500 Subject: [PATCH 0983/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 60905879..6555643e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-17 + +### Changed + +- **Homer LXC** + - NEW Script + ## 2023-01-14 ### Changed From f2a02a29142a42cfcf927c18d3d97bfc0d897eb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 18 Jan 2023 13:04:17 -0500 Subject: [PATCH 0984/3335] Update jellyfin-v5-install.sh install beignet-opencl-icd only on 20.04 --- install/jellyfin-v5-install.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 7038cd18..d67f35d7 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -92,9 +92,8 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd - + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then $STD apt-get -y install beignet-opencl-icd; fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* @@ -104,9 +103,7 @@ fi msg_info "Setting Up Jellyfin Repository" $STD add-apt-repository universe -y $STD apt-key add <(curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key) -cat </etc/apt/sources.list.d/jellyfin.list -deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal main -EOF +sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" > /etc/apt/sources.list.d/jellyfin.list' msg_ok "Set Up Jellyfin Repository" msg_info "Installing Jellyfin" From 220c436e575db63bcab396abfd66c40323374970 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 18 Jan 2023 13:08:22 -0500 Subject: [PATCH 0985/3335] Update emby-v5-install.sh install beignet-opencl-icd only on 20.04 --- install/emby-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 8caf588b..8982246c 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -90,8 +90,8 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then $STD apt-get -y install beignet-opencl-icd; fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri From c12d58630f7f7499fffda1c2fc9ca75a375e5f22 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 18 Jan 2023 13:15:21 -0500 Subject: [PATCH 0986/3335] Update plex-v5-install.sh install beignet-opencl-icd only on 20.04 --- install/plex-v5-install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 2a5cb5c2..4796b4fb 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -91,8 +91,8 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then $STD apt-get -y install beignet-opencl-icd; fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri @@ -102,9 +102,7 @@ fi msg_info "Setting Up Plex Media Server Repository" $STD apt-key add <(curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key) -cat </etc/apt/sources.list.d/plexmediaserver.list -deb [arch=amd64] https://downloads.plex.tv/repo/deb/ public main -EOF +sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list' msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" From ce5443f288a8a499d213c5353a81ea5e3ba41aa4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 19 Jan 2023 17:06:46 -0500 Subject: [PATCH 0987/3335] Create sabnzbd-v5.sh --- ct/sabnzbd-v5.sh | 370 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 ct/sabnzbd-v5.sh diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh new file mode 100644 index 00000000..fcba12e2 --- /dev/null +++ b/ct/sabnzbd-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + _____ ___ ____ __ __ + / ___// | / __ )____v5____ / /_ ____/ / + \__ \/ /| | / __ / __ \/_ / / __ \/ __ / + ___/ / ___ |/ /_/ / / / / / /_/ /_/ / /_/ / +/____/_/ |_/_____/_/ /_/ /___/_.___/\__,_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="SABnzbd" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:7777${CL} \n" From 85aeec53ba7b65eb463ea3e6c73a5ce8c88bb4a4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 19 Jan 2023 17:08:05 -0500 Subject: [PATCH 0988/3335] Create sabnzbd-v5-install.sh --- install/sabnzbd-v5-install.sh | 141 ++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 install/sabnzbd-v5-install.sh diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh new file mode 100644 index 00000000..848ac026 --- /dev/null +++ b/install/sabnzbd-v5-install.sh @@ -0,0 +1,141 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing pip3" +$STD apt-get install -y par2 \ + python3-setuptools \ + python3-pip +msg_ok "Installed pip3" + +msg_info "Installing SABnzbd" +RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +$STD tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) +mv SABnzbd-${RELEASE} /opt/sabnzbd +cd /opt/sabnzbd +$STD python3 -m pip install -r requirements.txt +msg_ok "Installed SABnzbd" + +msg_info "Creating Service" +service_path="/etc/systemd/system/sabnzbd.service" +echo "[Unit] +Description=SABnzbd +After=network.target +[Service] +WorkingDirectory=/opt/sabnzbd +ExecStart=python3 SABnzbd.py -s 0.0.0.0:7777 +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q sabnzbd.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From bc6ecfd8b7ab28a96d0b3b33f5c81ec51327fb74 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 19 Jan 2023 17:13:01 -0500 Subject: [PATCH 0989/3335] Update sabnzbd-v5.sh --- ct/sabnzbd-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index fcba12e2..2c3b0a1f 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -367,4 +367,4 @@ pct set $CTID -description "# ${APP} LXC " msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}https://${IP}:7777${CL} \n" + ${BL}http://${IP}:7777${CL} \n" From a9c03fcc7b4a781929c908f2890761b51d99c339 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 19 Jan 2023 17:36:53 -0500 Subject: [PATCH 0990/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6555643e..a7e201f3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-19 + +### Changed + +- **SABnzbd LXC** + - NEW Script + ## 2023-01-17 ### Changed From c16ed2a80f6f26525caa87e18ff8ed450d56681e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Jan 2023 07:40:45 -0500 Subject: [PATCH 0991/3335] Update and rename mikrotik-routeros-v4.sh to mikrotik-routeros-v5.sh --- ...routeros-v4.sh => mikrotik-routeros-v5.sh} | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) rename vm/{mikrotik-routeros-v4.sh => mikrotik-routeros-v5.sh} (90%) diff --git a/vm/mikrotik-routeros-v4.sh b/vm/mikrotik-routeros-v5.sh similarity index 90% rename from vm/mikrotik-routeros-v4.sh rename to vm/mikrotik-routeros-v5.sh index 848a505c..f2a0cd30 100644 --- a/vm/mikrotik-routeros-v4.sh +++ b/vm/mikrotik-routeros-v5.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +function header_info { +cat <<"EOF" + __ ____ __ __ _ __ ____ __ ____ _____ + / |/ (_) /___________ / /_(_) /__ / __ \____v5__ __/ /____ _____/ __ \/ ___/ + / /|_/ / / //_/ ___/ __ \/ __/ / //_/ / /_/ / __ \/ / / / __/ _ \/ ___/ / / /\__ \ + / / / / / < / / / /_/ / /_/ / < / _ _/ /_/ / /_/ / /_/ __/ / / /_/ /___/ / +/_/ /_/_/_/|_/_/ \____/\__/_/_/|_| /_/ |_|\____/\__,_/\__/\___/_/ \____//____/ + +EOF +} +clear +header_info echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) @@ -58,15 +70,7 @@ else echo -e "⚠ User exited script \n" exit fi -function header_info { -echo -e "${RD} - __ ____ __ __ _ __ ____ __ ____ _____ - / |/ (_) /___________ / /_(_) /__ / __ \____ __ __/ /____ _____/ __ \/ ___/ - / /|_/ / / //_/ ___/ __ \/ __/ / //_/ / /_/ / __ \/ / / / __/ _ \/ ___/ / / /\__ \ - / / / / / < / / / /_/ / /_/ / < v4 / _ _/ /_/ / /_/ / /_/ __/ / / /_/ /___/ / -/_/ /_/_/_/|_/_/ \____/\__/_/_/|_| /_/ |_|\____/\__,_/\__/\___/_/ \____//____/ -${CL}" -} + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -90,6 +94,8 @@ function default_settings() { MAC=$GEN_MAC echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}" @@ -149,6 +155,17 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi +MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi +fi if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}" START_VM="yes" @@ -241,17 +258,17 @@ for i in {0,1}; do done msg_ok "Extracted Mikrotik RouterOS Disk Image" msg_info "Creating Mikrotik RouterOS VM" -qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ +qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=2G >/dev/null -qm set $VMID \ -boot order=scsi0 >/dev/null -qm set $VMID -description "# Mikrotik RouterOS -### https://github.com/tteck/Proxmox" >/dev/null + -description "# Home Assistant OS +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Mikrotik RouterOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Mikrotik RouterOS VM" From 0323395dec810724cb5cb71f6347bad00a2ed1cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Jan 2023 07:49:47 -0500 Subject: [PATCH 0992/3335] Update mikrotik-routeros-v5.sh --- vm/mikrotik-routeros-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros-v5.sh b/vm/mikrotik-routeros-v5.sh index f2a0cd30..32eaffa7 100644 --- a/vm/mikrotik-routeros-v5.sh +++ b/vm/mikrotik-routeros-v5.sh @@ -266,7 +266,7 @@ qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=2G >/dev/null -boot order=scsi0 >/dev/null - -description "# Home Assistant OS + -description "# Mikrotik RouterOS VM ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Mikrotik RouterOS VM ${CL}${BL}(${HN})" From 85216cabc35203ef87803637f8c1608537536aa6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Jan 2023 08:22:09 -0500 Subject: [PATCH 0993/3335] Update sabnzbd-v5-install.sh add unzip unrar --- install/sabnzbd-v5-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 848ac026..1790be9a 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -83,12 +83,14 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y unzip +$STD apt-get install -y par2 +$STD apt-get install -y unrar-free msg_ok "Installed Dependencies" msg_info "Installing pip3" -$STD apt-get install -y par2 \ - python3-setuptools \ - python3-pip +$STD apt-get install -y python3-setuptools +$STD apt-get install -y python3-pip msg_ok "Installed pip3" msg_info "Installing SABnzbd" From 419f750487ff9453355d1eb6bffa06a70607c0cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Jan 2023 10:36:19 -0500 Subject: [PATCH 0994/3335] Update mikrotik-routeros-v5.sh fix redirect --- vm/mikrotik-routeros-v5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/mikrotik-routeros-v5.sh b/vm/mikrotik-routeros-v5.sh index 32eaffa7..789d2e75 100644 --- a/vm/mikrotik-routeros-v5.sh +++ b/vm/mikrotik-routeros-v5.sh @@ -264,8 +264,8 @@ pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ - -scsi0 ${DISK1_REF},size=2G >/dev/null - -boot order=scsi0 >/dev/null + -scsi0 ${DISK1_REF},size=2G \ + -boot order=scsi0 \ -description "# Mikrotik RouterOS VM ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null From 0a2896d81fb8bb543c4d71c947f006f928af65c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Jan 2023 11:18:32 -0500 Subject: [PATCH 0995/3335] Update mikrotik-routeros-v5.sh update to 7.7 --- vm/mikrotik-routeros-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros-v5.sh b/vm/mikrotik-routeros-v5.sh index 789d2e75..0c13b8dc 100644 --- a/vm/mikrotik-routeros-v5.sh +++ b/vm/mikrotik-routeros-v5.sh @@ -227,7 +227,7 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Mikrotik RouterOS Disk Image" -URL=https://download.mikrotik.com/routeros/7.4.1/install-image-7.4.1.zip +URL=https://download.mikrotik.com/routeros/7.7/install-image-7.7.zip sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From 78d07cd3a543539bb7ba3a9cfccf9894e0fddb33 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Jan 2023 14:01:43 -0500 Subject: [PATCH 0996/3335] Update casaos-v5.sh If the LXC is created Privileged, the script will automatically set up USB passthrough --- ct/casaos-v5.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 740930aa..809f3d74 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -377,6 +377,17 @@ cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$CT_TYPE" == "0" ]; then +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From c64ef30a9d566b2755e6c10a377c155fc3584bfd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Jan 2023 14:03:52 -0500 Subject: [PATCH 0997/3335] Update umbrel-v5.sh If the LXC is created Privileged, the script will automatically set up USB passthrough --- ct/umbrel-v5.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 9a2b7b0e..135b4218 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -375,6 +375,17 @@ cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: EOF +if [ "$CT_TYPE" == "0" ]; then +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" From b8a0390d410a3c8b93c934037dcad4ba2ab98b6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Jan 2023 16:25:53 -0500 Subject: [PATCH 0998/3335] Create kavita-v5.sh --- ct/kavita-v5.sh | 373 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 ct/kavita-v5.sh diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh new file mode 100644 index 00000000..7b2dd5a6 --- /dev/null +++ b/ct/kavita-v5.sh @@ -0,0 +1,373 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + __ __ _ __ + / //_/___ __ v5__(_) /_____ _ + / ,< / __ `/ | / / / __/ __ `/ + / /| / /_/ /| |/ / / /_/ /_/ / +/_/ |_\__,_/ |___/_/\__/\__,_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Kavita" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /opt/Kavita ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From 99edae4bcd1bb1f2fe16cf02ffa89400f84ff7f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Jan 2023 16:27:23 -0500 Subject: [PATCH 0999/3335] Create kavita-v5-install.sh --- install/kavita-v5-install.sh | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 install/kavita-v5-install.sh diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh new file mode 100644 index 00000000..6ef9c43d --- /dev/null +++ b/install/kavita-v5-install.sh @@ -0,0 +1,132 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" + +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing Kavita" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) && +msg_ok "Installed Kavita" + +msg_info "Creating Service" +service_path="/etc/systemd/system/kavita.service" +echo "[Unit] +Description=Kavita Server +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/Kavita +ExecStart=/opt/Kavita/Kavita +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +chmod +x /opt/Kavita/* && chown root /opt/Kavita/* +systemctl enable --now -q kavita.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 2138e2b0174914e2785a9ff0c74efedb51fdf3b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Jan 2023 16:37:32 -0500 Subject: [PATCH 1000/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a7e201f3..f8a3eb80 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-21 + +### Changed + +- **Kavita LXC** + - NEW Script + ## 2023-01-19 ### Changed From d899003066be8b0ad4a0d0d7ac91ea8ccbd3dc6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 22 Jan 2023 10:50:46 -0500 Subject: [PATCH 1001/3335] Update jellyfin-v5-install.sh now installs jellyfin-ffmpeg5 --- install/jellyfin-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index d67f35d7..667b3ace 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -109,7 +109,7 @@ msg_ok "Set Up Jellyfin Repository" msg_info "Installing Jellyfin" $STD apt-get update $STD apt install jellyfin-server -y -$STD apt install jellyfin-ffmpeg -y +$STD apt install jellyfin-ffmpeg5 -y msg_ok "Installed Jellyfin" msg_info "Creating Service" From f7d1889b22caf398c5d29af5775617d2b58b5841 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 22 Jan 2023 17:19:08 -0500 Subject: [PATCH 1002/3335] Create autobrr-v5-install.sh --- install/autobrr-v5-install.sh | 141 ++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 install/autobrr-v5-install.sh diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh new file mode 100644 index 00000000..406e63e5 --- /dev/null +++ b/install/autobrr-v5-install.sh @@ -0,0 +1,141 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +msg_ok "Installed Dependencies" + +msg_info "Installing Autobrr" +wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) +tar -C /usr/local/bin -xzf autobrr*.tar.gz +rm -rf autobrr*.tar.gz +mkdir -p /root/.config/autobrr +cat <>/root/.config/autobrr/config.toml +# https://autobrr.com/configuration/autobrr +host = "0.0.0.0" +port = 7474 +logLevel = "DEBUG" +sessionSecret = "$(openssl rand -base64 24)" +EOF +msg_ok "Installed Autobrr" + +msg_info "Creating Service" +service_path="/etc/systemd/system/autobrr.service" +echo "[Unit] +Description=autobrr service +After=syslog.target network-online.target +[Service] +Type=simple +User=root +Group=root +ExecStart=/usr/local/bin/autobrr --config=/root/.config/autobrr/ +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q autobrr.service +msg_ok "Created Service" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 50cc6e7287a19e7c156076a49379aa2ff31c279b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 22 Jan 2023 17:20:45 -0500 Subject: [PATCH 1003/3335] Create autobrr-v5.sh --- ct/autobrr-v5.sh | 384 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 384 insertions(+) create mode 100644 ct/autobrr-v5.sh diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh new file mode 100644 index 00000000..26e18c8c --- /dev/null +++ b/ct/autobrr-v5.sh @@ -0,0 +1,384 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___ __ __ + / | __ __/ /_____ / /_v5__________ + / /| |/ / / / __/ __ \/ __ \/ ___/ ___/ + / ___ / /_/ / /_/ /_/ / /_/ / / / / +/_/ |_\__,_/\__/\____/_.___/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Autobrr" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /root/.config/autobrr ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Stopping ${APP} LXC" +systemctl stop autobrr.service +msg_ok "Stopped ${APP} LXC" + +msg_info "Updating ${APP} LXC" +rm -rf /usr/local/bin/* +wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) +tar -C /usr/local/bin -xzf autobrr*.tar.gz +rm -rf autobrr*.tar.gz +msg_ok "Updated ${APP} LXC" + +msg_info "Starting ${APP} LXC" +systemctl start autobrr.service +msg_ok "Started ${APP} LXC" +msg_ok "Update Successfull" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7474${CL} \n" From d35f1eac89df25589daa4c96411062ee6c57568f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 22 Jan 2023 17:26:07 -0500 Subject: [PATCH 1004/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f8a3eb80..f5212b19 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-22 + +### Changed + +- **Autobrr LXC** + - NEW Script + ## 2023-01-21 ### Changed From 9a7d8fdc78bd55b7c58f003147ac94eb15278648 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 23 Jan 2023 10:42:50 -0500 Subject: [PATCH 1005/3335] add midnight commander (mc) (#974) --- install/adguard-install.sh | 1 + install/adguard-v5-install.sh | 2 ++ install/autobrr-v5-install.sh | 2 ++ install/blocky-install.sh | 1 + install/blocky-v5-install.sh | 2 ++ install/casaos-install.sh | 1 + install/casaos-v5-install.sh | 2 ++ install/changedetection-install.sh | 1 + install/changedetection-v5-install.sh | 2 ++ install/cronicle-v5-install.sh | 2 ++ install/daemonsync-install.sh | 1 + install/daemonsync-v5-install.sh | 2 ++ install/dashy-install.sh | 1 + install/dashy-v5-install.sh | 2 ++ install/debian-install.sh | 1 + install/debian-v5-install.sh | 2 ++ install/deconz-install.sh | 1 + install/deconz-v5-install.sh | 2 ++ install/deluge-v5-install.sh | 2 ++ install/docker-install.sh | 1 + install/docker-v5-install.sh | 2 ++ install/emby-install.sh | 1 + install/emby-v5-install.sh | 2 ++ install/emqx-install.sh | 1 + install/emqx-v5-install.sh | 2 ++ install/esphome-install.sh | 1 + install/esphome-v5-install.sh | 2 ++ install/grafana-install.sh | 1 + install/grafana-v5-install.sh | 2 ++ install/grocy-install.sh | 1 + install/grocy-v5-install.sh | 2 ++ install/heimdalldashboard-install.sh | 1 + install/heimdalldashboard-v5-install.sh | 2 ++ install/homeassistant-core-install.sh | 1 + install/homeassistant-core-v5-install.sh | 2 ++ install/homeassistant-install.sh | 1 + install/homeassistant-v5-install.sh | 2 ++ install/homebridge-install.sh | 1 + install/homebridge-v5-install.sh | 2 ++ install/homepage-install.sh | 1 + install/homepage-v5-install.sh | 2 ++ install/homer-v5-install.sh | 2 ++ install/hyperion-install.sh | 1 + install/hyperion-v5-install.sh | 2 ++ install/influxdb-install.sh | 1 + install/influxdb-v5-install.sh | 2 ++ install/iobroker-install.sh | 1 + install/iobroker-v5-install.sh | 2 ++ install/jellyfin-install.sh | 1 + install/jellyfin-v5-install.sh | 2 ++ install/k0s-v5-install.sh | 2 ++ install/kavita-v5-install.sh | 2 ++ install/keycloak-install.sh | 1 + install/keycloak-v5-install.sh | 2 ++ install/lidarr-v5-install.sh | 2 ++ install/magicmirror-install.sh | 1 + install/magicmirror-v5-install.sh | 2 ++ install/mariadb-install.sh | 1 + install/mariadb-v5-install.sh | 2 ++ install/meshcentral-install.sh | 1 + install/meshcentral-v5-install.sh | 2 ++ install/motioneye-install.sh | 1 + install/motioneye-v5-install.sh | 2 ++ install/mqtt-install.sh | 1 + install/mqtt-v5-install.sh | 2 ++ install/n8n-install.sh | 1 + install/n8n-v5-install.sh | 2 ++ install/navidrome-install.sh | 1 + install/navidrome-v5-install.sh | 2 ++ install/nextcloudpi-install.sh | 1 + install/nextcloudpi-v5-install.sh | 2 ++ install/nginx-proxy-manager-install.sh | 1 + install/nginxproxymanager-v5-install.sh | 2 ++ install/nocodb-install.sh | 1 + install/nocodb-v5-install.sh | 2 ++ install/node-red-install.sh | 1 + install/node-red-v5-install.sh | 2 ++ install/omada-install.sh | 1 + install/omada-v5-install.sh | 12 +++++++----- install/omv-install.sh | 1 + install/omv-v5-install.sh | 2 ++ install/openhab-install.sh | 1 + install/openhab-v5-install.sh | 2 ++ install/paperless-ngx-install.sh | 1 + install/paperless-ngx-v5-install.sh | 4 +++- install/photoprism-install.sh | 1 + install/photoprism-v5-install.sh | 2 ++ install/pihole-install.sh | 1 + install/pihole-v5-install.sh | 2 ++ install/plex-install.sh | 1 + install/plex-v5-install.sh | 2 ++ install/podman-homeassistant-install.sh | 1 + install/podman-homeassistant-v5-install.sh | 2 ++ install/podman-v5-install.sh | 2 ++ install/postgresql-install.sh | 1 + install/postgresql-v5-install.sh | 2 ++ install/prometheus-install.sh | 1 + install/prometheus-v5-install.sh | 2 ++ install/prowlarr-v5-install.sh | 2 ++ install/radarr-v5-install.sh | 2 ++ install/readarr-v5-install.sh | 2 ++ install/sabnzbd-v5-install.sh | 2 ++ install/scrypted-install.sh | 1 + install/scrypted-v5-install.sh | 4 +++- install/shinobi-install.sh | 1 + install/shinobi-v5-install.sh | 3 ++- install/sonarr-v5-install.sh | 2 ++ install/syncthing-install.sh | 1 + install/syncthing-v5-install.sh | 2 ++ install/tdarr-v5-install.sh | 2 ++ install/technitiumdns-install.sh | 1 + install/technitiumdns-v5-install.sh | 2 ++ install/trilium-install.sh | 1 + install/trilium-v5-install.sh | 2 ++ install/ubuntu-install.sh | 1 + install/ubuntu-v5-install.sh | 2 ++ install/umbrel-install.sh | 1 + install/umbrel-v5-install.sh | 2 ++ install/unifi-install.sh | 1 + install/unifi-v5-install.sh | 2 ++ install/uptimekuma-install.sh | 1 + install/uptimekuma-v5-install.sh | 2 ++ install/vaultwarden-install.sh | 1 + install/vaultwarden-v5-install.sh | 4 +++- install/whisparr-v5-install.sh | 2 ++ install/whoogle-install.sh | 1 + install/whoogle-v5-install.sh | 2 ++ install/wikijs-install.sh | 1 + install/wikijs-v5-install.sh | 2 ++ install/wireguard-install.sh | 1 + install/wireguard-v5-install.sh | 2 ++ install/yunohost-v5-install.sh | 2 ++ install/zigbee2mqtt-install.sh | 1 + install/zigbee2mqtt-v5-install.sh | 2 ++ install/zwave-js-ui-install.sh | 1 + install/zwave-js-ui-v5-install.sh | 2 ++ 136 files changed, 220 insertions(+), 9 deletions(-) diff --git a/install/adguard-install.sh b/install/adguard-install.sh index ec37c2c9..fbe4d973 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -91,6 +91,7 @@ curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scrip msg_ok "Installed AdGuard Home" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 637375f6..c0cb9130 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" @@ -93,6 +94,7 @@ rm install.sh msg_ok "Installed AdGuard Home" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 406e63e5..08b1490d 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Autobrr" @@ -115,6 +116,7 @@ systemctl enable --now -q autobrr.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/blocky-install.sh b/install/blocky-install.sh index ff3ad10c..4422902e 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -348,6 +348,7 @@ systemctl enable --now blocky msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index dbb72503..3a09d1b8 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Blocky" @@ -348,6 +349,7 @@ $STD systemctl enable --now blocky msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/casaos-install.sh b/install/casaos-install.sh index 35e88e14..141058cd 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -107,6 +107,7 @@ wget -qO- https://get.casaos.io | bash &>/dev/null msg_ok "Installed CasaOS" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 7ff88b3b..9f076d43 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y unzip msg_ok "Installed Dependencies" @@ -104,6 +105,7 @@ $STD bash <(curl -fsSL https://get.casaos.io) msg_ok "Installed CasaOS" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 8fe7d7fd..e8c2fdd3 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -107,6 +107,7 @@ systemctl enable --now changedetection &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 313d35cc..ae77b3a0 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y pip msg_ok "Installed Dependencies" @@ -108,6 +109,7 @@ $STD systemctl enable --now changedetection msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index ebd00e41..0bee1960 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git $STD apt-get install -y make $STD apt-get install -y g++ @@ -114,6 +115,7 @@ $STD update-rc.d cronicled defaults msg_ok "Installed Cronicle Primary Server" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh index 3936e378..9f68ed71 100644 --- a/install/daemonsync-install.sh +++ b/install/daemonsync-install.sh @@ -93,6 +93,7 @@ sudo dpkg -i daemonsync_2.2.0.0059_amd64.deb &>/dev/null msg_ok "Installed Daemon Sync Server" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 557f6505..670d3c2e 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y g++-multilib msg_ok "Installed Dependencies" @@ -93,6 +94,7 @@ $STD dpkg -i daemonsync_2.2.0.0059_amd64.deb msg_ok "Installed Daemon Sync Server" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 72155a18..680a95cc 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -124,6 +124,7 @@ sudo systemctl enable dashy &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 3e6391e8..205163bf 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -124,6 +125,7 @@ systemctl start dashy msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/debian-install.sh b/install/debian-install.sh index dca29c9b..0029b4e4 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -86,6 +86,7 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 13ff3d34..ffb9f70b 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -83,9 +83,11 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/deconz-install.sh b/install/deconz-install.sh index cef9767d..18395883 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -118,6 +118,7 @@ systemctl enable deconz &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 691f8f65..fa12d272 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -117,6 +118,7 @@ $STD systemctl enable --now deconz msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 43c0214f..cb4bebc7 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing pip3" @@ -131,6 +132,7 @@ systemctl enable --now -q deluge-web.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/docker-install.sh b/install/docker-install.sh index de2a015f..df358aba 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -148,6 +148,7 @@ if [[ $DOCKER_COMPOSE == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 82cd8d7f..c0edccb1 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" get_latest_release() { @@ -148,6 +149,7 @@ if [[ $DOCKER_COMPOSE == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/emby-install.sh b/install/emby-install.sh index fcd7396c..3ce66a06 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -107,6 +107,7 @@ dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null msg_ok "Installed Emby" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 8982246c..a13941c0 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then @@ -107,6 +108,7 @@ $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb msg_ok "Installed Emby" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/emqx-install.sh b/install/emqx-install.sh index e40bed9c..49adfa50 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -92,6 +92,7 @@ systemctl enable --now emqx msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index cc8f968f..718f0089 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing EMQX" @@ -92,6 +93,7 @@ $STD systemctl enable --now emqx msg_ok "Installed EMQX" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/esphome-install.sh b/install/esphome-install.sh index d624ad84..8a1b73d5 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -113,6 +113,7 @@ systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 22f1a6f2..bddd0035 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -113,6 +114,7 @@ systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 4235bd26..efc51a98 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -100,6 +100,7 @@ apt-get install -y grafana &>/dev/null msg_ok "Installed Grafana" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 23fc0f5b..189cbae3 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-get install -y apt-transport-https $STD apt-get install -y software-properties-common @@ -100,6 +101,7 @@ $STD apt-get install -y grafana msg_ok "Installed Grafana" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/grocy-install.sh b/install/grocy-install.sh index fcc019e7..1d7acc0a 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -130,6 +130,7 @@ systemctl reload apache2 msg_ok "Installed grocy" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 85ee376c..1e4c784b 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y apache2 $STD apt-get install -y unzip $STD apt-get install -y apt-transport-https @@ -130,6 +131,7 @@ systemctl reload apache2 msg_ok "Installed grocy" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index c9ef0bd7..cf19a76c 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -124,6 +124,7 @@ sudo systemctl enable --now heimdall.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 41185b39..33e8ef13 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing PHP" @@ -124,6 +125,7 @@ $STD sudo systemctl enable --now heimdall.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index e997f268..a9fb4de6 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -180,6 +180,7 @@ systemctl enable homeassistant &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 37131755..6070a81a 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -97,6 +97,7 @@ $STD apt-get install -y \ git \ curl \ sudo \ + mc \ llvm \ libncursesw5-dev \ xz-utils \ @@ -166,6 +167,7 @@ $STD systemctl enable --now homeassistant msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 7ad489d5..19998207 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -332,6 +332,7 @@ sudo chmod +x /root/update-containers.sh msg_ok "Created Update Menu Script" mkdir /root/hass_config PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index cb1fa779..603028b3 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing runlike" @@ -151,6 +152,7 @@ $STD docker run -d \ msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 1841a555..3fdc5a6b 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -103,6 +103,7 @@ sudo hb-service install --user homebridge &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index af5fdd30..bd218d9e 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -103,6 +104,7 @@ $STD hb-service install --user homebridge msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/homepage-install.sh b/install/homepage-install.sh index c48b139b..b69d538c 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -122,6 +122,7 @@ systemctl enable --now homepage &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index b477f518..bf0b8e4b 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -122,6 +123,7 @@ $STD systemctl enable --now homepage msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index d6c42232..c9e8172e 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y unzip $STD apt-get install -y pip msg_ok "Installed Dependencies" @@ -112,6 +113,7 @@ $STD systemctl enable --now homer msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index ee8a3c9f..29644340 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -97,6 +97,7 @@ systemctl enable --now hyperion@root.service &>/dev/null msg_ok "Installed Hyperion" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index fca9b2d9..13263722 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y lsb-release $STD apt-get install -y gpg $STD apt-get install -y apt-transport-https @@ -99,6 +100,7 @@ $STD systemctl enable --now hyperion@root.service msg_ok "Installed Hyperion" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 3c57b2c8..1d11d97f 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -125,6 +125,7 @@ if [[ $TELEGRAF == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index dcd61d3d..27e263e9 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y lsb-base $STD apt-get install -y lsb-release $STD apt-get install -y gnupg2 @@ -127,6 +128,7 @@ if [[ $TELEGRAF == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 3bcb2570..813e9c46 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -91,6 +91,7 @@ curl -sLf https://iobroker.net/install.sh | bash - &>/dev/null msg_ok "Installed ioBroker" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index c25ff672..b592dced 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing ioBroker (Patience)" @@ -91,6 +92,7 @@ $STD bash <(curl -fsSL https://iobroker.net/install.sh) msg_ok "Installed ioBroker" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index d70f29ce..94c8ad5f 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -132,6 +132,7 @@ ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 667b3ace..2f0f1126 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y apt-transport-https $STD apt-get install -y software-properties-common msg_ok "Installed Dependencies" @@ -131,6 +132,7 @@ ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 785160c7..24b67810 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -107,6 +108,7 @@ $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/ msg_ok "Installed Helm" fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 6ef9c43d..316ecaf1 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -77,6 +77,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Kavita" @@ -106,6 +107,7 @@ systemctl enable --now -q kavita.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index 00128983..92488072 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -113,6 +113,7 @@ systemctl enable --now keycloak.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 032c6a6b..797046df 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" 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 msg_ok "Installed Dependencies" @@ -110,6 +111,7 @@ $STD systemctl enable --now keycloak.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index 53d35fcc..061fbd31 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y sqlite3 $STD apt-get install -y libchromaprint-tools $STD apt-get install -y mediainfo @@ -117,6 +118,7 @@ systemctl enable --now -q lidarr msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 71bd489a..37ada095 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -215,6 +215,7 @@ systemctl enable --now magicmirror &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 3405239b..1902ced3 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -215,6 +216,7 @@ $STD systemctl enable --now magicmirror msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 12eeba97..cd499979 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -108,6 +108,7 @@ if [[ $ADMINER == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 83f6d689..8985b950 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing MariaDB" @@ -108,6 +109,7 @@ if [[ $ADMINER == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 77233afc..af40b17d 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -102,6 +102,7 @@ node node_modules/meshcentral --install &>/dev/null msg_ok "Installed MeshCentral" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index ebc598f8..0559a932 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -102,6 +103,7 @@ $STD node node_modules/meshcentral --install msg_ok "Installed MeshCentral" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index 2d116c01..7d819d66 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -121,6 +121,7 @@ systemctl start motioneye msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index f6a1e5e4..57a103de 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y cifs-utils msg_ok "Installed Dependencies" @@ -121,6 +122,7 @@ systemctl start motioneye msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 70f9efeb..c9e90259 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -98,6 +98,7 @@ apt-get -y install mosquitto-clients &>/dev/null msg_ok "Installed Mosquitto MQTT Broker" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 8ab82ce6..dfd7fd03 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -98,6 +99,7 @@ $STD apt-get -y install mosquitto-clients msg_ok "Installed Mosquitto MQTT Broker" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 1cca4611..c700bdb0 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -114,6 +114,7 @@ sudo systemctl enable n8n &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 64f241d5..03a27b72 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -113,6 +114,7 @@ $STD systemctl enable --now n8n msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 763d5353..e746cf32 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -141,6 +141,7 @@ systemctl enable --now navidrome.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index a6230259..f0c9e767 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" 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 ffmpeg msg_ok "Installed Dependencies" @@ -141,6 +142,7 @@ $STD systemctl enable --now navidrome.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index ec0729d7..5ea6ffa3 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -92,6 +92,7 @@ sudo service apache2 restart msg_ok "Installed NextCloudPi" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 356f2a8c..2fbce9fc 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" @@ -93,6 +94,7 @@ service apache2 restart msg_ok "Installed NextCloudPi" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/nginx-proxy-manager-install.sh b/install/nginx-proxy-manager-install.sh index 88c11cdd..c2dba3e7 100644 --- a/install/nginx-proxy-manager-install.sh +++ b/install/nginx-proxy-manager-install.sh @@ -246,6 +246,7 @@ EOF msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 25de6ad9..3b752773 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -85,6 +85,7 @@ msg_info "Installing Dependencies" $STD apt-get update $STD apt-get -y install \ sudo \ + mc \ curl \ gnupg \ make \ @@ -247,6 +248,7 @@ EOF msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 0099b7bd..491eb153 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -120,6 +120,7 @@ systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 967a506e..bcf5d676 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -120,6 +121,7 @@ systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 2169624a..85df743b 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -122,6 +122,7 @@ systemctl enable --now nodered.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index a6613d6e..a554c35b 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -123,6 +124,7 @@ $STD systemctl enable --now nodered.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/omada-install.sh b/install/omada-install.sh index 0daab6a0..bec67474 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -97,6 +97,7 @@ sudo dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb &>/dev/null msg_ok "Installed Omada Controller" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 898c75a4..dd1e986b 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -82,11 +82,12 @@ $STD apt-get -y upgrade msg_ok "Updated Container OS" msg_info "Installing Dependencies" -$STD apt-get -y install curl -$STD apt-get -y install sudo -$STD apt-get -y install gnupg -$STD apt-get -y install openjdk-8-jre-headless -$STD apt-get -y install jsvc +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +$STD apt-get install -y openjdk-8-jre-headless +$STD apt-get install -y jsvc wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed Dependencies" @@ -97,6 +98,7 @@ $STD dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb msg_ok "Installed Omada Controller" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/omv-install.sh b/install/omv-install.sh index 415e428b..0a98be6f 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -109,6 +109,7 @@ omv-confdbadm populate msg_ok "Installed OpenMediaVault" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index c3a10912..89bc3116 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -109,6 +110,7 @@ omv-confdbadm populate msg_ok "Installed OpenMediaVault" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/openhab-install.sh b/install/openhab-install.sh index 5736c2b0..ef7dc48f 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -109,6 +109,7 @@ systemctl start openhab.service msg_ok "Installed openHAB" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index f5df107e..ced8d90d 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" @@ -108,6 +109,7 @@ $STD systemctl enable --now openhab.service msg_ok "Installed openHAB" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index a994c2f3..87d509eb 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -263,6 +263,7 @@ systemctl enable --now paperless-consumer paperless-webserver paperless-schedule msg_ok "Finished installing Paperless-ngx" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index d9bf955e..8040e113 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -96,7 +96,8 @@ $STD apt-get install -y --no-install-recommends \ libzbar0 \ poppler-utils \ default-libmysqlclient-dev \ - sudo + sudo \ + mc msg_ok "Installed Paperless-ngx Dependencies" msg_info "Installing OCR Dependencies" @@ -265,6 +266,7 @@ $STD systemctl enable --now paperless-consumer paperless-webserver paperless-sch msg_ok "Created Services" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 6b6ec3f7..523bdf41 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -181,6 +181,7 @@ WantedBy=multi-user.target" >$service_path msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 352d6096..661ab7d9 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -85,6 +85,7 @@ msg_ok "Updated Container OS" 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 gcc $STD apt-get install -y g++ $STD apt-get install -y git @@ -181,6 +182,7 @@ WantedBy=multi-user.target" >$service_path msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 8e3783ac..3b7de2a2 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -111,6 +111,7 @@ curl -sSL https://install.pi-hole.net | bash /dev/stdin --unattended &>/dev/null msg_ok "Installed Pi-hole" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 300ed2d8..87bc2d69 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -85,6 +85,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y ufw $STD apt-get install -y ntp msg_ok "Installed Dependencies" @@ -111,6 +112,7 @@ $STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended msg_ok "Installed Pi-hole" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/plex-install.sh b/install/plex-install.sh index 93527256..dc5ba5e2 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -111,6 +111,7 @@ apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver &>/dev/n msg_ok "Installed Plex Media Server" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 4796b4fb..b048ada9 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -111,6 +112,7 @@ $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver msg_ok "Installed Plex Media Server" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 7fb81641..3cd1679d 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -144,6 +144,7 @@ systemctl enable homeassistant &>/dev/null msg_ok "Installed Home Assistant" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 5f302e48..7ed0482b 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Podman" @@ -113,6 +114,7 @@ $STD systemctl enable --now homeassistant msg_ok "Installed Home Assistant" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 82432ae6..48038cba 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Podman" @@ -92,6 +93,7 @@ echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registr msg_ok "Installed Podman" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 88cd544d..4e0c8849 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -216,6 +216,7 @@ if [[ $ADMINER == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 7ab0e05f..a092835d 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -215,6 +216,7 @@ if [[ $ADMINER == "Y" ]]; then fi PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index c0493b2f..fd38a1b9 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -121,6 +121,7 @@ sudo systemctl enable --now prometheus &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index f46343fa..b5f37958 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Prometheus" @@ -122,6 +123,7 @@ $STD sudo systemctl enable --now prometheus msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 71fcd5fb..f7f9edd8 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" @@ -115,6 +116,7 @@ systemctl enable --now -q prowlarr msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 63536c41..a0a84993 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" @@ -115,6 +116,7 @@ systemctl enable --now -q radarr msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 4ab6fd6c..8c90fcc2 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" @@ -115,6 +116,7 @@ systemctl enable --now -q readarr msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 1790be9a..cd231485 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y unzip $STD apt-get install -y par2 $STD apt-get install -y unrar-free @@ -117,6 +118,7 @@ systemctl enable --now -q sabnzbd.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 2347d59a..96380318 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -180,6 +180,7 @@ WantedBy=multi-user.target" >$service_path systemctl enable --now scrypted.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 27ae70da..40f4d6ac 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -98,7 +98,8 @@ $STD apt-get -y install \ librsvg2-dev \ pkg-config \ curl \ - sudo + sudo \ + mc msg_ok "Installed Dependencies" msg_info "Installing GStreamer" @@ -182,6 +183,7 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now scrypted.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index ba6fa2af..0c8510fa 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -150,6 +150,7 @@ pm2 list &>/dev/null msg_ok "Installed Shinobi" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 73e5eadb..6ea98787 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -91,7 +91,7 @@ if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then fi msg_info "Installing Dependencies" -$STD apt-get install -y curl sudo git +$STD apt-get install -y curl sudo git mc $STD apt-get install -y make zip net-tools $STD apt-get install -y gcc g++ cmake msg_ok "Installed Dependencies" @@ -150,6 +150,7 @@ $STD pm2 list msg_ok "Installed Shinobi" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 9d8a6585..f942d8ef 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" @@ -96,6 +97,7 @@ $STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr msg_ok "Installed Sonarr" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index f4f9d2ec..a6a09abd 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -99,6 +99,7 @@ systemctl restart syncthing@root.service msg_ok "Installed Syncthing" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 42f34a10..4845c1ec 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -101,6 +102,7 @@ systemctl restart syncthing@root.service msg_ok "Installed Syncthing" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 0bce29cd..43fc93cb 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y unzip msg_ok "Installed Dependencies" @@ -142,6 +143,7 @@ systemctl enable --now -q tdarr-node.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index dbd8ecd1..038275c2 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -91,6 +91,7 @@ curl -sSL https://download.technitium.com/dns/install.sh | sudo bash &>/dev/null msg_ok "Installed Technitium DNS" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index e3645c7c..a75fbc97 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Technitium DNS" @@ -91,6 +92,7 @@ $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/trilium-install.sh b/install/trilium-install.sh index c7f97023..d18a33c2 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -116,6 +116,7 @@ systemctl enable --now -q trilium msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 936eb6c6..5a6d2a36 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | @@ -116,6 +117,7 @@ systemctl enable --now -q trilium msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index b090d307..0b1564d0 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -87,6 +87,7 @@ apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 03415a4b..a0e2f7c1 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -84,9 +84,11 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index 95c1c376..d63ff40a 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -108,6 +108,7 @@ systemctl enable --now umbrel-startup.service &>/dev/null msg_ok "Installed Umbrel" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 0de53375..7468dfb3 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Umbrel (Patience)" @@ -105,6 +106,7 @@ $STD systemctl enable --now umbrel-startup.service msg_ok "Installed Umbrel" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 6dcd2e00..da6e91fd 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -99,6 +99,7 @@ wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh && b msg_ok "Installed UniFi Network Application" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 6b8f7bfd..e86bdeb8 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -85,6 +85,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" read -r -p "Local Controller? " prompt @@ -100,6 +101,7 @@ $STD bash unifi-latest.sh --skip --add-repository $LOCAL msg_ok "Installed UniFi Network Application" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index c542bba5..d314ad3c 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -120,6 +120,7 @@ systemctl enable --now uptime-kuma.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 87e80bc2..659c9685 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -120,6 +121,7 @@ $STD systemctl enable --now uptime-kuma.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index 72a03a9e..0710c1ef 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -176,6 +176,7 @@ systemctl enable --now vaultwarden.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 510d78c1..e23a1d84 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -91,7 +91,8 @@ $STD apt-get -qqy install \ libmariadb-dev-compat \ libpq-dev \ curl \ - sudo + sudo \ + mc msg_ok "Installed Dependencies" WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | @@ -177,6 +178,7 @@ $STD systemctl enable --now vaultwarden.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index f05cf265..3e10887c 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" @@ -115,6 +116,7 @@ systemctl enable --now -q whisparr msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index dc3efde8..f41c34d3 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -109,6 +109,7 @@ systemctl enable --now whoogle.service &>/dev/null msg_ok "Installed Whoogle" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index c8cb5ed3..0408a740 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing pip3" @@ -109,6 +110,7 @@ $STD systemctl enable --now whoogle.service msg_ok "Installed Whoogle" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 8194d606..947ddbab 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -137,6 +137,7 @@ systemctl enable --now wikijs &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 4806102b..28ae5236 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" @@ -137,6 +138,7 @@ $STD systemctl enable --now wikijs msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 96e11ce9..92f6f77d 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -150,6 +150,7 @@ sudo systemctl start wg-dashboard.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 10da01e4..6c30ed01 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -101,6 +101,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gunicorn msg_ok "Installed Dependencies" @@ -109,6 +110,7 @@ $STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf msg_ok "Installed WireGuard" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 19eeec06..e149ee21 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -83,6 +83,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' $STD apt-get install -y apt-transport-https @@ -96,6 +97,7 @@ $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" chmod -x /etc/update-motd.d/* diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 1d488c49..38f70952 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -136,6 +136,7 @@ systemctl enable zigbee2mqtt.service &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 81452490..c703e95b 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y git $STD apt-get install -y make $STD apt-get install -y g++ @@ -136,6 +137,7 @@ $STD systemctl enable zigbee2mqtt.service msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index b67f28d5..a101ffe6 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -112,6 +112,7 @@ systemctl enable zwave-js-ui &>/dev/null msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 601d9082..e1dace8a 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -84,6 +84,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y unzip msg_ok "Installed Dependencies" @@ -112,6 +113,7 @@ $STD systemctl enable zwave-js-ui msg_ok "Created Service" PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc if [[ $PASS != $ ]]; then msg_info "Customizing Container" rm /etc/motd From 2791098177694c740de88c8a961d95969e42b1cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 23 Jan 2023 10:46:38 -0500 Subject: [PATCH 1006/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f5212b19..8dbd128e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-23 + +### Changed + +- **ALL LXC's** + - Add [Midnight Commander (mc)](https://www.linuxcommand.org/lc3_adv_mc.php) + ## 2023-01-22 ### Changed From f99e8e198bd087ebcd4a2000f0ed5edbd9a851f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 23 Jan 2023 10:56:13 -0500 Subject: [PATCH 1007/3335] Update esphome-v5.sh fix typo --- ct/esphome-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 647a05ca..e42069b0 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -333,7 +333,7 @@ pip3 install esphome --upgrade &>/dev/null msg_ok "Updated ESPHome" msg_info "Starting ESPHome" -systemctl stop esphomeDashboard +systemctl start esphomeDashboard msg_ok "Started ESPHome" msg_ok "Update Successfull" exit From d4af8afb3d31d982837a6364c6258acd0c522c55 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 23 Jan 2023 16:51:29 -0500 Subject: [PATCH 1008/3335] Update homepage-v5-install.sh fix install --- install/homepage-v5-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index bf0b8e4b..c37009ba 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -93,13 +93,14 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" $STD apt-get install -y nodejs -$STD npm install -g pnpm +$STD npm install -g npm@9.3.1 msg_ok "Installed Node.js" msg_info "Installing Homepage" $STD git clone https://github.com/benphelps/homepage.git /opt/homepage cd /opt/homepage mkdir -p config +cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install $STD pnpm build msg_ok "Installed Homepage" From bfe427535e53baf60b31e7d8a4ebf9bf17a4327d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 23 Jan 2023 17:01:41 -0500 Subject: [PATCH 1009/3335] Update homepage-v5-install.sh --- install/homepage-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index c37009ba..f1da0ee9 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -93,7 +93,7 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" $STD apt-get install -y nodejs -$STD npm install -g npm@9.3.1 +$STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Installing Homepage" From 976ab3e597c165f7e76486066815fcabb1a5fc3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 23 Jan 2023 17:07:29 -0500 Subject: [PATCH 1010/3335] Update homepage-v5-install.sh --- install/homepage-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index f1da0ee9..7069e0ee 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -96,7 +96,7 @@ $STD apt-get install -y nodejs $STD npm install -g pnpm msg_ok "Installed Node.js" -msg_info "Installing Homepage" +msg_info "Installing Homepage (Patience)" $STD git clone https://github.com/benphelps/homepage.git /opt/homepage cd /opt/homepage mkdir -p config From 4828b02c9f2b77a60bd79501c25fe035052e0fd9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 24 Jan 2023 18:37:06 -0500 Subject: [PATCH 1011/3335] Create transmission-v5-install.sh --- install/transmission-v5-install.sh | 122 +++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 install/transmission-v5-install.sh diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh new file mode 100644 index 00000000..ceb6ddbd --- /dev/null +++ b/install/transmission-v5-install.sh @@ -0,0 +1,122 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +silent() { "$@" > /dev/null 2>&1; } +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + + +msg_info "Installing Transmission" +$STD apt-get install -y transmission-daemon +systemctl stop transmission-daemon +sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rpc-host-whitelist-enabled": true,/"rpc-host-whitelist-enabled": false,/g}' /etc/transmission-daemon/settings.json +systemctl start transmission-daemon +msg_ok "Installed Transmission" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From c5d30ac3b0377acc3d6315f3d1a6d05b81a8aadc Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 24 Jan 2023 18:40:59 -0500 Subject: [PATCH 1012/3335] Create transmission-v5.sh --- ct/transmission-v5.sh | 370 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 ct/transmission-v5.sh diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh new file mode 100644 index 00000000..7b991ea3 --- /dev/null +++ b/ct/transmission-v5.sh @@ -0,0 +1,370 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ______ _ _ + /_ __/________ _____v5_________ ___ (_)_________(_)___ ____ + / / / ___/ __ `/ __ \/ ___/ __ `__ \/ / ___/ ___/ / __ \/ __ \ + / / / / / /_/ / / / (__ ) / / / / / (__ |__ ) / /_/ / / / / +/_/ /_/ \__,_/_/ /_/____/_/ /_/ /_/_/____/____/_/\____/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Transmission" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} +clear +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9091/transmission${CL} \n" From b048583513f16e35d7f1e7b90677d33ff83aeef5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 24 Jan 2023 18:51:10 -0500 Subject: [PATCH 1013/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 8dbd128e..ebb1ef9f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-24 + +### Changed + +- **Transmission LXC** + - NEW Script + ## 2023-01-23 ### Changed From 263c59944a371d329fd489d050deb9aeff6ca160 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 24 Jan 2023 23:22:11 -0500 Subject: [PATCH 1014/3335] Update sabnzbd-v5-install.sh add 7zip --- install/sabnzbd-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index cd231485..e793adf4 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -87,6 +87,7 @@ $STD apt-get install -y mc $STD apt-get install -y unzip $STD apt-get install -y par2 $STD apt-get install -y unrar-free +$STD apt-get install -y p7zip-full msg_ok "Installed Dependencies" msg_info "Installing pip3" From e392cf9811db00509bfe872d1808b9d373f91334 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 08:14:42 -0500 Subject: [PATCH 1015/3335] add arch check (#981) --- ct/adguard-v4.sh | 9 +++++++++ ct/adguard-v5.sh | 10 ++++++++++ ct/alpine-v5.sh | 10 ++++++++++ ct/archlinux-v5.sh | 10 ++++++++++ ct/autobrr-v5.sh | 10 ++++++++++ ct/blocky-v4.sh | 9 +++++++++ ct/blocky-v5.sh | 10 ++++++++++ ct/casaos-v4.sh | 9 +++++++++ ct/casaos-v5.sh | 10 ++++++++++ ct/changedetection-v4.sh | 9 +++++++++ ct/changedetection-v5.sh | 10 ++++++++++ ct/cronicle-v5.sh | 10 ++++++++++ ct/daemonsync-v4.sh | 9 +++++++++ ct/daemonsync-v5.sh | 10 ++++++++++ ct/dashy-v4.sh | 9 +++++++++ ct/dashy-v5.sh | 10 ++++++++++ ct/debian-v4.sh | 9 +++++++++ ct/debian-v5.sh | 10 ++++++++++ ct/deconz-v4.sh | 9 +++++++++ ct/deconz-v5.sh | 10 ++++++++++ ct/deluge-v5.sh | 10 ++++++++++ ct/docker-v4.sh | 9 +++++++++ ct/docker-v5.sh | 10 ++++++++++ ct/emby-v4.sh | 9 +++++++++ ct/emby-v5.sh | 10 ++++++++++ ct/emqx-v4.sh | 9 +++++++++ ct/emqx-v5.sh | 10 ++++++++++ ct/esphome-v4.sh | 9 +++++++++ ct/esphome-v5.sh | 10 ++++++++++ ct/grafana-v4.sh | 9 +++++++++ ct/grafana-v5.sh | 10 ++++++++++ ct/grocy-v4.sh | 9 +++++++++ ct/grocy-v5.sh | 10 ++++++++++ ct/heimdalldashboard-v4.sh | 9 +++++++++ ct/heimdalldashboard-v5.sh | 10 ++++++++++ ct/homeassistant-core-v4.sh | 9 +++++++++ ct/homeassistant-core-v5.sh | 1 + ct/homeassistant-v4.sh | 9 +++++++++ ct/homeassistant-v5.sh | 10 ++++++++++ ct/homebridge-v4.sh | 9 +++++++++ ct/homebridge-v5.sh | 10 ++++++++++ ct/homepage-v4.sh | 9 +++++++++ ct/homepage-v5.sh | 10 ++++++++++ ct/homer-v5.sh | 10 ++++++++++ ct/hyperion-v4.sh | 9 +++++++++ ct/hyperion-v5.sh | 10 ++++++++++ ct/influxdb-v4.sh | 9 +++++++++ ct/influxdb-v5.sh | 10 ++++++++++ ct/iobroker-v4.sh | 9 +++++++++ ct/iobroker-v5.sh | 10 ++++++++++ ct/jellyfin-v4.sh | 9 +++++++++ ct/jellyfin-v5.sh | 10 ++++++++++ ct/k0s-v5.sh | 10 ++++++++++ ct/kavita-v5.sh | 10 ++++++++++ ct/keycloak-v4.sh | 9 +++++++++ ct/keycloak-v5.sh | 10 ++++++++++ ct/lidarr-v5.sh | 10 ++++++++++ ct/magicmirror-v4.sh | 9 +++++++++ ct/magicmirror-v5.sh | 10 ++++++++++ ct/mariadb-v4.sh | 9 +++++++++ ct/mariadb-v5.sh | 10 ++++++++++ ct/meshcentral-v4.sh | 9 +++++++++ ct/meshcentral-v5.sh | 10 ++++++++++ ct/motioneye-v4.sh | 9 +++++++++ ct/motioneye-v5.sh | 10 ++++++++++ ct/mqtt-v5.sh | 10 ++++++++++ ct/n8n-v4.sh | 9 +++++++++ ct/n8n-v5.sh | 10 ++++++++++ ct/navidrome-v4.sh | 9 +++++++++ ct/navidrome-v5.sh | 10 ++++++++++ ct/nextcloudpi-v4.sh | 9 +++++++++ ct/nextcloudpi-v5.sh | 10 ++++++++++ ct/nginx-proxy-manager-v4.sh | 9 +++++++++ ct/nginxproxymanager-v5.sh | 10 ++++++++++ ct/nocodb-v4.sh | 9 +++++++++ ct/nocodb-v5.sh | 10 ++++++++++ ct/node-red-v4.sh | 9 +++++++++ ct/node-red-v5.sh | 10 ++++++++++ ct/omada-v4.sh | 9 +++++++++ ct/omada-v5.sh | 10 ++++++++++ ct/omv-v4.sh | 9 +++++++++ ct/omv-v5.sh | 10 ++++++++++ ct/openhab-v4.sh | 9 +++++++++ ct/openhab-v5.sh | 10 ++++++++++ ct/paperless-ngx-v4.sh | 9 +++++++++ ct/paperless-ngx-v5.sh | 10 ++++++++++ ct/photoprism-v4.sh | 9 +++++++++ ct/photoprism-v5.sh | 10 ++++++++++ ct/pihole-v4.sh | 9 +++++++++ ct/pihole-v5.sh | 10 ++++++++++ ct/plex-v4.sh | 9 +++++++++ ct/plex-v5.sh | 10 ++++++++++ ct/podman-homeassistant-v4.sh | 9 +++++++++ ct/podman-homeassistant-v5.sh | 10 ++++++++++ ct/podman-v5.sh | 10 ++++++++++ ct/postgresql-v4.sh | 9 +++++++++ ct/postgresql-v5.sh | 10 ++++++++++ ct/prometheus-v4.sh | 9 +++++++++ ct/prometheus-v5.sh | 10 ++++++++++ ct/prowlarr-v5.sh | 10 ++++++++++ ct/radarr-v5.sh | 10 ++++++++++ ct/readarr-v5.sh | 10 ++++++++++ ct/sabnzbd-v5.sh | 10 ++++++++++ ct/scrypted-v4.sh | 9 +++++++++ ct/scrypted-v5.sh | 10 ++++++++++ ct/shinobi-v4.sh | 9 +++++++++ ct/shinobi-v5.sh | 10 ++++++++++ ct/sonarr-v5.sh | 10 ++++++++++ ct/syncthing-v4.sh | 9 +++++++++ ct/syncthing-v5.sh | 10 ++++++++++ ct/tdarr-v5.sh | 10 ++++++++++ ct/technitiumdns-v4.sh | 9 +++++++++ ct/technitiumdns-v5.sh | 10 ++++++++++ ct/transmission-v5.sh | 10 ++++++++++ ct/trilium-v4.sh | 9 +++++++++ ct/trilium-v5.sh | 10 ++++++++++ ct/ubuntu-v4.sh | 9 +++++++++ ct/ubuntu-v5.sh | 10 ++++++++++ ct/umbrel-v4.sh | 9 +++++++++ ct/umbrel-v5.sh | 10 ++++++++++ ct/unifi-v4.sh | 9 +++++++++ ct/unifi-v5.sh | 10 ++++++++++ ct/uptimekuma-v4.sh | 9 +++++++++ ct/uptimekuma-v5.sh | 10 ++++++++++ ct/vaultwarden-v4.sh | 9 +++++++++ ct/vaultwarden-v5.sh | 10 ++++++++++ ct/whisparr-v5.sh | 10 ++++++++++ ct/whoogle-v4.sh | 9 +++++++++ ct/whoogle-v5.sh | 10 ++++++++++ ct/wikijs-v4.sh | 9 +++++++++ ct/wikijs-v5.sh | 10 ++++++++++ ct/wireguard-v4.sh | 9 +++++++++ ct/wireguard-v5.sh | 10 ++++++++++ ct/yunohost-v5.sh | 10 ++++++++++ ct/zigbee2mqtt-v4.sh | 9 +++++++++ ct/zigbee2mqtt-v5.sh | 10 ++++++++++ ct/zwave-js-ui-v4.sh | 9 +++++++++ ct/zwave-js-ui-v5.sh | 10 ++++++++++ 138 files changed, 1312 insertions(+) diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh index c430c632..c7f12804 100644 --- a/ct/adguard-v4.sh +++ b/ct/adguard-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index da147dfc..56035b9d 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -350,6 +359,7 @@ exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index db759dd5..5ef6197c 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -329,6 +338,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index da561a1f..015661f0 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 26e18c8c..0bf2ba40 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -342,6 +351,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh index 7c681676..507d2f71 100644 --- a/ct/blocky-v4.sh +++ b/ct/blocky-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index 59d2c74d..d82c7a93 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh index 59da684a..b3ae3583 100644 --- a/ct/casaos-v4.sh +++ b/ct/casaos-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 809f3d74..f41c1c96 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -342,6 +351,7 @@ exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/changedetection-v4.sh b/ct/changedetection-v4.sh index 61bec458..95108992 100644 --- a/ct/changedetection-v4.sh +++ b/ct/changedetection-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 88aa8595..d0d7b890 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -332,6 +341,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index f10caccb..41f618b4 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} Master LXC. Proceed?" 10 58); then @@ -379,6 +388,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh index d8d5fca0..faaf9a81 100644 --- a/ct/daemonsync-v4.sh +++ b/ct/daemonsync-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 39305f4a..c21c5de6 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh index d824ab70..f128a191 100644 --- a/ct/dashy-v4.sh +++ b/ct/dashy-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index eb18f3a7..98ed2189 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -359,6 +368,7 @@ exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 7f6c9410..441ebe05 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index f4a14602..25af81a5 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh index 7740e731..87a41090 100644 --- a/ct/deconz-v4.sh +++ b/ct/deconz-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 4a50fe38..7b733470 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index d77b8d36..8450b457 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -329,6 +338,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh index 6e18ded5..d3a6ee55 100644 --- a/ct/docker-v4.sh +++ b/ct/docker-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index c90ee4b0..8b29ccd8 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -339,6 +348,7 @@ msg_ok "Updated ${APP} LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh index 0c381a19..4935a5c9 100644 --- a/ct/emby-v4.sh +++ b/ct/emby-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 1c8f4031..e5637ede 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -352,6 +361,7 @@ exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh index 64779851..032b2ec9 100644 --- a/ct/emqx-v4.sh +++ b/ct/emqx-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 053de5a0..45471134 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -332,6 +341,7 @@ msg_ok "Updated ${APP} LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh index e6f44de4..dc4fe5bf 100644 --- a/ct/esphome-v4.sh +++ b/ct/esphome-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index e42069b0..a3c650a5 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -339,6 +348,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh index f6de91c3..f89a2857 100644 --- a/ct/grafana-v4.sh +++ b/ct/grafana-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 71c801d9..291af104 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh index 90e9cd22..e355e177 100644 --- a/ct/grocy-v4.sh +++ b/ct/grocy-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 1f45f898..7b404d1f 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -332,6 +341,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh index af75b933..f39c042f 100644 --- a/ct/heimdalldashboard-v4.sh +++ b/ct/heimdalldashboard-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 466269e5..62bf3c8e 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -412,6 +421,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh index 93a64643..ae1cd2c7 100644 --- a/ct/homeassistant-core-v4.sh +++ b/ct/homeassistant-core-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 46bf2b5f..8dfdc3cd 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -409,6 +409,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 80218197..1407f92c 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 043eebb4..a9320d6c 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -407,6 +416,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh index 2c3eaa77..5aa8300e 100644 --- a/ct/homebridge-v4.sh +++ b/ct/homebridge-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index f635f3d6..d0ed805b 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh index 5b7430fe..07eea829 100644 --- a/ct/homepage-v4.sh +++ b/ct/homepage-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 5e293376..0ddcf04f 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -339,6 +348,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index bc702f38..281ffdb5 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -352,6 +361,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh index d9125d52..2b0fc124 100644 --- a/ct/hyperion-v4.sh +++ b/ct/hyperion-v4.sh @@ -70,6 +70,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index f2b83c82..ac0a241d 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -334,6 +343,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh index b1ca3aa8..6ee8e824 100644 --- a/ct/influxdb-v4.sh +++ b/ct/influxdb-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 18e5e1ef..e7dae7cf 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh index 4b54689b..b4515677 100644 --- a/ct/iobroker-v4.sh +++ b/ct/iobroker-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index e5863828..09ca2662 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh index aab2b0a2..774a3738 100644 --- a/ct/jellyfin-v4.sh +++ b/ct/jellyfin-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 91b007ef..77d93abe 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -342,6 +351,7 @@ msg_ok "Updated ${APP} LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 7a578549..84f72199 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 7b2dd5a6..2b80642e 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -331,6 +340,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh index 3266c386..5237a3ed 100644 --- a/ct/keycloak-v4.sh +++ b/ct/keycloak-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index f23f1c32..ab061363 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -334,6 +343,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index aa63a68d..11929ba5 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh index 6c172502..2342d731 100644 --- a/ct/magicmirror-v4.sh +++ b/ct/magicmirror-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 199ded64..1b523e7a 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -335,6 +344,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh index cf31225e..5281c61d 100644 --- a/ct/mariadb-v4.sh +++ b/ct/mariadb-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 82f7c71a..716e925f 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh index 54c21a91..b1a2b983 100644 --- a/ct/meshcentral-v4.sh +++ b/ct/meshcentral-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index ac9500ff..75444ab2 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh index 41ead7e5..f2101198 100644 --- a/ct/motioneye-v4.sh +++ b/ct/motioneye-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 7d4fe34c..a267063a 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -332,6 +341,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 707624b8..ade50ece 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -333,6 +342,7 @@ exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh index 8cff0d8d..58af3ddb 100644 --- a/ct/n8n-v4.sh +++ b/ct/n8n-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 69437e2a..87888de4 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh index 893f9311..3f188aa6 100644 --- a/ct/navidrome-v4.sh +++ b/ct/navidrome-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index beab0978..3754dfa3 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -344,6 +353,7 @@ exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh index e0a70b50..c1ff886d 100644 --- a/ct/nextcloudpi-v4.sh +++ b/ct/nextcloudpi-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index a993d3bc..c57934f8 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh index a6ab98ad..23e60e9c 100644 --- a/ct/nginx-proxy-manager-v4.sh +++ b/ct/nginx-proxy-manager-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 94954f7f..88dba9c9 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -442,6 +451,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh index 2406fd20..80776771 100644 --- a/ct/nocodb-v4.sh +++ b/ct/nocodb-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 1fd54974..c7db9a0a 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -336,6 +345,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh index fec6b066..24568629 100644 --- a/ct/node-red-v4.sh +++ b/ct/node-red-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 3743a71a..9928b776 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -369,6 +378,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh index f4db3280..70fbbe6a 100644 --- a/ct/omada-v4.sh +++ b/ct/omada-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index e6aa93bd..23689d0e 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -331,6 +340,7 @@ function install_script() { fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh index e279912a..573745c9 100644 --- a/ct/omv-v4.sh +++ b/ct/omv-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index e7ed0d62..5adcf838 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -334,6 +343,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh index 2c1e1541..2d014284 100644 --- a/ct/openhab-v4.sh +++ b/ct/openhab-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 401b85b7..3e7fab93 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -334,6 +343,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh index 6ed7022c..1630ed49 100644 --- a/ct/paperless-ngx-v4.sh +++ b/ct/paperless-ngx-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 411463c0..25a0b51f 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -401,6 +410,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh index e645f8f2..1574037c 100644 --- a/ct/photoprism-v4.sh +++ b/ct/photoprism-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 4691eb67..c458183a 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -354,6 +363,7 @@ msg_ok "Update Successful" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh index 492692bc..891d272e 100644 --- a/ct/pihole-v4.sh +++ b/ct/pihole-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index a6e3e22f..3b46de9a 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh index 9f12ecb5..ba26e011 100644 --- a/ct/plex-v4.sh +++ b/ct/plex-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 537f8bf5..5274f9b7 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -352,6 +361,7 @@ exit fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh index 36a5fef9..5887d22a 100644 --- a/ct/podman-homeassistant-v4.sh +++ b/ct/podman-homeassistant-v4.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 995ca428..9a19d4b9 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -76,6 +76,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -383,6 +392,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 32670543..0deea5d2 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh index 771d0568..d1013485 100644 --- a/ct/postgresql-v4.sh +++ b/ct/postgresql-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 73bf41f5..7cc1fd6f 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh index 474cc21e..a4106946 100644 --- a/ct/prometheus-v4.sh +++ b/ct/prometheus-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 8b46ddcf..a3c2a7b6 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index dbf5a5e8..589a1ff7 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index ad68253e..0f1b8a79 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index a8e596d0..b87aace9 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 2c3b0a1f..a6c859cc 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh index e8d364c9..3dd86f9b 100644 --- a/ct/scrypted-v4.sh +++ b/ct/scrypted-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 1070f901..12510995 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -334,6 +343,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh index 427e7e7a..e52e3565 100644 --- a/ct/shinobi-v4.sh +++ b/ct/shinobi-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 4e3f1107..61dc52bf 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -343,6 +352,7 @@ msg_ok "Updated Shinobi LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 2207fb65..2fb46009 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh index c66e96e1..f6f928c1 100644 --- a/ct/syncthing-v4.sh +++ b/ct/syncthing-v4.sh @@ -70,6 +70,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 4825b5ab..0d7743d4 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -334,6 +343,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 0de99210..7b6f59f8 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh index d726ba0c..ca581f21 100644 --- a/ct/technitiumdns-v4.sh +++ b/ct/technitiumdns-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 9e55abd1..fac927a2 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -395,6 +404,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 7b991ea3..e415d8f7 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated ${APP} LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh index 3a9ebe38..8fd5f853 100644 --- a/ct/trilium-v4.sh +++ b/ct/trilium-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 88cdc017..b8e733a7 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -352,6 +361,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh index 4c47da6d..803ce681 100644 --- a/ct/ubuntu-v4.sh +++ b/ct/ubuntu-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 6fb92d13..343b95f9 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -336,6 +345,7 @@ msg_ok "Updated ${APP} LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh index 2d663fca..9b557c03 100644 --- a/ct/umbrel-v4.sh +++ b/ct/umbrel-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 135b4218..b908617d 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -340,6 +349,7 @@ msg_ok "Updated ${APP} LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh index bf24121e..38229ab0 100644 --- a/ct/unifi-v4.sh +++ b/ct/unifi-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index d8f71fe2..b2267304 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -333,6 +342,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh index 630b2b04..289694da 100644 --- a/ct/uptimekuma-v4.sh +++ b/ct/uptimekuma-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 81f77d75..60c22a50 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -350,6 +359,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh index f4ec98da..be5fe841 100644 --- a/ct/vaultwarden-v4.sh +++ b/ct/vaultwarden-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 65002322..deed5797 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -401,6 +410,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index ed21646d..c00bcec0 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -329,6 +338,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh index 41cc947e..7d3a7f6c 100644 --- a/ct/whoogle-v4.sh +++ b/ct/whoogle-v4.sh @@ -68,6 +68,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index a92970eb..e6b6ef7d 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -332,6 +341,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh index bb5ad6b3..6fc2487f 100644 --- a/ct/wikijs-v4.sh +++ b/ct/wikijs-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index a8785853..1857c2fd 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -346,6 +355,7 @@ msg_ok "Update Successfull" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh index dd3b594f..532847ad 100644 --- a/ct/wireguard-v4.sh +++ b/ct/wireguard-v4.sh @@ -70,6 +70,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 333635b5..722884a6 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -388,6 +397,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 9a44f24e..973f62b8 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -328,6 +337,7 @@ msg_ok "Updated Debian LXC" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh index 46a81164..986309c5 100644 --- a/ct/zigbee2mqtt-v4.sh +++ b/ct/zigbee2mqtt-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 1d4d9cc1..10df801e 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -73,6 +73,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -363,6 +372,7 @@ msg_ok "Update Successful" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh index 317f5841..1125bd07 100644 --- a/ct/zwave-js-ui-v4.sh +++ b/ct/zwave-js-ui-v4.sh @@ -69,6 +69,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 3b7394df..9aff96ea 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -72,6 +72,15 @@ function PVE_CHECK() { exit fi } +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then @@ -346,6 +355,7 @@ msg_ok "Updated Successfully!\n" exit } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From c56f833f21ab37599c8f4096f3c2390652c86092 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 10:32:11 -0500 Subject: [PATCH 1016/3335] Update sabnzbd-v5-install.sh add unrar_6.0.3-1 --- install/sabnzbd-v5-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index e793adf4..6cd98a5c 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -86,14 +86,16 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y unzip $STD apt-get install -y par2 -$STD apt-get install -y unrar-free $STD apt-get install -y p7zip-full +wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.0.3-1+deb11u1_amd64.deb +$STD dpkg -i unrar_6.0.3-1+deb11u1_amd64.deb +rm unrar_6.0.3-1+deb11u1_amd64.deb msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" $STD apt-get install -y python3-setuptools $STD apt-get install -y python3-pip -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing SABnzbd" RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 58db0a3be9f4866b3bd6dfe658cf8f1b1d32d47b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 10:42:35 -0500 Subject: [PATCH 1017/3335] Update Home Assistant VM's (#983) --- vm/{haos-vm-v4.sh => haos-vm-v5.sh} | 65 +++-- vm/haos.sh.gpg | Bin 3852 -> 0 bytes vm/haos_vm.sh | 272 ------------------ ...imox-haos-vm-v4.sh => pimox-haos-vm-v5.sh} | 77 ++++- 4 files changed, 112 insertions(+), 302 deletions(-) rename vm/{haos-vm-v4.sh => haos-vm-v5.sh} (87%) delete mode 100644 vm/haos.sh.gpg delete mode 100644 vm/haos_vm.sh rename vm/{pimox-haos-vm-v4.sh => pimox-haos-vm-v5.sh} (78%) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v5.sh similarity index 87% rename from vm/haos-vm-v4.sh rename to vm/haos-vm-v5.sh index 8dbf2889..2f41df72 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v5.sh @@ -2,7 +2,7 @@ function header_info { cat <<"EOF" __ __ ___ _ __ __ ____ _____ - / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____v5/ /_ / __ \/ ___/ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / /_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ @@ -13,6 +13,7 @@ clear header_info echo -e "\n Loading..." GEN_MAC=$(echo 'AE 1A 60'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') @@ -62,13 +63,6 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7.2\|7.3" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: =>7.2" - echo "Exiting..." - sleep 3 - exit -fi if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then echo "User selected Yes" else @@ -76,7 +70,6 @@ else echo -e "⚠ User exited script \n" exit fi - function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -89,7 +82,24 @@ function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } - +function PVE_CHECK() { +if [ `pveversion | grep "pve-manager/7.2\|7.3" | wc -l` -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: =>7.2" + echo "Exiting..." + sleep 2 + exit +fi +} +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} function default_settings() { echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" BRANCH=${STABLE} @@ -110,6 +120,8 @@ function default_settings() { MAC=$GEN_MAC echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" @@ -126,8 +138,16 @@ if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${C VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; + else + if echo "$USEDID" | egrep -q "$VMID" + then + echo -e "\n🚨 ${RD}ID $VMID is already in use${CL} \n" + echo -e "Exiting Script \n" + sleep 2; + exit + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; + fi fi MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "i440fx" "Machine i440fx" ON \ @@ -183,6 +203,17 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi +MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi +fi if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" @@ -199,7 +230,7 @@ else advanced_settings fi } -function start_script() { +function START_SCRIPT() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then clear header_info @@ -212,7 +243,9 @@ else advanced_settings fi } -start_script +ARCH_CHECK +PVE_CHECK +START_SCRIPT msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -278,8 +311,8 @@ for i in {0,1}; do done msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ - -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ diff --git a/vm/haos.sh.gpg b/vm/haos.sh.gpg deleted file mode 100644 index c887542bcb808d9e1094be86e8b595681a0ba1a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3852 zcmV+n5A*Ph4Fm}T0@zj!h3-eJ)c?}!0jX8$yNUJ=oXwYmxoC)(Z=-E;yv3Ql#o_y8 zG6e6{C0!F_OsB*iD{;3irJB6QNi>6KQ+>BGd!&(!&#G&E@G&ZrTvoqrzDYb7MA?h}=S60*(AF-POhk49J6^I>D7P z422jb0MZ#Ld$7V+{{+b0W7>^?MezR=sUb`I(^#!ebNuR6fu`pE47g2!DHN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 index 5f204f69..00000000 --- a/vm/haos_vm.sh +++ /dev/null @@ -1,272 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') -NEXTID=$(pvesh get /cluster/nextid) -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -BETA=$(curl -sX GET "https://api.github.com/repos/home-assistant/operating-system/releases" | awk '/tag_name/{print $4;exit}' FS='[""]') -DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -HA=`echo "\033[1;34m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - [ ! -z ${VMID-} ] && cleanup_vmid - exit $EXIT -} -function cleanup_vmid() { - if $(qm status $VMID &>/dev/null); then - if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then - qm stop $VMID - fi - qm destroy $VMID - fi -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7" | wc -l` -eq 1 ]; then - echo -e "\n🚨 ${RD} This script is for Proxmox Virtual Environment 6.xx${CL}\n" - echo "Exiting..." - sleep 3 - exit -fi -if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { -echo -e "${HA} - __ _____ ____ _____ - / / / / | / __ \/ ___/ - / /_/ / /| |/ / / /\__ \ - / __ / ___ / /_/ /___/ / -/_/ /_/_/v4|_\____//____/ - Home Assistant OS -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - HN=haos${STABLE} - echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" - CORE_COUNT="2" - echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" -} -function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" 10 58 3 \ -"$STABLE" "Stable" ON \ -"$BETA" "Beta" OFF \ -"$DEV" "Dev" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" -else - exit -fi -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" -else - exit -fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - HN=$(echo ${VM_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" -else - exit -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" -else - exit -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" -else - exit -fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - MAC="$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - exit -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" -else - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" - START_VM="no" -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" 10 58); then - echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} -function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} -start_script -msg_info "Validating Storage" -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi -STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) -done < <(pvesm status -content images | awk 'NR>1') -VALID=$(pvesm status -content images | awk 'NR>1') -if [ -z "$VALID" ]; then - echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" - echo -e "Exiting..." - exit -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the HAOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" -if [ "$BRANCH" == "$DEV" ]; then -URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -else -URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -fi -sleep 2 -msg_ok "${CL}${BL}${URL}${CL}" -wget -q --show-progress $URL -echo -en "\e[1A\e[0K" -FILE=$(basename $URL) -msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" -msg_info "Extracting KVM Disk Image" -unxz $FILE -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in - nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DISK_IMPORT="-format qcow2" -esac -for i in {0,1}; do - disk="DISK$i" - eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} - eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} -done -msg_ok "Extracted KVM Disk Image" -msg_info "Creating HAOS VM" -qm create $VMID -agent 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ - -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 128 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null -qm set $VMID \ - -efidisk0 ${DISK0_REF},size=128K \ - -scsi0 ${DISK1_REF},size=32G >/dev/null -qm set $VMID \ - -boot order=scsi0 >/dev/null -qm set $VMID -description "# Home Assistant OS -### https://github.com/tteck/Proxmox" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}(${HN})" -if [ "$START_VM" == "yes" ]; then -msg_info "Starting Home Assistant OS VM" -qm start $VMID -msg_ok "Started Home Assistant OS VM" -fi -msg_ok "Completed Successfully!\n" diff --git a/vm/pimox-haos-vm-v4.sh b/vm/pimox-haos-vm-v5.sh similarity index 78% rename from vm/pimox-haos-vm-v4.sh rename to vm/pimox-haos-vm-v5.sh index 97dc8369..cebce5e2 100644 --- a/vm/pimox-haos-vm-v4.sh +++ b/vm/pimox-haos-vm-v5.sh @@ -1,6 +1,23 @@ #!/usr/bin/env bash +function header_info { +cat <<"EOF" + ____ _ __ ___ + / __ \(_) |/ /___ _ __ + / /_/ / / /|_/ / __ \| |/_/ + / ____/ / / / / /_/ /> < + __ __ /_/_ /_/_/ /_/\____/_/|_| __ ____ _____ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____v5/ /_ / __ \/ ___/ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ + +EOF +} +clear +header_info echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') @@ -55,14 +72,23 @@ else echo -e "⚠ User exited script \n" exit fi -function header_info { -echo -e "${RD} - ____ _ __ ___ __ _____ ____ _____ - / __ \(_) / |/ /___ _ __ / / / / | / __ \/ ___/ - / /_/ / /v4_/ /|_/ / __ \| |/_/ / /_/ / /| |/ / / /\__ \ - / ____/ /___/ / / / /_/ /> < / __ / ___ / /_/ /___/ / -/_/ /_/ /_/ /_/\____/_/|_| /_/ /_/_/ |_\____//____/ -${CL}" +function PVE_CHECK() { +if [ `pveversion | grep "pve-manager/7.2\|7.3" | wc -l` -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: =>7.2" + echo "Exiting..." + sleep 2 + exit +fi +} +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" == "amd64" ]]; then + echo -e "\n ❌ This script only works with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi } function msg_info() { local msg="$1" @@ -94,6 +120,8 @@ function default_settings() { MAC=$GEN_MAC echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" VLAN="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" @@ -109,8 +137,16 @@ if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${C VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; + else + if echo "$USEDID" | egrep -q "$VMID" + then + echo -e "\n🚨 ${RD}ID $VMID is already in use${CL} \n" + echo -e "Exiting Script \n" + sleep 2; + exit + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; + fi fi VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? @@ -152,6 +188,17 @@ else echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi +MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi +fi if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" @@ -168,7 +215,7 @@ else advanced_settings fi } -function start_script() { +function START_SCRIPT() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then clear header_info @@ -181,7 +228,9 @@ else advanced_settings fi } -start_script +ARCH_CHECK +PVE_CHECK +START_SCRIPT while read -r line; do TAG=$(echo $line | awk '{print $1}') TYPE=$(echo $line | awk '{printf "%-10s", $2}') @@ -232,8 +281,8 @@ for i in {0,1}; do done msg_ok "Extracted Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN \ - -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \ + -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ From 332f089110d6ab5476fcc150bbc3f30b6c60ea03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 11:00:21 -0500 Subject: [PATCH 1018/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ebb1ef9f..1fe9be84 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,24 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-25 + +### Changed + +- **Home Assistant OS VM** + - switch to v5 + - add an option to set MTU size (Advanced) + - add arch check (no ARM64) + - add check to insure VMID isn't already used before VM creation (Advanced) + - code refactoring +- **PiMox Home Assistant OS VM** + - switch to v5 + - add an option to set MTU size (Advanced) + - add arch check (no AMD64) + - add pve check (=>7.2) + - add check to insure VMID isn't already used before VM creation (Advanced) + - code refactoring + ## 2023-01-24 ### Changed From b5c89a34f2070b0c0fb2bfab8a634308fcea448e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 11:07:53 -0500 Subject: [PATCH 1019/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1fe9be84..035a5cc7 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -10,8 +10,8 @@ All notable changes to this project will be documented in this file. - **Home Assistant OS VM** - switch to v5 - add an option to set MTU size (Advanced) - - add arch check (no ARM64) - - add check to insure VMID isn't already used before VM creation (Advanced) + - add arch check (no ARM64) (issue from community.home-assistant.io) + - add check to insure VMID isn't already used before VM creation (Advanced) (issue from forum.proxmox.com) - code refactoring - **PiMox Home Assistant OS VM** - switch to v5 @@ -20,6 +20,8 @@ All notable changes to this project will be documented in this file. - add pve check (=>7.2) - add check to insure VMID isn't already used before VM creation (Advanced) - code refactoring +- **All LXC's** + - add arch check (no ARM64) (issue from forum.proxmox.com) ## 2023-01-24 From d385d7e9d23287c80a35a5ef654fa967788dafcb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 13:51:39 -0500 Subject: [PATCH 1020/3335] copy-data --- .../hacontainer-copy-data-hacontainer.sh} | 0 .../hacontainer-copy-data-hacore.sh} | 0 .../hacontainer-copy-data-podman.sh} | 0 .../hacore-copy-data-hacontainer.sh} | 0 .../hacore-copy-data-hacore.sh} | 0 misc/{pms-copy-data.sh => copy-data/plex-copy-data-plex.sh} | 0 .../podman-copy-data-hacontainer.sh} | 0 misc/{z2m-copy-data.sh => copy-data/z2m-copy-data-z2m.sh} | 0 .../zwavejs2mqtt-copy-data-zwavejsui.sh} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename misc/{ha-copy-data.sh => copy-data/hacontainer-copy-data-hacontainer.sh} (100%) rename misc/{hacontainer2hacore-data.sh => copy-data/hacontainer-copy-data-hacore.sh} (100%) rename misc/{ha-copy-data-podman.sh => copy-data/hacontainer-copy-data-podman.sh} (100%) rename misc/{hacore2hacontainer-data.sh => copy-data/hacore-copy-data-hacontainer.sh} (100%) rename misc/{hacore2hacore-data.sh => copy-data/hacore-copy-data-hacore.sh} (100%) rename misc/{pms-copy-data.sh => copy-data/plex-copy-data-plex.sh} (100%) rename misc/{podman-copy-data-docker.sh => copy-data/podman-copy-data-hacontainer.sh} (100%) rename misc/{z2m-copy-data.sh => copy-data/z2m-copy-data-z2m.sh} (100%) rename misc/{zwave-copy-data.sh => copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh} (100%) diff --git a/misc/ha-copy-data.sh b/misc/copy-data/hacontainer-copy-data-hacontainer.sh similarity index 100% rename from misc/ha-copy-data.sh rename to misc/copy-data/hacontainer-copy-data-hacontainer.sh diff --git a/misc/hacontainer2hacore-data.sh b/misc/copy-data/hacontainer-copy-data-hacore.sh similarity index 100% rename from misc/hacontainer2hacore-data.sh rename to misc/copy-data/hacontainer-copy-data-hacore.sh diff --git a/misc/ha-copy-data-podman.sh b/misc/copy-data/hacontainer-copy-data-podman.sh similarity index 100% rename from misc/ha-copy-data-podman.sh rename to misc/copy-data/hacontainer-copy-data-podman.sh diff --git a/misc/hacore2hacontainer-data.sh b/misc/copy-data/hacore-copy-data-hacontainer.sh similarity index 100% rename from misc/hacore2hacontainer-data.sh rename to misc/copy-data/hacore-copy-data-hacontainer.sh diff --git a/misc/hacore2hacore-data.sh b/misc/copy-data/hacore-copy-data-hacore.sh similarity index 100% rename from misc/hacore2hacore-data.sh rename to misc/copy-data/hacore-copy-data-hacore.sh diff --git a/misc/pms-copy-data.sh b/misc/copy-data/plex-copy-data-plex.sh similarity index 100% rename from misc/pms-copy-data.sh rename to misc/copy-data/plex-copy-data-plex.sh diff --git a/misc/podman-copy-data-docker.sh b/misc/copy-data/podman-copy-data-hacontainer.sh similarity index 100% rename from misc/podman-copy-data-docker.sh rename to misc/copy-data/podman-copy-data-hacontainer.sh diff --git a/misc/z2m-copy-data.sh b/misc/copy-data/z2m-copy-data-z2m.sh similarity index 100% rename from misc/z2m-copy-data.sh rename to misc/copy-data/z2m-copy-data-z2m.sh diff --git a/misc/zwave-copy-data.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh similarity index 100% rename from misc/zwave-copy-data.sh rename to misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh From 08fab50acd7ab8b97ab5fa61586f5a647f62b52f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 14:39:50 -0500 Subject: [PATCH 1021/3335] copy-data --- misc/copy-data/README.md | 46 +++++++++++++++++++ ...ner-copy-data-home-assistant-container.sh} | 1 - ...ontainer-copy-data-home-assistant-core.sh} | 0 ...tainer-copy-data-podman-home-assistant.sh} | 1 - ...ore-copy-data-home-assistant-container.sh} | 0 ...ant-core-copy-data-home-assistant-core.sh} | 0 misc/copy-data/plex-copy-data-plex.sh | 3 +- ...ant-copy-data-home-assistant-container.sh} | 3 +- misc/copy-data/z2m-copy-data-z2m.sh | 3 +- .../zwavejs2mqtt-copy-data-zwavejsui.sh | 3 +- 10 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 misc/copy-data/README.md rename misc/copy-data/{hacontainer-copy-data-hacontainer.sh => home-assistant-container-copy-data-home-assistant-container.sh} (97%) rename misc/copy-data/{hacontainer-copy-data-hacore.sh => home-assistant-container-copy-data-home-assistant-core.sh} (100%) rename misc/copy-data/{hacontainer-copy-data-podman.sh => home-assistant-container-copy-data-podman-home-assistant.sh} (97%) rename misc/copy-data/{hacore-copy-data-hacontainer.sh => home-assistant-core-copy-data-home-assistant-container.sh} (100%) rename misc/copy-data/{hacore-copy-data-hacore.sh => home-assistant-core-copy-data-home-assistant-core.sh} (100%) rename misc/copy-data/{podman-copy-data-hacontainer.sh => podman-home-assistant-copy-data-home-assistant-container.sh} (97%) diff --git a/misc/copy-data/README.md b/misc/copy-data/README.md new file mode 100644 index 00000000..519540dc --- /dev/null +++ b/misc/copy-data/README.md @@ -0,0 +1,46 @@ +

Copy data to another LXC

+
To copy data from Home Assistant Container to Home Assistant Container
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh)" +``` +
To copy data from Home Assistant Container to Home Assistant Core
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh)" +``` +
To copy data from Home Assistant Container to Podman Home Assistant
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh)" +``` +
To copy data from Podman Home Assistant to Home Assistant Container
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh)" +``` +
To copy data from Home Assistant Core to Home Assistant Container
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh)" +``` +
To copy data from Home Assistant Core to Home Assistant Core
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh)" +``` +
To copy data from Plex to Plex
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/plex-copy-data-plex.sh)" +``` +
To copy data from Zigbee2MQTT to Zigbee2MQTT
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/z2m-copy-data-z2m.sh)" +``` +
To copy data from Zwavejs2MQTT to Zwave JS UI
+ +``` +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh)" +``` diff --git a/misc/copy-data/hacontainer-copy-data-hacontainer.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh similarity index 97% rename from misc/copy-data/hacontainer-copy-data-hacontainer.sh rename to misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh index 698c1cfb..f9410471 100644 --- a/misc/copy-data/hacontainer-copy-data-hacontainer.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Use to copy all data from one Home Assistant LXC to another # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data.sh)" clear if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do diff --git a/misc/copy-data/hacontainer-copy-data-hacore.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh similarity index 100% rename from misc/copy-data/hacontainer-copy-data-hacore.sh rename to misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh diff --git a/misc/copy-data/hacontainer-copy-data-podman.sh b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh similarity index 97% rename from misc/copy-data/hacontainer-copy-data-podman.sh rename to misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh index 2b8abc13..2442a576 100644 --- a/misc/copy-data/hacontainer-copy-data-podman.sh +++ b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash # Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data-podman.sh)" clear if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do diff --git a/misc/copy-data/hacore-copy-data-hacontainer.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh similarity index 100% rename from misc/copy-data/hacore-copy-data-hacontainer.sh rename to misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh diff --git a/misc/copy-data/hacore-copy-data-hacore.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh similarity index 100% rename from misc/copy-data/hacore-copy-data-hacore.sh rename to misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh diff --git a/misc/copy-data/plex-copy-data-plex.sh b/misc/copy-data/plex-copy-data-plex.sh index 60812f67..399ddcb0 100644 --- a/misc/copy-data/plex-copy-data-plex.sh +++ b/misc/copy-data/plex-copy-data-plex.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Use to copy all data from one Plex Media Server LXC to another # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/pms-copy-data.sh)" +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from one Plex Media Server LXC to another. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/podman-copy-data-hacontainer.sh b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh similarity index 97% rename from misc/copy-data/podman-copy-data-hacontainer.sh rename to misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh index 5b5bea9e..d9c1d9dd 100644 --- a/misc/copy-data/podman-copy-data-hacontainer.sh +++ b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/podman-copy-data-docker.sh)" +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/z2m-copy-data-z2m.sh b/misc/copy-data/z2m-copy-data-z2m.sh index ad29d1c2..0cdd7651 100644 --- a/misc/copy-data/z2m-copy-data-z2m.sh +++ b/misc/copy-data/z2m-copy-data-z2m.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Use to copy all data from one Zigbee2MQTT LXC to another # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/z2m-copy-data.sh)" +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from one Zigbee2MQTT LXC to another. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh index 193a027e..c45ececc 100644 --- a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh +++ b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/zwave-copy-data.sh)" +clear +if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do read -p "Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC. Proceed(y/n)?" yn case $yn in From 61df2ea119f504d9effa032c911a7dfc4d486b7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 25 Jan 2023 14:49:07 -0500 Subject: [PATCH 1022/3335] Update README.md add instruction --- misc/copy-data/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/copy-data/README.md b/misc/copy-data/README.md index 519540dc..e24677c3 100644 --- a/misc/copy-data/README.md +++ b/misc/copy-data/README.md @@ -1,4 +1,4 @@ -

Copy data to another LXC

+

Copy data to another LXC (run in the Proxmox Shell)

To copy data from Home Assistant Container to Home Assistant Container
``` From 6964f82b4d702ab1f056146f931f6cebbbde5d75 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 03:55:42 -0500 Subject: [PATCH 1023/3335] Option to disable IPv6 (#986) --- ct/adguard-v5.sh | 10 ++++++++++ ct/alpine-v5.sh | 10 ++++++++++ ct/archlinux-v5.sh | 10 ++++++++++ ct/autobrr-v5.sh | 10 ++++++++++ ct/blocky-v5.sh | 10 ++++++++++ ct/casaos-v5.sh | 10 ++++++++++ ct/changedetection-v5.sh | 10 ++++++++++ ct/cronicle-v5.sh | 10 ++++++++++ ct/daemonsync-v5.sh | 10 ++++++++++ ct/dashy-v5.sh | 10 ++++++++++ ct/debian-v5.sh | 22 ++++++++++++++++------ ct/deconz-v5.sh | 10 ++++++++++ ct/deluge-v5.sh | 10 ++++++++++ ct/docker-v5.sh | 10 ++++++++++ ct/emby-v5.sh | 10 ++++++++++ ct/emqx-v5.sh | 10 ++++++++++ ct/esphome-v5.sh | 10 ++++++++++ ct/grafana-v5.sh | 10 ++++++++++ ct/grocy-v5.sh | 10 ++++++++++ ct/heimdalldashboard-v5.sh | 10 ++++++++++ ct/homeassistant-core-v5.sh | 10 ++++++++++ ct/homeassistant-v5.sh | 10 ++++++++++ ct/homebridge-v5.sh | 10 ++++++++++ ct/homepage-v5.sh | 10 ++++++++++ ct/homer-v5.sh | 10 ++++++++++ ct/hyperion-v5.sh | 10 ++++++++++ ct/influxdb-v5.sh | 10 ++++++++++ ct/iobroker-v5.sh | 10 ++++++++++ ct/jellyfin-v5.sh | 10 ++++++++++ ct/k0s-v5.sh | 10 ++++++++++ ct/kavita-v5.sh | 10 ++++++++++ ct/keycloak-v5.sh | 10 ++++++++++ ct/lidarr-v5.sh | 10 ++++++++++ ct/magicmirror-v5.sh | 10 ++++++++++ ct/mariadb-v5.sh | 10 ++++++++++ ct/meshcentral-v5.sh | 10 ++++++++++ ct/motioneye-v5.sh | 10 ++++++++++ ct/mqtt-v5.sh | 10 ++++++++++ ct/n8n-v5.sh | 10 ++++++++++ ct/navidrome-v5.sh | 10 ++++++++++ ct/nextcloudpi-v5.sh | 10 ++++++++++ ct/nginxproxymanager-v5.sh | 10 ++++++++++ ct/nocodb-v5.sh | 10 ++++++++++ ct/node-red-v5.sh | 10 ++++++++++ ct/omada-v5.sh | 10 ++++++++++ ct/omv-v5.sh | 10 ++++++++++ ct/openhab-v5.sh | 10 ++++++++++ ct/paperless-ngx-v5.sh | 10 ++++++++++ ct/photoprism-v5.sh | 10 ++++++++++ ct/pihole-v5.sh | 10 ++++++++++ ct/plex-v5.sh | 10 ++++++++++ ct/podman-homeassistant-v5.sh | 10 ++++++++++ ct/podman-v5.sh | 10 ++++++++++ ct/postgresql-v5.sh | 10 ++++++++++ ct/prometheus-v5.sh | 10 ++++++++++ ct/prowlarr-v5.sh | 10 ++++++++++ ct/radarr-v5.sh | 10 ++++++++++ ct/readarr-v5.sh | 10 ++++++++++ ct/sabnzbd-v5.sh | 10 ++++++++++ ct/scrypted-v5.sh | 10 ++++++++++ ct/shinobi-v5.sh | 10 ++++++++++ ct/sonarr-v5.sh | 10 ++++++++++ ct/syncthing-v5.sh | 10 ++++++++++ ct/tdarr-v5.sh | 10 ++++++++++ ct/technitiumdns-v5.sh | 10 ++++++++++ ct/transmission-v5.sh | 10 ++++++++++ ct/trilium-v5.sh | 10 ++++++++++ ct/ubuntu-v5.sh | 10 ++++++++++ ct/umbrel-v5.sh | 10 ++++++++++ ct/unifi-v5.sh | 10 ++++++++++ ct/uptimekuma-v5.sh | 10 ++++++++++ ct/vaultwarden-v5.sh | 10 ++++++++++ ct/whisparr-v5.sh | 10 ++++++++++ ct/whoogle-v5.sh | 10 ++++++++++ ct/wikijs-v5.sh | 10 ++++++++++ ct/wireguard-v5.sh | 14 ++++++++++++-- ct/yunohost-v5.sh | 10 ++++++++++ ct/zigbee2mqtt-v5.sh | 10 ++++++++++ ct/zwave-js-ui-v5.sh | 10 ++++++++++ install/adguard-v5-install.sh | 1 + install/autobrr-v5-install.sh | 1 + install/blocky-v5-install.sh | 1 + install/casaos-v5-install.sh | 1 + install/changedetection-v5-install.sh | 1 + install/cronicle-v5-install.sh | 1 + install/daemonsync-v5-install.sh | 1 + install/dashy-v5-install.sh | 1 + install/debian-v5-install.sh | 1 + install/deconz-v5-install.sh | 1 + install/deluge-v5-install.sh | 5 +++-- install/docker-v5-install.sh | 1 + install/emby-v5-install.sh | 1 + install/emqx-v5-install.sh | 1 + install/esphome-install.sh | 4 ++-- install/esphome-v5-install.sh | 5 +++-- install/grafana-v5-install.sh | 1 + install/grocy-v5-install.sh | 1 + install/heimdalldashboard-v5-install.sh | 1 + install/homeassistant-core-v5-install.sh | 1 + install/homeassistant-install.sh | 4 ++-- install/homeassistant-v5-install.sh | 1 + install/homebridge-v5-install.sh | 1 + install/homepage-v5-install.sh | 1 + install/homer-v5-install.sh | 1 + install/hyperion-v5-install.sh | 1 + install/influxdb-v5-install.sh | 1 + install/iobroker-v5-install.sh | 1 + install/jellyfin-v5-install.sh | 1 + install/k0s-v5-install.sh | 1 + install/kavita-v5-install.sh | 1 + install/keycloak-v5-install.sh | 1 + install/lidarr-v5-install.sh | 1 + install/magicmirror-v5-install.sh | 1 + install/mariadb-v5-install.sh | 1 + install/meshcentral-v5-install.sh | 1 + install/motioneye-v5-install.sh | 1 + install/mqtt-v5-install.sh | 1 + install/n8n-v5-install.sh | 1 + install/navidrome-v5-install.sh | 1 + install/nextcloudpi-v5-install.sh | 1 + install/nginxproxymanager-v5-install.sh | 1 + install/nocodb-v5-install.sh | 1 + install/node-red-v5-install.sh | 1 + install/omada-v5-install.sh | 1 + install/omv-v5-install.sh | 1 + install/openhab-v5-install.sh | 1 + install/paperless-ngx-v5-install.sh | 1 + install/photoprism-v5-install.sh | 1 + install/pihole-v5-install.sh | 1 + install/plex-v5-install.sh | 1 + install/podman-homeassistant-v5-install.sh | 1 + install/podman-v5-install.sh | 1 + install/postgresql-v5-install.sh | 1 + install/prometheus-v5-install.sh | 1 + install/prowlarr-v5-install.sh | 1 + install/radarr-v5-install.sh | 1 + install/readarr-v5-install.sh | 1 + install/sabnzbd-v5-install.sh | 1 + install/scrypted-v5-install.sh | 1 + install/shinobi-v5-install.sh | 1 + install/sonarr-v5-install.sh | 1 + install/syncthing-v5-install.sh | 1 + install/tdarr-v5-install.sh | 1 + install/technitiumdns-v5-install.sh | 1 + install/transmission-v5-install.sh | 1 + install/trilium-v5-install.sh | 1 + install/ubuntu-v5-install.sh | 1 + install/umbrel-v5-install.sh | 1 + install/unifi-v5-install.sh | 1 + install/uptimekuma-v5-install.sh | 1 + install/vaultwarden-v5-install.sh | 1 + install/whisparr-v5-install.sh | 1 + install/whoogle-install.sh | 4 ++-- install/whoogle-v5-install.sh | 5 +++-- install/wikijs-v5-install.sh | 1 + install/wireguard-install.sh | 4 ++-- install/wireguard-v5-install.sh | 1 + install/yunohost-v5-install.sh | 1 + install/zigbee2mqtt-v5-install.sh | 1 + install/zwave-js-ui-v5-install.sh | 1 + 160 files changed, 889 insertions(+), 22 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 56035b9d..817bb5fd 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -125,6 +125,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -236,6 +238,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -369,6 +378,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 5ef6197c..7f9c7d03 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -234,6 +236,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -348,6 +357,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 015661f0..afef7c5a 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 0bf2ba40..5f3589ba 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -125,6 +125,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -236,6 +238,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -361,6 +370,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index d82c7a93..7291b0be 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index f41c1c96..2a7e1c93 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -239,6 +241,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -362,6 +371,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index d0d7b890..e50e3fda 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,6 +360,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 41f618b4..e1e831cc 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -124,6 +124,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -235,6 +237,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -399,6 +408,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export SERV=$SERVER +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index c21c5de6..c79e3cac 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 98ed2189..d3ed0919 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -378,6 +387,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 25af81a5..9f007fb1 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash function header_info { cat <<"EOF" - ____ __________ _______ _ __ - / __ \/ ____/ __ )/ _/ | / | / / - / / / / __/ / __ |/ // /| | / |/ / - / /_/ / /_v5/ /_/ // // ___ |/ /| / -/_____/_____/_____/___/_/ |_/_/ |_/ - + ____ __ _ + / __ \___v5/ /_ (_)___ _____ + / / / / _ \/ __ \/ / __ `/ __ \ + / /_/ / __/ /_/ / / /_/ / / / / +/_____/\___/_.___/_/\__,_/_/ /_/ + EOF } clear @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 7b733470..f99fffb4 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index 8450b457..f6124413 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -123,6 +123,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -234,6 +236,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -348,6 +357,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 8b29ccd8..d2e3c0a7 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -125,6 +125,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -359,6 +368,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index e5637ede..7392ac61 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -246,6 +248,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -371,6 +380,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 45471134..26360cbc 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,6 +360,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index a3c650a5..6ec4e410 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -358,6 +367,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 291af104..85e1b111 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 7b404d1f..62441b72 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,6 +360,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 62bf3c8e..00dddee1 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -431,6 +440,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 8dfdc3cd..0cc1acb4 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -120,6 +120,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -232,6 +234,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -419,6 +428,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index a9320d6c..afaa19eb 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -241,6 +243,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -427,6 +436,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index d0ed805b..d036f6ed 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 0ddcf04f..413bcb9a 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -358,6 +367,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 281ffdb5..fcb920b0 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -371,6 +380,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index ac0a241d..51353a73 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -353,6 +362,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index e7dae7cf..03681cb6 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 09ca2662..257ae0bd 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 77d93abe..127dcd25 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -129,6 +129,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -248,6 +250,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -361,6 +370,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 84f72199..bcf5f0ee 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 2b80642e..d0d21213 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -125,6 +125,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -236,6 +238,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -350,6 +359,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index ab061363..2d9e16fe 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -353,6 +362,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 11929ba5..07586f05 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 1b523e7a..9a738bcf 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -354,6 +363,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 716e925f..96fdb8e1 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 75444ab2..37d26f3f 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index a267063a..f5b6186d 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,6 +360,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index ade50ece..8cc7274e 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -124,6 +124,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -235,6 +237,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 87888de4..c4a371af 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 3754dfa3..06f2a828 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -363,6 +372,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index c57934f8..af9a035b 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 88dba9c9..41cf41a8 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -461,6 +470,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index c7db9a0a..d552dd84 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -355,6 +364,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 9928b776..d6239acc 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -388,6 +397,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 23689d0e..c200d3fd 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -246,6 +248,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -350,6 +359,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 5adcf838..8591a72e 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -353,6 +362,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 3e7fab93..837f815c 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -353,6 +362,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 25a0b51f..b4de9ab6 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -420,6 +429,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index c458183a..ccab7aad 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -125,6 +125,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -236,6 +238,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -373,6 +382,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 3b46de9a..299c53d0 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 5274f9b7..30894617 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -128,6 +128,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -247,6 +249,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -371,6 +380,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 9a19d4b9..55f0f9c5 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -130,6 +130,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -241,6 +243,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -402,6 +411,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 0deea5d2..c4475f01 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 7cc1fd6f..e1247142 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index a3c2a7b6..2de01b11 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 589a1ff7..ed741da7 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 0f1b8a79..3ae34a9c 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index b87aace9..d8e03dfb 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index a6c859cc..c5480465 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 12510995..3b4c7eda 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -353,6 +362,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 61dc52bf..0a3ca6cf 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -246,6 +248,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -362,6 +371,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 2fb46009..bf291d82 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 0d7743d4..fc983f24 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -353,6 +362,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 7b6f59f8..882fa1d7 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index fac927a2..ec98b23c 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -414,6 +423,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index e415d8f7..53bf082a 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index b8e733a7..9facb7ca 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -371,6 +380,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 343b95f9..0cdab57f 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -123,6 +123,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -242,6 +244,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -355,6 +364,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index b908617d..684b4fc2 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -239,6 +241,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -360,6 +369,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index b2267304..5f07d29a 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,6 +361,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 60c22a50..c29a3832 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -369,6 +378,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index deed5797..fda70c39 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -125,6 +125,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -420,6 +429,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index c00bcec0..27636526 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -123,6 +123,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -234,6 +236,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -348,6 +357,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index e6b6ef7d..b8600076 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -351,6 +360,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 1857c2fd..1ed0b3b8 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -365,6 +374,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 722884a6..376ff186 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -352,13 +361,13 @@ if [ "$UPD" == "2" ]; then exit fi IP=$(hostname -I | awk '{print $1}') -msg_info "Installing pip3" +msg_info "Installing Python3-pip" apt-get install -y python3-pip &>/dev/null pip install flask &>/dev/null pip install ifcfg &>/dev/null pip install flask_qrcode &>/dev/null pip install icmplib &>/dev/null -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing WGDashboard" WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | @@ -407,6 +416,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 973f62b8..e9d630c4 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -122,6 +122,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -233,6 +235,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -347,6 +356,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 10df801e..e006440e 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -127,6 +127,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -238,6 +240,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -382,6 +391,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 9aff96ea..3018177d 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -126,6 +126,8 @@ function default_settings() { NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -237,6 +239,13 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -365,6 +374,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB export STD=$VERB2 export SSH_ROOT=${SSH} diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index c0cb9130..562c14ab 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 08b1490d..c66c362c 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 3a09d1b8..f4f9d698 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 9f076d43..98e7ae77 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index ae77b3a0..da5891f1 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 0bee1960..dc0dbd07 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 670d3c2e..f5f9408b 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 205163bf..4e4a084f 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index ffb9f70b..f89c2ffb 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index fa12d272..5b689847 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index cb4bebc7..963dbe93 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -86,9 +87,9 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" $STD apt-get install -y python3-pip -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing Deluge" $STD pip install deluge[all] diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index c0edccb1..5d4d19bb 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index a13941c0..29d38f1b 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 718f0089..26b8daa5 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 8a1b73d5..fbd8570a 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -87,9 +87,9 @@ apt-get install -y sudo &>/dev/null apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" apt-get install -y python3-pip &>/dev/null -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing ESPHome" pip3 install esphome &>/dev/null diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index bddd0035..e4fbcc58 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -88,9 +89,9 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" $STD apt-get install -y python3-pip -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing ESPHome" $STD pip3 install esphome diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 189cbae3..d9dbcdfc 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 1e4c784b..c56342c7 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 33e8ef13..a1fc064b 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 6070a81a..2b3a3333 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 19998207..52c3c427 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -86,9 +86,9 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" apt-get install -y python3-pip &>/dev/null -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" get_latest_release() { curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 603028b3..cb5c9ccf 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index bd218d9e..3aedb557 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 7069e0ee..b2d8ada4 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index c9e8172e..9f2db9fa 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 13263722..05558e6b 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 27e263e9..5affc2de 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index b592dced..a59032a8 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 2f0f1126..17683b67 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 24b67810..ab239220 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 316ecaf1..bbf7bc1a 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 797046df..53e03b5c 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index 061fbd31..f541f553 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 1902ced3..9f47644a 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 8985b950..a705ad23 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 0559a932..c5e5ed15 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 57a103de..6dd05e2e 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index dfd7fd03..b75ccd39 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 03a27b72..677f21b5 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index f0c9e767..8ef3f859 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 2fbce9fc..e6092393 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 3b752773..7fb0efa9 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index bcf5d676..15b515bc 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index a554c35b..de324a32 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index dd1e986b..30191935 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 89bc3116..9a1801a6 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index ced8d90d..1649094c 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 8040e113..496ae80a 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 661ab7d9..d8831deb 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 87bc2d69..091351f5 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index b048ada9..64d33251 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 7ed0482b..20d9c70c 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 48038cba..9fdad038 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index a092835d..48d20364 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index b5f37958..de31eb50 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index f7f9edd8..f22ccc1a 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index a0a84993..4f262889 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 8c90fcc2..a776b2cf 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 6cd98a5c..fd8b2d51 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 40f4d6ac..f0694686 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 6ea98787..838718b8 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index f942d8ef..fbbac3ac 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 4845c1ec..dd5d92f7 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 43fc93cb..8594d8a0 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index a75fbc97..add94e24 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index ceb6ddbd..d6ead82b 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 5a6d2a36..617ec96d 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index a0e2f7c1..d5371ab6 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 7468dfb3..841be405 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index e86bdeb8..ec68eaad 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi #https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 659c9685..5d088390 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index e23a1d84..9d107133 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 3e10887c..7f005241 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index f41c34d3..758ae265 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -86,9 +86,9 @@ apt-get install -y curl &>/dev/null apt-get install -y sudo &>/dev/null msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" apt-get install python3-pip -y &>/dev/null -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing Whoogle" pip install brotli &>/dev/null diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 0408a740..5fdd8338 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -87,9 +88,9 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" $STD apt-get install -y python3-pip -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing Whoogle" $STD pip install brotli diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 28ae5236..b138e039 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 92f6f77d..b71dad3b 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -110,13 +110,13 @@ chmod +x install.sh ./install.sh --unattended options.conf &>/dev/null msg_ok "Installed WireGuard" -msg_info "Installing pip3" +msg_info "Installing Python3-pip" apt-get install python3-pip -y &>/dev/null pip install flask &>/dev/null pip install ifcfg &>/dev/null pip install flask_qrcode &>/dev/null pip install icmplib &>/dev/null -msg_ok "Installed pip3" +msg_ok "Installed Python3-pip" msg_info "Installing WGDashboard" WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 6c30ed01..c92487b2 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index e149ee21..1f79c4a3 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index c703e95b..a37264cc 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index e1dace8a..b115a202 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") From 8e2248c83c4be7a9b9852a21ed75cc41e115a562 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 04:00:11 -0500 Subject: [PATCH 1024/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 035a5cc7..bb623259 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-26 + +### Changed + +- **ALL LXC's** + - Add an option to disable IPv6 (Advanced) + ## 2023-01-25 ### Changed From 2dede961bda88e7e91b38f04fbde5b50cbb0056c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 12:59:02 -0500 Subject: [PATCH 1025/3335] Update adguard-v5-install.sh free port 53 --- install/adguard-v5-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 562c14ab..583b6df8 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -89,6 +89,8 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" +echo "DNSStubListener=no" >>/etc/systemd/resolved.conf +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh $STD bash install.sh rm install.sh From f416b876d041e66bc5997fdfd8c09daa4591c429 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 13:06:39 -0500 Subject: [PATCH 1026/3335] Update adguard-v5-install.sh --- install/adguard-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 583b6df8..e2b5d69c 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -91,6 +91,7 @@ msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" echo "DNSStubListener=no" >>/etc/systemd/resolved.conf ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf +systemctl restart systemd-resolved wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh $STD bash install.sh rm install.sh From b16e58b370ebf6aca2674fbc2a1910bb509b342e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 13:09:02 -0500 Subject: [PATCH 1027/3335] Update adguard-v5-install.sh --- install/adguard-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index e2b5d69c..39d61741 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -91,7 +91,7 @@ msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" echo "DNSStubListener=no" >>/etc/systemd/resolved.conf ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -systemctl restart systemd-resolved +#systemctl restart systemd-resolved wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh $STD bash install.sh rm install.sh From 2c5190855785c13367097a9908f7e0234ac9ca64 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 14:13:49 -0500 Subject: [PATCH 1028/3335] Update adguard-v5-install.sh free port 53 without reboot --- install/adguard-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 39d61741..7b3711ab 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -89,9 +89,9 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" +systemctl stop systemd-resolved echo "DNSStubListener=no" >>/etc/systemd/resolved.conf ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -#systemctl restart systemd-resolved wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh $STD bash install.sh rm install.sh From 030c4927e7e912a9cbbc69fee3552016a51565bf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 17:51:02 -0500 Subject: [PATCH 1029/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 0cc1acb4..8db47e6b 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -325,6 +325,7 @@ function advanced_settings() { } function install_script() { + ARCH_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -418,7 +419,6 @@ fi } clear -ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From 2a33c86cfb4151a1c19ca6516ba7c9af29952f91 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 17:57:32 -0500 Subject: [PATCH 1030/3335] Update homeassistant-core-v5.sh add arch check --- ct/homeassistant-core-v5.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 8db47e6b..33862ce0 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -75,7 +75,14 @@ function PVE_CHECK() { exit fi } - +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -325,7 +332,6 @@ function advanced_settings() { } function install_script() { - ARCH_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -419,6 +425,7 @@ fi } clear +ARCH_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From ed1e623a287b002b6d5476a3365e4d82bcc2dbc8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 18:00:56 -0500 Subject: [PATCH 1031/3335] Update homeassistant-core-v5.sh --- ct/homeassistant-core-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 33862ce0..1d67e929 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -83,6 +83,7 @@ function ARCH_CHECK() { sleep 2 exit fi + } if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) From bc6ac71bc648c8b3800b78171fd81e58ab441b82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Jan 2023 20:19:10 -0500 Subject: [PATCH 1032/3335] Update adguard-v5.sh --- ct/adguard-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 817bb5fd..daf5027a 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -137,7 +137,7 @@ function default_settings() { MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" From 8307bbe86c6e81a753ab021dc3a40b64661b2675 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 01:33:16 -0500 Subject: [PATCH 1033/3335] Update influxdb-v5-install.sh fix sources --- install/influxdb-v5-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 5affc2de..0ab4978d 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -93,9 +93,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" $STD apt-key add <(curl -fsSL https://repos.influxdata.com/influxdb.key) -cat </etc/apt/sources.list.d/influxdb.list -deb https://repos.influxdata.com/debian bullseye stable -EOF +sh -c 'echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" > sudo tee /etc/apt/sources.list.d/influxdb.list' msg_ok "Set up InfluxDB Repository" read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt From 40ad663997f4865a13a737f474a4c10f18f51e96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 02:01:45 -0500 Subject: [PATCH 1034/3335] update sources --- install/hyperion-v5-install.sh | 4 +--- install/nginxproxymanager-v5-install.sh | 4 +--- install/scrypted-v5-install.sh | 4 +--- install/syncthing-v5-install.sh | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 05558e6b..b3eed082 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -92,9 +92,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Hyperion" wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg -cat </etc/apt/sources.list.d/hyperion.list -deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ bullseye main -EOF +sh -c 'echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/hyperion.list' $STD apt-get update $STD apt-get install -y hyperion $STD systemctl enable --now hyperion@root.service diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 7fb0efa9..e97c311e 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -114,9 +114,7 @@ msg_ok "Installed Python" msg_info "Installing Openresty" $STD apt-key add <(curl -fsSL https://openresty.org/package/pubkey.gpg) -cat </etc/apt/sources.list.d/openresty.list -deb http://openresty.org/package/debian bullseye openresty -EOF +sh -c 'echo "deb http://openresty.org/package/debian $(lsb_release -cs) openresty" > /etc/apt/sources.list.d/openresty.list' $STD apt-get -y update $STD apt-get -y install --no-install-recommends openresty msg_ok "Installed Openresty" diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index f0694686..4118fab3 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -153,9 +153,7 @@ fi if [[ $CORAL == "Y" ]]; then msg_info "Adding Coral Edge TPU Support" $STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) -cat </etc/apt/sources.list.d/coral-edgetpu.list -deb https://packages.cloud.google.com/apt coral-edgetpu-stable main -EOF +sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list' $STD apt-get -y update $STD apt-get -y install libedgetpu1-std msg_ok "Coral Edge TPU Support Added" diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index dd5d92f7..f8370423 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -90,9 +90,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Syncthing" curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg -cat </etc/apt/sources.list.d/syncthing.list -deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable -EOF +sh -c 'echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list' $STD apt-get update $STD apt-get install -y syncthing $STD systemctl enable syncthing@root.service From 454f8d696edf958f87dd55848187b18b2760dfe7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 02:40:33 -0500 Subject: [PATCH 1035/3335] Update influxdb-v5-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of 2023-01-26, InfluxData’s Linux packaging signing key has been rotated. --- install/influxdb-v5-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 0ab4978d..e3f506c3 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -92,8 +92,9 @@ $STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" -$STD apt-key add <(curl -fsSL https://repos.influxdata.com/influxdb.key) -sh -c 'echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" > sudo tee /etc/apt/sources.list.d/influxdb.list' +wget -q https://repos.influxdata.com/influxdata-archive_compat.key +$STD gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key +sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' msg_ok "Set up InfluxDB Repository" read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt From 076789ca79261111a92de95623c0a1d758ef8d42 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 02:46:08 -0500 Subject: [PATCH 1036/3335] Update influxdb-v5-install.sh --- install/influxdb-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index e3f506c3..ed09402b 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -94,6 +94,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" wget -q https://repos.influxdata.com/influxdata-archive_compat.key $STD gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key +$STD cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' msg_ok "Set up InfluxDB Repository" From f3727c347ac8ba2f12e7940c812ac5ac8d5aa08f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 02:50:05 -0500 Subject: [PATCH 1037/3335] Update influxdb-v5-install.sh --- install/influxdb-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index ed09402b..8fcdca35 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -94,7 +94,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" wget -q https://repos.influxdata.com/influxdata-archive_compat.key $STD gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key -$STD cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg +cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' msg_ok "Set up InfluxDB Repository" From db0a396df56d189d30c5c6cb0a3e95e8bc00d9c7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 02:58:08 -0500 Subject: [PATCH 1038/3335] Update influxdb-v5-install.sh --- install/influxdb-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 8fcdca35..68e31c7d 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -93,7 +93,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" wget -q https://repos.influxdata.com/influxdata-archive_compat.key -$STD gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key +gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' msg_ok "Set up InfluxDB Repository" From f750bb61593c795ddd51e1168081ce48e859a3aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 04:11:05 -0500 Subject: [PATCH 1039/3335] Update influxdb-v5-install.sh final fix for signing key rotation --- install/influxdb-v5-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 68e31c7d..7efc4406 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -93,8 +93,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" wget -q https://repos.influxdata.com/influxdata-archive_compat.key -gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key -cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null +cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' msg_ok "Set up InfluxDB Repository" From c360a680f8e8dab8e9c34a8e2463470e798c905f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 09:53:43 -0500 Subject: [PATCH 1040/3335] Create clean-lxcs.sh --- misc/clean-lxcs.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 misc/clean-lxcs.sh diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh new file mode 100644 index 00000000..bc7ce5c0 --- /dev/null +++ b/misc/clean-lxcs.sh @@ -0,0 +1,70 @@ +#!/bin/bash +function header_info { + cat <<"EOF" + ________ __ _ ________ + / ____/ /__ ____ _____ / / | |/ / ____/ + / / / / _ \/ __ `/ __ \ / / | / / +/ /___/ / __/ /_/ / / / / / /___/ / /___ +\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ + +EOF +} +set -e +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +CM='\xE2\x9C\x94\033' +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +clear +header_info +while true; do + read -p "This Will Clean logs, cache and update apt lists on all LXC Containers. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +clear +containers=$(pct list | tail -n +2 | cut -f1 -d' ') + +function clean_container() { + container=$1 + clear + header_info + echo -e "${BL}[Info]${GN} Cleaning${BL} $container${CL} \n" + pct exec $container -- bash -c "apt-get -y autoremove && apt-get -y autoclean && rm -rf /var/{cache,log}/* /var/lib/apt/lists/* && apt-get update" +} +read -p "Skip stopped containers? " -n 1 -r +echo +if [[ ! $REPLY =~ ^[Yy]$ ]]; then + skip=no +else + skip=yes +fi + +for container in $containers; do + status=$(pct status $container) + if [ "$skip" == "no" ]; then + if [ "$status" == "status: stopped" ]; then + echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" + pct start $container + echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" + sleep 5 + clean_container $container + echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" + pct shutdown $container & + elif [ "$status" == "status: running" ]; then + clean_container $container + fi + fi + if [ "$skip" == "yes" ]; then + if [ "$status" == "status: running" ]; then + clean_container $container + fi + fi +done +wait + +echo -e "${GN} Finished, All Containers Cleaned. ${CL} \n" From 4cc322d240a51af48648522740f3b6d159a00e74 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 10:00:29 -0500 Subject: [PATCH 1041/3335] Update clean-lxcs.sh --- misc/clean-lxcs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index bc7ce5c0..3c7c2aa3 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -66,5 +66,6 @@ for container in $containers; do fi done wait - +clear +header_info echo -e "${GN} Finished, All Containers Cleaned. ${CL} \n" From 1c327f96a5324c6b117cfc061422652aad313c37 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 10:56:20 -0500 Subject: [PATCH 1042/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index bb623259..7ae1401d 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-27 + +### Changed + +- **LXC Cleaner** + - NEW Script + ## 2023-01-26 ### Changed From 24d94e089d6e1bfab4217208804b5babc950f043 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 20:58:38 -0500 Subject: [PATCH 1043/3335] Update debian-v5.sh --- ct/debian-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 9f007fb1..3aa0fb10 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -380,7 +380,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ From 1a8a13423cb21ad37fd4a9fc17e274e7377add35 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 21:15:50 -0500 Subject: [PATCH 1044/3335] immediately enforce disable IPv6 (#993) --- install/adguard-v5-install.sh | 5 +++-- install/autobrr-v5-install.sh | 5 +++-- install/blocky-v5-install.sh | 5 +++-- install/casaos-v5-install.sh | 5 +++-- install/changedetection-v5-install.sh | 5 +++-- install/cronicle-v5-install.sh | 5 +++-- install/daemonsync-v5-install.sh | 5 +++-- install/dashy-v5-install.sh | 5 +++-- install/debian-v5-install.sh | 5 +++-- install/deconz-v5-install.sh | 5 +++-- install/deluge-v5-install.sh | 5 +++-- install/docker-v5-install.sh | 5 +++-- install/emby-v5-install.sh | 5 +++-- install/emqx-v5-install.sh | 5 +++-- install/esphome-v5-install.sh | 5 +++-- install/grafana-v5-install.sh | 5 +++-- install/grocy-v5-install.sh | 5 +++-- install/heimdalldashboard-v5-install.sh | 5 +++-- install/homeassistant-core-v5-install.sh | 5 +++-- install/homeassistant-v5-install.sh | 5 +++-- install/homebridge-v5-install.sh | 5 +++-- install/homepage-v5-install.sh | 5 +++-- install/homer-v5-install.sh | 5 +++-- install/hyperion-v5-install.sh | 5 +++-- install/influxdb-v5-install.sh | 5 +++-- install/iobroker-v5-install.sh | 5 +++-- install/jellyfin-v5-install.sh | 5 +++-- install/k0s-v5-install.sh | 5 +++-- install/kavita-v5-install.sh | 5 +++-- install/keycloak-v5-install.sh | 5 +++-- install/lidarr-v5-install.sh | 5 +++-- install/magicmirror-v5-install.sh | 5 +++-- install/mariadb-v5-install.sh | 5 +++-- install/meshcentral-v5-install.sh | 5 +++-- install/motioneye-v5-install.sh | 5 +++-- install/mqtt-v5-install.sh | 5 +++-- install/n8n-v5-install.sh | 5 +++-- install/navidrome-v5-install.sh | 5 +++-- install/nextcloudpi-v5-install.sh | 5 +++-- install/nginxproxymanager-v5-install.sh | 5 +++-- install/nocodb-v5-install.sh | 5 +++-- install/node-red-v5-install.sh | 5 +++-- install/omada-v5-install.sh | 5 +++-- install/omv-v5-install.sh | 5 +++-- install/openhab-v5-install.sh | 5 +++-- install/paperless-ngx-v5-install.sh | 5 +++-- install/photoprism-v5-install.sh | 5 +++-- install/pihole-v5-install.sh | 5 +++-- install/plex-v5-install.sh | 5 +++-- install/podman-homeassistant-v5-install.sh | 5 +++-- install/podman-v5-install.sh | 5 +++-- install/postgresql-v5-install.sh | 5 +++-- install/prometheus-v5-install.sh | 5 +++-- install/prowlarr-v5-install.sh | 5 +++-- install/radarr-v5-install.sh | 5 +++-- install/readarr-v5-install.sh | 5 +++-- install/sabnzbd-v5-install.sh | 5 +++-- install/scrypted-v5-install.sh | 5 +++-- install/shinobi-v5-install.sh | 5 +++-- install/sonarr-v5-install.sh | 5 +++-- install/syncthing-v5-install.sh | 5 +++-- install/tdarr-v5-install.sh | 5 +++-- install/technitiumdns-v5-install.sh | 5 +++-- install/transmission-v5-install.sh | 5 +++-- install/trilium-v5-install.sh | 5 +++-- install/ubuntu-v5-install.sh | 5 +++-- install/umbrel-v5-install.sh | 5 +++-- install/unifi-v5-install.sh | 5 +++-- install/uptimekuma-v5-install.sh | 5 +++-- install/vaultwarden-v5-install.sh | 5 +++-- install/whisparr-v5-install.sh | 5 +++-- install/whoogle-v5-install.sh | 5 +++-- install/wikijs-v5-install.sh | 5 +++-- install/wireguard-v5-install.sh | 5 +++-- install/yunohost-v5-install.sh | 5 +++-- install/zigbee2mqtt-v5-install.sh | 5 +++-- install/zwave-js-ui-v5-install.sh | 5 +++-- 77 files changed, 231 insertions(+), 154 deletions(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 7b3711ab..497b3a81 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index c66c362c..9c54ff2a 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index f4f9d698..b1b80f4b 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 98e7ae77..1a2358fc 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index da5891f1..bf528d16 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index dc0dbd07..85be2f0a 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index f5f9408b..4281260e 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 4e4a084f..14f76bef 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index f89c2ffb..3a525e6b 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 5b689847..0235e7de 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 963dbe93..19f9449d 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 5d4d19bb..762327dd 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 29d38f1b..ffe06b70 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 26b8daa5..c8fadb4b 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index e4fbcc58..0504c6c9 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index d9dbcdfc..29e171c9 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index c56342c7..d847d5a6 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index a1fc064b..a94d230d 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 2b3a3333..c4663502 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index cb5c9ccf..eaed502e 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 3aedb557..6526111b 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index b2d8ada4..eca56674 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 9f2db9fa..e4f564d5 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index b3eed082..62dd33fc 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 7efc4406..f5becf2e 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index a59032a8..96db7e0b 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 17683b67..99df1d57 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index ab239220..a87798ad 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index bbf7bc1a..b76e7979 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -14,7 +15,7 @@ CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 53e03b5c..4370ce4d 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index f541f553..653c2d7e 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 9f47644a..f347ba92 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index a705ad23..7e5b2265 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index c5e5ed15..e4085bed 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 6dd05e2e..77a8f558 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index b75ccd39..7b2893bb 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 677f21b5..e03de40c 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 8ef3f859..c035e760 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index e6092393..e0cb1628 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index e97c311e..eacab824 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 15b515bc..1700c038 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index de324a32..20359660 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 30191935..9dabc392 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 9a1801a6..19e6c069 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -21,7 +22,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 1649094c..4ef6fe28 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 496ae80a..2d3864e0 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index d8831deb..ca60b3df 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -21,7 +22,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 091351f5..e8776260 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -21,7 +22,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 64d33251..93bb66d3 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 20d9c70c..e7831240 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 9fdad038..f893c4d0 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 48d20364..16a24da2 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index de31eb50..5eaad18a 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index f22ccc1a..ace1fe80 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 4f262889..57434a87 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index a776b2cf..b621cb7a 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index fd8b2d51..964f2de7 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 4118fab3..53c2e62d 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 838718b8..b78a3eb2 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index fbbac3ac..d70ec352 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -21,7 +22,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index f8370423..3a78362e 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 8594d8a0..0121ef51 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index add94e24..28de985b 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index d6ead82b..436f527a 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 617ec96d..b4fe4f89 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index d5371ab6..abb5e42f 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 841be405..448920c3 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index ec68eaad..80b4562d 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi #https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -21,7 +22,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 5d088390..29af2997 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 9d107133..4ad15ac4 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 7f005241..9cd11da7 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 5fdd8338..659b2d36 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index b138e039..b90beae5 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index c92487b2..06d3cc3f 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 1f79c4a3..02ec6fc8 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index a37264cc..8eae1c36 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index b115a202..3ce383d8 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } if [ "$VERBOSE" == "yes" ]; then set -x; fi -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -20,7 +21,7 @@ set -o pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR -silent() { "$@" > /dev/null 2>&1; } + function error_exit() { trap - ERR local reason="Unknown failure occurred." From 13ece7ef08a236123e72d1b2eb8a3f0608b497ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 21:18:24 -0500 Subject: [PATCH 1045/3335] Update debian-v5.sh switch branch --- ct/debian-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 3aa0fb10..9f007fb1 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -380,7 +380,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/install/$var_install.sh)" || exit +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ From e075b4954a9f87ed4e73144806bcca272f7cc7ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 22:09:23 -0500 Subject: [PATCH 1046/3335] Update pihole-v5-install.sh free port 53 --- install/pihole-v5-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index e8776260..2133980b 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -93,6 +93,9 @@ $STD apt-get install -y ntp msg_ok "Installed Dependencies" msg_info "Installing Pi-hole" +systemctl stop systemd-resolved +echo "DNSStubListener=no" >>/etc/systemd/resolved.conf +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf mkdir -p /etc/pihole/ cat </etc/pihole/setupVars.conf PIHOLE_INTERFACE=eth0 From 32c38611ae72224957454842e2ad4a892bd4a5a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Jan 2023 22:10:14 -0500 Subject: [PATCH 1047/3335] Update technitiumdns-v5-install.sh free port 53 --- install/technitiumdns-v5-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 28de985b..76abf611 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -90,6 +90,9 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Technitium DNS" +systemctl stop systemd-resolved +echo "DNSStubListener=no" >>/etc/systemd/resolved.conf +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" From 5328b66cdf7e46c7a3825385bd8262bdfc3173bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Jan 2023 10:31:11 -0500 Subject: [PATCH 1048/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7ae1401d..e0713191 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-01-28 + +### Changed + +- **LXC Cleaner** + - Pulled due to Issues with some Apps + ## 2023-01-27 ### Changed From 24eb8ad256162aa4d7e9b48eac3bd0952cadcca9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Jan 2023 16:16:55 -0500 Subject: [PATCH 1049/3335] Update clean-lxcs.sh code refactoring --- misc/clean-lxcs.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 3c7c2aa3..21d4f892 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -18,6 +18,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") clear header_info +echo -e "\n ${RD} USE AT YOUR OWN RISK. Deleting logs/cache may result in some apps/services broken!${CL} \n" while true; do read -p "This Will Clean logs, cache and update apt lists on all LXC Containers. Proceed(y/n)?" yn case $yn in @@ -28,13 +29,13 @@ while true; do done clear containers=$(pct list | tail -n +2 | cut -f1 -d' ') - function clean_container() { container=$1 clear header_info - echo -e "${BL}[Info]${GN} Cleaning${BL} $container${CL} \n" - pct exec $container -- bash -c "apt-get -y autoremove && apt-get -y autoclean && rm -rf /var/{cache,log}/* /var/lib/apt/lists/* && apt-get update" + name=`pct exec $container hostname` + echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" + pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/dev/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } read -p "Skip stopped containers? " -n 1 -r echo @@ -68,4 +69,4 @@ done wait clear header_info -echo -e "${GN} Finished, All Containers Cleaned. ${CL} \n" +echo -e "${GN} Finished, Containers Cleaned. ${CL} \n" From 118a7d705478e26e3358d0b46ee45de1e7210b17 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Jan 2023 16:17:46 -0500 Subject: [PATCH 1050/3335] Create clean.sh --- misc/clean.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 misc/clean.sh diff --git a/misc/clean.sh b/misc/clean.sh new file mode 100644 index 00000000..331bbbe3 --- /dev/null +++ b/misc/clean.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ________ __ _ ________ + / ____/ /__ ____ _____ / / | |/ / ____/ + / / / / _ \/ __ `/ __ \ / / | / / +/ /___/ / __/ /_/ / / / / / /___/ / /___ +\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ + +EOF +} +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +name=$(hostname) +clear +header_info +echo -e "${BL}[Info]${GN} Cleaning $name${CL}" +cache=$(find /var/cache/ -type f) + if [[ -z "$cache" ]]; then + echo -e "It appears there are no cached files on your system. \n" + sleep 2 + else + echo -e "$cache \n" + echo -e "${GN}Cache in $name${CL}" + read -p "Would you like to remove the selected cache listed above? [y/n] " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Removing cache" + find /var/cache -type f -delete + echo "Successfully Removed cache" + sleep 2 + fi + fi +clear +header_info +echo -e "${BL}[Info]${GN} Cleaning $name${CL}" +logs=$(find /var/log/ -type f) + if [[ -z "$logs" ]]; then + echo -e "It appears there are no logs on your system. \n" + sleep 2 + else + echo -e "$logs \n" + echo -e "${GN}Logs in $name${CL}" + read -p "Would you like to remove the selected logs listed above? [y/n]" -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Removing logs" + find /var/log -type f -delete + echo "Successfully Removed logs" + sleep 2 + fi + fi + clear + header_info + echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" + echo -e "${GN}Populating apt lists${CL} \n" From 73582a907e09f1e56bab74fe0f04f82c5cd0b78e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Jan 2023 16:46:40 -0500 Subject: [PATCH 1051/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index e0713191..08530649 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **LXC Cleaner** - - Pulled due to Issues with some Apps + - Code refactoring to let the user decide if cache or logs gets deleted for each app/service. ## 2023-01-27 From 6d341109c58d97686273c3faad3308465f60ef7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Jan 2023 16:56:58 -0500 Subject: [PATCH 1052/3335] Update clean-lxcs.sh tweak --- misc/clean-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 21d4f892..f94141e7 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -37,7 +37,7 @@ function clean_container() { echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/dev/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } -read -p "Skip stopped containers? " -n 1 -r +read -p "Skip stopped containers? [y/N]" -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then skip=no From fcdd5a460ff7dd56de196ce3ea98a89c8fd6b24a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Jan 2023 18:45:40 -0500 Subject: [PATCH 1053/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 08530649..dd704742 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - **LXC Cleaner** - Code refactoring to let the user decide if cache or logs gets deleted for each app/service. + - Leaves directory structure intact ## 2023-01-27 From ecd56591b699f7f8d561a072a937fdedea9acd17 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 02:41:12 -0500 Subject: [PATCH 1054/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 80bd78cc..a47b3f08 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -51,7 +51,7 @@ function update_container() { fi } header_info -read -p "Skip stopped containers? " -n 1 -r +read -p "Skip stopped containers? [y/N]" -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then skip=no From 92f11b76609645acaa10532080e1c5e4d0af5327 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 10:04:48 -0500 Subject: [PATCH 1055/3335] Update clean-lxcs.sh fix curl path --- misc/clean-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index f94141e7..4bda3c1a 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -35,7 +35,7 @@ function clean_container() { header_info name=`pct exec $container hostname` echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" - pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/dev/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" + pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/main/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } read -p "Skip stopped containers? [y/N]" -n 1 -r echo From c9e3b72dfa60d0375ea44d7e66c9d732c8552871 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 11:01:07 -0500 Subject: [PATCH 1056/3335] Update clean.sh tweak --- misc/clean.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index 331bbbe3..8d80649e 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -15,7 +15,7 @@ CL=$(echo "\033[m") name=$(hostname) clear header_info -echo -e "${BL}[Info]${GN} Cleaning $name${CL}" +echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" cache=$(find /var/cache/ -type f) if [[ -z "$cache" ]]; then echo -e "It appears there are no cached files on your system. \n" @@ -34,7 +34,7 @@ cache=$(find /var/cache/ -type f) fi clear header_info -echo -e "${BL}[Info]${GN} Cleaning $name${CL}" +echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" logs=$(find /var/log/ -type f) if [[ -z "$logs" ]]; then echo -e "It appears there are no logs on your system. \n" From 6b3d7a7bf81273cd8c923180f217d7d4886f0a30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 15:20:01 -0500 Subject: [PATCH 1057/3335] Update clean.sh tweak --- misc/clean.sh | 75 ++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index 8d80649e..00856aa2 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -function header_info { + +function header_info() { cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ @@ -9,49 +10,57 @@ function header_info { EOF } + BL=$(echo "\033[36m") GN=$(echo "\033[1;92m") CL=$(echo "\033[m") name=$(hostname) + clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" + +# Clean cache cache=$(find /var/cache/ -type f) - if [[ -z "$cache" ]]; then - echo -e "It appears there are no cached files on your system. \n" +if [[ -z "$cache" ]]; then + echo -e "It appears there are no cached files on your system. \n" + sleep 2 +else + echo -e "$cache \n" + echo -e "${GN}Cache in $name${CL}" + read -p "Would you like to remove the selected cache listed above? [y/n] " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Removing cache" + find /var/cache -type f -delete + echo "Successfully Removed cache" sleep 2 - else - echo -e "$cache \n" - echo -e "${GN}Cache in $name${CL}" - read -p "Would you like to remove the selected cache listed above? [y/n] " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Removing cache" - find /var/cache -type f -delete - echo "Successfully Removed cache" - sleep 2 - fi - fi + fi +fi + +# Clean logs clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" logs=$(find /var/log/ -type f) - if [[ -z "$logs" ]]; then - echo -e "It appears there are no logs on your system. \n" +if [[ -z "$logs" ]]; then + echo -e "It appears there are no logs on your system. \n" + sleep 2 +else + echo -e "$logs \n" + echo -e "${GN}Logs in $name${CL}" + read -p "Would you like to remove the selected logs listed above? [y/n]" -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Removing logs" + find /var/log -type f -delete + echo "Successfully Removed logs" sleep 2 - else - echo -e "$logs \n" - echo -e "${GN}Logs in $name${CL}" - read -p "Would you like to remove the selected logs listed above? [y/n]" -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Removing logs" - find /var/log -type f -delete - echo "Successfully Removed logs" - sleep 2 - fi - fi - clear - header_info - echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" - echo -e "${GN}Populating apt lists${CL} \n" + fi +fi + +# Populate apt lists +clear +header_info +echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" +echo -e "${GN}Populating apt lists${CL} \n" From f067bc6e86d10f470263d1b026f31c6ba3128de3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 15:38:57 -0500 Subject: [PATCH 1058/3335] Update clean.sh --- misc/clean.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index 00856aa2..eaa83cd1 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - function header_info() { cat <<"EOF" ________ __ _ ________ @@ -10,17 +9,13 @@ function header_info() { EOF } - BL=$(echo "\033[36m") GN=$(echo "\033[1;92m") CL=$(echo "\033[m") name=$(hostname) - clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" - -# Clean cache cache=$(find /var/cache/ -type f) if [[ -z "$cache" ]]; then echo -e "It appears there are no cached files on your system. \n" @@ -37,8 +32,6 @@ else sleep 2 fi fi - -# Clean logs clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" @@ -49,7 +42,7 @@ if [[ -z "$logs" ]]; then else echo -e "$logs \n" echo -e "${GN}Logs in $name${CL}" - read -p "Would you like to remove the selected logs listed above? [y/n]" -n 1 -r + read -p "Would you like to remove the selected logs listed above? [y/n] " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "Removing logs" @@ -58,8 +51,6 @@ else sleep 2 fi fi - -# Populate apt lists clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" From 04bc43f06f83f2c6e9dc357f7c547ad3b6e1168f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 16:36:03 -0500 Subject: [PATCH 1059/3335] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5334d58e..6e495fb8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ +These script's creates a Linux container in an interactive manner, with Default settings available for a straightforward LXC creation.
If the user selects Advanced, they are presented with additional options, such as choosing the type of container (privileged or unprivileged), setting the root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects the user's input, validates it, and applies the appropriate values. The final configuration of the container is then generated based on the user's input.
+

Proxmox Helper Scripts

-
Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
+
Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
From 1b78baa78f6a3ceb4edd87b21c3a843b66f7a938 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 16:39:23 -0500 Subject: [PATCH 1060/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e495fb8..b04213e4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -These script's creates a Linux container in an interactive manner, with Default settings available for a straightforward LXC creation.
If the user selects Advanced, they are presented with additional options, such as choosing the type of container (privileged or unprivileged), setting the root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects the user's input, validates it, and applies the appropriate values. The final configuration of the container is then generated based on the user's input.
+These script's creates a Linux container or virtual machine in an interactive manner, with Default settings available for a straightforward LXC/VM creation.
If the user selects Advanced, they are presented with additional options, such as choosing the type of container (privileged or unprivileged), setting the root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects the user's input, validates it, and applies the appropriate values. The final configuration of the container or virtual machine is then generated based on the user's input.

Proxmox Helper Scripts

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
From 308ffc8dda80e2ca43471c7c6fb8a4500fbee6a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Jan 2023 16:43:29 -0500 Subject: [PATCH 1061/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b04213e4..d548402a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -These script's creates a Linux container or virtual machine in an interactive manner, with Default settings available for a straightforward LXC/VM creation.
If the user selects Advanced, they are presented with additional options, such as choosing the type of container (privileged or unprivileged), setting the root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects the user's input, validates it, and applies the appropriate values. The final configuration of the container or virtual machine is then generated based on the user's input.
+These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup provides additional options such as container type, root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox Helper Scripts

Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
From 616dd24616b2b66277e93a979c81cda0bbb95f0b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 31 Jan 2023 03:40:43 -0500 Subject: [PATCH 1062/3335] Update code-server.sh pve check --- misc/code-server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/code-server.sh b/misc/code-server.sh index cb55416b..03285dcb 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -40,6 +40,7 @@ function error_exit() { } clear header_info +if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in From 55077eba6c53853052e65174027c4736b0e9e015 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 31 Jan 2023 04:28:36 -0500 Subject: [PATCH 1063/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index dd704742..f4cf8cf6 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed - **LXC Cleaner** - - Code refactoring to let the user decide if cache or logs gets deleted for each app/service. + - Code refactoring to give the user the option to choose whether cache or logs will be deleted for each app/service. - Leaves directory structure intact ## 2023-01-27 From 536ff87b5ff7ef1aaa94fa4e067902dad7650766 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 31 Jan 2023 14:58:55 -0500 Subject: [PATCH 1064/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d548402a..acdc8c2d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup provides additional options such as container type, root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox Helper Scripts

-
Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.
+
Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From c2593306446c8157a3c00955cec706e90cf0e3ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 31 Jan 2023 22:14:37 -0500 Subject: [PATCH 1065/3335] Update haos-vm-v5.sh full random mac --- vm/haos-vm-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 2f41df72..0f2cb0b6 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -12,7 +12,7 @@ EOF clear header_info echo -e "\n Loading..." -GEN_MAC=$(echo 'AE 1A 60'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +GEN_MAC=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') From 4da7e6be7ce685f4acb46c2ecb787d8e5aaf4d4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Feb 2023 10:31:05 -0500 Subject: [PATCH 1066/3335] Update haos-vm-v5.sh revert --- vm/haos-vm-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 0f2cb0b6..2f41df72 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -12,7 +12,7 @@ EOF clear header_info echo -e "\n Loading..." -GEN_MAC=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') +GEN_MAC=$(echo 'AE 1A 60'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') From b2b065d77d0eca501f82bb8b382ae33fce63cf8c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Feb 2023 11:06:59 -0500 Subject: [PATCH 1067/3335] Update haos-vm-v5.sh ensure unicast random mac address --- vm/haos-vm-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 2f41df72..445f7f90 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -12,7 +12,7 @@ EOF clear header_info echo -e "\n Loading..." -GEN_MAC=$(echo 'AE 1A 60'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +GEN_MAC=02:$(openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') From bc651fc074a80721506860b1171dbd6e083cbd31 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Feb 2023 20:46:19 -0500 Subject: [PATCH 1068/3335] Create audiobookshelf-v5-install.sh --- install/audiobookshelf-v5-install.sh | 124 +++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 install/audiobookshelf-v5-install.sh diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh new file mode 100644 index 00000000..13e8a432 --- /dev/null +++ b/install/audiobookshelf-v5-install.sh @@ -0,0 +1,124 @@ +#!/usr/bin/env bash +silent() { "$@" > /dev/null 2>&1; } +if [ "$VERBOSE" == "yes" ]; then set -x; fi +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +NUM=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +while [ "$(hostname -I)" = "" ]; do + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + ((NUM--)) + if [ $NUM -eq 0 ]; then + echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + exit 1 + fi +done +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +alias die='' +if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +alias die='EXIT=$? LINE=$LINENO error_exit' +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing audiobookshelf" +$STD apt-key add <(curl -s --compressed "https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg") +sh -c 'echo "deb https://advplyr.github.io/audiobookshelf-ppa ./" > /etc/apt/sources.list.d/audiobookshelf.list' +$STD apt-get update +$STD apt install audiobookshelf +msg_ok "Installed audiobookshelf" + +PASS=$(grep -w "root" /etc/shadow | cut -b6) +echo "export TERM='xterm-256color'" >>/root/.bashrc +if [[ $PASS != $ ]]; then + msg_info "Customizing Container" + chmod -x /etc/update-motd.d/* + touch ~/.hushlogin + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd +fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 5f4c8b967ab31eab2d55e4a0a4ddb270c7dbe5cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Feb 2023 20:47:50 -0500 Subject: [PATCH 1069/3335] Create audiobookshelf-v5.sh --- ct/audiobookshelf-v5.sh | 390 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 ct/audiobookshelf-v5.sh diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh new file mode 100644 index 00000000..ad90c03c --- /dev/null +++ b/ct/audiobookshelf-v5.sh @@ -0,0 +1,390 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ___ __ __ __ ______ + ____ ___ ______/ (_)___v5/ /_ ____ ____ / /_______/ /_ ___ / / __/ + / __ `/ / / / __ / / __ \/ __ \/ __ \/ __ \/ //_/ ___/ __ \/ _ \/ / /_ +/ /_/ / /_/ / /_/ / / /_/ / /_/ / /_/ / /_/ / ,< (__ ) / / / __/ / __/ +\__,_/\__,_/\__,_/_/\____/_.___/\____/\____/_/|_/____/_/ /_/\___/_/_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="audiobookshelf" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +ARCH_CHECK +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:13378${CL} \n" From eec85f39e734427dd499ffc1c2a4bf1d12f2dc9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Feb 2023 21:12:25 -0500 Subject: [PATCH 1070/3335] Create rockylinux-v5.sh --- ct/rockylinux-v5.sh | 393 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 393 insertions(+) create mode 100644 ct/rockylinux-v5.sh diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh new file mode 100644 index 00000000..8cf707f2 --- /dev/null +++ b/ct/rockylinux-v5.sh @@ -0,0 +1,393 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ __ __ _ + / __ \____ _____/ /____ __ / / (_)___v5__ ___ __ + / /_/ / __ \/ ___/ //_/ / / / / / / / __ \/ / / / |/_/ + / _, _/ /_/ / /__/ ,< / /_/ / / /___/ / / / / /_/ /> < +/_/ |_|\____/\___/_/|_|\__, / /_____/_/_/ /_/\__,_/_/|_| + /____/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Rocky Linux" +var_disk="1" +var_cpu="1" +var_ram="512" +var_os="rockylinux" +var_version="9" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/pacman.d ]]; then + msg_error "No ${APP} Installation Found!"; + exit + fi + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}archlinux${CL}" + PW="-password rockylinux" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="rockylinux" PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + VERB2="" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + VERB2="silent" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating ${APP} LXC" +pacman-key --init +pacman-key --populate archlinux +pacman -Sy archlinux-keyring && pacman -Su +msg_ok "Update Successfull" +exit +} +clear +ARCH_CHECK +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export VERBOSE=$VERB +export STD=$VERB2 +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 108f3ffe5f14c8b248ee62a3603d0e24f3706d2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 Feb 2023 10:35:31 -0500 Subject: [PATCH 1071/3335] Update update-lxcs.sh add rocky -centos-alma --- misc/update-lxcs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index a47b3f08..e4542e09 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function header_info { cat <<"EOF" __ __ __ __ __ _ ________ @@ -41,9 +41,9 @@ function update_container() { if [ "$os" == "alpine" ]; then pct exec $container -- ash -c "apk update && apk upgrade" elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then - pct exec $container -- bash -c "apt-get update && apt-get upgrade -y && apt-get clean && apt-get --purge autoremove -y" - elif [ "$os" == "fedora" ]; then - pct exec $container -- bash -c "dnf -y update && dnf -y upgrade && dnf -y --purge autoremove" + pct exec $container -- bash -c "apt-get update && apt-get -y upgrade" + elif [ "$os" == "fedora" ] || [ "$os" == "rocky" ] || [ "$os" == "centos" ] || [ "$os" == "alma" ]; then + pct exec $container -- bash -c "dnf -y update && dnf -y upgrade" elif [ "$os" == "archlinux" ]; then pct exec $container -- bash -c "pacman -Syyu --noconfirm" else From 7cbbb1b38a27986a59f79babd1249e47db4ff952 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 Feb 2023 11:21:37 -0500 Subject: [PATCH 1072/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f4cf8cf6..1bbf3c61 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,15 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-02-02 + +### Changed + +- **Audiobookshelf LXC** + - NEW Script +- **Rocky Linux LXC** + - NEW Script + ## 2023-01-28 ### Changed From c8aa5a029decffb2d1b8f33b91bb7f50126eaab5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 07:15:15 -0500 Subject: [PATCH 1073/3335] more pruning & code refactoring (#1011) * improve error handling to show more details * improve the way it checks for root password * consistant getty_override * streamline verbose mode * remove v4 scripts * small tweaks --- ct/adguard-v4.sh | 329 ------------------ ct/adguard-v5.sh | 25 +- ct/alpine-v5.sh | 25 +- ct/archlinux-v5.sh | 25 +- ct/audiobookshelf-v5.sh | 25 +- ct/autobrr-v5.sh | 25 +- ct/blocky-v4.sh | 327 ------------------ ct/blocky-v5.sh | 25 +- ct/casaos-v4.sh | 344 ------------------- ct/casaos-v5.sh | 25 +- ct/changedetection-v4.sh | 329 ------------------ ct/changedetection-v5.sh | 25 +- ct/create_lxc.sh | 23 +- ct/cronicle-v5.sh | 25 +- ct/daemonsync-v4.sh | 329 ------------------ ct/daemonsync-v5.sh | 25 +- ct/dashy-v4.sh | 329 ------------------ ct/dashy-v5.sh | 25 +- ct/debian-v4.sh | 326 ------------------ ct/debian-v5.sh | 25 +- ct/deconz-v4.sh | 343 ------------------- ct/deconz-v5.sh | 24 +- ct/deluge-v5.sh | 25 +- ct/docker-v4.sh | 353 ------------------- ct/docker-v5.sh | 25 +- ct/emby-v4.sh | 350 ------------------- ct/emby-v5.sh | 25 +- ct/emqx-v4.sh | 329 ------------------ ct/emqx-v5.sh | 25 +- ct/esphome-v4.sh | 328 ------------------ ct/esphome-v5.sh | 25 +- ct/grafana-v4.sh | 328 ------------------ ct/grafana-v5.sh | 25 +- ct/grocy-v4.sh | 328 ------------------ ct/grocy-v5.sh | 25 +- ct/heimdalldashboard-v4.sh | 328 ------------------ ct/heimdalldashboard-v5.sh | 25 +- ct/homeassistant-core-v4.sh | 343 ------------------- ct/homeassistant-core-v5.sh | 26 +- ct/homeassistant-v4.sh | 357 -------------------- ct/homeassistant-v5.sh | 25 +- ct/homebridge-v4.sh | 328 ------------------ ct/homebridge-v5.sh | 25 +- ct/homepage-v4.sh | 329 ------------------ ct/homepage-v5.sh | 25 +- ct/homer-v5.sh | 25 +- ct/hyperion-v4.sh | 344 ------------------- ct/hyperion-v5.sh | 25 +- ct/influxdb-v4.sh | 326 ------------------ ct/influxdb-v5.sh | 25 +- ct/iobroker-v4.sh | 328 ------------------ ct/iobroker-v5.sh | 25 +- ct/jellyfin-v4.sh | 350 ------------------- ct/jellyfin-v5.sh | 25 +- ct/k0s-v5.sh | 25 +- ct/kavita-v5.sh | 25 +- ct/keycloak-v4.sh | 329 ------------------ ct/keycloak-v5.sh | 25 +- ct/lidarr-v5.sh | 25 +- ct/magicmirror-v4.sh | 329 ------------------ ct/magicmirror-v5.sh | 25 +- ct/mariadb-v4.sh | 326 ------------------ ct/mariadb-v5.sh | 25 +- ct/meshcentral-v4.sh | 328 ------------------ ct/meshcentral-v5.sh | 25 +- ct/motioneye-v4.sh | 328 ------------------ ct/motioneye-v5.sh | 25 +- ct/mqtt-v4.sh | 293 ---------------- ct/mqtt-v5.sh | 25 +- ct/n8n-v4.sh | 329 ------------------ ct/n8n-v5.sh | 25 +- ct/navidrome-v4.sh | 328 ------------------ ct/navidrome-v5.sh | 25 +- ct/nextcloudpi-v4.sh | 329 ------------------ ct/nextcloudpi-v5.sh | 25 +- ct/nginx-proxy-manager-v4.sh | 329 ------------------ ct/nginxproxymanager-v5.sh | 25 +- ct/nocodb-v4.sh | 328 ------------------ ct/nocodb-v5.sh | 25 +- ct/node-red-v4.sh | 328 ------------------ ct/node-red-v5.sh | 25 +- ct/omada-v4.sh | 337 ------------------ ct/omada-v5.sh | 25 +- ct/omv-v4.sh | 339 ------------------- ct/omv-v5.sh | 25 +- ct/openhab-v4.sh | 329 ------------------ ct/openhab-v5.sh | 25 +- ct/paperless-ngx-v4.sh | 329 ------------------ ct/paperless-ngx-v5.sh | 25 +- ct/photoprism-v4.sh | 331 ------------------ ct/photoprism-v5.sh | 25 +- ct/pihole-v4.sh | 328 ------------------ ct/pihole-v5.sh | 25 +- ct/plex-v4.sh | 350 ------------------- ct/plex-v5.sh | 25 +- ct/podman-homeassistant-v4.sh | 354 ------------------- ct/podman-homeassistant-v5.sh | 25 +- ct/podman-v5.sh | 25 +- ct/postgresql-v4.sh | 327 ------------------ ct/postgresql-v5.sh | 25 +- ct/prometheus-v4.sh | 328 ------------------ ct/prometheus-v5.sh | 25 +- ct/prowlarr-v5.sh | 25 +- ct/radarr-v5.sh | 25 +- ct/readarr-v5.sh | 25 +- ct/rockylinux-v5.sh | 25 +- ct/sabnzbd-v5.sh | 25 +- ct/scrypted-v4.sh | 343 ------------------- ct/scrypted-v5.sh | 25 +- ct/shinobi-v4.sh | 338 ------------------- ct/shinobi-v5.sh | 25 +- ct/sonarr-v5.sh | 25 +- ct/syncthing-v4.sh | 330 ------------------ ct/syncthing-v5.sh | 25 +- ct/tdarr-v5.sh | 25 +- ct/technitiumdns-v4.sh | 328 ------------------ ct/technitiumdns-v5.sh | 25 +- ct/transmission-v5.sh | 25 +- ct/trilium-v4.sh | 329 ------------------ ct/trilium-v5.sh | 25 +- ct/ubuntu-v4.sh | 335 ------------------ ct/ubuntu-v5.sh | 25 +- ct/umbrel-v4.sh | 344 ------------------- ct/umbrel-v5.sh | 25 +- ct/unifi-v4.sh | 328 ------------------ ct/unifi-v5.sh | 25 +- ct/uptimekuma-v4.sh | 329 ------------------ ct/uptimekuma-v5.sh | 25 +- ct/vaultwarden-v4.sh | 332 ------------------ ct/vaultwarden-v5.sh | 25 +- ct/whisparr-v5.sh | 25 +- ct/whoogle-v4.sh | 328 ------------------ ct/whoogle-v5.sh | 25 +- ct/wikijs-v4.sh | 329 ------------------ ct/wikijs-v5.sh | 25 +- ct/wireguard-v4.sh | 330 ------------------ ct/wireguard-v5.sh | 25 +- ct/yunohost-v5.sh | 25 +- ct/zigbee2mqtt-v4.sh | 341 ------------------- ct/zigbee2mqtt-v5.sh | 25 +- ct/zwave-js-ui-v4.sh | 343 ------------------- ct/zwave-js-ui-v5.sh | 25 +- install/adguard-install.sh | 119 ------- install/adguard-v5-install.sh | 56 ++- install/audiobookshelf-v5-install.sh | 55 ++- install/autobrr-v5-install.sh | 55 ++- install/blocky-install.sh | 375 --------------------- install/blocky-v5-install.sh | 55 ++- install/casaos-install.sh | 135 -------- install/casaos-v5-install.sh | 56 ++- install/changedetection-install.sh | 134 -------- install/changedetection-v5-install.sh | 55 ++- install/cronicle-v5-install.sh | 55 ++- install/daemonsync-install.sh | 121 ------- install/daemonsync-v5-install.sh | 56 ++- install/dashy-install.sh | 152 --------- install/dashy-v5-install.sh | 56 ++- install/debian-install.sh | 113 ------- install/debian-v5-install.sh | 55 ++- install/deconz-install.sh | 145 -------- install/deconz-v5-install.sh | 55 ++- install/deluge-v5-install.sh | 55 ++- install/docker-install.sh | 176 ---------- install/docker-v5-install.sh | 56 ++- install/emby-install.sh | 135 -------- install/emby-v5-install.sh | 55 ++- install/emqx-install.sh | 119 ------- install/emqx-v5-install.sh | 55 ++- install/esphome-install.sh | 141 -------- install/esphome-v5-install.sh | 56 ++- install/grafana-install.sh | 130 ------- install/grafana-v5-install.sh | 56 ++- install/grocy-install.sh | 158 --------- install/grocy-v5-install.sh | 55 ++- install/heimdalldashboard-install.sh | 152 --------- install/heimdalldashboard-v5-install.sh | 56 ++- install/homeassistant-core-install.sh | 207 ------------ install/homeassistant-core-v5-install.sh | 55 ++- install/homeassistant-install.sh | 360 -------------------- install/homeassistant-v5-install.sh | 56 ++- install/homebridge-install.sh | 131 ------- install/homebridge-v5-install.sh | 56 ++- install/homepage-install.sh | 149 -------- install/homepage-v5-install.sh | 55 ++- install/homer-v5-install.sh | 55 ++- install/hyperion-install.sh | 124 ------- install/hyperion-v5-install.sh | 55 ++- install/influxdb-install.sh | 153 --------- install/influxdb-v5-install.sh | 56 ++- install/iobroker-install.sh | 119 ------- install/iobroker-v5-install.sh | 56 ++- install/jellyfin-install.sh | 159 --------- install/jellyfin-v5-install.sh | 55 ++- install/k0s-v5-install.sh | 55 ++- install/kavita-v5-install.sh | 32 +- install/keycloak-install.sh | 140 -------- install/keycloak-v5-install.sh | 55 ++- install/lidarr-v5-install.sh | 55 ++- install/magicmirror-install.sh | 242 ------------- install/magicmirror-v5-install.sh | 17 +- install/mariadb-install.sh | 136 -------- install/mariadb-v5-install.sh | 56 ++- install/meshcentral-install.sh | 130 ------- install/meshcentral-v5-install.sh | 56 ++- install/motioneye-install.sh | 149 -------- install/motioneye-v5-install.sh | 56 ++- install/mqtt-install.sh | 126 ------- install/mqtt-v5-install.sh | 56 ++- install/n8n-install.sh | 142 -------- install/n8n-v5-install.sh | 56 ++- install/navidrome-install.sh | 169 ---------- install/navidrome-v5-install.sh | 55 ++- install/nextcloudpi-install.sh | 119 ------- install/nextcloudpi-v5-install.sh | 55 ++- install/nginx-proxy-manager-install.sh | 280 --------------- install/nginxproxymanager-v5-install.sh | 56 ++- install/nocodb-install.sh | 148 -------- install/nocodb-v5-install.sh | 56 ++- install/node-red-install.sh | 150 --------- install/node-red-v5-install.sh | 56 ++- install/omada-install.sh | 124 ------- install/omada-v5-install.sh | 55 ++- install/omv-install.sh | 136 -------- install/omv-v5-install.sh | 55 ++- install/openhab-install.sh | 136 -------- install/openhab-v5-install.sh | 55 ++- install/paperless-ngx-install.sh | 287 ---------------- install/paperless-ngx-v5-install.sh | 14 +- install/photoprism-install.sh | 218 ------------ install/photoprism-v5-install.sh | 56 ++- install/pihole-install.sh | 139 -------- install/pihole-v5-install.sh | 56 ++- install/plex-install.sh | 138 -------- install/plex-v5-install.sh | 55 ++- install/podman-homeassistant-install.sh | 172 ---------- install/podman-homeassistant-v5-install.sh | 56 ++- install/podman-v5-install.sh | 55 ++- install/postgresql-install.sh | 243 ------------- install/postgresql-v5-install.sh | 55 ++- install/prometheus-install.sh | 149 -------- install/prometheus-v5-install.sh | 55 ++- install/prowlarr-v5-install.sh | 55 ++- install/radarr-v5-install.sh | 55 ++- install/readarr-v5-install.sh | 55 ++- install/sabnzbd-v5-install.sh | 55 ++- install/scrypted-install.sh | 207 ------------ install/scrypted-v5-install.sh | 55 ++- install/shinobi-install.sh | 177 ---------- install/shinobi-v5-install.sh | 55 ++- install/sonarr-v5-install.sh | 55 ++- install/syncthing-install.sh | 126 ------- install/syncthing-v5-install.sh | 55 ++- install/tdarr-v5-install.sh | 55 ++- install/technitiumdns-install.sh | 119 ------- install/technitiumdns-v5-install.sh | 56 ++- install/transmission-v5-install.sh | 55 ++- install/trilium-install.sh | 144 -------- install/trilium-v5-install.sh | 55 ++- install/ubuntu-install.sh | 114 ------- install/ubuntu-v5-install.sh | 55 ++- install/umbrel-install.sh | 135 -------- install/umbrel-v5-install.sh | 56 ++- install/unifi-install.sh | 127 ------- install/unifi-v5-install.sh | 56 ++- install/uptimekuma-install.sh | 148 -------- install/uptimekuma-v5-install.sh | 56 ++- install/vaultwarden-install.sh | 204 ----------- install/vaultwarden-v5-install.sh | 56 ++- install/whisparr-v5-install.sh | 55 ++- install/whoogle-install.sh | 136 -------- install/whoogle-v5-install.sh | 55 ++- install/wikijs-install.sh | 164 --------- install/wikijs-v5-install.sh | 55 ++- install/wireguard-install.sh | 178 ---------- install/wireguard-v5-install.sh | 56 ++- install/yunohost-v5-install.sh | 55 ++- install/zigbee2mqtt-install.sh | 164 --------- install/zigbee2mqtt-v5-install.sh | 56 ++- install/zwave-js-ui-install.sh | 141 -------- install/zwave-js-ui-v5-install.sh | 56 ++- 280 files changed, 2486 insertions(+), 33413 deletions(-) delete mode 100644 ct/adguard-v4.sh delete mode 100644 ct/blocky-v4.sh delete mode 100644 ct/casaos-v4.sh delete mode 100644 ct/changedetection-v4.sh delete mode 100644 ct/daemonsync-v4.sh delete mode 100644 ct/dashy-v4.sh delete mode 100644 ct/debian-v4.sh delete mode 100644 ct/deconz-v4.sh delete mode 100644 ct/docker-v4.sh delete mode 100644 ct/emby-v4.sh delete mode 100644 ct/emqx-v4.sh delete mode 100644 ct/esphome-v4.sh delete mode 100644 ct/grafana-v4.sh delete mode 100644 ct/grocy-v4.sh delete mode 100644 ct/heimdalldashboard-v4.sh delete mode 100644 ct/homeassistant-core-v4.sh delete mode 100644 ct/homeassistant-v4.sh delete mode 100644 ct/homebridge-v4.sh delete mode 100644 ct/homepage-v4.sh delete mode 100644 ct/hyperion-v4.sh delete mode 100644 ct/influxdb-v4.sh delete mode 100644 ct/iobroker-v4.sh delete mode 100644 ct/jellyfin-v4.sh delete mode 100644 ct/keycloak-v4.sh delete mode 100644 ct/magicmirror-v4.sh delete mode 100644 ct/mariadb-v4.sh delete mode 100644 ct/meshcentral-v4.sh delete mode 100644 ct/motioneye-v4.sh delete mode 100644 ct/mqtt-v4.sh delete mode 100644 ct/n8n-v4.sh delete mode 100644 ct/navidrome-v4.sh delete mode 100644 ct/nextcloudpi-v4.sh delete mode 100644 ct/nginx-proxy-manager-v4.sh delete mode 100644 ct/nocodb-v4.sh delete mode 100644 ct/node-red-v4.sh delete mode 100644 ct/omada-v4.sh delete mode 100644 ct/omv-v4.sh delete mode 100644 ct/openhab-v4.sh delete mode 100644 ct/paperless-ngx-v4.sh delete mode 100644 ct/photoprism-v4.sh delete mode 100644 ct/pihole-v4.sh delete mode 100644 ct/plex-v4.sh delete mode 100644 ct/podman-homeassistant-v4.sh delete mode 100644 ct/postgresql-v4.sh delete mode 100644 ct/prometheus-v4.sh delete mode 100644 ct/scrypted-v4.sh delete mode 100644 ct/shinobi-v4.sh delete mode 100644 ct/syncthing-v4.sh delete mode 100644 ct/technitiumdns-v4.sh delete mode 100644 ct/trilium-v4.sh delete mode 100644 ct/ubuntu-v4.sh delete mode 100644 ct/umbrel-v4.sh delete mode 100644 ct/unifi-v4.sh delete mode 100644 ct/uptimekuma-v4.sh delete mode 100644 ct/vaultwarden-v4.sh delete mode 100644 ct/whoogle-v4.sh delete mode 100644 ct/wikijs-v4.sh delete mode 100644 ct/wireguard-v4.sh delete mode 100644 ct/zigbee2mqtt-v4.sh delete mode 100644 ct/zwave-js-ui-v4.sh delete mode 100644 install/adguard-install.sh delete mode 100644 install/blocky-install.sh delete mode 100644 install/casaos-install.sh delete mode 100644 install/changedetection-install.sh delete mode 100644 install/daemonsync-install.sh delete mode 100644 install/dashy-install.sh delete mode 100644 install/debian-install.sh delete mode 100644 install/deconz-install.sh delete mode 100644 install/docker-install.sh delete mode 100644 install/emby-install.sh delete mode 100644 install/emqx-install.sh delete mode 100644 install/esphome-install.sh delete mode 100644 install/grafana-install.sh delete mode 100644 install/grocy-install.sh delete mode 100644 install/heimdalldashboard-install.sh delete mode 100644 install/homeassistant-core-install.sh delete mode 100644 install/homeassistant-install.sh delete mode 100644 install/homebridge-install.sh delete mode 100644 install/homepage-install.sh delete mode 100644 install/hyperion-install.sh delete mode 100644 install/influxdb-install.sh delete mode 100644 install/iobroker-install.sh delete mode 100644 install/jellyfin-install.sh delete mode 100644 install/keycloak-install.sh delete mode 100644 install/magicmirror-install.sh delete mode 100644 install/mariadb-install.sh delete mode 100644 install/meshcentral-install.sh delete mode 100644 install/motioneye-install.sh delete mode 100644 install/mqtt-install.sh delete mode 100644 install/n8n-install.sh delete mode 100644 install/navidrome-install.sh delete mode 100644 install/nextcloudpi-install.sh delete mode 100644 install/nginx-proxy-manager-install.sh delete mode 100644 install/nocodb-install.sh delete mode 100644 install/node-red-install.sh delete mode 100644 install/omada-install.sh delete mode 100644 install/omv-install.sh delete mode 100644 install/openhab-install.sh delete mode 100644 install/paperless-ngx-install.sh delete mode 100644 install/photoprism-install.sh delete mode 100644 install/pihole-install.sh delete mode 100644 install/plex-install.sh delete mode 100644 install/podman-homeassistant-install.sh delete mode 100644 install/postgresql-install.sh delete mode 100644 install/prometheus-install.sh delete mode 100644 install/scrypted-install.sh delete mode 100644 install/shinobi-install.sh delete mode 100644 install/syncthing-install.sh delete mode 100644 install/technitiumdns-install.sh delete mode 100644 install/trilium-install.sh delete mode 100644 install/ubuntu-install.sh delete mode 100644 install/umbrel-install.sh delete mode 100644 install/unifi-install.sh delete mode 100644 install/uptimekuma-install.sh delete mode 100644 install/vaultwarden-install.sh delete mode 100644 install/whoogle-install.sh delete mode 100644 install/wikijs-install.sh delete mode 100644 install/wireguard-install.sh delete mode 100644 install/zigbee2mqtt-install.sh delete mode 100644 install/zwave-js-ui-install.sh diff --git a/ct/adguard-v4.sh b/ct/adguard-v4.sh deleted file mode 100644 index c7f12804..00000000 --- a/ct/adguard-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Adguard" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${GN} - ___ __ __ - / | ____/ /___ ___ ______ __________/ / - / /| |/ __ / __ / / / / __ / ___/ __ / - / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / -/_/v4|_\__,_/\__, /\__,_/\__,_/_/ \__,_/ - /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index daf5027a..9cec3c16 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -141,7 +135,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -316,7 +309,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -380,7 +372,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 7f9c7d03..38ffc8c7 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -314,7 +307,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -359,7 +351,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index afef7c5a..8e424a66 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index ad90c03c..86199f22 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 5f3589ba..fa31ef71 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -141,7 +135,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -316,7 +309,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -372,7 +364,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/blocky-v4.sh b/ct/blocky-v4.sh deleted file mode 100644 index 507d2f71..00000000 --- a/ct/blocky-v4.sh +++ /dev/null @@ -1,327 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Blocky" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ____ __ __ - / __ )/ /___v4_____/ /____ __ - / __ / / __ \/ ___/ //_/ / / / - / /_/ / / /_/ / /__/ ,< / /_/ / -/_____/_/\____/\___/_/|_|\__, / - /____/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index 7291b0be..efe66ff7 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/casaos-v4.sh b/ct/casaos-v4.sh deleted file mode 100644 index b3ae3583..00000000 --- a/ct/casaos-v4.sh +++ /dev/null @@ -1,344 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="CasaOS" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ______ ____ _____ - / ____/___ __v4______ _/ __ \/ ___/ - / / / __ `/ ___/ __ `/ / / /\__ \ -/ /___/ /_/ (__ ) /_/ / /_/ /___/ / -\____/\__,_/____/\__,_/\____//____/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export ST=$FUSE -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP} ${CL} \n" diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 2a7e1c93..bb901bca 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -144,7 +138,6 @@ function default_settings() { FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -326,7 +319,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -373,7 +365,6 @@ pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/changedetection-v4.sh b/ct/changedetection-v4.sh deleted file mode 100644 index 95108992..00000000 --- a/ct/changedetection-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Change Detection" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ________ ____ __ __ _ - / ____/ /_v4____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ - / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ -/ /___/ / / / /_/ / / / / /_/ / __/ / /_/ / __/ /_/ __/ /__/ /_/ / /_/ / / / / -\____/_/ /_/\__,_/_/ /_/\__, /\___/ /_____/\___/\__/\___/\___/\__/_/\____/_/ /_/ - /____/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index e50e3fda..13afb78e 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -362,7 +354,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index c0af30d9..f6071c13 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -36,21 +36,14 @@ if [ -z "$VALIDTMP" ]; then exit 1 fi -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function select_storage() { diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index e1e831cc..bf0495e1 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -33,20 +33,14 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" hostname="$(hostname)" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -140,7 +134,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -315,7 +308,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -410,7 +402,6 @@ pushd $TEMP_DIR >/dev/null export SERV=$SERVER export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/daemonsync-v4.sh b/ct/daemonsync-v4.sh deleted file mode 100644 index faaf9a81..00000000 --- a/ct/daemonsync-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Daemon Sync" -var_disk="8" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - ____ _____ - / __ \____ ____ ____ ___ ____ ____ / ___/__ ______ _____ - / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ - / /_/ / /_/ / __/ / / / / / /_/ / / / / ___/ / /_/ / / / / /__ -/_____/\__,_/\___/_/ /_/ /_/\____/_/ /_/ v4/____/\__, /_/ /_/\___/ - /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index c79e3cac..401086bb 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/dashy-v4.sh b/ct/dashy-v4.sh deleted file mode 100644 index f128a191..00000000 --- a/ct/dashy-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Dashy" -var_disk="3" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ____ __ - / __ \____ ______/ /_ __ __ - / / / / __ / ___/ __ \/ / / / - / /_/ / /_/ (__ ) / / / /_/ / -/_____/\__,_/____/_/ /_/\__, / - v4 /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index d3ed0919..069b8ee1 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -389,7 +381,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh deleted file mode 100644 index 441ebe05..00000000 --- a/ct/debian-v4.sh +++ /dev/null @@ -1,326 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Debian" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ____ __________ _______ _ __ - / __ \/ ____/ __ )/ _/ | / | / / - / / / / __/ / __ |/ // /| | / |/ / - / /_/ / /_v4/ /_/ // // ___ |/ /| / -/_____/_____/_____/___/_/ |_/_/ |_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 9f007fb1..9fae150f 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/deconz-v4.sh b/ct/deconz-v4.sh deleted file mode 100644 index 87a41090..00000000 --- a/ct/deconz-v4.sh +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="deCONZ" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - __ __________ _ _______ - ____/ /v4 / ____/ __ \/ | / /__ / - / __ / _ \/ / / / / / |/ / / / -/ /_/ / __/ /___/ /_/ / /| / / /__ -\__,_/\___/\____/\____/_/ |_/ /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL}\n" diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index f99fffb4..8368ce39 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -317,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index f6124413..93fde875 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -139,7 +133,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -314,7 +307,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -359,7 +351,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/docker-v4.sh b/ct/docker-v4.sh deleted file mode 100644 index d3a6ee55..00000000 --- a/ct/docker-v4.sh +++ /dev/null @@ -1,353 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Docker" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - ____ __ - / __ \____ _____/ /_v4__ _____ - / / / / __ \/ ___/ //_/ _ \/ ___/ - / /_/ / /_/ / /__/ ,< / __/ / -/_____/\____/\___/_/|_|\___/_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export ST=$FUSE -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index d2e3c0a7..5d4b2eb2 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -325,7 +318,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -370,7 +362,6 @@ pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/emby-v4.sh b/ct/emby-v4.sh deleted file mode 100644 index 4935a5c9..00000000 --- a/ct/emby-v4.sh +++ /dev/null @@ -1,350 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Emby" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${DGN} - ______ __ - / ____/___ v4_ / /_ __ __ - / __/ / __ __ \/ __ \/ / / / - / /___/ / / / / / /_/ / /_/ / -/_____/_/ /_/ /_/_.___/\__, / - /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 7392ac61..fb1392ac 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -326,7 +319,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -382,7 +374,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/emqx-v4.sh b/ct/emqx-v4.sh deleted file mode 100644 index 032b2ec9..00000000 --- a/ct/emqx-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="EMQX" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ________ _______v4 _ __ - / ____/ |/ / __ \ | |/ / - / __/ / /|_/ / / / / | / - / /___/ / / / /_/ / / | -/_____/_/ /_/\___\_\/_/|_| - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:18083${CL} \n" diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 26360cbc..5f0aaa9a 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -362,7 +354,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/esphome-v4.sh b/ct/esphome-v4.sh deleted file mode 100644 index dc4fe5bf..00000000 --- a/ct/esphome-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="ESPHome" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${CL} - ___________ ____ __ ______ __ _________ - / ____/ ___// __ \/ / / / __ \/ |/ / ____/ - / __/ \__ \/ /_/ / /_/ / / / / /|_/ / __/ - / /___ ___/ / ____/ __ / /_/ / / / / /_v4 -/_____//____/_/ /_/ /_/\____/_/ /_/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 6ec4e410..b0a51c9c 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -369,7 +361,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/grafana-v4.sh b/ct/grafana-v4.sh deleted file mode 100644 index f89a2857..00000000 --- a/ct/grafana-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Grafana" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - ______ ____ - / ____/________ _/ __/___ _____ ____ _ - / / __/ ___/ __ / /_/ __ / __ \/ __ / -/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / -\____/_/ v4\__,_/_/ \__,_/_/ /_/\__,_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 85e1b111..38514eed 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/grocy-v4.sh b/ct/grocy-v4.sh deleted file mode 100644 index e355e177..00000000 --- a/ct/grocy-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="grocy" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - ____ __________ _______ __ - / __ / ___/ __ \/ ___/ / / / - / /_/ / / / /_/ / /__/ /_/ / - \__, /_/ \____/\___/\__, / -/____/ v4 /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 62441b72..64a58fe6 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -362,7 +354,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/heimdalldashboard-v4.sh b/ct/heimdalldashboard-v4.sh deleted file mode 100644 index f39c042f..00000000 --- a/ct/heimdalldashboard-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Heimdall Dashboard" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ __ _ __ ____ ____ __ __ __ - / / / /__ (_)___ ___ ____/ /_v4 _/ / / / __ \____ ______/ /_ / /_ ____ ____ __________/ / - / /_/ / _ \/ / __ __ \/ __ / __ / / / / / / / __ / ___/ __ \/ __ \/ __ \/ __ / ___/ __ / - / __ / __/ / / / / / / /_/ / /_/ / / / / /_/ / /_/ (__ ) / / / /_/ / /_/ / /_/ / / / /_/ / -/_/ /_/\___/_/_/ /_/ /_/\__,_/\__,_/_/_/ /_____/\__,_/____/_/ /_/_.___/\____/\__,_/_/ \__,_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 00dddee1..4dcc78d0 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -442,7 +434,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homeassistant-core-v4.sh b/ct/homeassistant-core-v4.sh deleted file mode 100644 index ae1cd2c7..00000000 --- a/ct/homeassistant-core-v4.sh +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Home Assistant-Core" -var_disk="8" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _ _ _ _ ___ - /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___v4_ __ ___ - / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ -/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ -\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable (after it's initialized) by going to the following URL. - ${BL}http://${IP}:8123${CL}" diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 1d67e929..769a6f1a 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -34,21 +34,14 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -144,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -320,7 +312,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -438,7 +429,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh deleted file mode 100644 index 1407f92c..00000000 --- a/ct/homeassistant-v4.sh +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Home Assistant" -var_disk="16" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ __ ___ _ __ __ - / / / /___ ____ ___ ___ v4 / | __________(_)____/ /_____ _____ / /_ - / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export ST=$FUSE -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} -Portainer should be reachable by going to the following URL. - ${BL}http://${IP}:9000${CL}\n" diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index afaa19eb..49de18fd 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -145,7 +139,6 @@ function default_settings() { FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -328,7 +321,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -438,7 +430,6 @@ pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homebridge-v4.sh b/ct/homebridge-v4.sh deleted file mode 100644 index 5aa8300e..00000000 --- a/ct/homebridge-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Homebridge" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - __ ______ __ _____________ ____ ________ ____________ - / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ - / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ - / __ / /_/ / / / / /___/ /_/ / _, _// // /_/ / /_/ / /___ -/_/ /_/\____/_/v4/_/_____/_____/_/ |_/___/_____/\____/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index d036f6ed..95297599 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homepage-v4.sh b/ct/homepage-v4.sh deleted file mode 100644 index 07eea829..00000000 --- a/ct/homepage-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Homepage" -var_disk="3" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - __ __ - / / / /___ ____ ___ ___ ____ ____ _____ ____ - / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ - / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ -/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ - /_/ v4 /____/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 413bcb9a..555343bc 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -369,7 +361,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index fcb920b0..494b0b7c 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -382,7 +374,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/hyperion-v4.sh b/ct/hyperion-v4.sh deleted file mode 100644 index 2b0fc124..00000000 --- a/ct/hyperion-v4.sh +++ /dev/null @@ -1,344 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Hyperion" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { -cat <<"EOF" - __ __ _ - / / / /_ ______v4___ _____(_)___ ____ - / /_/ / / / / __ \/ _ \/ ___/ / __ \/ __ \ - / __ / /_/ / /_/ / __/ / / / /_/ / / / / -/_/ /_/\__, / .___/\___/_/ /_/\____/_/ /_/ - /____/_/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8090${CL} \n" diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 51353a73..2ae540da 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/influxdb-v4.sh b/ct/influxdb-v4.sh deleted file mode 100644 index 6ee8e824..00000000 --- a/ct/influxdb-v4.sh +++ /dev/null @@ -1,326 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="InfluxDB" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - ____ ______ ____ ____ - / _/_v4 / __/ /_ ___ __/ __ \/ __ ) - / // __ \/ /_/ / / / / |/_/ / / / __ | - _/ // / / / __/ / /_/ /> &1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 03681cb6..053feb3e 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/iobroker-v4.sh b/ct/iobroker-v4.sh deleted file mode 100644 index b4515677..00000000 --- a/ct/iobroker-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="ioBroker" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - _ ____ __ - (_)___ / __ )_________ / /_____ _____ - / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ - / / /_/ / /_/ / / / /_/ / ,< / __/ / -/_/\____/_____/_/ v4\____/_/|_|\___/_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 257ae0bd..6d022ee3 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/jellyfin-v4.sh b/ct/jellyfin-v4.sh deleted file mode 100644 index 774a3738..00000000 --- a/ct/jellyfin-v4.sh +++ /dev/null @@ -1,350 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Jellyfin" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${DGN} - __________ ____ _____________ __ - / / ____/ / / /\ \/ / ____/ _/ | / / - __ / / __/ / / / / \ / /_ / // |/ / -/ /_/ / /___/ /___/ /_v4/ / __/ _/ // /| / -\____/_____/_____/_____/_/_/ /___/_/ |_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 127dcd25..ec315a7c 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -145,7 +139,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -328,7 +321,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -372,7 +364,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index bcf5f0ee..6a4281a7 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index d0d21213..0267f0a9 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -141,7 +135,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -316,7 +309,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -361,7 +353,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/keycloak-v4.sh b/ct/keycloak-v4.sh deleted file mode 100644 index 5237a3ed..00000000 --- a/ct/keycloak-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Keycloak" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - __ __ __ __ - / //_/__ __ _______/ /___ ____ _/ /__ - / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ - / /| / __/ /_/ / /__/ / /_/ / /_/ / ,< -/_/ |_\___/\__, /\___/_/\____/\__,_/_/|_| - v4 /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 2d9e16fe..85b170e2 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 07586f05..1a11e0d7 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/magicmirror-v4.sh b/ct/magicmirror-v4.sh deleted file mode 100644 index 2342d731..00000000 --- a/ct/magicmirror-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="MagicMirror" -var_disk="3" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ ___ _ __ ____ - / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ - / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ - / / / / /_/ / /_/ / / /__/ / / / / / / / / /_/ / / -/_/ /_/\__,_/\__, /_/\___/_/ /_/_/_/ /_/ \____/_/ - /____/ v4 -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 9a738bcf..8fb8eef7 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -365,7 +357,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/mariadb-v4.sh b/ct/mariadb-v4.sh deleted file mode 100644 index 5281c61d..00000000 --- a/ct/mariadb-v4.sh +++ /dev/null @@ -1,326 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="MariaDB" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ ___ _ ____ ____ - / |/ /___ ______(_)___ _/ __ \/ __ ) - / /|_/ / __ / ___/ / __ / / / / __ | - / / / / /_/ / / / / /_/ / /_/ / /_/ / -/_/ /_/\__,_/_/v4/_/\__,_/_____/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 96fdb8e1..3ad4ae5a 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/meshcentral-v4.sh b/ct/meshcentral-v4.sh deleted file mode 100644 index b1a2b983..00000000 --- a/ct/meshcentral-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="MeshCentral" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ ___ __ ______ __ __ - / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / - / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / - / / / / __(__ ) / / / /___/ __/ / / / /_/ / / /_/ / / -/_/ /_/\___/____/_/ /_/\____/\___/_/ /_/\__/_/ v4\__,_/_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 37d26f3f..825c5a55 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/motioneye-v4.sh b/ct/motioneye-v4.sh deleted file mode 100644 index f2101198..00000000 --- a/ct/motioneye-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Motioneye" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ ___ __ _ ________ ________ - / |/ /___ / /_(_)___ ____ / ____/\ \/ / ____/ - / /|_/ / __ \/ __/ / __ \/ __ \/ __/ \ / __/ - / / / / /_/ / /_/ / /_/ / / / / /___v4 / / /___ -/_/ /_/\____/\__/_/\____/_/ /_/_____/ /_/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index f5b6186d..4d8d82a2 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -362,7 +354,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/mqtt-v4.sh b/ct/mqtt-v4.sh deleted file mode 100644 index 16d80e43..00000000 --- a/ct/mqtt-v4.sh +++ /dev/null @@ -1,293 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="MQTT" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { -echo -e "${GN} - __ _______ ____________ - / |/ / __ \/_ __/_ __/ - / /|_/ / / / / / / / / - / / / / /_/ / / / / / -/_/ /_/\___\_\/_/ v4/_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) -if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit -fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { -CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ -"1" "Unprivileged" ON \ -"0" "Privileged" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -fi -PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then PW1="Automatic Login" PW=" "; - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi -fi -CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi; -fi -CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi; - if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi; -fi -GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then GATE1="Default" GATE=""; - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi -fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi -MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then MAC1="Default" MAC=""; - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} -function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 8cc7274e..5a4e9351 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -140,7 +134,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -315,7 +308,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/n8n-v4.sh b/ct/n8n-v4.sh deleted file mode 100644 index 58af3ddb..00000000 --- a/ct/n8n-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="n8n" -var_disk="3" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ___ - / _ \ - _ __ | (_) |_v4_ - | _ \ > _ <| _ \ - | | | | (_) | | | | - |_| |_|\___/|_| |_| -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index c4a371af..a1fa02ad 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/navidrome-v4.sh b/ct/navidrome-v4.sh deleted file mode 100644 index 3f188aa6..00000000 --- a/ct/navidrome-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Navidrome" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _ __ _ __ - / | / /___ __ v4__(_)___/ /________ ____ ___ ___ - / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ - / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ -/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:4533${CL} \n" diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 06f2a828..1f38d743 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -374,7 +366,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/nextcloudpi-v4.sh b/ct/nextcloudpi-v4.sh deleted file mode 100644 index c1ff886d..00000000 --- a/ct/nextcloudpi-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="NextCloudPi" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _ __ __ ________ ______ _ - / | / /__ _ __/ /_/ ____/ /___ __v4______/ / __ \(_) - / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / - / /| / __/> &1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}https://${IP}/${CL} \n" diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index af9a035b..e77c3b4a 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/nginx-proxy-manager-v4.sh b/ct/nginx-proxy-manager-v4.sh deleted file mode 100644 index 23e60e9c..00000000 --- a/ct/nginx-proxy-manager-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Nginx Proxy Manager" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - _ __ _ ____ __ ___ - / | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____ - / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ - / /| / /_/ / / / / /> < / ____/ / / /_/ /> &1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/nginx-proxy-manager-install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 41cf41a8..237ee263 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -472,7 +464,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/nocodb-v4.sh b/ct/nocodb-v4.sh deleted file mode 100644 index 80776771..00000000 --- a/ct/nocodb-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="NocoDB" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - _ __ ____ ____ - / | / /___ ____v4___ / __ \/ __ ) - / |/ / __ \/ ___/ __ \/ / / / __ | - / /| / /_/ / /__/ /_/ / /_/ / /_/ / -/_/ |_/\____/\___/\____/_____/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080/dashboard${CL} \n" diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index d552dd84..e06cdc12 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -366,7 +358,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/node-red-v4.sh b/ct/node-red-v4.sh deleted file mode 100644 index 24568629..00000000 --- a/ct/node-red-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Node-Red" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - _ __ __ ____ __ - / | / /___ ____/ /__ v4 / __ \___ ____/ / - / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / - / /| / /_/ / /_/ / __/ / _, _/ __/ /_/ / -/_/ |_/\____/\__,_/\___/ /_/ |_|\___/\__,_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index d6239acc..cc5720ed 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -399,7 +391,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/omada-v4.sh b/ct/omada-v4.sh deleted file mode 100644 index 70fbbe6a..00000000 --- a/ct/omada-v4.sh +++ /dev/null @@ -1,337 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Omada" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - ____ __ - / __ \____ ___v4____ _____/ /___ _ - / / / / __ __ \/ __ / __ / __ / -/ /_/ / / / / / / /_/ / /_/ / /_/ / -\____/_/ /_/ /_/\__,_/\__,_/\__,_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index c200d3fd..35861b21 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -326,7 +319,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -361,7 +353,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/omv-v4.sh b/ct/omv-v4.sh deleted file mode 100644 index 573745c9..00000000 --- a/ct/omv-v4.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="OMV" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ____ __ ___ ___ _ __ ____ - / __ \____v4___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ - / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ -/ /_/ / /_/ / __/ / / / / / / __/ /_/ / / /_/ /| |/ / /_/ / /_/ / / /_ -\____/ .___/\___/_/ /_/_/ /_/\___/\__,_/_/\__,_/ |___/\__,_/\__,_/_/\__/ - /_/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file -EOF -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 8591a72e..8406e00a 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/openhab-v4.sh b/ct/openhab-v4.sh deleted file mode 100644 index 2d014284..00000000 --- a/ct/openhab-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="openHAB" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - __ _____ ____ - ____v4____ ___ ____ / / / / | / __ ) - / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | -/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / -\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/ - /_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 837f815c..a1d4a601 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/paperless-ngx-v4.sh b/ct/paperless-ngx-v4.sh deleted file mode 100644 index 1630ed49..00000000 --- a/ct/paperless-ngx-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Paperless-ngx" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ____ __ - / __ \____ _____ ___ _____/ /__v4__________ ____ ____ __ __ - / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ - / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < -/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| - /_/ /____/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index b4de9ab6..d014671b 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -431,7 +423,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/photoprism-v4.sh b/ct/photoprism-v4.sh deleted file mode 100644 index 1574037c..00000000 --- a/ct/photoprism-v4.sh +++ /dev/null @@ -1,331 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="PhotoPrism" -var_disk="8" -var_cpu="2" -var_ram="3072" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ____ __ ______ __________ ____ ____ _________ __ ___ - / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / - / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / - / ____/ __ / /_/ / / / / /_/ / ____/ _, _// / v4_/ / / / / -/_/ /_/ /_/\____/ /_/ \____/_/ /_/ |_/___//____/_/ /_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -msg_ok "Set Container to Normal Resources" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index ccab7aad..2c7042d6 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -141,7 +135,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -316,7 +309,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -384,7 +376,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/pihole-v4.sh b/ct/pihole-v4.sh deleted file mode 100644 index 891d272e..00000000 --- a/ct/pihole-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Pihole" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ____ ____ __ ______ __ ______ - / __ \/ _/ / / / / __ \/ / / ____/ - / /_/ // /___/ /_/ / / / / / / __/ - / ____// /___/ __ / /_/ / /v4_/ /___ -/_/ /___/ /_/ /_/\____/_____/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 299c53d0..989bd0de 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/plex-v4.sh b/ct/plex-v4.sh deleted file mode 100644 index ba26e011..00000000 --- a/ct/plex-v4.sh +++ /dev/null @@ -1,350 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Plex" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - ____ __ - / __ \/ /__ _ __ - / /_/ / / _ \| |/_/ - / ____/ / __/> < -/_/v4 /_/\___/_/|_| -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:32400/web${CL}\n" diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 30894617..f7dc89a0 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -144,7 +138,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -327,7 +320,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -382,7 +374,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/podman-homeassistant-v4.sh b/ct/podman-homeassistant-v4.sh deleted file mode 100644 index 5887d22a..00000000 --- a/ct/podman-homeassistant-v4.sh +++ /dev/null @@ -1,354 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Podman-Home Assistant" -var_disk="16" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - ____ __ - / __ \____ ____/ /___ ___ ____ _____ - v4 / /_/ / __ \/ __ / __ __ \/ __ / __ \ - / ____/ /_/ / /_/ / / / / / / /_/ / / / / - __ __ /_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/__ __ - / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ - / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -if [ "$CT_TYPE" == "0" ]; then -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -else - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} -Yacht should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL}\n" diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 55f0f9c5..711ae8f8 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -36,20 +36,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -146,7 +140,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -321,7 +314,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -413,7 +405,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index c4475f01..325d7268 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/postgresql-v4.sh b/ct/postgresql-v4.sh deleted file mode 100644 index d1013485..00000000 --- a/ct/postgresql-v4.sh +++ /dev/null @@ -1,327 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="PostgreSQL" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - ____ __ _____ ____ __ - / __ \____ _____/ /_____ _________ / ___// __ \ / / - / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / - / ____/ /_/ (__ ) /_/ /_/ / / / __/__/ / /_/ / / /___ -/_/ \____/____/\__/\__, /_/v4 \___/____/\___\_\/_____/ - /____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index e1247142..3a00762f 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/prometheus-v4.sh b/ct/prometheus-v4.sh deleted file mode 100644 index a4106946..00000000 --- a/ct/prometheus-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Prometheus" -var_disk="4" -var_cpu="1" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ____ __ __ - / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ - / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ - / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ ) -/_/ v4/_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 2de01b11..a11c6e8e 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index ed741da7..5d73e435 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 3ae34a9c..e453cd1a 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index d8e03dfb..39092a64 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 8cf707f2..992902d1 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index c5480465..6edfd424 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/scrypted-v4.sh b/ct/scrypted-v4.sh deleted file mode 100644 index 3dd86f9b..00000000 --- a/ct/scrypted-v4.sh +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Scrypted" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _____ __ __ - / ___/____________v4______ / /____ ____/ / - \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / - ___/ / /__/ / / /_/ / /_/ / /_/ __/ /_/ / -/____/\___/_/ \__, / .___/\__/\___/\__,_/ - /____/_/ -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}https://${IP}:10443${CL} \n" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 3b4c7eda..97f0bedf 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/shinobi-v4.sh b/ct/shinobi-v4.sh deleted file mode 100644 index e52e3565..00000000 --- a/ct/shinobi-v4.sh +++ /dev/null @@ -1,338 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Shinobi" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="22.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _____ __ _ __ _ - / ___// /_ (_)___v4____ / /_ (_) - \__ \/ __ \/ / __ \/ __ \/ __ \/ / - ___/ / / / / / / / / /_/ / /_/ / / -/____/_/ /_/_/_/ /_/\____/_.___/_/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:8080/super${CL} \n" diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 0a3ca6cf..9e9943b7 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -326,7 +319,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -373,7 +365,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index bf291d82..f0ddd2bc 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/syncthing-v4.sh b/ct/syncthing-v4.sh deleted file mode 100644 index f6f928c1..00000000 --- a/ct/syncthing-v4.sh +++ /dev/null @@ -1,330 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Syncthing" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _____ __ __ _ - / ___/__ ______v4_____/ /_/ /_ (_)___ ____ _ - \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ - ___/ / /_/ / / / / /__/ /_/ / / / / / / / /_/ / -/____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / - /____/ /____/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8384 ${CL} (after initial start) \n" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index fc983f24..cc8c498e 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -364,7 +356,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 882fa1d7..16fee7d4 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/technitiumdns-v4.sh b/ct/technitiumdns-v4.sh deleted file mode 100644 index ca581f21..00000000 --- a/ct/technitiumdns-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Technitium DNS" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - ______ __ _ __ _ ____ _ _______ - /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ v4 / __ \/ | / / ___/ - / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ - / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / -/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index ec98b23c..d9f0cc23 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -425,7 +417,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 53bf082a..9c040e3e 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/trilium-v4.sh b/ct/trilium-v4.sh deleted file mode 100644 index 8fd5f853..00000000 --- a/ct/trilium-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Trilium" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - ______ _ ___ - /_ __/_v4_(_) (_)_ ______ ___ - / / / ___/ / / / / / / __ `__ \ - / / / / / / / / /_/ / / / / / / -/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 9facb7ca..09e8bf47 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -382,7 +374,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/ubuntu-v4.sh b/ct/ubuntu-v4.sh deleted file mode 100644 index 803ce681..00000000 --- a/ct/ubuntu-v4.sh +++ /dev/null @@ -1,335 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Ubuntu" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="ubuntu" -var_version="22.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - __ ____ __ - / / / / /_v4__ ______ / /___ __ - / / / / __ \/ / / / __ \/ __/ / / / -/ /_/ / /_/ / /_/ / / / / /_/ /_/ / -\____/_.___/\__,_/_/ /_/\__/\__,_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 0cdab57f..938f771a 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -139,7 +133,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -322,7 +315,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -366,7 +358,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/umbrel-v4.sh b/ct/umbrel-v4.sh deleted file mode 100644 index 9b557c03..00000000 --- a/ct/umbrel-v4.sh +++ /dev/null @@ -1,344 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Umbrel" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - __ __ __ __ - / / / /___ ___v4/ /_ ________ / / - / / / / __ `__ \/ __ \/ ___/ _ \/ / -/ /_/ / / / / / / /_/ / / / __/ / -\____/_/ /_/ /_/_.___/_/ \___/_/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export ST=$FUSE -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL (reboot is required before app installs). - ${BL}http://${IP} ${CL} \n" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 684b4fc2..6d421a09 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -144,7 +138,6 @@ function default_settings() { FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -326,7 +319,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -371,7 +363,6 @@ pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/unifi-v4.sh b/ct/unifi-v4.sh deleted file mode 100644 index 38229ab0..00000000 --- a/ct/unifi-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Unifi" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - __ __ _ _____ - / / / /_v4 (_) __(_) - / / / / __ \/ / /_/ / -/ /_/ / / / / / __/ / -\____/_/ /_/_/_/ /_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 5f07d29a..87ec5d1f 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -363,7 +355,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/uptimekuma-v4.sh b/ct/uptimekuma-v4.sh deleted file mode 100644 index 289694da..00000000 --- a/ct/uptimekuma-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Uptime Kuma" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${DGN} - __ __ __ _ __ __ - / / / /___ / /_(_)___ ___ ___ v4 / //_/_ ______ ___ ____ _ - / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / -/ /_/ / /_/ / /_/ / / / / / / __/ / /| / /_/ / / / / / / /_/ / -\____/ .___/\__/_/_/ /_/ /_/\___/ /_/ |_\__,_/_/ /_/ /_/\__,_/ - /_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3001${CL} \n" diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index c29a3832..b08413ed 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -380,7 +372,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/vaultwarden-v4.sh b/ct/vaultwarden-v4.sh deleted file mode 100644 index be5fe841..00000000 --- a/ct/vaultwarden-v4.sh +++ /dev/null @@ -1,332 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Vaultwarden" -var_disk="6" -var_cpu="2" -var_ram="3072" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${CL} - _ _____ __ ____ _______ _____ ____ ____ _______ __ -| | / / | / / / / / /_ __/ | / / | / __ \/ __ \/ ____/ | / / -| | / / /| |/ / / / / / / | | /| / / /| | / /_/ / / / / __/ / |/ / -| |/ / ___ / /_/ / /___/ / | |/ |/ / ___ |/ _, _/ /_/ / /___/ /| / -|___/_/ |_\____/_____/_/ v4 |__/|__/_/ |_/_/ |_/_____/_____/_/ |_/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 512 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index fda70c39..87ebde7d 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -141,7 +135,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -431,7 +423,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 27636526..eb983253 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -139,7 +133,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -314,7 +307,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -359,7 +351,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/whoogle-v4.sh b/ct/whoogle-v4.sh deleted file mode 100644 index 7d3a7f6c..00000000 --- a/ct/whoogle-v4.sh +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Whoogle" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${GN} - _ ____ ______ ____ ________ ______ -| | v4 / / / / / __ \/ __ \/ ____/ / / ____/ -| | /| / / /_/ / / / / / / / / __/ / / __/ -| |/ |/ / __ / /_/ / /_/ / /_/ / /___/ /___ -|__/|__/_/ /_/\____/\____/\____/_____/_____/ -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index b8600076..e39ecff8 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -362,7 +354,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/wikijs-v4.sh b/ct/wikijs-v4.sh deleted file mode 100644 index 6fc2487f..00000000 --- a/ct/wikijs-v4.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Wikijs" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${BL} - _ ___ __ _ _ -| | / (_) /__(_) (_)____ -| | /| / / / //_/ / / / ___/ -| |/ |/ / / ,< / / / (__ ) -|__/|__/_/_/|_/_(_)_/ /____/ - /___/ v4 -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 1ed0b3b8..db50b8e9 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -376,7 +368,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/wireguard-v4.sh b/ct/wireguard-v4.sh deleted file mode 100644 index 532847ad..00000000 --- a/ct/wireguard-v4.sh +++ /dev/null @@ -1,330 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Wireguard" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${RD} - __ ___ _____ _ - \ \ / (_) / ____| | | - \ \ /\ / / _ _ __ ___| | __ _ _ __ _ _ __ __| | - \ \/ \/ / | | __/ _ \ | |_ | | | |/ _ | __/ _ | - \ /\ / | | | | __/ |__| | |_| | (_| | | | (_| | - \/ \/ v4|_|_| \___|\_____|\__,_|\__,_|_| \__,_| - ${YW}With WGDashboard -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "WGDashboard should be reachable by going to the following URL. - ${BL}http://${IP}:10086${CL} \n" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 376ff186..78d35fa2 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -418,7 +410,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index e9d630c4..f60795d2 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -138,7 +132,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -313,7 +306,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -358,7 +350,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/zigbee2mqtt-v4.sh b/ct/zigbee2mqtt-v4.sh deleted file mode 100644 index 986309c5..00000000 --- a/ct/zigbee2mqtt-v4.sh +++ /dev/null @@ -1,341 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Zigbee2MQTT" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - echo -e "${YW} - _____ _ __ ___ __ _______ ____________ -/__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ - / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / - / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / -/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ - v4 /____/ 🐝 -${CL}" -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index e006440e..ad1d2455 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -33,20 +33,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -143,7 +137,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -318,7 +311,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -393,7 +385,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/ct/zwave-js-ui-v4.sh b/ct/zwave-js-ui-v4.sh deleted file mode 100644 index 1125bd07..00000000 --- a/ct/zwave-js-ui-v4.sh +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/env bash -echo -e "Loading..." -APP="Zwave-JS-UI" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-install" -NEXTID=$(pvesh get /cluster/nextid) -INTEGER='^[0-9]+$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" -else - clear - echo -e "⚠ User exited script \n" - exit -fi -function header_info { - cat <<"EOF" - _____ _______ __ ______ -/__ /_ ______ __v4 _____ / / ___/ / / / / _/ - / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / - / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / -/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ - -EOF -} -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} -clear -start_script -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8091${CL} \n" diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 3018177d..da1e45c8 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -32,20 +32,14 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -142,7 +136,6 @@ function default_settings() { SSH="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function advanced_settings() { @@ -317,7 +310,6 @@ function advanced_settings() { else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" - VERB2="silent" fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" @@ -376,7 +368,6 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 export VERBOSE=$VERB -export STD=$VERB2 export SSH_ROOT=${SSH} export CTID=$CT_ID export PCT_OSTYPE=$var_os diff --git a/install/adguard-install.sh b/install/adguard-install.sh deleted file mode 100644 index fbe4d973..00000000 --- a/install/adguard-install.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing AdGuard Home" -curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh &>/dev/null -msg_ok "Installed AdGuard Home" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 497b3a81..533c988a 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -98,12 +94,11 @@ $STD bash install.sh rm install.sh msg_ok "Installed AdGuard Home" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -116,10 +111,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index 13e8a432..e9086b57 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -96,11 +92,11 @@ $STD apt-get update $STD apt install audiobookshelf msg_ok "Installed audiobookshelf" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -113,10 +109,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 9c54ff2a..03a1d05c 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -117,11 +113,11 @@ WantedBy=multi-user.target" >$service_path systemctl enable --now -q autobrr.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -134,10 +130,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/blocky-install.sh b/install/blocky-install.sh deleted file mode 100644 index 4422902e..00000000 --- a/install/blocky-install.sh +++ /dev/null @@ -1,375 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Blocky" -systemctl stop systemd-resolved &>/dev/null -systemctl disable systemd-resolved.service &>/dev/null -RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz &>/dev/null -mkdir -p /opt/blocky -tar -xf blocky_${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky -rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz -cat </opt/blocky/config.yml -upstream: - # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query - # format for resolver: [net:]host:[port][/path]. net could be empty (default, shortcut for tcp+udp), tcp+udp, tcp, udp, tcp-tls or https (DoH). If port is empty, default port will be used (53 for udp and tcp, 853 for tcp-tls, 443 for https (Doh)) - # this configuration is mandatory, please define at least one external DNS resolver - default: - # example for tcp+udp IPv4 server (https://digitalcourage.de/) - #- 5.9.164.112 - # Cloudflare - - 1.1.1.1 - # example for DNS-over-TLS server (DoT) - #- tcp-tls:fdns1.dismail.de:853 - # example for DNS-over-HTTPS (DoH) - #- https://dns.digitale-gesellschaft.ch/dns-query - # optional: use client name (with wildcard support: * - sequence of any characters, [0-9] - range) - # or single ip address / client subnet as CIDR notation - #laptop*: - #- 123.123.123.123 - -# optional: timeout to query the upstream resolver. Default: 2s -#upstreamTimeout: 2s - -# optional: If true, blocky will fail to start unless at least one upstream server per group is reachable. Default: false -#startVerifyUpstream: true - -# optional: Determines how blocky will create outgoing connections. This impacts both upstreams, and lists. -# accepted: dual, v4, v6 -# default: dual -#connectIPVersion: dual - -# optional: custom IP address(es) for domain name (with all sub-domains). Multiple addresses must be separated by a comma -# example: query "printer.lan" or "my.printer.lan" will return 192.168.178.3 -#customDNS: - #customTTL: 1h - # optional: if true (default), return empty result for unmapped query types (for example TXT, MX or AAAA if only IPv4 address is defined). - # if false, queries with unmapped types will be forwarded to the upstream resolver - #filterUnmappedTypes: true - # optional: replace domain in the query with other domain before resolver lookup in the mapping - #rewrite: - #example.com: printer.lan - #mapping: - #printer.lan: 192.168.178.3,2001:0db8:85a3:08d3:1319:8a2e:0370:7344 - -# optional: definition, which DNS resolver(s) should be used for queries to the domain (with all sub-domains). Multiple resolvers must be separated by a comma -# Example: Query client.fritz.box will ask DNS server 192.168.178.1. This is necessary for local network, to resolve clients by host name -#conditional: - # optional: if false (default), return empty result if after rewrite, the mapped resolver returned an empty answer. If true, the original query will be sent to the upstream resolver - # Example: The query "blog.example.com" will be rewritten to "blog.fritz.box" and also redirected to the resolver at 192.168.178.1. If not found and if was set to , the original query "blog.example.com" will be sent upstream. - # Usage: One usecase when having split DNS for internal and external (internet facing) users, but not all subdomains are listed in the internal domain. - #fallbackUpstream: false - # optional: replace domain in the query with other domain before resolver lookup in the mapping - #rewrite: - #example.com: fritz.box - #mapping: - #fritz.box: 192.168.178.1 - #lan.net: 192.168.178.1,192.168.178.2 - -# optional: use black and white lists to block queries (for example ads, trackers, adult pages etc.) -blocking: - # definition of blacklist groups. Can be external link (http/https) or local file - blackLists: - ads: - - https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt - - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts - - http://sysctl.org/cameleon/hosts - - https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt - - | - # inline definition with YAML literal block scalar style - # hosts format - someadsdomain.com - special: - - https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts - # definition of whitelist groups. Attention: if the same group has black and whitelists, whitelists will be used to disable particular blacklist entries. If a group has only whitelist entries -> this means only domains from this list are allowed, all other domains will be blocked - whiteLists: - ads: - - whitelist.txt - - | - # inline definition with YAML literal block scalar style - # hosts format - whitelistdomain.com - # this is a regex - /^banners?[_.-]/ - # definition: which groups should be applied for which client - clientGroupsBlock: - # default will be used, if no special definition for a client name exists - default: - - ads - - special - # use client name (with wildcard support: * - sequence of any characters, [0-9] - range) - # or single ip address / client subnet as CIDR notation - #laptop*: - #- ads - #192.168.178.1/24: - #- special - # which response will be sent, if query is blocked: - # zeroIp: 0.0.0.0 will be returned (default) - # nxDomain: return NXDOMAIN as return code - # comma separated list of destination IP addresses (for example: 192.100.100.15, 2001:0db8:85a3:08d3:1319:8a2e:0370:7344). Should contain ipv4 and ipv6 to cover all query types. Useful with running web server on this address to display the "blocked" page. - blockType: zeroIp - # optional: TTL for answers to blocked domains - # default: 6h - blockTTL: 1m - # optional: automatically list refresh period (in duration format). Default: 4h. - # Negative value -> deactivate automatically refresh. - # 0 value -> use default - refreshPeriod: 4h - # optional: timeout for list download (each url). Default: 60s. Use large values for big lists or slow internet connections - downloadTimeout: 4m - # optional: Download attempt timeout. Default: 60s - downloadAttempts: 5 - # optional: Time between the download attempts. Default: 1s - downloadCooldown: 10s - # optional: if failOnError, application startup will fail if at least one list can't be downloaded / opened. Default: blocking - #startStrategy: failOnError - -# optional: configuration for caching of DNS responses -caching: - # duration how long a response must be cached (min value). - # If <=0, use response's TTL, if >0 use this value, if TTL is smaller - # Default: 0 - minTime: 5m - # duration how long a response must be cached (max value). - # If <0, do not cache responses - # If 0, use TTL - # If > 0, use this value, if TTL is greater - # Default: 0 - maxTime: 30m - # Max number of cache entries (responses) to be kept in cache (soft limit). Useful on systems with limited amount of RAM. - # Default (0): unlimited - maxItemsCount: 0 - # if true, will preload DNS results for often used queries (default: names queried more than 5 times in a 2-hour time window) - # this improves the response time for often used queries, but significantly increases external traffic - # default: false - prefetching: true - # prefetch track time window (in duration format) - # default: 120 - prefetchExpires: 2h - # name queries threshold for prefetch - # default: 5 - prefetchThreshold: 5 - # Max number of domains to be kept in cache for prefetching (soft limit). Useful on systems with limited amount of RAM. - # Default (0): unlimited - #prefetchMaxItemsCount: 0 - -# optional: configuration of client name resolution -clientLookup: - # optional: this DNS resolver will be used to perform reverse DNS lookup (typically local router) - #upstream: 192.168.178.1 - # optional: some routers return multiple names for client (host name and user defined name). Define which single name should be used. - # Example: take second name if present, if not take first name - #singleNameOrder: - #- 2 - #- 1 - # optional: custom mapping of client name to IP addresses. Useful if reverse DNS does not work properly or just to have custom client names. - #clients: - #laptop: - #- 192.168.178.29 -# optional: configuration for prometheus metrics endpoint -prometheus: - # enabled if true - #enable: true - # url path, optional (default '/metrics') - #path: /metrics - -# optional: write query information (question, answer, client, duration etc.) to daily csv file -queryLog: - # optional one of: mysql, postgresql, csv, csv-client. If empty, log to console - #type: mysql - # directory (should be mounted as volume in docker) for csv, db connection string for mysql/postgresql - #target: db_user:db_password@tcp(db_host_or_ip:3306)/db_name?charset=utf8mb4&parseTime=True&loc=Local - #postgresql target: postgres://user:password@db_host_or_ip:5432/db_name - # if > 0, deletes log files which are older than ... days - #logRetentionDays: 7 - # optional: Max attempts to create specific query log writer, default: 3 - #creationAttempts: 1 - # optional: Time between the creation attempts, default: 2s - #creationCooldown: 2s - -# optional: Blocky can synchronize its cache and blocking state between multiple instances through redis. -redis: - # Server address and port - #address: redis:6379 - # Password if necessary - #password: passwd - # Database, default: 0 - #database: 2 - # Connection is required for blocky to start. Default: false - #required: true - # Max connection attempts, default: 3 - #connectionAttempts: 10 - # Time between the connection attempts, default: 1s - #connectionCooldown: 3s - -# optional: DNS listener port(s) and bind ip address(es), default 53 (UDP and TCP). Example: 53, :53, "127.0.0.1:5353,[::1]:5353" -port: 553 -# optional: Port(s) and bind ip address(es) for DoT (DNS-over-TLS) listener. Example: 853, 127.0.0.1:853 -#tlsPort: 853 -# optional: HTTPS listener port(s) and bind ip address(es), default empty = no http listener. If > 0, will be used for prometheus metrics, pprof, REST API, DoH... Example: 443, :443, 127.0.0.1:443 -#httpPort: 4000 -#httpsPort: 443 -# optional: Mininal TLS version that the DoH and DoT server will use -#minTlsServeVersion: 1.3 -# if https port > 0: path to cert and key file for SSL encryption. if not set, self-signed certificate will be generated -#certFile: server.crt -#keyFile: server.key -# optional: use this DNS server to resolve blacklist urls and upstream DNS servers. Useful if no DNS resolver is configured and blocky needs to resolve a host name. Format net:IP:port, net must be udp or tcp -#bootstrapDns: tcp+udp:1.1.1.1 - -filtering: -# optional: drop all queries with following query types. Default: empty - #queryTypes: - #- AAAA - -# optional: if path defined, use this file for query resolution (A, AAAA and rDNS). Default: empty -hostsFile: - # optional: Path to hosts file (e.g. /etc/hosts on Linux) - #filePath: /etc/hosts - # optional: TTL, default: 1h - #hostsTTL: 60m - # optional: Time between hosts file refresh, default: 1h - #refreshPeriod: 30m - # optional: Whether loopback hosts addresses (127.0.0.0/8 and ::1) should be filtered or not, default: false - #filterLoopback: true -# optional: Log level (one from debug, info, warn, error). Default: info -#logLevel: info -# optional: Log format (text or json). Default: text -#logFormat: text -# optional: log timestamps. Default: true -#logTimestamp: true -# optional: obfuscate log output (replace all alphanumeric characters with *) for user sensitive data like request domains or responses to increase privacy. Default: false -#logPrivacy: false - -# optional: add EDE error codes to dns response -#ede: - # enabled if true, Default: false - #enable: true -EOF -msg_ok "Installed Blocky" - -msg_info "Creating Service" -cat </etc/systemd/system/blocky.service -[Unit] -Description=Blocky -After=network.target -[Service] -User=root -WorkingDirectory=/opt/blocky -ExecStart=/opt/blocky/./blocky --config config.yml -[Install] -WantedBy=multi-user.target -EOF -systemctl enable --now blocky -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index b1b80f4b..b68882b1 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -350,11 +346,11 @@ EOF $STD systemctl enable --now blocky msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -367,10 +363,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/casaos-install.sh b/install/casaos-install.sh deleted file mode 100644 index 141058cd..00000000 --- a/install/casaos-install.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y unzip &>/dev/null -msg_ok "Installed Dependencies" - -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF - -msg_info "Installing CasaOS (Patience)" -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -fi -wget -qO- https://get.casaos.io | bash &>/dev/null -msg_ok "Installed CasaOS" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 1a2358fc..013a9a46 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -106,12 +102,11 @@ fi $STD bash <(curl -fsSL https://get.casaos.io) msg_ok "Installed CasaOS" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -124,10 +119,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh deleted file mode 100644 index e8c2fdd3..00000000 --- a/install/changedetection-install.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y pip &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Change Detection" -mkdir /opt/changedetection -pip3 install changedetection.io &>/dev/null -msg_ok "Installed Change Detection" - -msg_info "Creating Service" -cat </etc/systemd/system/changedetection.service -[Unit] -Description=Change Detection -After=network-online.target -[Service] -Type=simple -WorkingDirectory=/opt/changedetection -ExecStart=changedetection.io -d /opt/changedetection -p 5000 -[Install] -WantedBy=multi-user.target -EOF -systemctl enable --now changedetection &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index bf528d16..f8b24983 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -110,11 +106,11 @@ EOF $STD systemctl enable --now changedetection msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -127,10 +123,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 85be2f0a..d9c2aca7 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -116,11 +112,11 @@ chmod 775 /etc/init.d/cronicled $STD update-rc.d cronicled defaults msg_ok "Installed Cronicle Primary Server" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -133,10 +129,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh deleted file mode 100644 index 9f68ed71..00000000 --- a/install/daemonsync-install.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y g++-multilib &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Daemon Sync Server" -wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb &>/dev/null -sudo dpkg -i daemonsync_2.2.0.0059_amd64.deb &>/dev/null -msg_ok "Installed Daemon Sync Server" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 4281260e..04229094 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -95,12 +91,11 @@ wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_am $STD dpkg -i daemonsync_2.2.0.0059_amd64.deb msg_ok "Installed Daemon Sync Server" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -113,10 +108,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf daemonsync_2.2.0.0059_amd64.deb diff --git a/install/dashy-install.sh b/install/dashy-install.sh deleted file mode 100644 index 680a95cc..00000000 --- a/install/dashy-install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -sudo apt-get install -y nodejs git make g++ gcc &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Yarn" -npm install --global yarn &>/dev/null -msg_ok "Installed Yarn" - -msg_info "Installing Dashy (Patience)" -git clone https://github.com/Lissy93/dashy.git &>/dev/null -cd /dashy -yarn &>/dev/null -export NODE_OPTIONS=--max-old-space-size=1000 &>/dev/null -yarn build &>/dev/null -msg_ok "Installed Dashy" - -msg_info "Creating Service" -cat </etc/systemd/system/dashy.service -[Unit] -Description=dashy - -[Service] -Type=simple -WorkingDirectory=/dashy -ExecStart=/usr/bin/yarn start -[Install] -WantedBy=multi-user.target -EOF -sudo systemctl start dashy &>/dev/null -sudo systemctl enable dashy &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 14f76bef..84bc8eaa 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -126,12 +122,11 @@ $STD systemctl enable dashy systemctl start dashy msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -144,10 +139,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/debian-install.sh b/install/debian-install.sh deleted file mode 100644 index 0029b4e4..00000000 --- a/install/debian-install.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 3a525e6b..428fe812 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -88,11 +84,11 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -105,10 +101,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/deconz-install.sh b/install/deconz-install.sh deleted file mode 100644 index 18395883..00000000 --- a/install/deconz-install.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting Phoscon Repository" -wget -q http://phoscon.de/apt/deconz.pub.key -O - | sudo apt-key add - &>/dev/null -sh -c "echo 'deb [arch=amd64] http://phoscon.de/apt/deconz $(lsb_release -cs) main' > /etc/apt/sources.list.d/deconz.list" &>/dev/null -msg_ok "Setup Phoscon Repository" - -msg_info "Installing deConz" -apt-get update &>/dev/null -apt-get install -y deconz &>/dev/null -msg_ok "Installed deConz" - -msg_info "Creating Service" -service_path="/lib/systemd/system/deconz.service" -echo "[Unit] -Description=deCONZ: ZigBee gateway -- REST API -Wants=deconz-init.service deconz-update.service -StartLimitIntervalSec=0 - -[Service] -User=root -ExecStart=/usr/bin/deCONZ -platform minimal --http-port=80 -Restart=on-failure -RestartSec=30 -AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl start deconz -systemctl enable deconz &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 0235e7de..1b4a59b3 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -119,11 +115,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now deconz msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -136,10 +132,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 19f9449d..4d2c8e21 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -133,11 +129,11 @@ systemctl enable --now -q deluged.service systemctl enable --now -q deluge-web.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -150,10 +146,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/docker-install.sh b/install/docker-install.sh deleted file mode 100644 index df358aba..00000000 --- a/install/docker-install.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 -} - -DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") -PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") -DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") - -msg_info "Installing Docker $DOCKER_LATEST_VERSION" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi -sh <(curl -sSL https://get.docker.com) &>/dev/null -msg_ok "Installed Docker $DOCKER_LATEST_VERSION" - -read -r -p "Would you like to add Portainer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - PORTAINER="Y" -else - PORTAINER="N" -fi - -if [[ $PORTAINER == "Y" ]]; then - msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" - docker volume create portainer_data >/dev/null - docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest &>/dev/null - msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" -fi - -read -r -p "Would you like to add Docker Compose? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - DOCKER_COMPOSE="Y" -else - DOCKER_COMPOSE="N" -fi - -if [[ $DOCKER_COMPOSE == "Y" ]]; then - msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" - DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} - mkdir -p $DOCKER_CONFIG/cli-plugins - curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose - chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose - msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" -fi - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 762327dd..fa8b1495 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -150,12 +146,11 @@ if [[ $DOCKER_COMPOSE == "Y" ]]; then msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -168,10 +163,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/emby-install.sh b/install/emby-install.sh deleted file mode 100644 index 3ce66a06..00000000 --- a/install/emby-install.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then - msg_info "Setting Up Hardware Acceleration" - apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd &>/dev/null - - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* - msg_ok "Set Up Hardware Acceleration" -fi - -LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) - -msg_info "Installing Emby" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null -dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null -msg_ok "Installed Emby" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -rm emby-server-deb_${LATEST}_amd64.deb -msg_ok "Cleaned" diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index ffe06b70..18d832f1 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -109,11 +105,11 @@ wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb msg_ok "Installed Emby" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -126,10 +122,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/emqx-install.sh b/install/emqx-install.sh deleted file mode 100644 index 49adfa50..00000000 --- a/install/emqx-install.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing EMQX" -curl -s https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh | bash &>/dev/null -sudo apt-get install -y emqx >/dev/null -systemctl enable --now emqx -msg_ok "Installed EMQX" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index c8fadb4b..bcbae979 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -94,11 +90,11 @@ $STD apt-get install -y emqx $STD systemctl enable --now emqx msg_ok "Installed EMQX" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -111,10 +107,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/install/esphome-install.sh b/install/esphome-install.sh deleted file mode 100644 index fbd8570a..00000000 --- a/install/esphome-install.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -apt-get install -y python3-pip &>/dev/null -msg_ok "Installed Python3-pip" - -msg_info "Installing ESPHome" -pip3 install esphome &>/dev/null -msg_ok "Installed ESPHome" - -msg_info "Installing ESPHome Dashboard" -pip3 install tornado esptool &>/dev/null - -service_path="/etc/systemd/system/esphomeDashboard.service" -echo "[Unit] -Description=ESPHome Dashboard -After=network.target -[Service] -ExecStart=/usr/local/bin/esphome /root/config/ dashboard -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable esphomeDashboard.service &>/dev/null -systemctl start esphomeDashboard -msg_ok "Installed ESPHome Dashboard" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 0504c6c9..433d8487 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -115,12 +111,11 @@ $STD systemctl enable esphomeDashboard.service systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -133,10 +128,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/grafana-install.sh b/install/grafana-install.sh deleted file mode 100644 index efc51a98..00000000 --- a/install/grafana-install.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -apt-get install -y apt-transport-https &>/dev/null -apt-get install -y software-properties-common &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Grafana Repository" -wget -qO- https://packages.grafana.com/gpg.key | sudo apt-key add - &>/dev/null -echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list &>/dev/null -msg_ok "Set up Grafana Repository" - -msg_info "Installing Grafana" -apt-get update &>/dev/null -apt-get install -y grafana &>/dev/null -msg_ok "Installed Grafana" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi -systemctl start grafana-server -systemctl enable grafana-server.service &>/dev/null - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 29e171c9..b695df32 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -102,12 +98,11 @@ $STD apt-get update $STD apt-get install -y grafana msg_ok "Installed Grafana" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -120,10 +115,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi systemctl start grafana-server $STD systemctl enable grafana-server.service diff --git a/install/grocy-install.sh b/install/grocy-install.sh deleted file mode 100644 index 1d7acc0a..00000000 --- a/install/grocy-install.sh +++ /dev/null @@ -1,158 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y apache2 &>/dev/null -apt-get install -y unzip &>/dev/null -apt-get install -y apt-transport-https &>/dev/null -apt-get install -y lsb-release &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing PHP 8.1" -curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg -sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' -apt-get update &>/dev/null -apt-get install -y php8.1 &>/dev/null -apt-get install -y libapache2-mod-php8.1 &>/dev/null -apt-get install -y php8.1-sqlite3 &>/dev/null -apt-get install -y php8.1-gd &>/dev/null -apt-get install -y php8.1-intl &>/dev/null -apt-get install -y php8.1-mbstring &>/dev/null -msg_ok "Installed PHP 8.1" - -msg_info "Installing grocy" -wget https://releases.grocy.info/latest &>/dev/null -unzip latest -d /var/www/html &>/dev/null -chown -R www-data:www-data /var/www/html -cp /var/www/html/config-dist.php /var/www/html/data/config.php -chmod +x /var/www/html/update.sh - -cat </etc/apache2/sites-available/grocy.conf - - ServerAdmin webmaster@localhost - DocumentRoot /var/www/html/public - ErrorLog /var/log/apache2/error.log - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - allow from all - - -EOF - -a2dissite 000-default.conf &>/dev/null -a2ensite grocy.conf &>/dev/null -a2enmod rewrite &>/dev/null -systemctl reload apache2 -msg_ok "Installed grocy" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -rm -rf /root/latest -msg_ok "Cleaned" diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index d847d5a6..34073ba0 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -132,11 +128,11 @@ $STD a2enmod rewrite systemctl reload apache2 msg_ok "Installed grocy" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -149,10 +145,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh deleted file mode 100644 index cf19a76c..00000000 --- a/install/heimdalldashboard-install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing PHP" -apt-get install -y php &>/dev/null -apt-get install -y php-sqlite3 &>/dev/null -apt-get install -y php-zip &>/dev/null -msg_ok "Installed PHP" - -RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -msg_info "Installing Heimdall Dashboard ${RELEASE}" -curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null -tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') -rm -rf ${RELEASE}.tar.gz -mv Heimdall-${VER} /opt/Heimdall -msg_ok "Installed Heimdall Dashboard ${RELEASE}" - -msg_info "Creating Service" -service_path="/etc/systemd/system/heimdall.service" -echo "[Unit] -Description=Heimdall -After=network.target - -[Service] -Restart=always -RestartSec=5 -Type=simple -User=root -WorkingDirectory=/opt/Heimdall -ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 -TimeoutStopSec=30 - -[Install] -WantedBy=multi-user.target" >$service_path -sudo systemctl enable --now heimdall.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index a94d230d..ce1b5f75 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -126,12 +122,11 @@ WantedBy=multi-user.target" >$service_path $STD sudo systemctl enable --now heimdall.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -144,10 +139,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh deleted file mode 100644 index a9fb4de6..00000000 --- a/install/homeassistant-core-install.sh +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies (Patience)" -apt-get install -y \ - make \ - build-essential \ - libjpeg-dev \ - libpcap-dev \ - libssl-dev \ - zlib1g-dev \ - libbz2-dev \ - libreadline-dev \ - libsqlite3-dev \ - libmariadb-dev-compat \ - autoconf \ - git \ - curl \ - sudo \ - llvm \ - libncursesw5-dev \ - xz-utils \ - tzdata \ - bluez \ - tk-dev \ - libxml2-dev \ - libxmlsec1-dev \ - libffi-dev \ - libopenjp2-7 \ - libtiff5 \ - libturbojpeg0-dev \ - liblzma-dev &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Linux D-Bus Message Broker" -cat <>/etc/apt/sources.list -deb http://deb.debian.org/debian bullseye-backports main contrib non-free -deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free -EOF -apt-get update &>/dev/null -apt-get -t bullseye-backports install -y dbus-broker &>/dev/null -systemctl enable --now dbus-broker.service &>/dev/null -msg_ok "Installed Linux D-Bus Message Broker" - -msg_info "Installing pyenv" -git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null -set +e -echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc -msg_ok "Installed pyenv" -. ~/.bashrc -set -e -msg_info "Installing Python 3.10.8" -pyenv install 3.10.8 &>/dev/null -pyenv global 3.10.8 -msg_ok "Installed Python 3.10.8" - -read -r -p " Use the Beta Branch? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - BR="--pre " -else - BR="" -fi - -msg_info "Installing Home Assistant-Core" -mkdir /srv/homeassistant -cd /srv/homeassistant -python3 -m venv . -source bin/activate -pip install --upgrade pip &>/dev/null -python3 -m pip install wheel &>/dev/null -pip install mysqlclient &>/dev/null -pip install psycopg2-binary &>/dev/null -pip install ${BR}homeassistant &>/dev/null -msg_ok "Installed Home Assistant-Core" - -# fix for inconsistent versions, hopefully the HA team will get this fixed -if [ "${BR}" == "--pre " ]; then -sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.82.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -else -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/package_constraints.txt -sed -i '{s/dbus-fast==1.75.0/dbus-fast==1.83.1/g; s/bleak==0.19.2/bleak==0.19.5/g}' /srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/bluetooth/manifest.json -fi - -msg_info "Creating Service" -cat </etc/systemd/system/homeassistant.service -[Unit] -Description=Home Assistant -After=network-online.target -[Service] -Type=simple -WorkingDirectory=/root/.homeassistant -ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" -RestartForceExitStatus=100 -[Install] -WantedBy=multi-user.target -EOF -systemctl enable homeassistant &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index c4663502..1ca60ef6 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -168,11 +164,11 @@ EOF $STD systemctl enable --now homeassistant msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -185,10 +181,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh deleted file mode 100644 index 52c3c427..00000000 --- a/install/homeassistant-install.sh +++ /dev/null @@ -1,360 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -apt-get install -y python3-pip &>/dev/null -msg_ok "Installed Python3-pip" - -get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 -} - -DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") -CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core") -PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") - -msg_info "Installing Docker $DOCKER_LATEST_VERSION" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi -sh <(curl -sSL https://get.docker.com) &>/dev/null -msg_ok "Installed Docker $DOCKER_LATEST_VERSION" - -msg_info "Pulling Portainer $PORTAINER_LATEST_VERSION Image" -docker pull portainer/portainer-ce:latest &>/dev/null -msg_ok "Pulled Portainer $PORTAINER_LATEST_VERSION Image" - -msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" -docker volume create portainer_data >/dev/null -docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest &>/dev/null -msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" - -msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image" -docker pull homeassistant/home-assistant:stable &>/dev/null -msg_ok "Pulled Home Assistant $CORE_LATEST_VERSION Image" - -msg_info "Installing Home Assistant $CORE_LATEST_VERSION" -docker volume create hass_config >/dev/null -docker run -d \ - --name homeassistant \ - --privileged \ - --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - --net=host \ - homeassistant/home-assistant:stable &>/dev/null -msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" - -msg_info "Creating Update Menu Script" -pip3 install runlike &>/dev/null -UPDATE_PATH='/root/update' -UPDATE_CONTAINERS_PATH='/root/update-containers.sh' -cat >$UPDATE_PATH <<'EOF' -#!/bin/sh -set -o errexit -show_menu(){ - normal=`echo "\033[m"` - safe=`echo "\033[32m"` - menu=`echo "\033[36m"` - number=`echo "\033[33m"` - bgred=`echo "\033[41m"` - fgred=`echo "\033[31m"` - hostname -I - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${safe} Switch to Stable Branch ${normal}\n" - printf "${menu}**${number} 2)${number} Switch to Beta Branch ${normal}\n" - printf "${menu}**${number} 3)${fgred} Switch to Dev Branch ${normal}\n" - printf "${menu}**${number} 4)${safe} Backup Home Assistant Data (to root) ${normal}\n" - printf "${menu}**${number} 5)${number} Restore Home Assistant Data ${normal}\n" - printf "${menu}**${number} 6)${fgred} Edit Home Assistant Configuration ${normal}\n" - printf "${menu}**${number} 7)${safe} Restart Home Assistant ${normal}\n" - printf "${menu}**${number} 8)${safe} Just Update Containers ${normal}\n" - printf "${menu}**${number} 9)${number} Remove Unused Images ${normal}\n" - printf "${menu}**${number} 10)${safe} Update Host OS ${normal}\n" - printf "${menu}**${number} 11)${safe} Reboot Host OS ${normal}\n" - printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu and enter or ${fgred}x to exit. ${normal}" - read opt -} -option_picked(){ - msgcolor=`echo "\033[01;31m"` - normal=`echo "\033[00;00m"` - message=${@:-"${normal}Error: No message passed"} - printf "${msgcolor}${message}${normal}\n" -} -clear -show_menu -while [ $opt != '' ] - do - if [ $opt = '' ]; then - exit; - else - case $opt in - 1) clear; - option_picked "Switching to Stable Branch"; - TAG=stable - break; - ;; - 2) clear; - option_picked "Switching to Beta Branch"; - TAG=beta - break; - ;; - 3) while true; do - read -p "Are you sure you want to Switch to Dev Branch? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Switching to Dev Branch"; - TAG=dev - break; - ;; - 4) clear; - option_picked "Backing up Home Assistant Data to root (hass_config)"; - rm -r hass_config; - cp -pR /var/lib/docker/volumes/hass_config/ /root/; - sleep 2; - clear; - show_menu; - ;; - 5) while true; do - read -p "Are you sure you want to Restore Home Assistant Data? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Restoring Home Assistant Data from root (hass_config)"; - rm -r /var/lib/docker/volumes/hass_config/_data; - cp -pR /root/hass_config/_data /var/lib/docker/volumes/hass_config/; - sleep 2; - clear; - show_menu; - ;; - 6) while true; do - read -p "Are you sure you want to Edit Home Assistant Configuration? Proceed(y/n)?" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done - clear; - option_picked "Editing Home Assistant Configuration"; - nano /var/lib/docker/volumes/hass_config/_data/configuration.yaml; - clear; - show_menu; - ;; - 7) clear; - option_picked "Restarting Home Assistant"; - docker restart homeassistant; - exit; - ;; - 8) clear; - option_picked "Just Updating Containers"; - ./update-containers.sh; - sleep 2; - clear; - show_menu; - ;; - 9) clear; - option_picked "Removing Unused Images"; - docker image prune -af; - sleep 2; - clear; - show_menu; - ;; - 10) clear; - option_picked "Updating Host OS"; - apt update && apt upgrade -y; - sleep 2; - clear; - show_menu; - ;; - 11) clear; - option_picked "Reboot Host OS"; - reboot; - exit; - ;; - x)exit; - ;; - \n)exit; - ;; - *)clear; - option_picked "Please choose an option from the menu"; - show_menu; - ;; - esac - fi - done -docker pull homeassistant/home-assistant:$TAG -docker rm --force homeassistant -docker run -d \ - --name homeassistant \ - --privileged \ - --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:$TAG -EOF -sudo chmod +x /root/update -cat >$UPDATE_CONTAINERS_PATH <<'EOF' -#!/bin/bash -set -o errexit -CONTAINER_LIST="${1:-$(docker ps -q)}" -for container in ${CONTAINER_LIST}; do - CONTAINER_IMAGE="$(docker inspect --format "{{.Config.Image}}" --type container ${container})" - RUNNING_IMAGE="$(docker inspect --format "{{.Image}}" --type container "${container}")" - docker pull "${CONTAINER_IMAGE}" - LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" - if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then - echo "Updating ${container} image ${CONTAINER_IMAGE}" - DOCKER_COMMAND="$(runlike "${container}")" - docker rm --force "${container}" - eval ${DOCKER_COMMAND} - fi -done -EOF -sudo chmod +x /root/update-containers.sh -msg_ok "Created Update Menu Script" -mkdir /root/hass_config -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index eaed502e..b6c63719 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -153,12 +149,11 @@ $STD docker run -d \ mkdir /root/hass_config msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -171,10 +166,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh deleted file mode 100644 index 3fdc5a6b..00000000 --- a/install/homebridge-install.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -sudo apt-get install -y nodejs gcc g++ make python net-tools &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Homebridge" -sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x &>/dev/null -msg_info "Installed Homebridge" - -msg_info "Creating Service" -sudo hb-service install --user homebridge &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 6526111b..1bf8da31 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -105,12 +101,11 @@ msg_info "Creating Service" $STD hb-service install --user homebridge msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -123,10 +118,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homepage-install.sh b/install/homepage-install.sh deleted file mode 100644 index b69d538c..00000000 --- a/install/homepage-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_14.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -npm install -g pnpm &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Homepage" -git clone https://github.com/benphelps/homepage.git /opt/homepage &>/dev/null -cd /opt/homepage -mkdir -p config -pnpm install &>/dev/null -pnpm build &>/dev/null -msg_ok "Installed Homepage" - -msg_info "Creating Service" -service_path="/etc/systemd/system/homepage.service" -echo "[Unit] -Description=Homepage -After=network.target -StartLimitIntervalSec=0 -[Service] -Type=simple -Restart=always -RestartSec=1 -User=root -WorkingDirectory=/opt/homepage/ -ExecStart=pnpm start -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now homepage &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index eca56674..81bc069e 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -125,11 +121,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now homepage msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -142,10 +138,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index e4f564d5..b7bbed3a 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -114,11 +110,11 @@ EOF $STD systemctl enable --now homer msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -131,10 +127,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh deleted file mode 100644 index 29644340..00000000 --- a/install/hyperion-install.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y lsb-release &>/dev/null -apt-get install -y gpg &>/dev/null -apt-get install -y apt-transport-https &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Hyperion" -wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | sudo gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg &>/dev/null -echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hyperion.list &>/dev/null -apt-get update &>/dev/null -apt-get install -y hyperion &>/dev/null -systemctl enable --now hyperion@root.service &>/dev/null -msg_ok "Installed Hyperion" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 62dd33fc..82bf8084 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -99,11 +95,11 @@ $STD apt-get install -y hyperion $STD systemctl enable --now hyperion@root.service msg_ok "Installed Hyperion" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -116,10 +112,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove >/dev/null diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh deleted file mode 100644 index 1d11d97f..00000000 --- a/install/influxdb-install.sh +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y lsb-base &>/dev/null -apt-get install -y lsb-release &>/dev/null -apt-get install -y gnupg2 &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up InfluxDB Repository" -wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - &>/dev/null -echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list &>/dev/null -msg_ok "Set up InfluxDB Repository" - -read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt -if [[ $prompt == "2" ]]; then - INFLUX="2" -else - INFLUX="1" -fi - -msg_info "Installing InfluxDB" -apt-get update &>/dev/null -if [[ $INFLUX == "2" ]]; then - apt-get install -y influxdb2 &>/dev/null -else - apt-get install -y influxdb &>/dev/null -fi -systemctl enable --now influxdb &>/dev/null -msg_ok "Installed InfluxDB" - -read -r -p "Would you like to add Telegraf? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - TELEGRAF="Y" -else - TELEGRAF="N" -fi - -if [[ $TELEGRAF == "Y" ]]; then - msg_info "Installing Telegraf" - apt-get install -y telegraf &>/dev/null - msg_ok "Installed Telegraf" -fi - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index f5becf2e..6c16f851 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -128,12 +124,11 @@ if [[ $TELEGRAF == "Y" ]]; then msg_ok "Installed Telegraf" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -146,10 +141,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh deleted file mode 100644 index 813e9c46..00000000 --- a/install/iobroker-install.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing ioBroker (10 min)" -curl -sLf https://iobroker.net/install.sh | bash - &>/dev/null -msg_ok "Installed ioBroker" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 96db7e0b..9baddbb6 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -93,12 +89,11 @@ msg_info "Installing ioBroker (Patience)" $STD bash <(curl -fsSL https://iobroker.net/install.sh) msg_ok "Installed ioBroker" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -111,10 +106,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh deleted file mode 100644 index 94c8ad5f..00000000 --- a/install/jellyfin-install.sh +++ /dev/null @@ -1,159 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y apt-transport-https &>/dev/null -apt-get install -y software-properties-common &>/dev/null -msg_ok "Installed Dependencies" - -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then - msg_info "Setting Up Hardware Acceleration" - apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd &>/dev/null - - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* - msg_ok "Set Up Hardware Acceleration" -fi - -msg_info "Setting Up Jellyfin Repository" -sudo add-apt-repository universe -y &>/dev/null -wget -q -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add - &>/dev/null -echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list &>/dev/null -msg_ok "Set Up Jellyfin Repository" - -msg_info "Installing Jellyfin" -apt-get update &>/dev/null -sudo apt install jellyfin-server -y &>/dev/null -apt install jellyfin-ffmpeg -y &>/dev/null -msg_ok "Installed Jellyfin" - -msg_info "Creating Service" -cat <<'EOF' >/lib/systemd/system/jellyfin.service -[Unit] -Description = Jellyfin Media Server -After = network.target -[Service] -Type = simple -EnvironmentFile = /etc/default/jellyfin -User = root -ExecStart = /usr/bin/jellyfin -Restart = on-failure -TimeoutSec = 15 -[Install] -WantedBy = multi-user.target -EOF -ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 99df1d57..9b06ea4c 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -133,11 +129,11 @@ EOF ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -150,10 +146,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index a87798ad..8a8553ae 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -109,11 +105,11 @@ msg_info "Installing Helm" $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) msg_ok "Installed Helm" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -126,10 +122,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index b76e7979..e7f41d47 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,7 +10,6 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" @@ -42,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -67,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -108,11 +111,11 @@ chmod +x /opt/Kavita/* && chown root /opt/Kavita/* systemctl enable --now -q kavita.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -125,10 +128,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh deleted file mode 100644 index 92488072..00000000 --- a/install/keycloak-install.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies (Patience)" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y openjdk-11-jdk &>/dev/null -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) }') - -msg_info "Installing Keycloak v$RELEASE" -cd /opt -wget https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz &>/dev/null -tar -xvf keycloak-$RELEASE.tar.gz &>/dev/null -mv keycloak-$RELEASE keycloak -msg_ok "Installed Keycloak" - -msg_info "Creating Service" -service_path="/etc/systemd/system/keycloak.service" -echo "[Unit] -Description=Keycloak -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/keycloak -ExecStart=/opt/keycloak/bin/kc.sh start-dev -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now keycloak.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 4370ce4d..6fdf6051 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -112,11 +108,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now keycloak.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -129,10 +125,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index 653c2d7e..d32cf2af 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -119,11 +115,11 @@ systemctl -q daemon-reload systemctl enable --now -q lidarr msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -136,10 +132,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Lidarr.master.*.tar.gz diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh deleted file mode 100644 index 37ada095..00000000 --- a/install/magicmirror-install.sh +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Setting up MagicMirror Repository" -git clone https://github.com/MichMich/MagicMirror /opt/magicmirror &>/dev/null -msg_ok "Set up MagicMirror Repository" - -msg_info "Installing MagicMirror" -cd /opt/magicmirror &>/dev/null -npm install --only=prod --omit=dev &>/dev/null - -cat </opt/magicmirror/config/config.js -let config = { - address: "0.0.0.0", - port: 8080, - basePath: "/", - ipWhitelist: [], - useHttps: false, - httpsPrivateKey: "", - httpsCertificate: "", - language: "en", - locale: "en-US", - logLevel: ["INFO", "LOG", "WARN", "ERROR"], - timeFormat: 24, - units: "metric", - serverOnly: true, - modules: [ - { - module: "alert", - }, - { - module: "updatenotification", - position: "top_bar" - }, - { - module: "clock", - position: "top_left" - }, - { - module: "calendar", - header: "US Holidays", - position: "top_left", - config: { - calendars: [ - { - symbol: "calendar-check", - url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" - } - ] - } - }, - { - module: "compliments", - position: "lower_third" - }, - { - module: "weather", - position: "top_right", - config: { - weatherProvider: "openweathermap", - type: "current", - location: "New York", - locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city - apiKey: "YOUR_OPENWEATHER_API_KEY" - } - }, - { - module: "weather", - position: "top_right", - header: "Weather Forecast", - config: { - weatherProvider: "openweathermap", - type: "forecast", - location: "New York", - locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city - apiKey: "YOUR_OPENWEATHER_API_KEY" - } - }, - { - module: "newsfeed", - position: "bottom_bar", - config: { - feeds: [ - { - title: "New York Times", - url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml" - } - ], - showSourceTitle: true, - showPublishDate: true, - broadcastNewsFeeds: true, - broadcastNewsUpdates: true - } - }, - ] -}; - -/*************** DO NOT EDIT THE LINE BELOW ***************/ -if (typeof module !== "undefined") {module.exports = config;} -EOF -msg_ok "Installed MagicMirror" - -msg_info "Creating Service" -service_path="/etc/systemd/system/magicmirror.service" -echo "[Unit] -Description=Magic Mirror -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -Restart=always -RestartSec=1 -User=root -WorkingDirectory=/opt/magicmirror/ -ExecStart=/usr/bin/node serveronly - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now magicmirror &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index f347ba92..94db7430 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,7 +10,6 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" @@ -74,7 +74,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -217,11 +217,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now magicmirror msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -234,10 +234,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh deleted file mode 100644 index cd499979..00000000 --- a/install/mariadb-install.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing MariaDB" -curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash &>/dev/null -apt-get update >/dev/null -apt-get install -y mariadb-server &>/dev/null -msg_ok "Installed MariaDB" - -read -r -p "Would you like to add Adminer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - ADMINER="Y" -else - ADMINER="N" -fi - -if [[ $ADMINER == "Y" ]]; then - msg_info "Installing Adminer" - sudo apt install adminer -y &>/dev/null - sudo a2enconf adminer &>/dev/null - sudo systemctl reload apache2 &>/dev/null - msg_ok "Installed Adminer" -fi - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 7e5b2265..35d38926 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -110,12 +106,11 @@ if [[ $ADMINER == "Y" ]]; then msg_ok "Installed Adminer" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -128,10 +123,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh deleted file mode 100644 index af40b17d..00000000 --- a/install/meshcentral-install.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing MeshCentral" -mkdir /opt/meshcentral -cd /opt/meshcentral -npm install meshcentral &>/dev/null -node node_modules/meshcentral --install &>/dev/null -msg_ok "Installed MeshCentral" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index e4085bed..825aaa00 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -104,12 +100,11 @@ $STD npm install meshcentral $STD node node_modules/meshcentral --install msg_ok "Installed MeshCentral" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -122,10 +117,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh deleted file mode 100644 index 7d819d66..00000000 --- a/install/motioneye-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y cifs-utils &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Motion" -apt-get install motion -y &>/dev/null -systemctl stop motion &>/dev/null -systemctl disable motion &>/dev/null -msg_ok "Installed Motion" - -msg_info "Installing FFmpeg" -apt-get install ffmpeg v4l-utils -y &>/dev/null -msg_ok "Installed FFmpeg" - -msg_info "Installing Python" -apt-get update &>/dev/null -apt-get install python2 -y &>/dev/null -curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py &>/dev/null -python2 get-pip.py &>/dev/null -apt-get install libffi-dev libzbar-dev libzbar0 -y &>/dev/null -apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -y &>/dev/null -msg_ok "Installed Python" - -msg_info "Installing MotionEye" -apt-get update &>/dev/null -sudo pip install motioneye &>/dev/null -mkdir -p /etc/motioneye -cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf -mkdir -p /var/lib/motioneye -msg_ok "Installed MotionEye" - -msg_info "Creating Service" -cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service &>/dev/null -systemctl enable motioneye &>/dev/null -systemctl start motioneye -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 77a8f558..772149a2 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -123,12 +119,11 @@ $STD systemctl enable motioneye systemctl start motioneye msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -141,10 +136,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh deleted file mode 100644 index c9e90259..00000000 --- a/install/mqtt-install.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Mosquitto MQTT Broker" -wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key &>/dev/null -apt-key add mosquitto-repo.gpg.key &>/dev/null -cd /etc/apt/sources.list.d/ -wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list &>/dev/null -apt-get update >/dev/null -apt-get -y install mosquitto &>/dev/null -apt-get -y install mosquitto-clients &>/dev/null -msg_ok "Installed Mosquitto MQTT Broker" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 7b2893bb..867fb2bb 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -100,12 +96,11 @@ $STD apt-get -y install mosquitto $STD apt-get -y install mosquitto-clients msg_ok "Installed Mosquitto MQTT Broker" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -118,10 +113,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/n8n-install.sh b/install/n8n-install.sh deleted file mode 100644 index c700bdb0..00000000 --- a/install/n8n-install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -sL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing n8n (Patience)" -npm install --global n8n &>/dev/null -msg_ok "Installed n8n" - -msg_info "Creating Service" -cat </etc/systemd/system/n8n.service -[Unit] -Description=n8n - -[Service] -Type=simple -ExecStart=n8n start -[Install] -WantedBy=multi-user.target -EOF -sudo systemctl start n8n &>/dev/null -sudo systemctl enable n8n &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index e03de40c..d72a9c2d 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -115,12 +111,11 @@ EOF $STD systemctl enable --now n8n msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -133,10 +128,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh deleted file mode 100644 index e746cf32..00000000 --- a/install/navidrome-install.sh +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies (patience)" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y ffmpeg &>/dev/null -msg_ok "Installed Dependencies" - -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Installing Navidrome" -sudo install -d -o root -g root /opt/navidrome -sudo install -d -o root -g root /var/lib/navidrome -wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null -sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null -sudo chown -R root:root /opt/navidrome -mkdir -p /music -cat </var/lib/navidrome/navidrome.toml -MusicFolder = '/music' -EOF -msg_ok "Installed Navidrome" - -msg_info "Creating Service" -service_path="/etc/systemd/system/navidrome.service" - -echo "[Unit] -Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic -After=remote-fs.target network.target -AssertPathExists=/var/lib/navidrome - -[Service] -User=root -Group=root -Type=simple -ExecStart=/opt/navidrome/navidrome --configfile '/var/lib/navidrome/navidrome.toml' -WorkingDirectory=/var/lib/navidrome -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -DevicePolicy=closed -NoNewPrivileges=yes -PrivateTmp=yes -PrivateUsers=yes -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 -RestrictNamespaces=yes -RestrictRealtime=yes -SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap -ReadWritePaths=/var/lib/navidrome -ProtectSystem=full - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl daemon-reload -systemctl enable --now navidrome.service &>/dev/null - -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -rm -rf /root/Navidrome.tar.gz -msg_ok "Cleaned" diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index c035e760..519177bd 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -143,11 +139,11 @@ $STD systemctl enable --now navidrome.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -160,10 +156,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh deleted file mode 100644 index 5ea6ffa3..00000000 --- a/install/nextcloudpi-install.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing NextCloudPi (Patience)" -curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null -sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php -sudo service apache2 restart -msg_ok "Installed NextCloudPi" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index e0cb1628..fc3f7c74 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -95,11 +91,11 @@ sed -i '{s|root:/usr/sbin/nologin|root:/bin/bash|g}' /etc/passwd service apache2 restart msg_ok "Installed NextCloudPi" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -112,10 +108,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/nginx-proxy-manager-install.sh b/install/nginx-proxy-manager-install.sh deleted file mode 100644 index c2dba3e7..00000000 --- a/install/nginx-proxy-manager-install.sh +++ /dev/null @@ -1,280 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get update &>/dev/null -apt-get -y install \ - sudo \ - curl \ - gnupg \ - make \ - g++ \ - gcc \ - ca-certificates \ - apache2-utils \ - logrotate \ - build-essential \ - python3-dev \ - git \ - lsb-release &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Python" -apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv &>/dev/null -pip3 install --upgrade setuptools &>/dev/null -pip3 install --upgrade pip &>/dev/null -python3 -m venv /opt/certbot/ &>/dev/null -if [ "$(getconf LONG_BIT)" = "32" ]; then - python3 -m pip install --no-cache-dir -U cryptography==3.3.2 &>/dev/null -fi -python3 -m pip install --no-cache-dir cffi certbot &>/dev/null -msg_ok "Installed Python" - -msg_info "Installing Openresty" -wget -q -O - https://openresty.org/package/pubkey.gpg | apt-key add - &>/dev/null -codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) &>/dev/null -echo "deb http://openresty.org/package/debian $codename openresty" | tee /etc/apt/sources.list.d/openresty.list &>/dev/null -apt-get -y update &>/dev/null -apt-get -y install --no-install-recommends openresty &>/dev/null -msg_ok "Installed Openresty" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Yarn" -npm install --global yarn &>/dev/null -msg_ok "Installed Yarn" - -RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Downloading Nginx Proxy Manager v${RELEASE}" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null -cd ./nginx-proxy-manager-${RELEASE} -msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" - -msg_info "Setting up Enviroment" -ln -sf /usr/bin/python3 /usr/bin/python -ln -sf /usr/bin/certbot /opt/certbot/bin/certbot -ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx -ln -sf /usr/local/openresty/nginx/ /etc/nginx - -sed -i "s+0.0.0+${RELEASE}+g" backend/package.json -sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json - -sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf -NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") -for NGINX_CONF in $NGINX_CONFS; do - sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" -done - -mkdir -p /var/www/html /etc/nginx/logs -cp -r docker/rootfs/var/www/html/* /var/www/html/ -cp -r docker/rootfs/etc/nginx/* /etc/nginx/ -cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini -cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager -ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf -rm -f /etc/nginx/conf.d/dev.conf - -mkdir -p /tmp/nginx/body \ - /run/nginx \ - /data/nginx \ - /data/custom_ssl \ - /data/logs \ - /data/access \ - /data/nginx/default_host \ - /data/nginx/default_www \ - /data/nginx/proxy_host \ - /data/nginx/redirection_host \ - /data/nginx/stream \ - /data/nginx/dead_host \ - /data/nginx/temp \ - /var/lib/nginx/cache/public \ - /var/lib/nginx/cache/private \ - /var/cache/nginx/proxy_temp - -chmod -R 777 /var/cache/nginx -chown root /tmp/nginx - -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf - -if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -en "${GN} Generating dummy SSL Certificate... " - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null -fi - -mkdir -p /app/global /app/frontend/images -cp -r backend/* /app -cp -r global/* /app/global -msg_ok "Set up Enviroment" - -msg_info "Building Frontend" -cd ./frontend -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -yarn build &>/dev/null -cp -r dist/* /app/frontend -cp -r app-images/* /app/frontend/images -msg_ok "Built Frontend" - -msg_info "Initializing Backend" -rm -rf /app/config/default.json &>/dev/null -if [ ! -f /app/config/production.json ]; then - cat <<'EOF' >/app/config/production.json -{ - "database": { - "engine": "knex-native", - "knex": { - "client": "sqlite3", - "connection": { - "filename": "/data/database.sqlite" - } - } - } -} -EOF -fi -cd /app -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -msg_ok "Initialized Backend" - -msg_info "Creating Service" -cat <<'EOF' >/lib/systemd/system/npm.service -[Unit] -Description=Nginx Proxy Manager -After=network.target -Wants=openresty.service - -[Service] -Type=simple -Environment=NODE_ENV=production -ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge -ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 -WorkingDirectory=/app -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Starting Services" -systemctl enable npm &>/dev/null -systemctl start openresty -systemctl start npm -msg_ok "Started Services" - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index eacab824..ae45c980 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -247,12 +243,11 @@ WantedBy=multi-user.target EOF msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -265,10 +260,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Starting Services" $STD systemctl enable --now openresty diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh deleted file mode 100644 index 491eb153..00000000 --- a/install/nocodb-install.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -sudo apt-get install -y nodejs git make g++ gcc &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing NocoDB" -git clone https://github.com/nocodb/nocodb-seed &>/dev/null -mv nocodb-seed /opt/nocodb -cd /opt/nocodb -npm install &>/dev/null -msg_ok "Installed NocoDB" - -msg_info "Creating Service" -service_path="/etc/systemd/system/nocodb.service" -echo "[Unit] -Description=nocodb - -[Service] -Type=simple -Restart=always -User=root -WorkingDirectory=/opt/nocodb -ExecStart=/usr/bin/npm start - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now nocodb.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 1700c038..340863f9 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -122,12 +118,11 @@ WantedBy=multi-user.target" >$service_path systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -140,10 +135,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/node-red-install.sh b/install/node-red-install.sh deleted file mode 100644 index 85df743b..00000000 --- a/install/node-red-install.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Node-Red" -npm install -g --unsafe-perm node-red &>/dev/null -msg_ok "Installed Node-Red" - -msg_info "Creating Service" -service_path="/etc/systemd/system/nodered.service" -echo "[Unit] -Description=Node-RED -After=syslog.target network.target - -[Service] -ExecStart=/usr/bin/node-red --max-old-space-size=128 -v -Restart=on-failure -KillSignal=SIGINT - -SyslogIdentifier=node-red -StandardOutput=syslog - -WorkingDirectory=/root/ -User=root -Group=root - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now nodered.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index 20359660..b9cb9bc9 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -125,12 +121,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now nodered.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -143,10 +138,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/omada-install.sh b/install/omada-install.sh deleted file mode 100644 index bec67474..00000000 --- a/install/omada-install.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get -y install curl &>/dev/null -apt-get -y install sudo &>/dev/null -apt-get -y install gnupg &>/dev/null -apt-get -y install openjdk-8-jre-headless &>/dev/null -apt-get -y install jsvc &>/dev/null -wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb -sudo dpkg -i mongodb-org-server_3.6.23_amd64.deb &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Omada Controller v5.6.3" -wget -qL https://static.tp-link.com/upload/software/2022/202211/20221121/Omada_SDN_Controller_v5.7.4_Linux_x64.deb -sudo dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb &>/dev/null -msg_ok "Installed Omada Controller" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 9dabc392..79fd4e5f 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -99,11 +95,11 @@ wget -qL https://static.tp-link.com/upload/software/2022/202211/20221121/Omada_S $STD dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb msg_ok "Installed Omada Controller" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -116,10 +112,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Omada_SDN_Controller_v5.7.4_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb diff --git a/install/omv-install.sh b/install/omv-install.sh deleted file mode 100644 index 0a98be6f..00000000 --- a/install/omv-install.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -export DEBIAN_FRONTEND=noninteractive -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing OpenMediaVault (Patience)" -wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key &>/dev/null -apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null - -cat <>/etc/apt/sources.list.d/openmediavault.list -deb https://packages.openmediavault.org/public shaitan main -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main -## Uncomment the following line to add software from the proposed repository. -# deb https://packages.openmediavault.org/public shaitan-proposed main -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main -## This software is not part of OpenMediaVault, but is offered by third-party -## developers as a service to OpenMediaVault users. -# deb https://packages.openmediavault.org/public shaitan partner -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner -EOF -apt-get update &>/dev/null -apt-get -y install openmediavault-keyring &>/dev/null -apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends install openmediavault &>/dev/null -omv-confdbadm populate -msg_ok "Installed OpenMediaVault" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 19e6c069..90623f7c 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") @@ -10,26 +11,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -111,11 +107,11 @@ $STD apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-chan omv-confdbadm populate msg_ok "Installed OpenMediaVault" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -128,10 +124,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/openhab-install.sh b/install/openhab-install.sh deleted file mode 100644 index ef7dc48f..00000000 --- a/install/openhab-install.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -apt-get install -y apt-transport-https &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Azul Zulu" -apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 &>/dev/null -curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb &>/dev/null -apt-get install ./zulu-repo_1.0.0-3_all.deb &>/dev/null -apt-get update &>/dev/null -apt-get -y install zulu11-jdk &>/dev/null -msg_ok "Installed Azul Zulu" - -msg_info "Installing openHAB" -curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg -mv openhab.gpg /usr/share/keyrings -chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg -echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | tee /etc/apt/sources.list.d/openhab.list &>/dev/null -apt update &>/dev/null -apt-get -y install openhab &>/dev/null -systemctl daemon-reload -systemctl enable openhab.service &>/dev/null -systemctl start openhab.service -msg_ok "Installed openHAB" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 4ef6fe28..ca7a23d9 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -110,11 +106,11 @@ systemctl daemon-reload $STD systemctl enable --now openhab.service msg_ok "Installed openHAB" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -127,10 +123,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh deleted file mode 100644 index 87d509eb..00000000 --- a/install/paperless-ngx-install.sh +++ /dev/null @@ -1,287 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Paperless-ngx Dependencies" -apt-get install -y --no-install-recommends \ - python3 \ - python3-pip \ - python3-dev \ - imagemagick \ - fonts-liberation \ - optipng \ - gnupg \ - libpq-dev \ - libmagic-dev \ - mime-support \ - libzbar0 \ - poppler-utils \ - default-libmysqlclient-dev \ - sudo &>/dev/null -msg_ok "Installed Paperless-ngx Dependencies" - -msg_info "Installing OCR Dependencies" -apt-get install -y --no-install-recommends \ - unpaper \ - ghostscript \ - icc-profiles-free \ - qpdf \ - liblept5 \ - libxml2 \ - pngquant \ - zlib1g \ - tesseract-ocr \ - tesseract-ocr-eng &>/dev/null -msg_ok "Installed OCR Dependencies" - -msg_info "Installing Extra Dependencies" -apt-get install -y --no-install-recommends \ - redis \ - postgresql \ - build-essential \ - python3-setuptools \ - python3-wheel &>/dev/null -msg_ok "Installed Extra Dependencies" - -msg_info "Installing JBIG2" -apt-get install -y --no-install-recommends \ - automake \ - libtool \ - pkg-config \ - git \ - curl \ - libtiff-dev \ - libpng-dev \ - libleptonica-dev &>/dev/null - -git clone https://github.com/agl/jbig2enc /opt/jbig2enc &>/dev/null -cd /opt/jbig2enc -/bin/bash -c "./autogen.sh" &>/dev/null && - /bin/bash -c "./configure && make" &>/dev/null && - /bin/bash -c "make install" &>/dev/null -rm -rf /opt/jbig2enc -msg_ok "Installed JBIG2" - -msg_info "Downloading Paperless-ngx" -Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) -cd /opt && - wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz &>/dev/null && - tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ &>/dev/null && - mv paperless-ngx paperless && - rm paperless-ngx-$Paperlessngx.tar.xz -cd /opt/paperless - -## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file -sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt - -/usr/bin/python3 -m pip install --upgrade pip &>/dev/null -/usr/bin/python3 -m pip install -r requirements.txt &>/dev/null -msg_ok "Downloaded Paperless-ngx" - -msg_info "Setting up database" -DB_USER=paperless -DB_PASS="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)" -DB_NAME=paperlessdb - -sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" &>/dev/null -sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" &>/dev/null - -echo "Paperless-ngx Database User" >>~/paperless.creds -echo $DB_USER >>~/paperless.creds -echo "Paperless-ngx Database Password" >>~/paperless.creds -echo $DB_PASS >>~/paperless.creds -echo "Paperless-ngx Database Name" >>~/paperless.creds -echo $DB_NAME >>~/paperless.creds - -/bin/bash -c "mkdir -p {consume,media}" - -sed -i -e 's|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=paperlessdb|' /opt/paperless/paperless.conf -sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf -SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" -sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf - -cd /opt/paperless/src -/usr/bin/python3 manage.py migrate &>/dev/null -msg_ok "Set up database" - -msg_info "Setting up admin Paperless-ngx User & Password" -## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations -cat <>~/paperless.creds -echo "Paperless-ngx WebUI User" >>~/paperless.creds -echo admin >>~/paperless.creds -echo "Paperless-ngx WebUI Password" >>~/paperless.creds -echo $DB_PASS >>~/paperless.creds -msg_ok "Set up admin Paperless-ngx User & Password" - -cat </etc/systemd/system/paperless-scheduler.service -[Unit] -Description=Paperless Celery beat -Requires=redis.service - -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless beat --loglevel INFO - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/paperless-task-queue.service -[Unit] -Description=Paperless Celery Workers -Requires=redis.service - -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless worker --loglevel INFO - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/paperless-consumer.service -[Unit] -Description=Paperless consumer -Requires=redis.service - -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=python3 manage.py document_consumer - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/paperless-webserver.service -[Unit] -Description=Paperless webserver -After=network.target -Wants=network.target -Requires=redis.service - -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=/usr/local/bin/gunicorn -c /opt/paperless/gunicorn.conf.py paperless.asgi:application - -[Install] -WantedBy=multi-user.target -EOF - -sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml - -systemctl daemon-reload -systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service &>/dev/null - -msg_ok "Finished installing Paperless-ngx" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 2d3864e0..3eb5cb42 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,7 +10,6 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" @@ -74,7 +74,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -267,12 +267,11 @@ $STD systemctl enable --now paperless-consumer paperless-webserver paperless-sch msg_ok "Created Services" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -285,6 +284,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh deleted file mode 100644 index 523bdf41..00000000 --- a/install/photoprism-install.sh +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies (Patience)" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gcc &>/dev/null -apt-get install -y g++ &>/dev/null -apt-get install -y git &>/dev/null -apt-get install -y gnupg &>/dev/null -apt-get install -y make &>/dev/null -apt-get install -y zip &>/dev/null -apt-get install -y unzip &>/dev/null -apt-get install -y exiftool &>/dev/null -apt-get install -y ffmpeg &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -sL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Golang (Patience)" -wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz &>/dev/null -tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local &>/dev/null -ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null -go install github.com/tianon/gosu@latest &>/dev/null -go install golang.org/x/tools/cmd/goimports@latest &>/dev/null -go install github.com/psampaz/go-mod-outdated@latest &>/dev/null -go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest &>/dev/null -go install github.com/mikefarah/yq/v4@latest &>/dev/null -go install github.com/kyoh86/richgo@latest &>/dev/null -cp /root/go/bin/* /usr/local/go/bin/ -cp /usr/local/go/bin/richgo /usr/local/bin/richgo -cp /usr/local/go/bin/gosu /usr/local/sbin/gosu -chown root:root /usr/local/sbin/gosu -chmod 755 /usr/local/sbin/gosu -msg_ok "Installed Golang" - -msg_info "Installing Tensorflow" -if [[ "$AVX" =~ avx2 ]]; then - wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null - tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null -elif [[ "$AVX" =~ avx ]]; then - wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null - tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null -else - wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null - tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null -fi -ldconfig &>/dev/null -msg_ok "Installed Tensorflow" - -msg_info "Cloning PhotoPrism" -mkdir -p /opt/photoprism/bin -mkdir -p /var/lib/photoprism/storage -git clone https://github.com/photoprism/photoprism.git &>/dev/null -cd photoprism -git checkout release &>/dev/null -msg_ok "Cloned PhotoPrism" - -msg_info "Building PhotoPrism (Patience)" -NODE_OPTIONS=--max_old_space_size=2048 make all &>/dev/null -./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null -cp -r assets/ /opt/photoprism/ &>/dev/null -msg_ok "Built PhotoPrism" - -env_path="/var/lib/photoprism/.env" -echo " -PHOTOPRISM_AUTH_MODE='password' -PHOTOPRISM_ADMIN_PASSWORD='changeme' -PHOTOPRISM_HTTP_HOST='0.0.0.0' -PHOTOPRISM_HTTP_PORT='2342' -PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' -PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' -PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' -PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' -" >$env_path - -msg_info "Creating Service" -service_path="/etc/systemd/system/photoprism.service" - -echo "[Unit] -Description=PhotoPrism service -After=network.target - -[Service] -Type=forking -User=root -WorkingDirectory=/opt/photoprism -EnvironmentFile=/var/lib/photoprism/.env -ExecStart=/opt/photoprism/bin/photoprism up -d -ExecStop=/opt/photoprism/bin/photoprism down - -[Install] -WantedBy=multi-user.target" >$service_path -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* \ - /photoprism \ - /go1.19.3.linux-amd64.tar.gz \ - /libtensorflow-linux-avx2-1.15.2.tar.gz \ - /libtensorflow-linux-avx-1.15.2.tar.gz \ - /libtensorflow-linux-cpu-1.15.2.tar.gz -msg_ok "Cleaned" - -msg_info "Starting PhotoPrism" -systemctl enable --now photoprism &>/dev/null diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index ca60b3df..48584dcb 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) YW=$(echo "\033[33m") @@ -10,26 +11,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -50,15 +43,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -75,7 +71,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -183,12 +179,11 @@ ExecStop=/opt/photoprism/bin/photoprism down WantedBy=multi-user.target" >$service_path msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -201,10 +196,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/pihole-install.sh b/install/pihole-install.sh deleted file mode 100644 index 3b7de2a2..00000000 --- a/install/pihole-install.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -export DEBIAN_FRONTEND=noninteractive -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y ufw &>/dev/null -apt-get install -y ntp &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Pi-hole" -mkdir -p /etc/pihole/ -cat </etc/pihole/setupVars.conf -PIHOLE_INTERFACE=eth0 -PIHOLE_DNS_1=8.8.8.8 -PIHOLE_DNS_2=8.8.4.4 -QUERY_LOGGING=true -INSTALL_WEB_SERVER=true -INSTALL_WEB_INTERFACE=true -LIGHTTPD_ENABLED=true -CACHE_SIZE=10000 -DNS_FQDN_REQUIRED=true -DNS_BOGUS_PRIV=true -DNSMASQ_LISTENING=local -WEBPASSWORD=$(openssl rand -base64 48) -BLOCKING_ENABLED=true -EOF - -curl -sSL https://install.pi-hole.net | bash /dev/stdin --unattended &>/dev/null -msg_ok "Installed Pi-hole" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 2133980b..c1d93dd4 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi export DEBIAN_FRONTEND=noninteractive YW=$(echo "\033[33m") @@ -10,26 +11,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -50,15 +43,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -75,7 +71,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -116,12 +112,11 @@ EOF $STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended msg_ok "Installed Pi-hole" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -134,10 +129,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/plex-install.sh b/install/plex-install.sh deleted file mode 100644 index dc5ba5e2..00000000 --- a/install/plex-install.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -msg_ok "Installed Dependencies" - -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then - msg_info "Setting Up Hardware Acceleration" - apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - beignet-opencl-icd &>/dev/null - - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* - msg_ok "Set Up Hardware Acceleration" -fi - -msg_info "Setting Up Plex Media Server Repository" -wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add - &>/dev/null -echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" | tee /etc/apt/sources.list.d/plexmediaserver.list &>/dev/null -msg_ok "Set Up Plex Media Server Repository" - -msg_info "Installing Plex Media Server" -apt-get update &>/dev/null -apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver &>/dev/null -msg_ok "Installed Plex Media Server" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 93bb66d3..b9a46f66 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -113,11 +109,11 @@ $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver msg_ok "Installed Plex Media Server" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -130,10 +126,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh deleted file mode 100644 index 3cd1679d..00000000 --- a/install/podman-homeassistant-install.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Podman" -apt-get -y install podman &>/dev/null -systemctl enable --now podman.socket &>/dev/null -msg_ok "Installed Podman" - -read -r -p "Would you like to add Yacht (Semifunctional)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - YACHT="Y" -else - YACHT="N" -fi - -if [[ $YACHT == "Y" ]]; then - msg_info "Pulling Yacht Image" - podman pull docker.io/selfhostedpro/yacht:latest &>/dev/null - msg_ok "Pulled Yacht Image" - - msg_info "Installing Yacht" - podman volume create yacht >/dev/null - podman run -d \ - --privileged \ - --name yacht \ - --restart always \ - -v /var/run/podman/podman.sock:/var/run/docker.sock \ - -v yacht:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - -p 8000:8000 \ - selfhostedpro/yacht:latest &>/dev/null - podman generate systemd \ - --new --name yacht \ - >/etc/systemd/system/yacht.service - systemctl enable yacht &>/dev/null - msg_ok "Installed Yacht" -fi -msg_info "Pulling Home Assistant Image" -podman pull docker.io/homeassistant/home-assistant:stable &>/dev/null -msg_ok "Pulled Home Assistant Image" - -msg_info "Installing Home Assistant" -podman volume create hass_config >/dev/null -podman run -d \ - --privileged \ - --name homeassistant \ - --restart unless-stopped \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:stable &>/dev/null -podman generate systemd \ - --new --name homeassistant \ - >/etc/systemd/system/homeassistant.service -systemctl enable homeassistant &>/dev/null -msg_ok "Installed Home Assistant" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index e7831240..277afab7 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -115,12 +111,11 @@ podman generate systemd \ $STD systemctl enable --now homeassistant msg_ok "Installed Home Assistant" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -133,10 +128,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index f893c4d0..98928d14 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -94,11 +90,11 @@ $STD systemctl enable --now podman.socket echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf msg_ok "Installed Podman" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -111,10 +107,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh deleted file mode 100644 index 4e0c8849..00000000 --- a/install/postgresql-install.sh +++ /dev/null @@ -1,243 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg2 &>/dev/null -apt-get install -y lsb-release &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up PostgreSQL Repository" -sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' &>/dev/null -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - &>/dev/null -msg_ok "Setup PostgreSQL Repository" - -msg_info "Installing PostgreSQL" -apt-get update &>/dev/null -apt-get install -y postgresql &>/dev/null - -cat </etc/postgresql/15/main/pg_hba.conf -# PostgreSQL Client Authentication Configuration File -local all postgres peer -# TYPE DATABASE USER ADDRESS METHOD -# "local" is for Unix domain socket connections only -local all all peer -# IPv4 local connections: -host all all 127.0.0.1/32 scram-sha-256 -host all all 0.0.0.0/24 md5 -# IPv6 local connections: -host all all ::1/128 scram-sha-256 -host all all 0.0.0.0/0 md5 -# Allow replication connections from localhost, by a user with the -# replication privilege. -local replication all peer -host replication all 127.0.0.1/32 scram-sha-256 -host replication all ::1/128 scram-sha-256 -EOF - -cat </etc/postgresql/15/main/postgresql.conf -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -data_directory = '/var/lib/postgresql/15/main' -hba_file = '/etc/postgresql/15/main/pg_hba.conf' -ident_file = '/etc/postgresql/15/main/pg_ident.conf' -external_pid_file = '/var/run/postgresql/15-main.pid' - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '*' -port = 5432 -max_connections = 100 -unix_socket_directories = '/var/run/postgresql' - -# - SSL - - -ssl = on -ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' -ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -shared_buffers = 128MB -dynamic_shared_memory_type = posix - -#------------------------------------------------------------------------------ -# WRITE-AHEAD LOG -#------------------------------------------------------------------------------ - -max_wal_size = 1GB -min_wal_size = 80MB - -#------------------------------------------------------------------------------ -# REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - What to Log - - -log_line_prefix = '%m [%p] %q%u@%d ' -log_timezone = 'Etc/UTC' - -#------------------------------------------------------------------------------ -# PROCESS TITLE -#------------------------------------------------------------------------------ - -cluster_name = '15/main' - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Locale and Formatting - - -datestyle = 'iso, mdy' -timezone = 'Etc/UTC' -lc_messages = 'C' -lc_monetary = 'C' -lc_numeric = 'C' -lc_time = 'C' -default_text_search_config = 'pg_catalog.english' - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -include_dir = 'conf.d' -EOF - -sudo systemctl restart postgresql -msg_ok "Installed PostgreSQL" - -read -r -p "Would you like to add Adminer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - ADMINER="Y" -else - ADMINER="N" -fi - -if [[ $ADMINER == "Y" ]]; then - msg_info "Installing Adminer" - sudo apt install adminer -y &>/dev/null - sudo a2enconf adminer &>/dev/null - sudo systemctl reload apache2 &>/dev/null - msg_ok "Installed Adminer" -fi - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 16a24da2..bc14a5dc 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -217,11 +213,11 @@ if [[ $ADMINER == "Y" ]]; then msg_ok "Installed Adminer" fi -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -234,10 +230,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh deleted file mode 100644 index fd38a1b9..00000000 --- a/install/prometheus-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Prometheus" -mkdir -p /etc/prometheus -mkdir -p /var/lib/prometheus -wget https://github.com/prometheus/prometheus/releases/download/v2.36.2/prometheus-2.36.2.linux-amd64.tar.gz &>/dev/null -tar -xvf prometheus-2.36.2.linux-amd64.tar.gz &>/dev/null -cd prometheus-2.36.2.linux-amd64 -mv prometheus promtool /usr/local/bin/ -mv consoles/ console_libraries/ /etc/prometheus/ -mv prometheus.yml /etc/prometheus/prometheus.yml -msg_ok "Installed Prometheus" - -msg_info "Creating Service" -service_path="/etc/systemd/system/prometheus.service" -echo "[Unit] -Description=Prometheus -Wants=network-online.target -After=network-online.target - -[Service] -User=root -Restart=always -Type=simple -ExecStart=/usr/local/bin/prometheus \ - --config.file=/etc/prometheus/prometheus.yml \ - --storage.tsdb.path=/var/lib/prometheus/ \ - --web.console.templates=/etc/prometheus/consoles \ - --web.console.libraries=/etc/prometheus/console_libraries \ - --web.listen-address=0.0.0.0:9090 - -[Install] -WantedBy=multi-user.target" >$service_path -sudo systemctl enable --now prometheus &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -rm -rf /root/prometheus-2.36.2.linux-amd64 /root/prometheus-2.36.2.linux-amd64.tar.gz -msg_ok "Cleaned" diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 5eaad18a..faf3d67a 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -124,11 +120,11 @@ WantedBy=multi-user.target" >$service_path $STD sudo systemctl enable --now prometheus msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -141,10 +137,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index ace1fe80..7fa6898b 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -117,11 +113,11 @@ systemctl -q daemon-reload systemctl enable --now -q prowlarr msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -134,10 +130,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Prowlarr.master.*.tar.gz diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 57434a87..58f9c4a6 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -117,11 +113,11 @@ systemctl -q daemon-reload systemctl enable --now -q radarr msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -134,10 +130,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Radarr.master.*.tar.gz diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index b621cb7a..d4586f0d 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -117,11 +113,11 @@ systemctl -q daemon-reload systemctl enable --now -q readarr msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -134,10 +130,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Readarr.develop.*.tar.gz diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 964f2de7..ccdf4923 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -122,11 +118,11 @@ WantedBy=multi-user.target" >$service_path systemctl enable --now -q sabnzbd.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -139,10 +135,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh deleted file mode 100644 index 96380318..00000000 --- a/install/scrypted-install.sh +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get -y install software-properties-common apt-utils &>/dev/null -apt-get -y update &>/dev/null -apt-get -y upgrade &>/dev/null -apt-get -y install \ - build-essential \ - gcc \ - gir1.2-gtk-3.0 \ - libcairo2-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libjpeg-dev \ - libgif-dev \ - libopenjp2-7 \ - libpango1.0-dev \ - librsvg2-dev \ - pkg-config \ - curl \ - sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing GStreamer" -apt-get -y install \ - gstreamer1.0-tools \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgstreamer-plugins-bad1.0-dev \ - gstreamer1.0-plugins-base \ - gstreamer1.0-plugins-good \ - gstreamer1.0-plugins-bad \ - gstreamer1.0-plugins-ugly \ - gstreamer1.0-libav \ - gstreamer1.0-alsa &>/dev/null -msg_ok "Installed GStreamer" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Python3" -apt-get -y install \ - python3 \ - python3-dev \ - python3-gi \ - python3-gst-1.0 \ - python3-matplotlib \ - python3-numpy \ - python3-opencv \ - python3-pil \ - python3-pip \ - python3-setuptools \ - python3-skimage \ - python3-wheel &>/dev/null -python3 -m pip install --upgrade pip &>/dev/null -python3 -m pip install aiofiles debugpy typing_extensions typing &>/dev/null -msg_ok "Installed Python3" - -read -r -p "Would you like to add Coral Edge TPU support? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - CORAL="Y" -else - CORAL="N" -fi - -if [[ $CORAL == "Y" ]]; then -msg_info "Adding Coral Edge TPU Support" -echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list &>/dev/null -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - &>/dev/null -apt-get -y update &>/dev/null -apt-get -y install libedgetpu1-std &>/dev/null -msg_ok "Coral Edge TPU Support Added" -fi - -msg_info "Installing Scrypted" -sudo -u root npx -y scrypted@latest install-server &>/dev/null -msg_info "Installed Scrypted" - -msg_info "Creating Service" -service_path="/etc/systemd/system/scrypted.service" -echo "[Unit] -Description=Scrypted service -After=network.target - -[Service] -User=root -Group=root -Type=simple -ExecStart=/usr/bin/npx -y scrypted serve -Restart=on-failure -RestartSec=3 - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now scrypted.service &>/dev/null -msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 53c2e62d..c55bfba2 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -182,11 +178,11 @@ RestartSec=3 WantedBy=multi-user.target" >$service_path $STD systemctl enable --now scrypted.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -199,10 +195,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh deleted file mode 100644 index 0c8510fa..00000000 --- a/install/shinobi-install.sh +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update --fix-missing &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1) -if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then - apt install sudo wget -y - sudo apt install -y software-properties-common - sudo add-apt-repository universe -y - apt update -y - apt update --fix-missing -y -fi - -msg_info "Installing Dependencies" -apt-get install -y curl sudo git &>/dev/null -apt-get install -y make zip net-tools &>/dev/null -apt-get install -y gcc g++ cmake &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing FFMPEG" -apt-get install -y ffmpeg &>/dev/null -msg_ok "Installed FFMPEG" - -msg_info "Clonning Shinobi" -cd /opt -git clone https://gitlab.com/Shinobi-Systems/Shinobi.git -b master Shinobi &>/dev/null -cd Shinobi -gitVersionNumber=$(git rev-parse HEAD) -theDateRightNow=$(date) -touch version.json -chmod 777 version.json -echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json -msg_ok "Cloned Shinobi" - -msg_info "Installing Database" -sqlpass="" -echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections -echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections -apt-get install -y mariadb-server &>/dev/null -service mysql start -sqluser="root" -mysql -e "source sql/user.sql" || true -mysql -e "source sql/framework.sql" || true -msg_ok "Installed Database" -cp conf.sample.json conf.json -cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') -sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json -cp super.sample.json super.json - -msg_info "Installing Shinobi" -npm i npm -g &>/dev/null -npm install --unsafe-perm &>/dev/null -npm install pm2@latest -g &>/dev/null -chmod -R 755 . -touch INSTALL/installed.txt -ln -s /opt/Shinobi/INSTALL/shinobi /usr/bin/shinobi -node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null -pm2 start camera.js &>/dev/null -pm2 start cron.js &>/dev/null -pm2 startup &>/dev/null -pm2 save &>/dev/null -pm2 list &>/dev/null -msg_ok "Installed Shinobi" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index b78a3eb2..6a6c6d47 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -151,11 +147,11 @@ $STD pm2 save $STD pm2 list msg_ok "Installed Shinobi" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -168,10 +164,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index d70ec352..4d397510 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -10,26 +11,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -98,11 +94,11 @@ $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr msg_ok "Installed Sonarr" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -115,10 +111,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh deleted file mode 100644 index a6a09abd..00000000 --- a/install/syncthing-install.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gnupg &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Syncthing" -curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg &>/dev/null -echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list &>/dev/null -apt-get update &>/dev/null -apt-get install -y syncthing &>/dev/null -systemctl enable syncthing@root.service &>/dev/null -systemctl start syncthing@root.service -sleep 5 -sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml -systemctl restart syncthing@root.service -msg_ok "Installed Syncthing" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 3a78362e..770fdc90 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -101,11 +97,11 @@ sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml systemctl restart syncthing@root.service msg_ok "Installed Syncthing" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -118,10 +114,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 0121ef51..35167dfc 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -144,11 +140,11 @@ systemctl enable --now -q tdarr-server.service systemctl enable --now -q tdarr-node.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -161,10 +157,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Tdarr_Updater.zip diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh deleted file mode 100644 index 038275c2..00000000 --- a/install/technitiumdns-install.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Technitium DNS" -curl -sSL https://download.technitium.com/dns/install.sh | sudo bash &>/dev/null -msg_ok "Installed Technitium DNS" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 76abf611..a410e6cc 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -96,12 +92,11 @@ ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -114,10 +109,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index 436f527a..db579d21 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -96,11 +92,11 @@ sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rp systemctl start transmission-daemon msg_ok "Installed Transmission" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -113,10 +109,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/trilium-install.sh b/install/trilium-install.sh deleted file mode 100644 index d18a33c2..00000000 --- a/install/trilium-install.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Installing Trilium" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null -mv trilium-linux-x64-server /opt/trilium -msg_ok "Installed Trilium" - -msg_info "Creating Service" -service_path="/etc/systemd/system/trilium.service" - -echo "[Unit] -Description=Trilium Daemon -After=syslog.target network.target - -[Service] -User=root -Type=simple -ExecStart=/opt/trilium/trilium.sh -WorkingDirectory=/opt/trilium/ -TimeoutStopSec=20 -Restart=always - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q trilium -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz -msg_ok "Cleaned" diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index b4fe4f89..4b266ec1 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -118,11 +114,11 @@ WantedBy=multi-user.target" >$service_path systemctl enable --now -q trilium msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -135,10 +131,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh deleted file mode 100644 index 0b1564d0..00000000 --- a/install/ubuntu-install.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index abb5e42f..ec35eb7f 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -89,11 +85,11 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -106,10 +102,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh deleted file mode 100644 index d63ff40a..00000000 --- a/install/umbrel-install.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -cat >$DOCKER_CONFIG_PATH <<'EOF' -{ - "log-driver": "journald" -} -EOF - -msg_info "Installing Umbrel (Patience)" -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -fi -curl -sL https://umbrel.sh | bash &>/dev/null -systemctl daemon-reload -systemctl enable --now umbrel-startup.service &>/dev/null -msg_ok "Installed Umbrel" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 448920c3..3c0e217b 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -107,12 +103,11 @@ systemctl daemon-reload $STD systemctl enable --now umbrel-startup.service msg_ok "Installed Umbrel" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -125,10 +120,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean diff --git a/install/unifi-install.sh b/install/unifi-install.sh deleted file mode 100644 index da6e91fd..00000000 --- a/install/unifi-install.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -#https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -read -r -p "Local Controller? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - LOCAL="--local-controller" -else - LOCAL="" -fi - -msg_info "Installing UniFi Network Application (Patience)" -wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh && bash unifi-latest.sh --skip --add-repository $LOCAL &>/dev/null -msg_ok "Installed UniFi Network Application" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 80b4562d..afc4930a 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi #https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 YW=$(echo "\033[33m") @@ -10,26 +11,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -50,15 +43,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -75,7 +71,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -102,12 +98,11 @@ wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh $STD bash unifi-latest.sh --skip --add-repository $LOCAL msg_ok "Installed UniFi Network Application" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -120,10 +115,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh deleted file mode 100644 index d314ad3c..00000000 --- a/install/uptimekuma-install.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -sudo apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Uptime Kuma" -git clone https://github.com/louislam/uptime-kuma.git &>/dev/null -mv uptime-kuma /opt/uptime-kuma -cd /opt/uptime-kuma -npm run setup &>/dev/null -msg_ok "Installed Uptime Kuma" - -msg_info "Creating Service" -service_path="/etc/systemd/system/uptime-kuma.service" -echo "[Unit] -Description=uptime-kuma - -[Service] -Type=simple -Restart=always -User=root -WorkingDirectory=/opt/uptime-kuma -ExecStart=/usr/bin/npm start - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now uptime-kuma.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 29af2997..69baf541 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -122,12 +118,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now uptime-kuma.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -140,10 +135,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh deleted file mode 100644 index 0710c1ef..00000000 --- a/install/vaultwarden-install.sh +++ /dev/null @@ -1,204 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get update &>/dev/null -apt-get -qqy install \ - git \ - build-essential \ - pkgconf \ - libssl-dev \ - libmariadb-dev-compat \ - libpq-dev \ - curl \ - sudo &>/dev/null -msg_ok "Installed Dependencies" - -WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -msg_info "Installing Rust" -curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal &>/dev/null -echo 'export PATH=~/.cargo/bin:$PATH' >>~/.bashrc &>/dev/null -export PATH=~/.cargo/bin:$PATH &>/dev/null -which rustc &>/dev/null -msg_ok "Installed Rust" - -msg_info "Building Vaultwarden ${VAULT} (Patience)" -git clone https://github.com/dani-garcia/vaultwarden &>/dev/null -cd vaultwarden -cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null -msg_ok "Built Vaultwarden ${VAULT}" - -addgroup --system vaultwarden &>/dev/null -adduser --system --home /opt/vaultwarden --shell /usr/sbin/nologin --no-create-home --gecos 'vaultwarden' --ingroup vaultwarden --disabled-login --disabled-password vaultwarden &>/dev/null -mkdir -p /opt/vaultwarden/bin -mkdir -p /opt/vaultwarden/data -cp target/release/vaultwarden /opt/vaultwarden/bin/ - -msg_info "Downloading Web-Vault ${WEBVAULT}" -curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz &>/dev/null -tar -xzf bw_web_$WEBVAULT.tar.gz -C /opt/vaultwarden/ &>/dev/null -msg_ok "Downloaded Web-Vault ${WEBVAULT}" - -cat </opt/vaultwarden/.env -ADMIN_TOKEN=$(openssl rand -base64 48) -ROCKET_ADDRESS=0.0.0.0 -DATA_FOLDER=/opt/vaultwarden/data -DATABASE_MAX_CONNS=10 -WEB_VAULT_FOLDER=/opt/vaultwarden/web-vault -WEB_VAULT_ENABLED=true -EOF - -msg_info "Creating Service" -chown -R vaultwarden:vaultwarden /opt/vaultwarden/ -chown root:root /opt/vaultwarden/bin/vaultwarden -chmod +x /opt/vaultwarden/bin/vaultwarden -chown -R root:root /opt/vaultwarden/web-vault/ -chmod +r /opt/vaultwarden/.env -service_path="/etc/systemd/system/vaultwarden.service" &>/dev/null - -echo "[Unit] -Description=Bitwarden Server (Powered by Vaultwarden) -Documentation=https://github.com/dani-garcia/vaultwarden -After=network.target -[Service] -User=vaultwarden -Group=vaultwarden -EnvironmentFile=-/opt/vaultwarden/.env -ExecStart=/opt/vaultwarden/bin/vaultwarden -LimitNOFILE=65535 -LimitNPROC=4096 -PrivateTmp=true -PrivateDevices=true -ProtectHome=true -ProtectSystem=strict -DevicePolicy=closed -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes -RestrictNamespaces=yes -RestrictRealtime=yes -MemoryDenyWriteExecute=yes -LockPersonality=yes -WorkingDirectory=/opt/vaultwarden -ReadWriteDirectories=/opt/vaultwarden/data -AmbientCapabilities=CAP_NET_BIND_SERVICE -[Install] -WantedBy=multi-user.target" >$service_path -systemctl daemon-reload -systemctl enable --now vaultwarden.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 4ad15ac4..aeaab763 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -179,12 +175,11 @@ systemctl daemon-reload $STD systemctl enable --now vaultwarden.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -197,10 +192,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 9cd11da7..1c037d5c 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -117,11 +113,11 @@ systemctl -q daemon-reload systemctl enable --now -q whisparr msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -134,10 +130,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm -rf Whisparr.develop.*.tar.gz diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh deleted file mode 100644 index 758ae265..00000000 --- a/install/whoogle-install.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -apt-get install python3-pip -y &>/dev/null -msg_ok "Installed Python3-pip" - -msg_info "Installing Whoogle" -pip install brotli &>/dev/null -pip install whoogle-search &>/dev/null - -service_path="/etc/systemd/system/whoogle.service" -echo "[Unit] -Description=Whoogle-Search -After=network.target -[Service] -ExecStart=/usr/local/bin/whoogle-search --host 0.0.0.0 -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path - -systemctl enable --now whoogle.service &>/dev/null -msg_ok "Installed Whoogle" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 659b2d36..891c28c1 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -111,11 +107,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now whoogle.service msg_ok "Installed Whoogle" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -128,10 +124,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh deleted file mode 100644 index 947ddbab..00000000 --- a/install/wikijs-install.sh +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -sL https://deb.nodesource.com/setup_16.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Wiki.js" -mkdir -p /opt/wikijs -cd /opt/wikijs -wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null -tar xzf wiki-js.tar.gz -rm wiki-js.tar.gz - -cat </opt/wikijs/config.yml -bindIP: 0.0.0.0 -port: 3000 -db: - type: sqlite - storage: /opt/wikijs/db.sqlite -logLevel: info -logFormat: default -dataPath: /opt/wikijs/data -bodyParserLimit: 5mb -EOF -npm rebuild sqlite3 &>/dev/null -msg_ok "Installed Wiki.js" - -msg_info "Creating Service" -service_path="/etc/systemd/system/wikijs.service" - -echo "[Unit] -Description=Wiki.js -After=network.target - -[Service] -Type=simple -ExecStart=/usr/bin/node server -Restart=always -User=root -Environment=NODE_ENV=production -WorkingDirectory=/opt/wikijs - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now wikijs &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index b90beae5..5cbaeb91 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -139,11 +135,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now wikijs msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -156,10 +152,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh deleted file mode 100644 index b71dad3b..00000000 --- a/install/wireguard-install.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -OPTIONS_PATH='/options.conf' -cat >$OPTIONS_PATH <<'EOF' -IPv4dev=eth0 -install_user=root -VPN=wireguard -pivpnNET=10.6.0.0 -subnetClass=24 -ALLOWED_IPS="0.0.0.0/0, ::0/0" -pivpnMTU=1420 -pivpnPORT=51820 -pivpnDNS1=1.1.1.1 -pivpnDNS2=8.8.8.8 -pivpnHOST= -pivpnPERSISTENTKEEPALIVE=25 -UNATTUPG=1 -EOF - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y gunicorn &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing WireGuard (using pivpn.io)" -curl -s -L https://install.pivpn.io >install.sh -chmod +x install.sh -./install.sh --unattended options.conf &>/dev/null -msg_ok "Installed WireGuard" - -msg_info "Installing Python3-pip" -apt-get install python3-pip -y &>/dev/null -pip install flask &>/dev/null -pip install ifcfg &>/dev/null -pip install flask_qrcode &>/dev/null -pip install icmplib &>/dev/null -msg_ok "Installed Python3-pip" - -msg_info "Installing WGDashboard" -WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null -cd /etc/wgdashboard/src -sudo chmod u+x wgd.sh -sudo ./wgd.sh install &>/dev/null -sudo chmod -R 755 /etc/wireguard -msg_ok "Installed WGDashboard" - -msg_info "Creating Service" -service_path="/etc/systemd/system/wg-dashboard.service" -echo "[Unit] -After=netword.service - -[Service] -WorkingDirectory=/etc/wgdashboard/src -ExecStart=/usr/bin/python3 /etc/wgdashboard/src/dashboard.py -Restart=always - - -[Install] -WantedBy=default.target" >$service_path -sudo chmod 664 /etc/systemd/system/wg-dashboard.service -sudo systemctl daemon-reload -sudo systemctl enable wg-dashboard.service &>/dev/null -sudo systemctl start wg-dashboard.service -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 06d3cc3f..b7647b7b 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -111,12 +107,11 @@ msg_info "Installing WireGuard (using pivpn.io)" $STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf msg_ok "Installed WireGuard" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -129,10 +124,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 02ec6fc8..2510ebc1 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -48,15 +41,18 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -73,7 +69,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -98,11 +94,11 @@ wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - chmod -x /etc/update-motd.d/* + OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -115,10 +111,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh deleted file mode 100644 index 38f70952..00000000 --- a/install/zigbee2mqtt-install.sh +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y git &>/dev/null -apt-get install -y make &>/dev/null -apt-get install -y g++ &>/dev/null -apt-get install -y gcc &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Setting up Zigbee2MQTT Repository" -git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt &>/dev/null -msg_ok "Set up Zigbee2MQTT Repository" - -read -r -p "Switch to Edge/dev branch? (y/N) " prompt -if [[ $prompt == "y" ]]; then - DEV="y" -else - DEV="n" -fi - -msg_info "Installing Zigbee2MQTT" -cd /opt/zigbee2mqtt &>/dev/null -if [[ $DEV == "y" ]]; then - git checkout dev &>/dev/null -fi -npm ci &>/dev/null -msg_ok "Installed Zigbee2MQTT" - -msg_info "Creating Service" -service_path="/etc/systemd/system/zigbee2mqtt.service" -echo "[Unit] -Description=zigbee2mqtt -After=network.target -[Service] -Environment=NODE_ENV=production -ExecStart=/usr/bin/npm start -WorkingDirectory=/opt/zigbee2mqtt -StandardOutput=inherit -StandardError=inherit -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable zigbee2mqtt.service &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 8eae1c36..dfe49bdd 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -138,12 +134,11 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable zigbee2mqtt.service msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -156,10 +151,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh deleted file mode 100644 index a101ffe6..00000000 --- a/install/zwave-js-ui-install.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -NUM=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi -done -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -alias die='' -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' -set -e - -msg_info "Updating Container OS" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null -apt-get install -y unzip &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Installing Z-Wave JS UI" -mkdir /opt/zwave-js-ui -cd /opt/zwave-js-ui -RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -msg_ok "Installed Z-Wave JS UI" - -msg_info "Creating Service" -service_path="/etc/systemd/system/zwave-js-ui.service" -echo "[Unit] -Description=zwave-js-ui -Wants=network-online.target -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux -[Install] -WantedBy=multi-user.target" >$service_path -systemctl start zwave-js-ui -systemctl enable zwave-js-ui &>/dev/null -msg_ok "Created Service" - -PASS=$(grep -w "root" /etc/shadow | cut -b6) -echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then - msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi - -msg_info "Cleaning up" -rm zwave-js-ui-${RELEASE}-linux.zip -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 3ce383d8..63125469 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash +if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi +if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$VERBOSE" == "yes" ]; then set -x; fi if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -9,26 +10,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 -NUM=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { @@ -49,15 +42,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi echo 1>&2 -en "${CROSS}${RD} No Network! " sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" @@ -74,7 +70,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi alias die='EXIT=$? LINE=$LINENO error_exit' set -e @@ -114,12 +110,11 @@ systemctl start zwave-js-ui $STD systemctl enable zwave-js-ui msg_ok "Created Service" -PASS=$(grep -w "root" /etc/shadow | cut -b6) echo "export TERM='xterm-256color'" >>/root/.bashrc -if [[ $PASS != $ ]]; then +if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - rm /etc/motd - rm /etc/update-motd.d/10-uname +OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) +if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -132,10 +127,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -if [[ "${SSH_ROOT}" == "yes" ]]; then - sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config - systemctl restart sshd -fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" rm zwave-js-ui-${RELEASE}-linux.zip From 811ff7fd968af472341fcbf35b3e4cde9a416ea0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 08:40:46 -0500 Subject: [PATCH 1074/3335] remove residual error_exit (#1012) --- install/adguard-v5-install.sh | 2 -- install/audiobookshelf-v5-install.sh | 2 -- install/autobrr-v5-install.sh | 2 -- install/blocky-v5-install.sh | 2 -- install/casaos-v5-install.sh | 2 -- install/changedetection-v5-install.sh | 2 -- install/cronicle-v5-install.sh | 2 -- install/daemonsync-v5-install.sh | 2 -- install/dashy-v5-install.sh | 2 -- install/debian-v5-install.sh | 2 -- install/deconz-v5-install.sh | 2 -- install/deluge-v5-install.sh | 2 -- install/docker-v5-install.sh | 2 -- install/emby-v5-install.sh | 2 -- install/emqx-v5-install.sh | 2 -- install/esphome-v5-install.sh | 2 -- install/grafana-v5-install.sh | 2 -- install/grocy-v5-install.sh | 2 -- install/heimdalldashboard-v5-install.sh | 2 -- install/homeassistant-core-v5-install.sh | 2 -- install/homeassistant-v5-install.sh | 2 -- install/homebridge-v5-install.sh | 2 -- install/homepage-v5-install.sh | 2 -- install/homer-v5-install.sh | 2 -- install/hyperion-v5-install.sh | 2 -- install/influxdb-v5-install.sh | 2 -- install/iobroker-v5-install.sh | 2 -- install/jellyfin-v5-install.sh | 2 -- install/k0s-v5-install.sh | 2 -- install/kavita-v5-install.sh | 2 -- install/keycloak-v5-install.sh | 2 -- install/lidarr-v5-install.sh | 2 -- install/magicmirror-v5-install.sh | 2 -- install/mariadb-v5-install.sh | 2 -- install/meshcentral-v5-install.sh | 2 -- install/motioneye-v5-install.sh | 2 -- install/mqtt-v5-install.sh | 2 -- install/n8n-v5-install.sh | 2 -- install/navidrome-v5-install.sh | 2 -- install/nextcloudpi-v5-install.sh | 2 -- install/nginxproxymanager-v5-install.sh | 2 -- install/nocodb-v5-install.sh | 2 -- install/node-red-v5-install.sh | 2 -- install/omada-v5-install.sh | 2 -- install/omv-v5-install.sh | 2 -- install/openhab-v5-install.sh | 2 -- install/paperless-ngx-v5-install.sh | 2 -- install/photoprism-v5-install.sh | 2 -- install/pihole-v5-install.sh | 2 -- install/plex-v5-install.sh | 2 -- install/podman-homeassistant-v5-install.sh | 2 -- install/podman-v5-install.sh | 2 -- install/postgresql-v5-install.sh | 2 -- install/prometheus-v5-install.sh | 2 -- install/prowlarr-v5-install.sh | 2 -- install/radarr-v5-install.sh | 2 -- install/readarr-v5-install.sh | 2 -- install/sabnzbd-v5-install.sh | 2 -- install/scrypted-v5-install.sh | 2 -- install/shinobi-v5-install.sh | 2 -- install/sonarr-v5-install.sh | 2 -- install/syncthing-v5-install.sh | 2 -- install/tdarr-v5-install.sh | 2 -- install/technitiumdns-v5-install.sh | 2 -- install/transmission-v5-install.sh | 2 -- install/trilium-v5-install.sh | 2 -- install/ubuntu-v5-install.sh | 2 -- install/umbrel-v5-install.sh | 2 -- install/unifi-v5-install.sh | 2 -- install/uptimekuma-v5-install.sh | 2 -- install/vaultwarden-v5-install.sh | 2 -- install/whisparr-v5-install.sh | 2 -- install/whoogle-v5-install.sh | 2 -- install/wikijs-v5-install.sh | 2 -- install/wireguard-v5-install.sh | 2 -- install/yunohost-v5-install.sh | 2 -- install/zigbee2mqtt-v5-install.sh | 2 -- install/zwave-js-ui-v5-install.sh | 2 -- 78 files changed, 156 deletions(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 533c988a..e6fafaa3 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index e9086b57..fe7913ef 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 03a1d05c..478b01f8 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index b68882b1..dbabbbe7 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 013a9a46..6e0fea4c 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index f8b24983..da0f9854 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index d9c2aca7..4a9d95a1 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 04229094..82267d9a 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 84bc8eaa..bfec6f59 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 428fe812..df4d2093 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 1b4a59b3..e5794400 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 4d2c8e21..a6477102 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index fa8b1495..8ed83542 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 18d832f1..6d8a58fa 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index bcbae979..59245e2b 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 433d8487..c3a74cd8 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index b695df32..b9386b4c 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 34073ba0..d2f9ed40 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index ce1b5f75..39a569a6 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 1ca60ef6..6a8d6913 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index b6c63719..4a72aa7b 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 1bf8da31..3917de67 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 81bc069e..80dfab19 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index b7bbed3a..2f3bd736 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 82bf8084..e3af572d 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 6c16f851..de01f69f 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 9baddbb6..2905243b 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 9b06ea4c..dd56b60e 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 8a8553ae..5b58883b 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index e7f41d47..2f5fec18 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 6fdf6051..44addad1 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index d32cf2af..aa4651aa 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 94db7430..5acc38b6 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -62,7 +62,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,7 +74,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 35d38926..441dc6e5 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 825aaa00..b2c0027b 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 772149a2..298e719c 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 867fb2bb..ea8d8928 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index d72a9c2d..d3a6f6d4 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 519177bd..1fec13d1 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index fc3f7c74..ef24f03c 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index ae45c980..2bab1ba7 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 340863f9..f282e40c 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index b9cb9bc9..b4568343 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 79fd4e5f..14cbcbe9 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 90623f7c..cfdd0173 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index ca7a23d9..e8174928 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 3eb5cb42..2d7f28fb 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -62,7 +62,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,7 +74,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 48584dcb..4a74f1e2 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -59,7 +59,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -72,7 +71,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index c1d93dd4..a9926604 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -59,7 +59,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -72,7 +71,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index b9a46f66..dbf48fdf 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 277afab7..f14550f6 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 98928d14..d1017251 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index bc14a5dc..13933399 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index faf3d67a..82e1c7d7 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 7fa6898b..8690a803 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 58f9c4a6..cca78868 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index d4586f0d..70fae8db 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index ccdf4923..2684a461 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index c55bfba2..00c6c76b 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 6a6c6d47..9f128f6d 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 4d397510..1e1ee7a3 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 770fdc90..ddfc4e9a 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 35167dfc..2ee6e6c5 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index a410e6cc..01679c67 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index db579d21..8616965a 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 4b266ec1..2fc7f477 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index ec35eb7f..71d85b05 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 3c0e217b..43bc7343 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index afc4930a..5691b0d1 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -59,7 +59,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -72,7 +71,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 69baf541..8121c67b 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index aeaab763..8ae80763 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 1c037d5c..351d1d60 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 891c28c1..8e1b6d48 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 5cbaeb91..de85bdf0 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index b7647b7b..c3860c5b 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e OPTIONS_PATH='/options.conf' diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 2510ebc1..d97a204a 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -57,7 +57,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -70,7 +69,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index dfe49bdd..131e0654 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 63125469..293d484c 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -58,7 +58,6 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -71,7 +70,6 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -alias die='EXIT=$? LINE=$LINENO error_exit' set -e msg_info "Updating Container OS" From d8c2d6e257f6112473fc51933c18d6fed8c27e72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 10:16:51 -0500 Subject: [PATCH 1075/3335] remove old code --- ct/adguard-v5.sh | 1 - ct/alpine-v5.sh | 1 - ct/archlinux-v5.sh | 1 - ct/audiobookshelf-v5.sh | 1 - ct/autobrr-v5.sh | 1 - ct/blocky-v5.sh | 1 - ct/casaos-v5.sh | 1 - ct/changedetection-v5.sh | 1 - ct/cronicle-v5.sh | 1 - ct/daemonsync-v5.sh | 1 - ct/dashy-v5.sh | 1 - ct/debian-v5.sh | 1 - ct/deconz-v5.sh | 1 - ct/deluge-v5.sh | 1 - ct/docker-v5.sh | 1 - ct/emby-v5.sh | 1 - ct/emqx-v5.sh | 1 - ct/esphome-v5.sh | 1 - ct/grafana-v5.sh | 1 - ct/grocy-v5.sh | 1 - ct/heimdalldashboard-v5.sh | 1 - ct/homeassistant-core-v5.sh | 1 - ct/homeassistant-v5.sh | 1 - ct/homebridge-v5.sh | 1 - ct/homepage-v5.sh | 1 - ct/homer-v5.sh | 1 - ct/hyperion-v5.sh | 1 - ct/influxdb-v5.sh | 1 - ct/iobroker-v5.sh | 1 - ct/jellyfin-v5.sh | 1 - ct/k0s-v5.sh | 1 - ct/kavita-v5.sh | 1 - ct/keycloak-v5.sh | 1 - ct/lidarr-v5.sh | 1 - ct/magicmirror-v5.sh | 1 - ct/mariadb-v5.sh | 1 - ct/meshcentral-v5.sh | 1 - ct/motioneye-v5.sh | 1 - ct/mqtt-v5.sh | 1 - ct/n8n-v5.sh | 1 - ct/navidrome-v5.sh | 1 - ct/nextcloudpi-v5.sh | 1 - ct/nginxproxymanager-v5.sh | 1 - ct/nocodb-v5.sh | 1 - ct/node-red-v5.sh | 1 - ct/omada-v5.sh | 1 - ct/omv-v5.sh | 1 - ct/openhab-v5.sh | 1 - ct/paperless-ngx-v5.sh | 1 - ct/photoprism-v5.sh | 1 - ct/pihole-v5.sh | 1 - ct/plex-v5.sh | 1 - ct/podman-homeassistant-v5.sh | 1 - ct/podman-v5.sh | 1 - ct/postgresql-v5.sh | 1 - ct/prometheus-v5.sh | 1 - ct/prowlarr-v5.sh | 1 - ct/radarr-v5.sh | 1 - ct/readarr-v5.sh | 1 - ct/rockylinux-v5.sh | 1 - ct/sabnzbd-v5.sh | 1 - ct/scrypted-v5.sh | 1 - ct/shinobi-v5.sh | 1 - ct/sonarr-v5.sh | 1 - ct/syncthing-v5.sh | 1 - ct/tdarr-v5.sh | 1 - ct/technitiumdns-v5.sh | 1 - ct/transmission-v5.sh | 1 - ct/trilium-v5.sh | 1 - ct/ubuntu-v5.sh | 1 - ct/umbrel-v5.sh | 1 - ct/unifi-v5.sh | 1 - ct/uptimekuma-v5.sh | 1 - ct/vaultwarden-v5.sh | 1 - ct/whisparr-v5.sh | 1 - ct/whoogle-v5.sh | 1 - ct/wikijs-v5.sh | 1 - ct/wireguard-v5.sh | 1 - ct/yunohost-v5.sh | 1 - ct/zigbee2mqtt-v5.sh | 1 - ct/zwave-js-ui-v5.sh | 1 - 81 files changed, 81 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 9cec3c16..6e424c6a 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -305,7 +305,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 38ffc8c7..d94a9c33 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -303,7 +303,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 8e424a66..a59e2a5a 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 86199f22..bac2131c 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index fa31ef71..942565ac 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -305,7 +305,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index efe66ff7..a18faaef 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index bb901bca..c40fcac5 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -315,7 +315,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 13afb78e..632c8c9f 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index bf0495e1..6d5b478c 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -304,7 +304,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 401086bb..f170a688 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 069b8ee1..7f168215 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 9fae150f..8abd935b 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 8368ce39..24296217 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index 93fde875..22b90ad3 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -303,7 +303,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 5d4b2eb2..dd21a81e 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -314,7 +314,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index fb1392ac..6808f1ff 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -315,7 +315,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 5f0aaa9a..3313c436 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index b0a51c9c..f4b4f117 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 38514eed..0c349d10 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 64a58fe6..49a71f40 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 4dcc78d0..0aac7e41 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 769a6f1a..8f588766 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -308,7 +308,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 49de18fd..35a5c1c7 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -317,7 +317,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 95297599..8b6028ba 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 555343bc..4eee8fd5 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 494b0b7c..05700b71 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 2ae540da..c419e8b4 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 053feb3e..08687ce2 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 6d022ee3..ce7d81cb 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index ec315a7c..682cf962 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -317,7 +317,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 6a4281a7..90734371 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 0267f0a9..2ffed10a 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -305,7 +305,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 85b170e2..149cf054 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 1a11e0d7..5f2bea43 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 8fb8eef7..748e92dd 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 3ad4ae5a..60febdd9 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 825c5a55..bc150f17 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 4d8d82a2..bd05d8d3 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 5a4e9351..d6586750 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -304,7 +304,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index a1fa02ad..06519242 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 1f38d743..d440e7e5 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index e77c3b4a..da10e525 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 237ee263..34effe2b 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index e06cdc12..2bbdc9ba 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index cc5720ed..47d50c74 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 35861b21..72768f0e 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -315,7 +315,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 8406e00a..3c82ce9f 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index a1d4a601..bd75f853 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index d014671b..ac926ebb 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 2c7042d6..46acf01c 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -305,7 +305,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 989bd0de..dfcfd8af 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index f7dc89a0..32e66dd6 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -316,7 +316,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 711ae8f8..702a2d74 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -310,7 +310,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 325d7268..e61101f8 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 3a00762f..aa1b8325 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index a11c6e8e..05122e98 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 5d73e435..8e3bd733 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index e453cd1a..8a9ab6fc 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 39092a64..63cf74e1 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 992902d1..ec0975b8 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 6edfd424..65399620 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 97f0bedf..33a22311 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 9e9943b7..190d3df6 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -315,7 +315,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index f0ddd2bc..7925af27 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index cc8c498e..9007943a 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 16fee7d4..9ff7e671 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index d9f0cc23..5e395c27 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 9c040e3e..622406d8 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 09e8bf47..b71cb766 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 938f771a..7b62d7cd 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -311,7 +311,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 6d421a09..80375583 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -315,7 +315,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 87ec5d1f..8a7aa4f1 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index b08413ed..4e852dd0 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 87ebde7d..ab1d0fb6 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index eb983253..900cc60e 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -303,7 +303,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index e39ecff8..c858ecb8 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index db50b8e9..b151cd13 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 78d35fa2..52ed54a5 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index f60795d2..2ba9a1aa 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -302,7 +302,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index ad1d2455..23badce2 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -307,7 +307,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index da1e45c8..75152cca 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -306,7 +306,6 @@ function advanced_settings() { if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" VERB="yes" - VERB2="" else echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" From 5238dd8b24a404f56c644408ab41ea6260154572 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 10:49:24 -0500 Subject: [PATCH 1076/3335] Update create_lxc.sh --- ct/create_lxc.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index f6071c13..0eadaf9c 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -59,7 +59,7 @@ function select_storage() { CONTENT='vztmpl' CONTENT_LABEL='Container template' ;; - *) false || die "Invalid storage class." ;; + *) false;; esac local -a MENU @@ -83,21 +83,20 @@ function select_storage() { STORAGE=$(whiptail --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "${MENU[@]}" 3>&1 1>&2 2>&3)" done printf $STORAGE fi } -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." -[[ "${PCT_OSTYPE:-}" ]] || die "You need to set 'PCT_OSTYPE' variable." +[[ "${CTID:-}" ]] +[[ "${PCT_OSTYPE:-}" ]] -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." +[ "$CTID" -ge "100" ] if pct status $CTID &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID - die "Cannot use ID that is already in use." fi TEMPLATE_STORAGE=$(select_storage template) || exit @@ -112,13 +111,12 @@ msg_ok "Updated LXC Template List" TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +[ ${#TEMPLATES[@]} -gt 0 ] TEMPLATE="${TEMPLATES[-1]}" if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then msg_info "Downloading LXC Template" - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null msg_ok "Downloaded LXC Template" fi @@ -129,6 +127,5 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) [[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) msg_info "Creating LXC Container" -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." From c0ab2d5e0a823fb91d5041e8b574a9e6e839c08c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 10:53:08 -0500 Subject: [PATCH 1077/3335] Update create_lxc.sh --- ct/create_lxc.sh | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 0eadaf9c..c0af30d9 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -36,14 +36,21 @@ if [ -z "$VALIDTMP" ]; then exit 1 fi -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + exit $EXIT } function select_storage() { @@ -59,7 +66,7 @@ function select_storage() { CONTENT='vztmpl' CONTENT_LABEL='Container template' ;; - *) false;; + *) false || die "Invalid storage class." ;; esac local -a MENU @@ -83,20 +90,21 @@ function select_storage() { STORAGE=$(whiptail --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3)" + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi } -[[ "${CTID:-}" ]] -[[ "${PCT_OSTYPE:-}" ]] +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." +[[ "${PCT_OSTYPE:-}" ]] || die "You need to set 'PCT_OSTYPE' variable." -[ "$CTID" -ge "100" ] +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." if pct status $CTID &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID + die "Cannot use ID that is already in use." fi TEMPLATE_STORAGE=$(select_storage template) || exit @@ -111,12 +119,13 @@ msg_ok "Updated LXC Template List" TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." TEMPLATE="${TEMPLATES[-1]}" if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then msg_info "Downloading LXC Template" - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." msg_ok "Downloaded LXC Template" fi @@ -127,5 +136,6 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) [[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) msg_info "Creating LXC Container" -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." From ca7ee8519e53bfd1d8af55ad42eb85398097cc8f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 11:41:12 -0500 Subject: [PATCH 1078/3335] Update create_lxc.sh add new error_handler --- ct/create_lxc.sh | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index c0af30d9..ecb62d96 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -9,7 +9,15 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" - +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -36,23 +44,6 @@ if [ -z "$VALIDTMP" ]; then exit 1 fi -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - function select_storage() { local CLASS=$1 local CONTENT @@ -66,7 +57,7 @@ function select_storage() { CONTENT='vztmpl' CONTENT_LABEL='Container template' ;; - *) false || die "Invalid storage class." ;; + *) false || exit "Invalid storage class." ;; esac local -a MENU @@ -90,21 +81,21 @@ function select_storage() { STORAGE=$(whiptail --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." done printf $STORAGE fi } -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." -[[ "${PCT_OSTYPE:-}" ]] || die "You need to set 'PCT_OSTYPE' variable." +[[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable." +[[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable." -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." +[ "$CTID" -ge "100" ] || exit "ID cannot be less than 100." if pct status $CTID &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID - die "Cannot use ID that is already in use." + exit "Cannot use ID that is already in use." fi TEMPLATE_STORAGE=$(select_storage template) || exit @@ -119,13 +110,13 @@ msg_ok "Updated LXC Template List" TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +[ ${#TEMPLATES[@]} -gt 0 ] || exit "Unable to find a template when searching for '$TEMPLATE_SEARCH'." TEMPLATE="${TEMPLATES[-1]}" if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then msg_info "Downloading LXC Template" pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." + exit "A problem occured while downloading the LXC template." msg_ok "Downloaded LXC Template" fi @@ -137,5 +128,5 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) msg_info "Creating LXC Container" pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." + exit "A problem occured while trying to create container." msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." From bb63e91f32fe7bdb339b2d39b867bd44c7b69d1c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 11:47:41 -0500 Subject: [PATCH 1079/3335] Update magicmirror-v5-install.sh add error_handler --- install/magicmirror-v5-install.sh | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 5acc38b6..7fad5c70 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -14,21 +14,14 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { From 08efe3585028a3bc6897ee043b31968342f0d1ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 11:49:04 -0500 Subject: [PATCH 1080/3335] Update paperless-ngx-v5-install.sh add error_handler --- install/paperless-ngx-v5-install.sh | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 2d7f28fb..c32d5362 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -14,21 +14,14 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { From b2da4b0cd215ec9fb04eaa4b551ca988d789e534 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 17:39:18 -0500 Subject: [PATCH 1081/3335] Update zigbee2mqtt-v5.sh - Revise the update process so that if the `git pull` fails, it will execute `git stash` followed by `git pull`. - Keep the update process verbose. --- ct/zigbee2mqtt-v5.sh | 69 +++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 23badce2..d1e2b82c 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -335,40 +335,57 @@ function update_script() { clear header_info cd /opt/zigbee2mqtt -msg_info "Checking for Backup Directory" +#!/bin/bash + +stop_zigbee2mqtt() { + if which systemctl 2> /dev/null > /dev/null; then + echo "Shutting down Zigbee2MQTT..." + sudo systemctl stop zigbee2mqtt + else + echo "Skipped stopping Zigbee2MQTT, no systemctl found" + fi +} + +start_zigbee2mqtt() { + if which systemctl 2> /dev/null > /dev/null; then + echo "Starting Zigbee2MQTT..." + sudo systemctl start zigbee2mqtt + else + echo "Skipped starting Zigbee2MQTT, no systemctl found" + fi +} + +set -e + if [ -d data-backup ]; then - echo "ERROR: Backup directory exists. May be previous restoring was failed?" - echo "1. Save 'data-backup' and 'data' dirs to safe location to make possibility to restore config later." - echo "2. Manually delete 'data-backup' dir and try again." - exit 1 + echo "ERROR: Backup directory exists. May be previous restoring was failed?" + echo "1. Save 'data-backup' and 'data' dirs to safe location to make possibility to restore config later." + echo "2. Manually delete 'data-backup' dir and try again." + exit 1 fi -msg_ok "No Backup Directory Exists" -msg_info "Stopping Zigbee2MQTT" -systemctl stop zigbee2mqtt -msg_ok "Stopped Zigbee2MQTT" +stop_zigbee2mqtt -msg_info "Creating Backup of Configuration" -cp -R data data-backup -msg_ok "Created Backup of Configuration" +echo "Creating backup of configuration..." +cp -R data data-backup || { echo "Failed to create backup."; exit 1; } -msg_info "Updating Zigbee2MQTT" -git pull &>/dev/null -msg_ok "Updated Zigbee2MQTT" +echo "Initiating update" +if ! git pull; then + echo "Update failed, temporarily storing changes and trying again." + git stash && git pull || (echo "Update failed even after storing changes. Aborting."; exit 1) +fi -msg_info "Installing Dependencies" -npm ci &>/dev/null -msg_ok "Installed Dependencies" +echo "Acquiring necessary components..." +npm ci || { echo "Failed to install necessary components."; exit 1; } -msg_info "Restoring Configuration" -cp -R data-backup/* data -rm -rf data-backup -msg_ok "Restored Configuration" +echo "Restoring configuration..." +cp -R data-backup/* data || { echo "Failed to restore configuration."; exit 1; } -msg_info "Starting Zigbee2MQTT" -systemctl start zigbee2mqtt -msg_ok "Started Zigbee2MQTT" -msg_ok "Update Successful" +rm -rf data-backup || { echo "Failed to remove backup directory."; exit 1; } + +start_zigbee2mqtt + +echo "Done!" exit } clear From 9494cffd986f25dc6423fb01e1360736cc7fe21b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 17:41:45 -0500 Subject: [PATCH 1082/3335] Update zigbee2mqtt-v5.sh --- ct/zigbee2mqtt-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index d1e2b82c..5c2e943c 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -335,7 +335,6 @@ function update_script() { clear header_info cd /opt/zigbee2mqtt -#!/bin/bash stop_zigbee2mqtt() { if which systemctl 2> /dev/null > /dev/null; then From a5b50d9d451edf48fd0535230e84e5c1fe497d93 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Feb 2023 17:53:17 -0500 Subject: [PATCH 1083/3335] Update zigbee2mqtt-v5.sh --- ct/zigbee2mqtt-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 5c2e943c..dbde6937 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -365,7 +365,7 @@ fi stop_zigbee2mqtt -echo "Creating backup of configuration..." +echo "Generating a backup of the configuration..." cp -R data data-backup || { echo "Failed to create backup."; exit 1; } echo "Initiating update" From 351161bc835e9f96b38508acf054d977e02af944 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Feb 2023 09:40:27 -0500 Subject: [PATCH 1084/3335] add rm options --- install/adguard-v5-install.sh | 2 +- install/audiobookshelf-v5-install.sh | 2 +- install/autobrr-v5-install.sh | 2 +- install/blocky-v5-install.sh | 2 +- install/casaos-v5-install.sh | 2 +- install/changedetection-v5-install.sh | 2 +- install/cronicle-v5-install.sh | 2 +- install/daemonsync-v5-install.sh | 2 +- install/dashy-v5-install.sh | 2 +- install/debian-v5-install.sh | 2 +- install/deconz-v5-install.sh | 2 +- install/deluge-v5-install.sh | 2 +- install/docker-v5-install.sh | 2 +- install/emby-v5-install.sh | 2 +- install/emqx-v5-install.sh | 2 +- install/esphome-v5-install.sh | 2 +- install/grafana-v5-install.sh | 2 +- install/grocy-v5-install.sh | 2 +- install/heimdalldashboard-v5-install.sh | 2 +- install/homeassistant-core-v5-install.sh | 2 +- install/homeassistant-v5-install.sh | 2 +- install/homebridge-v5-install.sh | 2 +- install/homepage-v5-install.sh | 2 +- install/homer-v5-install.sh | 2 +- install/hyperion-v5-install.sh | 2 +- install/influxdb-v5-install.sh | 2 +- install/iobroker-v5-install.sh | 2 +- install/jellyfin-v5-install.sh | 2 +- install/k0s-v5-install.sh | 2 +- install/kavita-v5-install.sh | 2 +- install/keycloak-v5-install.sh | 2 +- install/lidarr-v5-install.sh | 2 +- install/magicmirror-v5-install.sh | 2 +- install/mariadb-v5-install.sh | 2 +- install/meshcentral-v5-install.sh | 2 +- install/motioneye-v5-install.sh | 2 +- install/mqtt-v5-install.sh | 2 +- install/n8n-v5-install.sh | 2 +- install/navidrome-v5-install.sh | 2 +- install/nextcloudpi-v5-install.sh | 2 +- install/nginxproxymanager-v5-install.sh | 2 +- install/nocodb-v5-install.sh | 2 +- install/node-red-v5-install.sh | 2 +- install/omada-v5-install.sh | 2 +- install/omv-v5-install.sh | 2 +- install/openhab-v5-install.sh | 2 +- install/paperless-ngx-v5-install.sh | 2 +- install/photoprism-v5-install.sh | 2 +- install/pihole-v5-install.sh | 2 +- install/plex-v5-install.sh | 2 +- install/podman-homeassistant-v5-install.sh | 2 +- install/podman-v5-install.sh | 2 +- install/postgresql-v5-install.sh | 2 +- install/prometheus-v5-install.sh | 2 +- install/prowlarr-v5-install.sh | 2 +- install/radarr-v5-install.sh | 2 +- install/readarr-v5-install.sh | 2 +- install/sabnzbd-v5-install.sh | 2 +- install/scrypted-v5-install.sh | 2 +- install/shinobi-v5-install.sh | 2 +- install/sonarr-v5-install.sh | 2 +- install/syncthing-v5-install.sh | 2 +- install/tdarr-v5-install.sh | 2 +- install/technitiumdns-v5-install.sh | 2 +- install/transmission-v5-install.sh | 2 +- install/trilium-v5-install.sh | 2 +- install/ubuntu-v5-install.sh | 2 +- install/umbrel-v5-install.sh | 2 +- install/unifi-v5-install.sh | 2 +- install/uptimekuma-v5-install.sh | 2 +- install/vaultwarden-v5-install.sh | 2 +- install/whisparr-v5-install.sh | 2 +- install/whoogle-v5-install.sh | 2 +- install/wikijs-v5-install.sh | 2 +- install/wireguard-v5-install.sh | 2 +- install/yunohost-v5-install.sh | 2 +- install/zigbee2mqtt-v5-install.sh | 2 +- install/zwave-js-ui-v5-install.sh | 2 +- 78 files changed, 78 insertions(+), 78 deletions(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index e6fafaa3..73cb6aba 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -96,7 +96,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index fe7913ef..3fbd4fc5 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -94,7 +94,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 478b01f8..98e9e22f 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -115,7 +115,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index dbabbbe7..2f2fe7f0 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -348,7 +348,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 6e0fea4c..1b68b8b7 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -104,7 +104,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index da0f9854..219298ac 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -108,7 +108,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 4a9d95a1..69a5d798 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -114,7 +114,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 82267d9a..a7ee8c29 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -93,7 +93,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index bfec6f59..dd2eee90 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -124,7 +124,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index df4d2093..176fe03b 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -86,7 +86,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index e5794400..4a4cfe2b 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -117,7 +117,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index a6477102..618c18ad 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -131,7 +131,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 8ed83542..1a79204c 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -148,7 +148,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 6d8a58fa..caed417c 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -107,7 +107,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 59245e2b..5067c515 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -92,7 +92,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index c3a74cd8..e899e86a 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -113,7 +113,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index b9386b4c..87f02d1b 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -100,7 +100,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index d2f9ed40..b0945f6f 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -130,7 +130,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 39a569a6..04bde39e 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -124,7 +124,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 6a8d6913..c4d90f2b 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -166,7 +166,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 4a72aa7b..47e8a5f1 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -151,7 +151,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 3917de67..3ca4c619 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -103,7 +103,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 80dfab19..e7564d29 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -123,7 +123,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 2f3bd736..1bea0313 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -112,7 +112,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index e3af572d..5acf9f93 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -97,7 +97,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index de01f69f..85a9ec8d 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -126,7 +126,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 2905243b..c4539140 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -91,7 +91,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index dd56b60e..6da83f15 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -131,7 +131,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 5b58883b..315983d1 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -107,7 +107,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 2f5fec18..f197b02b 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -113,7 +113,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 44addad1..3f57e98c 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -110,7 +110,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index aa4651aa..d6808aff 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -117,7 +117,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 7fad5c70..62e0377c 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -212,7 +212,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 441dc6e5..f00046a7 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -108,7 +108,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index b2c0027b..458c458e 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -102,7 +102,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 298e719c..e93a6a46 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -121,7 +121,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index ea8d8928..08cd9055 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -98,7 +98,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index d3a6f6d4..84207276 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -113,7 +113,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 1fec13d1..5f0b0f45 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -141,7 +141,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index ef24f03c..47ce3060 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -93,7 +93,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 2bab1ba7..a128a729 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -245,7 +245,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index f282e40c..6f92515c 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -120,7 +120,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index b4568343..f114216b 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -123,7 +123,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 14cbcbe9..347eec82 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -97,7 +97,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index cfdd0173..3a72d385 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -109,7 +109,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index e8174928..cf21a733 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -108,7 +108,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index c32d5362..e60e617a 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -262,7 +262,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 4a74f1e2..c61d4dec 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -181,7 +181,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index a9926604..21637402 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -114,7 +114,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index dbf48fdf..2fa7638d 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -111,7 +111,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index f14550f6..b54fdd82 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -113,7 +113,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index d1017251..952fa9c3 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -92,7 +92,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 13933399..897fb1c1 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -215,7 +215,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 82e1c7d7..c3ebcdff 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -122,7 +122,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 8690a803..dc9fd918 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -115,7 +115,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index cca78868..3e2b2c51 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -115,7 +115,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 70fae8db..5df38948 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -115,7 +115,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 2684a461..15384772 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -120,7 +120,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 00c6c76b..b557a38f 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -180,7 +180,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 9f128f6d..f36b68c5 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -149,7 +149,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 1e1ee7a3..697514d7 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -96,7 +96,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index ddfc4e9a..b7f63b24 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -99,7 +99,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 2ee6e6c5..8e6f50f0 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -142,7 +142,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 01679c67..fb052087 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -94,7 +94,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index 8616965a..2e73fc17 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -94,7 +94,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 2fc7f477..3d6f2598 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -116,7 +116,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 71d85b05..b48ba885 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -87,7 +87,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 43bc7343..b447635c 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -105,7 +105,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 5691b0d1..b75f3bba 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -100,7 +100,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 8121c67b..9148e80e 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -120,7 +120,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 8ae80763..6cc0f029 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -177,7 +177,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 351d1d60..2ffa248d 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -115,7 +115,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 8e1b6d48..e9d8f72d 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -109,7 +109,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index de85bdf0..5defd0dd 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -137,7 +137,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index c3860c5b..6e5d8464 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -109,7 +109,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index d97a204a..769e07be 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -96,7 +96,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 131e0654..7f778003 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -136,7 +136,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 293d484c..973ef4c2 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -112,7 +112,7 @@ echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) From d54683396e89902a8ccf41b54f30aeb4403d855d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Feb 2023 12:47:47 -0500 Subject: [PATCH 1085/3335] use PCT_OSTYPE instead of redefining OS (#1018) --- install/adguard-v5-install.sh | 3 +-- install/audiobookshelf-v5-install.sh | 3 +-- install/autobrr-v5-install.sh | 3 +-- install/blocky-v5-install.sh | 3 +-- install/casaos-v5-install.sh | 3 +-- install/changedetection-v5-install.sh | 3 +-- install/cronicle-v5-install.sh | 3 +-- install/daemonsync-v5-install.sh | 3 +-- install/dashy-v5-install.sh | 3 +-- install/debian-v5-install.sh | 3 +-- install/deconz-v5-install.sh | 3 +-- install/deluge-v5-install.sh | 3 +-- install/docker-v5-install.sh | 3 +-- install/emby-v5-install.sh | 3 +-- install/emqx-v5-install.sh | 3 +-- install/esphome-v5-install.sh | 3 +-- install/grafana-v5-install.sh | 3 +-- install/grocy-v5-install.sh | 3 +-- install/heimdalldashboard-v5-install.sh | 3 +-- install/homeassistant-core-v5-install.sh | 3 +-- install/homeassistant-v5-install.sh | 3 +-- install/homebridge-v5-install.sh | 3 +-- install/homepage-v5-install.sh | 3 +-- install/homer-v5-install.sh | 3 +-- install/hyperion-v5-install.sh | 3 +-- install/influxdb-v5-install.sh | 3 +-- install/iobroker-v5-install.sh | 3 +-- install/jellyfin-v5-install.sh | 3 +-- install/k0s-v5-install.sh | 3 +-- install/kavita-v5-install.sh | 3 +-- install/keycloak-v5-install.sh | 3 +-- install/lidarr-v5-install.sh | 3 +-- install/magicmirror-v5-install.sh | 5 ++--- install/mariadb-v5-install.sh | 3 +-- install/meshcentral-v5-install.sh | 3 +-- install/motioneye-v5-install.sh | 3 +-- install/mqtt-v5-install.sh | 3 +-- install/n8n-v5-install.sh | 3 +-- install/navidrome-v5-install.sh | 3 +-- install/nextcloudpi-v5-install.sh | 3 +-- install/nginxproxymanager-v5-install.sh | 3 +-- install/nocodb-v5-install.sh | 3 +-- install/node-red-v5-install.sh | 3 +-- install/omada-v5-install.sh | 3 +-- install/omv-v5-install.sh | 3 +-- install/openhab-v5-install.sh | 3 +-- install/paperless-ngx-v5-install.sh | 5 ++--- install/photoprism-v5-install.sh | 3 +-- install/pihole-v5-install.sh | 3 +-- install/plex-v5-install.sh | 3 +-- install/podman-homeassistant-v5-install.sh | 3 +-- install/podman-v5-install.sh | 3 +-- install/postgresql-v5-install.sh | 3 +-- install/prometheus-v5-install.sh | 3 +-- install/prowlarr-v5-install.sh | 3 +-- install/radarr-v5-install.sh | 3 +-- install/readarr-v5-install.sh | 3 +-- install/sabnzbd-v5-install.sh | 3 +-- install/scrypted-v5-install.sh | 3 +-- install/shinobi-v5-install.sh | 3 +-- install/sonarr-v5-install.sh | 3 +-- install/syncthing-v5-install.sh | 3 +-- install/tdarr-v5-install.sh | 3 +-- install/technitiumdns-v5-install.sh | 3 +-- install/transmission-v5-install.sh | 3 +-- install/trilium-v5-install.sh | 3 +-- install/ubuntu-v5-install.sh | 3 +-- install/umbrel-v5-install.sh | 3 +-- install/unifi-v5-install.sh | 3 +-- install/uptimekuma-v5-install.sh | 3 +-- install/vaultwarden-v5-install.sh | 3 +-- install/whisparr-v5-install.sh | 3 +-- install/whoogle-v5-install.sh | 3 +-- install/wikijs-v5-install.sh | 3 +-- install/wireguard-v5-install.sh | 3 +-- install/yunohost-v5-install.sh | 3 +-- install/zigbee2mqtt-v5-install.sh | 3 +-- install/zwave-js-ui-v5-install.sh | 3 +-- misc/update-lxcs.sh | 2 +- 79 files changed, 81 insertions(+), 159 deletions(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 73cb6aba..927412d4 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -95,8 +95,7 @@ msg_ok "Installed AdGuard Home" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index 3fbd4fc5..c5ea736a 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -93,8 +93,7 @@ msg_ok "Installed audiobookshelf" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 98e9e22f..61b2eb45 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -114,8 +114,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 2f2fe7f0..51f1e601 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -347,8 +347,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 1b68b8b7..4825c26f 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -103,8 +103,7 @@ msg_ok "Installed CasaOS" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 219298ac..fbe2e18d 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -107,8 +107,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 69a5d798..fb845084 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -113,8 +113,7 @@ msg_ok "Installed Cronicle Primary Server" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index a7ee8c29..ea43bc98 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -92,8 +92,7 @@ msg_ok "Installed Daemon Sync Server" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index dd2eee90..e876c39f 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -123,8 +123,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 176fe03b..d15f4d0c 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -85,8 +85,7 @@ msg_ok "Installed Dependencies" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 4a4cfe2b..3e9973df 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -116,8 +116,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 618c18ad..1dc55656 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -130,8 +130,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 1a79204c..5eed9309 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -147,8 +147,7 @@ fi echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index caed417c..c23deef0 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -106,8 +106,7 @@ msg_ok "Installed Emby" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 5067c515..5a4cab70 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -91,8 +91,7 @@ msg_ok "Installed EMQX" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index e899e86a..00366388 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -112,8 +112,7 @@ msg_ok "Installed ESPHome Dashboard" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 87f02d1b..3827d1b0 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -99,8 +99,7 @@ msg_ok "Installed Grafana" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index b0945f6f..344ea7ce 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -129,8 +129,7 @@ msg_ok "Installed grocy" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 04bde39e..351df94b 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -123,8 +123,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index c4d90f2b..14c6d0e6 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -165,8 +165,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 47e8a5f1..e1213501 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -150,8 +150,7 @@ msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 3ca4c619..a966c54b 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -102,8 +102,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index e7564d29..2cd61caa 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -122,8 +122,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 1bea0313..5c0358ce 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -111,8 +111,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 5acf9f93..589297a0 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -96,8 +96,7 @@ msg_ok "Installed Hyperion" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 85a9ec8d..f623b20d 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -125,8 +125,7 @@ fi echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index c4539140..0c9499cf 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -90,8 +90,7 @@ msg_ok "Installed ioBroker" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 6da83f15..e8f0f73b 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -130,8 +130,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 315983d1..c9adae82 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -106,8 +106,7 @@ fi echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index f197b02b..0b5b6711 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -112,8 +112,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 3f57e98c..19407187 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -109,8 +109,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index d6808aff..4eaaa2e8 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -116,8 +116,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 62e0377c..fa57fd6e 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -210,9 +210,8 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi + msg_info "Customizing Container" +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index f00046a7..37829a43 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -107,8 +107,7 @@ fi echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 458c458e..d172d37e 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -101,8 +101,7 @@ msg_ok "Installed MeshCentral" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index e93a6a46..f0d91b0e 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -120,8 +120,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 08cd9055..4b2c7047 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -97,8 +97,7 @@ msg_ok "Installed Mosquitto MQTT Broker" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 84207276..e11671e6 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -112,8 +112,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 5f0b0f45..5f3804f0 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -140,8 +140,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 47ce3060..0d01c01e 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -92,8 +92,7 @@ msg_ok "Installed NextCloudPi" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index a128a729..d585a660 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -244,8 +244,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 6f92515c..f56b68c5 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -119,8 +119,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index f114216b..02686163 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -122,8 +122,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 347eec82..26428b02 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -96,8 +96,7 @@ msg_ok "Installed Omada Controller" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 3a72d385..d5b06587 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -108,8 +108,7 @@ msg_ok "Installed OpenMediaVault" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index cf21a733..b57f9edf 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -107,8 +107,7 @@ msg_ok "Installed openHAB" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index e60e617a..1d09ae89 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -260,9 +260,8 @@ msg_ok "Created Services" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi + msg_info "Customizing Container" +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index c61d4dec..66b62c0b 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -180,8 +180,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 21637402..848d9cb1 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -113,8 +113,7 @@ msg_ok "Installed Pi-hole" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 2fa7638d..bbd76a96 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -110,8 +110,7 @@ msg_ok "Installed Plex Media Server" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index b54fdd82..5a93e042 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -112,8 +112,7 @@ msg_ok "Installed Home Assistant" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 952fa9c3..7e75b6f9 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -91,8 +91,7 @@ msg_ok "Installed Podman" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 897fb1c1..8877f2e4 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -214,8 +214,7 @@ fi echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index c3ebcdff..357a2229 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -121,8 +121,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index dc9fd918..7ca5434b 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -114,8 +114,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 3e2b2c51..85a47c29 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -114,8 +114,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 5df38948..6554d377 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -114,8 +114,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 15384772..ccf74909 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -119,8 +119,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index b557a38f..fd84cc49 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -179,8 +179,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index f36b68c5..76d2b9b0 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -148,8 +148,7 @@ msg_ok "Installed Shinobi" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 697514d7..96dca52d 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -95,8 +95,7 @@ msg_ok "Installed Sonarr" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index b7f63b24..8e6812b7 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -98,8 +98,7 @@ msg_ok "Installed Syncthing" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 8e6f50f0..e13a2f94 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -141,8 +141,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index fb052087..0ad64b31 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -93,8 +93,7 @@ msg_ok "Installed Technitium DNS" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index 2e73fc17..f56dff91 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -93,8 +93,7 @@ msg_ok "Installed Transmission" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 3d6f2598..e93f13f1 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -115,8 +115,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index b48ba885..539076f0 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -86,8 +86,7 @@ msg_ok "Installed Dependencies" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index b447635c..ee5469cf 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -104,8 +104,7 @@ msg_ok "Installed Umbrel" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index b75f3bba..3f105891 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -99,8 +99,7 @@ msg_ok "Installed UniFi Network Application" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 9148e80e..92f6b6ba 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -119,8 +119,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 6cc0f029..ee7181ca 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -176,8 +176,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 2ffa248d..ac18b9b6 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -114,8 +114,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index e9d8f72d..a4db211d 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -108,8 +108,7 @@ msg_ok "Installed Whoogle" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 5defd0dd..916a57b3 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -136,8 +136,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 6e5d8464..9c94cdc4 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -108,8 +108,7 @@ msg_ok "Installed WireGuard" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 769e07be..803a1fa0 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -95,8 +95,7 @@ msg_ok "Installed YunoHost" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" - OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 7f778003..9161fbb4 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -135,8 +135,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 973ef4c2..eb90430d 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -111,8 +111,7 @@ msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2) -if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi +if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index e4542e09..0c19f0ca 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -40,7 +40,7 @@ function update_container() { os=`awk '/^ostype/' temp | cut -d' ' -f2` if [ "$os" == "alpine" ]; then pct exec $container -- ash -c "apk update && apk upgrade" - elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then + elif [ "$os" == "ubuntu" ] || [ "$PCT_OSTYPE" == "debian" ] || [ "$os" == "devuan" ]; then pct exec $container -- bash -c "apt-get update && apt-get -y upgrade" elif [ "$os" == "fedora" ] || [ "$os" == "rocky" ] || [ "$os" == "centos" ] || [ "$os" == "alma" ]; then pct exec $container -- bash -c "dnf -y update && dnf -y upgrade" From b7e073b1c8a39b9f51e4c215ea33095cd20355e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Feb 2023 12:56:22 -0500 Subject: [PATCH 1086/3335] Update update-lxcs.sh --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 0c19f0ca..e4542e09 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -40,7 +40,7 @@ function update_container() { os=`awk '/^ostype/' temp | cut -d' ' -f2` if [ "$os" == "alpine" ]; then pct exec $container -- ash -c "apk update && apk upgrade" - elif [ "$os" == "ubuntu" ] || [ "$PCT_OSTYPE" == "debian" ] || [ "$os" == "devuan" ]; then + elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then pct exec $container -- bash -c "apt-get update && apt-get -y upgrade" elif [ "$os" == "fedora" ] || [ "$os" == "rocky" ] || [ "$os" == "centos" ] || [ "$os" == "alma" ]; then pct exec $container -- bash -c "dnf -y update && dnf -y upgrade" From 1be65d04cc5d159000eaddabaa311c97788ac4c3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Feb 2023 16:45:47 -0500 Subject: [PATCH 1087/3335] code refactoring --- misc/update-lxcs.sh | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index e4542e09..eb9d14cd 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash function header_info { - cat <<"EOF" +clear +cat <<"EOF" __ __ __ __ __ _ ________ / / / /___ ____/ /___ _/ /____ / / | |/ / ____/ / / / / __ \/ __ / __ `/ __/ _ \ / / | / / @@ -17,7 +18,6 @@ RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") -clear header_info while true; do read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn @@ -29,26 +29,19 @@ while true; do done clear containers=$(pct list | tail -n +2 | cut -f1 -d' ') - function update_container() { container=$1 clear header_info - name=`pct exec $container hostname` + name=$(pct exec "$container" hostname) echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} \n" - pct config $container > temp - os=`awk '/^ostype/' temp | cut -d' ' -f2` - if [ "$os" == "alpine" ]; then - pct exec $container -- ash -c "apk update && apk upgrade" - elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then - pct exec $container -- bash -c "apt-get update && apt-get -y upgrade" - elif [ "$os" == "fedora" ] || [ "$os" == "rocky" ] || [ "$os" == "centos" ] || [ "$os" == "alma" ]; then - pct exec $container -- bash -c "dnf -y update && dnf -y upgrade" - elif [ "$os" == "archlinux" ]; then - pct exec $container -- bash -c "pacman -Syyu --noconfirm" - else - pct exec $container -- bash -c "yum -y update" - fi + os=$(pct config "$container" | awk '/^ostype/ {print $2}') + case "$os" in + alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; + archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; + fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; + ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update && apt-get -y upgrade" ;; + esac } header_info read -p "Skip stopped containers? [y/N]" -n 1 -r @@ -58,11 +51,9 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then else skip=yes fi - for container in $containers; do status=$(pct status $container) - if [ "$skip" == "no" ]; then - if [ "$status" == "status: stopped" ]; then + if [ "$skip" == "no" ] && [ "$status" == "status: stopped" ]; then echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" pct start $container echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" @@ -72,16 +63,9 @@ for container in $containers; do pct shutdown $container & elif [ "$status" == "status: running" ]; then update_container $container - fi - fi - if [ "$skip" == "yes" ]; then - if [ "$status" == "status: running" ]; then - update_container $container - fi fi done wait rm -rf temp -clear header_info echo -e "${GN} Finished, All Containers Updated. ${CL} \n" From 94a5b030cadc6cba56833855c4b18da58da4fd52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Feb 2023 18:28:08 -0500 Subject: [PATCH 1088/3335] add nltk stopwords --- install/paperless-ngx-v5-install.sh | 52 ++++++++++++----------------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 1d09ae89..bdf8ba88 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -74,12 +74,21 @@ $STD apt-get update $STD apt-get -y upgrade msg_ok "Updated Container OS" -msg_info "Installing Paperless-ngx Dependencies" +msg_info "Installing Python3" $STD apt-get install -y --no-install-recommends \ python3 \ python3-pip \ python3-dev \ - imagemagick \ + python3-setuptools \ + python3-wheel +msg_ok "Installed Python3" + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y --no-install-recommends \ + redis \ + postgresql \ + build-essential \ + imagemagick \ fonts-liberation \ optipng \ gnupg \ @@ -89,11 +98,19 @@ $STD apt-get install -y --no-install-recommends \ libzbar0 \ poppler-utils \ default-libmysqlclient-dev \ + automake \ + libtool \ + pkg-config \ + git \ + curl \ + libtiff-dev \ + libpng-dev \ + libleptonica-dev \ sudo \ mc -msg_ok "Installed Paperless-ngx Dependencies" +msg_ok "Installed Dependencies" -msg_info "Installing OCR Dependencies" +msg_info "Installing OCR Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ unpaper \ ghostscript \ @@ -107,26 +124,7 @@ $STD apt-get install -y --no-install-recommends \ tesseract-ocr-eng msg_ok "Installed OCR Dependencies" -msg_info "Installing Extra Dependencies" -$STD apt-get install -y --no-install-recommends \ - redis \ - postgresql \ - build-essential \ - python3-setuptools \ - python3-wheel -msg_ok "Installed Extra Dependencies" - msg_info "Installing JBIG2" -$STD apt-get install -y --no-install-recommends \ - automake \ - libtool \ - pkg-config \ - git \ - curl \ - libtiff-dev \ - libpng-dev \ - libleptonica-dev - $STD git clone https://github.com/agl/jbig2enc /opt/jbig2enc cd /opt/jbig2enc $STD bash ./autogen.sh @@ -144,36 +142,30 @@ $STD tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ mv paperless-ngx paperless rm paperless-ngx-$Paperlessngx.tar.xz cd /opt/paperless - ## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt - $STD pip install --upgrade pip $STD pip install -r requirements.txt +$STD python3 -m nltk.downloader -d /usr/share/nltk_data stopwords msg_ok "Installed Paperless-ngx" msg_info "Setting up database" DB_USER=paperless DB_PASS="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)" DB_NAME=paperlessdb - $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" - echo "Paperless-ngx Database User" >>~/paperless.creds echo $DB_USER >>~/paperless.creds echo "Paperless-ngx Database Password" >>~/paperless.creds echo $DB_PASS >>~/paperless.creds echo "Paperless-ngx Database Name" >>~/paperless.creds echo $DB_NAME >>~/paperless.creds - mkdir -p {consume,media} - sed -i -e 's|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=paperlessdb|' /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf - cd /opt/paperless/src $STD python3 manage.py migrate msg_ok "Set up database" From 3c4772541243ce6c2c35b772bf1b9b86c33e3949 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Feb 2023 22:40:38 -0500 Subject: [PATCH 1089/3335] code optimization (#1020) --- ct/adguard-v5.sh | 2 +- ct/alpine-v5.sh | 2 +- ct/archlinux-v5.sh | 2 +- ct/audiobookshelf-v5.sh | 2 +- ct/autobrr-v5.sh | 2 +- ct/blocky-v5.sh | 2 +- ct/casaos-v5.sh | 2 +- ct/changedetection-v5.sh | 2 +- ct/cronicle-v5.sh | 2 +- ct/daemonsync-v5.sh | 2 +- ct/dashy-v5.sh | 2 +- ct/debian-v5.sh | 2 +- ct/deconz-v5.sh | 2 +- ct/deluge-v5.sh | 2 +- ct/docker-v5.sh | 2 +- ct/emby-v5.sh | 2 +- ct/emqx-v5.sh | 2 +- ct/esphome-v5.sh | 2 +- ct/grafana-v5.sh | 2 +- ct/grocy-v5.sh | 2 +- ct/heimdalldashboard-v5.sh | 2 +- ct/homeassistant-core-v5.sh | 2 +- ct/homeassistant-v5.sh | 2 +- ct/homebridge-v5.sh | 2 +- ct/homepage-v5.sh | 2 +- ct/homer-v5.sh | 2 +- ct/hyperion-v5.sh | 2 +- ct/influxdb-v5.sh | 2 +- ct/iobroker-v5.sh | 2 +- ct/jellyfin-v5.sh | 2 +- ct/k0s-v5.sh | 2 +- ct/kavita-v5.sh | 2 +- ct/keycloak-v5.sh | 2 +- ct/lidarr-v5.sh | 2 +- ct/magicmirror-v5.sh | 2 +- ct/mariadb-v5.sh | 2 +- ct/meshcentral-v5.sh | 2 +- ct/motioneye-v5.sh | 2 +- ct/mqtt-v5.sh | 2 +- ct/n8n-v5.sh | 2 +- ct/navidrome-v5.sh | 2 +- ct/nextcloudpi-v5.sh | 2 +- ct/nginxproxymanager-v5.sh | 2 +- ct/nocodb-v5.sh | 2 +- ct/node-red-v5.sh | 2 +- ct/omada-v5.sh | 2 +- ct/omv-v5.sh | 2 +- ct/openhab-v5.sh | 2 +- ct/paperless-ngx-v5.sh | 2 +- ct/photoprism-v5.sh | 2 +- ct/pihole-v5.sh | 2 +- ct/plex-v5.sh | 2 +- ct/podman-homeassistant-v5.sh | 2 +- ct/podman-v5.sh | 2 +- ct/postgresql-v5.sh | 2 +- ct/prometheus-v5.sh | 2 +- ct/prowlarr-v5.sh | 2 +- ct/radarr-v5.sh | 2 +- ct/readarr-v5.sh | 2 +- ct/rockylinux-v5.sh | 2 +- ct/sabnzbd-v5.sh | 2 +- ct/scrypted-v5.sh | 2 +- ct/shinobi-v5.sh | 2 +- ct/sonarr-v5.sh | 2 +- ct/syncthing-v5.sh | 2 +- ct/tdarr-v5.sh | 2 +- ct/technitiumdns-v5.sh | 2 +- ct/transmission-v5.sh | 2 +- ct/trilium-v5.sh | 2 +- ct/ubuntu-v5.sh | 2 +- ct/umbrel-v5.sh | 2 +- ct/unifi-v5.sh | 2 +- ct/uptimekuma-v5.sh | 2 +- ct/vaultwarden-v5.sh | 2 +- ct/whisparr-v5.sh | 2 +- ct/whoogle-v5.sh | 2 +- ct/wikijs-v5.sh | 2 +- ct/wireguard-v5.sh | 2 +- ct/yunohost-v5.sh | 2 +- ct/zigbee2mqtt-v5.sh | 2 +- ct/zwave-js-ui-v5.sh | 2 +- install/adguard-v5-install.sh | 7 +++---- install/audiobookshelf-v5-install.sh | 7 +++---- install/autobrr-v5-install.sh | 7 +++---- install/blocky-v5-install.sh | 7 +++---- install/casaos-v5-install.sh | 7 +++---- install/changedetection-v5-install.sh | 7 +++---- install/cronicle-v5-install.sh | 7 +++---- install/daemonsync-v5-install.sh | 7 +++---- install/dashy-v5-install.sh | 7 +++---- install/debian-v5-install.sh | 7 +++---- install/deconz-v5-install.sh | 7 +++---- install/deluge-v5-install.sh | 7 +++---- install/docker-v5-install.sh | 7 +++---- install/emby-v5-install.sh | 7 +++---- install/emqx-v5-install.sh | 7 +++---- install/esphome-v5-install.sh | 7 +++---- install/grafana-v5-install.sh | 7 +++---- install/grocy-v5-install.sh | 7 +++---- install/heimdalldashboard-v5-install.sh | 7 +++---- install/homeassistant-core-v5-install.sh | 7 +++---- install/homeassistant-v5-install.sh | 7 +++---- install/homebridge-v5-install.sh | 7 +++---- install/homepage-v5-install.sh | 7 +++---- install/homer-v5-install.sh | 7 +++---- install/hyperion-v5-install.sh | 7 +++---- install/influxdb-v5-install.sh | 7 +++---- install/iobroker-v5-install.sh | 7 +++---- install/jellyfin-v5-install.sh | 7 +++---- install/k0s-v5-install.sh | 7 +++---- install/kavita-v5-install.sh | 7 +++---- install/keycloak-v5-install.sh | 7 +++---- install/lidarr-v5-install.sh | 7 +++---- install/magicmirror-v5-install.sh | 7 +++---- install/mariadb-v5-install.sh | 7 +++---- install/meshcentral-v5-install.sh | 7 +++---- install/motioneye-v5-install.sh | 7 +++---- install/mqtt-v5-install.sh | 7 +++---- install/n8n-v5-install.sh | 7 +++---- install/navidrome-v5-install.sh | 7 +++---- install/nextcloudpi-v5-install.sh | 7 +++---- install/nginxproxymanager-v5-install.sh | 7 +++---- install/nocodb-v5-install.sh | 7 +++---- install/node-red-v5-install.sh | 7 +++---- install/omada-v5-install.sh | 7 +++---- install/omv-v5-install.sh | 7 +++---- install/openhab-v5-install.sh | 7 +++---- install/paperless-ngx-v5-install.sh | 7 +++---- install/photoprism-v5-install.sh | 7 +++---- install/pihole-v5-install.sh | 7 +++---- install/plex-v5-install.sh | 7 +++---- install/podman-homeassistant-v5-install.sh | 7 +++---- install/podman-v5-install.sh | 7 +++---- install/postgresql-v5-install.sh | 7 +++---- install/prometheus-v5-install.sh | 7 +++---- install/prowlarr-v5-install.sh | 7 +++---- install/radarr-v5-install.sh | 7 +++---- install/readarr-v5-install.sh | 7 +++---- install/sabnzbd-v5-install.sh | 7 +++---- install/scrypted-v5-install.sh | 7 +++---- install/shinobi-v5-install.sh | 7 +++---- install/sonarr-v5-install.sh | 7 +++---- install/syncthing-v5-install.sh | 7 +++---- install/tdarr-v5-install.sh | 7 +++---- install/technitiumdns-v5-install.sh | 7 +++---- install/transmission-v5-install.sh | 7 +++---- install/trilium-v5-install.sh | 7 +++---- install/ubuntu-v5-install.sh | 7 +++---- install/umbrel-v5-install.sh | 7 +++---- install/unifi-v5-install.sh | 7 +++---- install/uptimekuma-v5-install.sh | 7 +++---- install/vaultwarden-v5-install.sh | 7 +++---- install/whisparr-v5-install.sh | 7 +++---- install/whoogle-v5-install.sh | 7 +++---- install/wikijs-v5-install.sh | 7 +++---- install/wireguard-v5-install.sh | 7 +++---- install/yunohost-v5-install.sh | 7 +++---- install/zigbee2mqtt-v5-install.sh | 7 +++---- install/zwave-js-ui-v5-install.sh | 7 +++---- 159 files changed, 315 insertions(+), 393 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 6e424c6a..43255816 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -393,7 +393,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index d94a9c33..a3aed622 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -371,7 +371,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index a59e2a5a..d16eb6a1 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -375,7 +375,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index bac2131c..6c63c6c2 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 942565ac..88c5ba1c 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -385,7 +385,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index a18faaef..764e832b 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index c40fcac5..70af50ab 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -402,7 +402,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 632c8c9f..9e856f71 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -375,7 +375,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 6d5b478c..6e039f32 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -423,7 +423,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index f170a688..ec7e6c7f 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 7f168215..c284725b 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -402,7 +402,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 8abd935b..a167d1a9 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 24296217..fbaf1bd1 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -391,7 +391,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index 22b90ad3..be3a784c 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -372,7 +372,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index dd21a81e..9a55c770 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -400,7 +400,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 6808f1ff..78b3623c 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -407,7 +407,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 3313c436..740f13ff 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -375,7 +375,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index f4b4f117..1f65a742 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -382,7 +382,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 0c349d10..0723b384 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 49a71f40..8dd7be84 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -375,7 +375,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 0aac7e41..2e687d41 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -455,7 +455,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 8f588766..9a5247af 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -464,7 +464,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 35a5c1c7..80f7c040 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -468,7 +468,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 8b6028ba..f0de87a9 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 4eee8fd5..092838f9 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -382,7 +382,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 05700b71..d7a94ab4 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -395,7 +395,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index c419e8b4..b26fa92b 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -391,7 +391,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 08687ce2..7865ff37 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index ce7d81cb..aec33a36 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 682cf962..44743db4 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -397,7 +397,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 90734371..566323c8 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 2ffed10a..00bde20e 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -374,7 +374,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 149cf054..5c646690 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -377,7 +377,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 5f2bea43..1b210bf8 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 748e92dd..d0b6d70c 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -378,7 +378,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 60febdd9..a7e10c6f 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index bc150f17..42a7a903 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index bd05d8d3..d6438774 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -375,7 +375,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index d6586750..4a47c646 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 06519242..15ed0944 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index d440e7e5..9aca8a7d 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -387,7 +387,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index da10e525..67fbc1be 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 34effe2b..0bc50e2e 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -485,7 +485,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 2bbdc9ba..8dd52282 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -379,7 +379,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 47d50c74..23e2b5c6 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -412,7 +412,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 72768f0e..7923b522 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -374,7 +374,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 3c82ce9f..1a2577df 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -387,7 +387,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index bd75f853..28041e77 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -377,7 +377,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index ac926ebb..cfd7653d 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -444,7 +444,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 46acf01c..0787d490 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -397,7 +397,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index dfcfd8af..c2a79326 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 32e66dd6..39766d02 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -407,7 +407,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 702a2d74..e9301f95 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -446,7 +446,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index e61101f8..ceaaabc6 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index aa1b8325..09ded8b2 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 05122e98..e2b60b9a 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 8e3bd733..23fe82cc 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 8a9ab6fc..cd1a1fd1 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 63cf74e1..d78e79bf 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index ec0975b8..0888b791 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -376,7 +376,7 @@ bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/c msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 65399620..f9422730 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 33a22311..0c2e1f0d 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -391,7 +391,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 190d3df6..8b4f1d67 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -386,7 +386,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 7925af27..27ff2b07 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 9007943a..3638e391 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -377,7 +377,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 9ff7e671..ec70c7bc 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 5e395c27..75603db3 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -438,7 +438,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 622406d8..db1881b8 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index b71cb766..ee1d71d6 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -395,7 +395,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 7b62d7cd..aa85b85f 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -379,7 +379,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} ${var_version} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 80375583..a7e63c93 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -400,7 +400,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 8a7aa4f1..82c6edfd 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -376,7 +376,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 4e852dd0..e638b68c 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -393,7 +393,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index ab1d0fb6..e89d3872 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -444,7 +444,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 900cc60e..4877261f 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -372,7 +372,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index c858ecb8..4a5e2296 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -375,7 +375,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index b151cd13..12aaa524 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -389,7 +389,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 52ed54a5..8c773e57 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -431,7 +431,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 2ba9a1aa..1a79f7dd 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -371,7 +371,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index dbde6937..4e8055dc 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -436,7 +436,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 75152cca..5beec0f9 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -403,7 +403,7 @@ msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container" lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}') +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 927412d4..309588d0 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index c5ea736a..140b4239 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 61b2eb45..2aa9ed6a 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 51f1e601..d8c20d98 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 4825c26f..13ca9596 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index fbe2e18d..54356608 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index fb845084..fe04107d 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index ea43bc98..2bc5536a 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index e876c39f..5d5dd79c 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index d15f4d0c..0a5e83a5 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 3e9973df..189d4ded 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 1dc55656..ab026534 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 5eed9309..a50a80e9 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index c23deef0..753c541d 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 5a4cab70..07e6b630 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 00366388..42e810b0 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 3827d1b0..6e4b218e 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 344ea7ce..3210baa2 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 351df94b..a920d9ea 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 14c6d0e6..c51a67f6 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index e1213501..3e6d6023 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index a966c54b..f1a75d97 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 2cd61caa..9c093dfe 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 5c0358ce..f9012735 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 589297a0..017efb42 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index f623b20d..c7db11a5 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 0c9499cf..f17f3978 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index e8f0f73b..56fc9c6d 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index c9adae82..a7906488 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 0b5b6711..41ebc755 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 19407187..b05cc0cf 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index 4eaaa2e8..00bf3b60 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index fa57fd6e..8aafd3e5 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -55,7 +54,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -65,7 +64,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 37829a43..5cefe546 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index d172d37e..31031d10 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index f0d91b0e..c573d84d 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 4b2c7047..a7401efe 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index e11671e6..9c421c55 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 5f3804f0..c23cfa96 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 0d01c01e..f702367f 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index d585a660..193aa3f7 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index f56b68c5..e09afe29 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index 02686163..6ed1c729 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 26428b02..2f007ebf 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index d5b06587..dc355c56 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi export DEBIAN_FRONTEND=noninteractive @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index b57f9edf..89481331 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index bdf8ba88..cbc85eea 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -55,7 +54,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -65,7 +64,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 66b62c0b..a18106b9 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) @@ -59,7 +58,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -69,7 +68,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 848d9cb1..2ef307c8 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi export DEBIAN_FRONTEND=noninteractive @@ -59,7 +58,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -69,7 +68,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index bbd76a96..1afcc401 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 5a93e042..18828d37 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 7e75b6f9..c8e375a0 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 8877f2e4..08357047 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 357a2229..33a090bb 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 7ca5434b..6157280e 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 85a47c29..32c540e0 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 6554d377..ae2b5416 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index ccf74909..3e700eb3 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index fd84cc49..d4753e21 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 76d2b9b0..8738ea13 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 96dca52d..2152a929 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 8e6812b7..4fb4f35b 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index e13a2f94..0604dd72 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 0ad64b31..cb536f2e 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index f56dff91..44f1c40a 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index e93f13f1..936eac73 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 539076f0..051e6554 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index ee5469cf..e07e745a 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 3f105891..fa1c90ea 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi #https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 @@ -59,7 +58,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -69,7 +68,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 92f6b6ba..d53bacc8 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index ee7181ca..1421be40 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index ac18b9b6..c07df625 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index a4db211d..2d3e996d 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 916a57b3..36f48110 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 9c94cdc4..95598151 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 803a1fa0..912136e7 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -57,7 +56,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -67,7 +66,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 9161fbb4..c24062c9 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index eb90430d..02e5b65e 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -if [ "$VERBOSE" == "yes" ]; then set -x; STD=""; fi -if [ "$VERBOSE" != "yes" ]; then STD="silent"; fi +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi YW=$(echo "\033[33m") @@ -58,7 +57,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e -if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then @@ -68,7 +67,7 @@ if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else exit 1 fi fi -RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e From a4c1b0e464e0679a1ef46e44ced60d744a693434 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 12:36:42 -0500 Subject: [PATCH 1090/3335] Update clean-lxcs.sh code optimization --- misc/clean-lxcs.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 4bda3c1a..8c35219a 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -1,6 +1,7 @@ #!/bin/bash function header_info { - cat <<"EOF" +clear +cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ / / / / _ \/ __ `/ __ \ / / | / / @@ -16,7 +17,6 @@ RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") -clear header_info echo -e "\n ${RD} USE AT YOUR OWN RISK. Deleting logs/cache may result in some apps/services broken!${CL} \n" while true; do @@ -31,9 +31,8 @@ clear containers=$(pct list | tail -n +2 | cut -f1 -d' ') function clean_container() { container=$1 - clear header_info - name=`pct exec $container hostname` + name=$(pct exec "$container" hostname) echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/main/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } @@ -47,8 +46,7 @@ fi for container in $containers; do status=$(pct status $container) - if [ "$skip" == "no" ]; then - if [ "$status" == "status: stopped" ]; then + if [ "$skip" == "no" ] && [ "$status" == "status: stopped" ]; then echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" pct start $container echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" @@ -58,15 +56,8 @@ for container in $containers; do pct shutdown $container & elif [ "$status" == "status: running" ]; then clean_container $container - fi - fi - if [ "$skip" == "yes" ]; then - if [ "$status" == "status: running" ]; then - clean_container $container - fi fi done wait -clear header_info echo -e "${GN} Finished, Containers Cleaned. ${CL} \n" From 0213205b29d96e2f914b1d0418258e5a210b5264 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 12:38:25 -0500 Subject: [PATCH 1091/3335] Update clean.sh tweak --- misc/clean.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index eaa83cd1..8146ff52 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash function header_info() { - cat <<"EOF" +clear +cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ / / / / _ \/ __ `/ __ \ / / | / / @@ -13,7 +14,6 @@ BL=$(echo "\033[36m") GN=$(echo "\033[1;92m") CL=$(echo "\033[m") name=$(hostname) -clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" cache=$(find /var/cache/ -type f) @@ -32,7 +32,6 @@ else sleep 2 fi fi -clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" logs=$(find /var/log/ -type f) @@ -51,7 +50,6 @@ else sleep 2 fi fi -clear header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" echo -e "${GN}Populating apt lists${CL} \n" From c89e9ac9c569283ef422abbde1757f9843162387 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 13:52:05 -0500 Subject: [PATCH 1092/3335] Update audiobookshelf-v5.sh set default privileged --- ct/audiobookshelf-v5.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 6c63c6c2..54e5d69a 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -96,8 +96,8 @@ if ! command -v pveversion >/dev/null 2>&1; then fi function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" PW="" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -136,8 +136,8 @@ function default_settings() { } function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then From 1fd36bc6c3a908153b69735aa0794914bfec4f26 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 17:10:04 -0500 Subject: [PATCH 1093/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index eb9d14cd..51ccb214 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -66,6 +66,5 @@ for container in $containers; do fi done wait -rm -rf temp header_info echo -e "${GN} Finished, All Containers Updated. ${CL} \n" From 907a29b7a3b899c3876d7931174155abd6956385 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 17:27:58 -0500 Subject: [PATCH 1094/3335] Update update-lxcs.sh change to dist-upgrade --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 51ccb214..80586942 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -40,7 +40,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update && apt-get -y upgrade" ;; + ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update && apt-get -y dist-upgrade" ;; esac } header_info From 38d1a82c71643b0bbb962fcdedd1ac21413c56a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 18:36:19 -0500 Subject: [PATCH 1095/3335] Create devuan-v5-install.sh --- install/devuan-v5-install.sh | 88 ++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 install/devuan-v5-install.sh diff --git a/install/devuan-v5-install.sh b/install/devuan-v5-install.sh new file mode 100644 index 00000000..52cdbb48 --- /dev/null +++ b/install/devuan-v5-install.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY +done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +echo "export TERM='xterm-256color'" >>/root/.bashrc +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From fa715ef26b8b9ae7d167aa5e4ca7068820593339 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 18:38:19 -0500 Subject: [PATCH 1096/3335] Create devuan-v5.sh --- ct/devuan-v5.sh | 378 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 378 insertions(+) create mode 100644 ct/devuan-v5.sh diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh new file mode 100644 index 00000000..fb23bcf7 --- /dev/null +++ b/ct/devuan-v5.sh @@ -0,0 +1,378 @@ +#!/usr/bin/env bash +function header_info { + cat <<"EOF" + ____ + / __ \___ _ ____ ______v5____ + / / / / _ \ | / / / / / __ `/ __ \ + / /_/ / __/ |/ / /_/ / /_/ / / / / +/_____/\___/|___/\__,_/\__,_/_/ /_/ + +EOF +} +clear +header_info +echo -e "Loading..." +APP="Devuan" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="devuan" +var_version="4.0" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { + PVE=$(pveversion | grep "pve-manager/7" | wc -l) + if [[ $PVE != 1 ]]; then + echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" + echo -e "Exiting..." + sleep 2 + exit + fi +} +function ARCH_CHECK() { + ARCH=$(dpkg --print-architecture) + if [[ "$ARCH" != "amd64" ]]; then + echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +if command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + NEXTID=$(pvesh get /cluster/nextid) + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi +if ! command -v pveversion >/dev/null 2>&1; then + if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + echo "User selected Update" + else + clear + echo -e "⚠ User exited script \n" + exit + fi +fi + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}devuan${CL}" + PW="-password devuan" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD (leave blank for devuan)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="devuan" PW="-password devuan" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +clear +header_info +msg_info "Updating Debian LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Debian LXC" +exit +} +clear +ARCH_CHECK +if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} ${var_version} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 7d5019068fefe688c9d3e16391818b879c7218ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Feb 2023 19:05:38 -0500 Subject: [PATCH 1097/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1bbf3c61..65b956ed 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-02-05 + +### Changed + +- **Devuan LXC** + - NEW Script + ## 2023-02-02 ### Changed From 474903d5af95289ee7bd040826564d77e2721264 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Feb 2023 05:56:25 -0500 Subject: [PATCH 1098/3335] Update devuan-v5.sh tweak --- ct/devuan-v5.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index fb23bcf7..82d40c70 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -98,8 +98,8 @@ fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}devuan${CL}" - PW="-password devuan" + echo -e "${DGN}Using Root Password: ${BGN}$NSAPP${CL}" + PW="-password $NSAPP" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" CT_ID=$NEXTID echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" @@ -143,11 +143,11 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD (leave blank for devuan)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + PW1=$(whiptail --inputbox "Set Root Password" 8 58 $NSAPP --title "ROOT PASSWORD" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $PW1 ]; then - PW1="devuan" PW="-password devuan" + PW1="$NSAPP" PW="-password $NSAPP" echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" else PW="-password $PW1" From eeced862dafb61dc76b7592e23620cd90d652aea Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Feb 2023 09:36:01 -0500 Subject: [PATCH 1099/3335] code optimization (#1025) - remove mc from Ubuntu - change archive mirrors for Ubuntu - small tweaks --- ct/adguard-v5.sh | 1 + ct/alpine-v5.sh | 1 + ct/archlinux-v5.sh | 1 + ct/audiobookshelf-v5.sh | 1 + ct/autobrr-v5.sh | 1 + ct/blocky-v5.sh | 1 + ct/casaos-v5.sh | 1 + ct/changedetection-v5.sh | 1 + ct/cronicle-v5.sh | 1 + ct/daemonsync-v5.sh | 1 + ct/dashy-v5.sh | 1 + ct/debian-v5.sh | 1 + ct/deconz-v5.sh | 1 + ct/deluge-v5.sh | 1 + ct/devuan-v5.sh | 1 + ct/docker-v5.sh | 1 + ct/emby-v5.sh | 1 + ct/emqx-v5.sh | 1 + ct/esphome-v5.sh | 1 + ct/grafana-v5.sh | 1 + ct/grocy-v5.sh | 1 + ct/heimdalldashboard-v5.sh | 1 + ct/homeassistant-core-v5.sh | 1 + ct/homeassistant-v5.sh | 1 + ct/homebridge-v5.sh | 1 + ct/homepage-v5.sh | 1 + ct/homer-v5.sh | 1 + ct/hyperion-v5.sh | 1 + ct/influxdb-v5.sh | 1 + ct/iobroker-v5.sh | 1 + ct/jellyfin-v5.sh | 1 + ct/k0s-v5.sh | 1 + ct/kavita-v5.sh | 1 + ct/keycloak-v5.sh | 1 + ct/lidarr-v5.sh | 1 + ct/magicmirror-v5.sh | 1 + ct/mariadb-v5.sh | 1 + ct/meshcentral-v5.sh | 1 + ct/motioneye-v5.sh | 1 + ct/mqtt-v5.sh | 1 + ct/n8n-v5.sh | 1 + ct/navidrome-v5.sh | 1 + ct/nextcloudpi-v5.sh | 1 + ct/nginxproxymanager-v5.sh | 1 + ct/nocodb-v5.sh | 1 + ct/node-red-v5.sh | 1 + ct/omada-v5.sh | 1 + ct/omv-v5.sh | 1 + ct/openhab-v5.sh | 1 + ct/paperless-ngx-v5.sh | 1 + ct/photoprism-v5.sh | 1 + ct/pihole-v5.sh | 1 + ct/plex-v5.sh | 1 + ct/podman-homeassistant-v5.sh | 1 + ct/podman-v5.sh | 1 + ct/postgresql-v5.sh | 1 + ct/prometheus-v5.sh | 1 + ct/prowlarr-v5.sh | 1 + ct/radarr-v5.sh | 1 + ct/readarr-v5.sh | 1 + ct/rockylinux-v5.sh | 1 + ct/sabnzbd-v5.sh | 1 + ct/scrypted-v5.sh | 1 + ct/shinobi-v5.sh | 1 + ct/sonarr-v5.sh | 1 + ct/syncthing-v5.sh | 1 + ct/tdarr-v5.sh | 1 + ct/technitiumdns-v5.sh | 1 + ct/transmission-v5.sh | 1 + ct/trilium-v5.sh | 1 + ct/ubuntu-v5.sh | 1 + ct/umbrel-v5.sh | 1 + ct/unifi-v5.sh | 1 + ct/uptimekuma-v5.sh | 1 + ct/vaultwarden-v5.sh | 1 + ct/whisparr-v5.sh | 1 + ct/whoogle-v5.sh | 1 + ct/wikijs-v5.sh | 1 + ct/wireguard-v5.sh | 1 + ct/yunohost-v5.sh | 1 + ct/zigbee2mqtt-v5.sh | 1 + ct/zwave-js-ui-v5.sh | 1 + install/adguard-v5-install.sh | 4 ++-- install/audiobookshelf-v5-install.sh | 4 ++-- install/autobrr-v5-install.sh | 4 ++-- install/blocky-v5-install.sh | 4 ++-- install/casaos-v5-install.sh | 4 ++-- install/changedetection-v5-install.sh | 4 ++-- install/cronicle-v5-install.sh | 4 ++-- install/daemonsync-v5-install.sh | 4 ++-- install/dashy-v5-install.sh | 4 ++-- install/debian-v5-install.sh | 4 ++-- install/deconz-v5-install.sh | 11 ++++++++--- install/deluge-v5-install.sh | 4 ++-- install/devuan-v5-install.sh | 2 ++ install/docker-v5-install.sh | 4 ++-- install/emby-v5-install.sh | 11 ++++++++--- install/emqx-v5-install.sh | 4 ++-- install/esphome-v5-install.sh | 4 ++-- install/grafana-v5-install.sh | 4 ++-- install/grocy-v5-install.sh | 4 ++-- install/heimdalldashboard-v5-install.sh | 4 ++-- install/homeassistant-core-v5-install.sh | 4 ++-- install/homeassistant-v5-install.sh | 4 ++-- install/homebridge-v5-install.sh | 4 ++-- install/homepage-v5-install.sh | 4 ++-- install/homer-v5-install.sh | 4 ++-- install/hyperion-v5-install.sh | 4 ++-- install/influxdb-v5-install.sh | 4 ++-- install/iobroker-v5-install.sh | 4 ++-- install/jellyfin-v5-install.sh | 11 ++++++++--- install/k0s-v5-install.sh | 4 ++-- install/kavita-v5-install.sh | 4 ++-- install/keycloak-v5-install.sh | 4 ++-- install/lidarr-v5-install.sh | 4 ++-- install/magicmirror-v5-install.sh | 16 ++++++++-------- install/mariadb-v5-install.sh | 4 ++-- install/meshcentral-v5-install.sh | 4 ++-- install/motioneye-v5-install.sh | 4 ++-- install/mqtt-v5-install.sh | 4 ++-- install/n8n-v5-install.sh | 4 ++-- install/navidrome-v5-install.sh | 4 ++-- install/nextcloudpi-v5-install.sh | 4 ++-- install/nginxproxymanager-v5-install.sh | 4 ++-- install/nocodb-v5-install.sh | 4 ++-- install/node-red-v5-install.sh | 4 ++-- install/omada-v5-install.sh | 11 ++++++++--- install/omv-v5-install.sh | 4 ++-- install/openhab-v5-install.sh | 4 ++-- install/paperless-ngx-v5-install.sh | 16 ++++++++-------- install/photoprism-v5-install.sh | 4 ++-- install/pihole-v5-install.sh | 4 ++-- install/plex-v5-install.sh | 11 ++++++++--- install/podman-homeassistant-v5-install.sh | 4 ++-- install/podman-v5-install.sh | 4 ++-- install/postgresql-v5-install.sh | 4 ++-- install/prometheus-v5-install.sh | 4 ++-- install/prowlarr-v5-install.sh | 4 ++-- install/radarr-v5-install.sh | 4 ++-- install/readarr-v5-install.sh | 4 ++-- install/sabnzbd-v5-install.sh | 4 ++-- install/scrypted-v5-install.sh | 4 ++-- install/shinobi-v5-install.sh | 12 +++++++++--- install/sonarr-v5-install.sh | 4 ++-- install/syncthing-v5-install.sh | 4 ++-- install/tdarr-v5-install.sh | 4 ++-- install/technitiumdns-v5-install.sh | 4 ++-- install/transmission-v5-install.sh | 4 ++-- install/trilium-v5-install.sh | 4 ++-- install/ubuntu-v5-install.sh | 11 ++++++++--- install/umbrel-v5-install.sh | 4 ++-- install/unifi-v5-install.sh | 4 ++-- install/uptimekuma-v5-install.sh | 4 ++-- install/vaultwarden-v5-install.sh | 4 ++-- install/whisparr-v5-install.sh | 4 ++-- install/whoogle-v5-install.sh | 4 ++-- install/wikijs-v5-install.sh | 4 ++-- install/wireguard-v5-install.sh | 4 ++-- install/yunohost-v5-install.sh | 4 ++-- install/zigbee2mqtt-v5-install.sh | 4 ++-- install/zwave-js-ui-v5-install.sh | 4 ++-- 161 files changed, 295 insertions(+), 175 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 43255816..d27ffa28 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -370,6 +370,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index a3aed622..4b29ba88 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -349,6 +349,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index d16eb6a1..d3c3009e 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 54e5d69a..55e121d0 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 88c5ba1c..ba683924 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -362,6 +362,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index 764e832b..321a6932 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 70af50ab..994be9a2 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -363,6 +363,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 9e856f71..2e9939ff 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -352,6 +352,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 6e039f32..8097937e 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -400,6 +400,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export SERV=$SERVER export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index ec7e6c7f..bc351a7d 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index c284725b..7a5f9354 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -379,6 +379,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index a167d1a9..1f0cb49c 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index fbaf1bd1..85f27fe0 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index be3a784c..ba79ee1c 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -349,6 +349,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 82d40c70..79871ef6 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 9a55c770..ae6085f4 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -360,6 +360,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 78b3623c..57c35026 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -372,6 +372,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 740f13ff..b0e091ca 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -352,6 +352,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 1f65a742..bf580607 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -359,6 +359,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 0723b384..20947e81 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 8dd7be84..f715b57e 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -352,6 +352,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 2e687d41..396e5825 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -432,6 +432,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 9a5247af..83b04839 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -427,6 +427,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 80f7c040..04f7f93a 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -428,6 +428,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index f0de87a9..851b72bc 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 092838f9..a93adf81 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -359,6 +359,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index d7a94ab4..458bbd87 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -372,6 +372,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index b26fa92b..bd2f7106 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 7865ff37..9f3889e8 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index aec33a36..2099aa8e 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 44743db4..a81b354e 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -362,6 +362,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 566323c8..1e5f3e92 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 00bde20e..acf18be2 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -351,6 +351,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 5c646690..e3e8eac0 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 1b210bf8..636e4e0a 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index d0b6d70c..50432f13 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -355,6 +355,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index a7e10c6f..d37c0186 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 42a7a903..68285c3b 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index d6438774..eb08e9b1 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -352,6 +352,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 4a47c646..f7995b7f 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 15ed0944..beb58747 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 9aca8a7d..c382844a 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -364,6 +364,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 67fbc1be..20909da5 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 0bc50e2e..a1f96474 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -462,6 +462,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 8dd52282..be844bf6 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -356,6 +356,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 23e2b5c6..2784b41f 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -389,6 +389,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 7923b522..0af724ce 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -351,6 +351,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 1a2577df..839b8b69 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 28041e77..46720606 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index cfd7653d..5b5d8a6f 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -421,6 +421,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 0787d490..33a810db 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -374,6 +374,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index c2a79326..4ecb5d26 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 39766d02..c973e8a0 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -372,6 +372,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index e9301f95..8f88bf64 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -403,6 +403,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index ceaaabc6..048c6a50 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 09ded8b2..ff6dcbf0 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index e2b60b9a..898b61b0 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 23fe82cc..3ff3a087 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index cd1a1fd1..a71f5265 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index d78e79bf..71dde5fe 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 0888b791..421a5eab 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index f9422730..885619eb 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 0c2e1f0d..9e0c1244 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 8b4f1d67..54abd42f 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -363,6 +363,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 27ff2b07..7e5f472e 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 3638e391..d11d2c2d 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -354,6 +354,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index ec70c7bc..679b1258 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 75603db3..9fd8c7f3 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -415,6 +415,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index db1881b8..ff634702 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index ee1d71d6..7a6648e4 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -372,6 +372,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index aa85b85f..ece6935e 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -356,6 +356,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index a7e63c93..fbf3e650 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -361,6 +361,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 82c6edfd..7c395c9e 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -353,6 +353,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index e638b68c..af07651f 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -370,6 +370,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index e89d3872..1eff8d4e 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -421,6 +421,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 4877261f..3549ade0 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -349,6 +349,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 4a5e2296..2027bf44 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -352,6 +352,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 12aaa524..80f0cd42 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -366,6 +366,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 8c773e57..642ff613 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -408,6 +408,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 1a79f7dd..ca1efda9 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -348,6 +348,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 4e8055dc..c5c789a1 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -399,6 +399,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 5beec0f9..6d3f63cc 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -366,6 +366,7 @@ fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP export VERBOSE=$VERB export SSH_ROOT=${SSH} export CTID=$CT_ID diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 309588d0..f4c92d4c 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -92,10 +92,10 @@ rm install.sh msg_ok "Installed AdGuard Home" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index 140b4239..51d38430 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -90,10 +90,10 @@ $STD apt install audiobookshelf msg_ok "Installed audiobookshelf" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 2aa9ed6a..4414672e 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -111,10 +111,10 @@ systemctl enable --now -q autobrr.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index d8c20d98..5c4bef55 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -344,10 +344,10 @@ $STD systemctl enable --now blocky msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index 13ca9596..fa81060c 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -100,10 +100,10 @@ $STD bash <(curl -fsSL https://get.casaos.io) msg_ok "Installed CasaOS" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 54356608..2827bfc7 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -104,10 +104,10 @@ $STD systemctl enable --now changedetection msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index fe04107d..8f7d152c 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -110,10 +110,10 @@ $STD update-rc.d cronicled defaults msg_ok "Installed Cronicle Primary Server" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 2bc5536a..16f410c1 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -89,10 +89,10 @@ $STD dpkg -i daemonsync_2.2.0.0059_amd64.deb msg_ok "Installed Daemon Sync Server" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 5d5dd79c..f6421b9a 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -120,10 +120,10 @@ systemctl start dashy msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 0a5e83a5..e910d9e5 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -82,10 +82,10 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 189d4ded..6a7f82a7 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade @@ -79,7 +85,6 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -113,10 +118,10 @@ $STD systemctl enable --now deconz msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index ab026534..776814e7 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -127,10 +127,10 @@ systemctl enable --now -q deluge-web.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/devuan-v5-install.sh b/install/devuan-v5-install.sh index 52cdbb48..9da236b1 100644 --- a/install/devuan-v5-install.sh +++ b/install/devuan-v5-install.sh @@ -80,6 +80,8 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index a50a80e9..091dfdec 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -144,10 +144,10 @@ if [[ $DOCKER_COMPOSE == "Y" ]]; then fi echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 753c541d..fff7abed 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade @@ -79,7 +85,6 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then @@ -103,10 +108,10 @@ $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb msg_ok "Installed Emby" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 07e6b630..23df928a 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -88,10 +88,10 @@ $STD systemctl enable --now emqx msg_ok "Installed EMQX" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 42e810b0..b2af525e 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -109,10 +109,10 @@ systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 6e4b218e..2abf3dff 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -96,10 +96,10 @@ $STD apt-get install -y grafana msg_ok "Installed Grafana" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 3210baa2..d23ff417 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -126,10 +126,10 @@ systemctl reload apache2 msg_ok "Installed grocy" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index a920d9ea..fac55718 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -120,10 +120,10 @@ $STD sudo systemctl enable --now heimdall.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index c51a67f6..83695041 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -162,10 +162,10 @@ $STD systemctl enable --now homeassistant msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 3e6d6023..f86f089e 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -147,10 +147,10 @@ $STD docker run -d \ msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index f1a75d97..4e1e4c92 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -99,10 +99,10 @@ $STD hb-service install --user homebridge msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 9c093dfe..3ef04b4b 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -119,10 +119,10 @@ $STD systemctl enable --now homepage msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index f9012735..70d9ee17 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -108,10 +108,10 @@ $STD systemctl enable --now homer msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 017efb42..2eba6ef7 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -93,10 +93,10 @@ $STD systemctl enable --now hyperion@root.service msg_ok "Installed Hyperion" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index c7db11a5..dc918a9a 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -122,10 +122,10 @@ if [[ $TELEGRAF == "Y" ]]; then fi echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index f17f3978..6db17570 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -87,10 +87,10 @@ $STD bash <(curl -fsSL https://iobroker.net/install.sh) msg_ok "Installed ioBroker" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 56fc9c6d..e7633690 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade @@ -79,7 +85,6 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc $STD apt-get install -y apt-transport-https $STD apt-get install -y software-properties-common msg_ok "Installed Dependencies" @@ -127,10 +132,10 @@ ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index a7906488..dcb6de05 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -103,10 +103,10 @@ $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/ msg_ok "Installed Helm" fi echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 41ebc755..21245848 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -109,10 +109,10 @@ systemctl enable --now -q kavita.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index b05cc0cf..d64ef3a1 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -106,10 +106,10 @@ $STD systemctl enable --now keycloak.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index 00bf3b60..d3e8b945 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -113,10 +113,10 @@ systemctl enable --now -q lidarr msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 8aafd3e5..f53c1689 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -208,20 +208,20 @@ $STD systemctl enable --now magicmirror msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 5cefe546..72cf2410 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -104,10 +104,10 @@ if [[ $ADMINER == "Y" ]]; then fi echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 31031d10..67cc6747 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -98,10 +98,10 @@ $STD node node_modules/meshcentral --install msg_ok "Installed MeshCentral" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index c573d84d..1575f17f 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -117,10 +117,10 @@ systemctl start motioneye msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index a7401efe..53b39b32 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -94,10 +94,10 @@ $STD apt-get -y install mosquitto-clients msg_ok "Installed Mosquitto MQTT Broker" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 9c421c55..be76bfa3 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -109,10 +109,10 @@ $STD systemctl enable --now n8n msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index c23cfa96..33ae8d3e 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -137,10 +137,10 @@ $STD systemctl enable --now navidrome.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index f702367f..4396c90c 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -89,10 +89,10 @@ service apache2 restart msg_ok "Installed NextCloudPi" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 193aa3f7..99b09e8a 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -241,10 +241,10 @@ EOF msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index e09afe29..d22f7308 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -116,10 +116,10 @@ systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index 6ed1c729..a127c44d 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -119,10 +119,10 @@ $STD systemctl enable --now nodered.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 2f007ebf..b56d4564 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade @@ -79,7 +85,6 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-get install -y openjdk-8-jre-headless $STD apt-get install -y jsvc @@ -93,10 +98,10 @@ $STD dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb msg_ok "Installed Omada Controller" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index dc355c56..32151fa7 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -105,10 +105,10 @@ omv-confdbadm populate msg_ok "Installed OpenMediaVault" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 89481331..54b87c0a 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -104,10 +104,10 @@ $STD systemctl enable --now openhab.service msg_ok "Installed openHAB" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index cbc85eea..5c076deb 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -250,20 +250,20 @@ $STD systemctl enable --now paperless-consumer paperless-webserver paperless-sch msg_ok "Created Services" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index a18106b9..f167d361 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -177,10 +177,10 @@ WantedBy=multi-user.target" >$service_path msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 2ef307c8..fb175b07 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -110,10 +110,10 @@ $STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended msg_ok "Installed Pi-hole" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 1afcc401..660fa292 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade @@ -79,7 +85,6 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" @@ -107,10 +112,10 @@ $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver msg_ok "Installed Plex Media Server" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 18828d37..56853cf3 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -109,10 +109,10 @@ $STD systemctl enable --now homeassistant msg_ok "Installed Home Assistant" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index c8e375a0..91d1e340 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -88,10 +88,10 @@ echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registr msg_ok "Installed Podman" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 08357047..0fa74a59 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -211,10 +211,10 @@ if [[ $ADMINER == "Y" ]]; then fi echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 33a090bb..7ee69706 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -118,10 +118,10 @@ $STD sudo systemctl enable --now prometheus msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 6157280e..5e9bf052 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -111,10 +111,10 @@ systemctl enable --now -q prowlarr msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 32c540e0..b2829bf8 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -111,10 +111,10 @@ systemctl enable --now -q radarr msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index ae2b5416..66ad0e93 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -111,10 +111,10 @@ systemctl enable --now -q readarr msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 3e700eb3..bae07f8a 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -116,10 +116,10 @@ systemctl enable --now -q sabnzbd.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index d4753e21..e67b5a15 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -176,10 +176,10 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now scrypted.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 8738ea13..29af4e26 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update --fix-missing $STD apt-get -y upgrade @@ -86,7 +92,7 @@ if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then fi msg_info "Installing Dependencies" -$STD apt-get install -y curl sudo git mc +$STD apt-get install -y curl sudo git $STD apt-get install -y make zip net-tools $STD apt-get install -y gcc g++ cmake msg_ok "Installed Dependencies" @@ -145,10 +151,10 @@ $STD pm2 list msg_ok "Installed Shinobi" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 2152a929..9eb09159 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -92,10 +92,10 @@ $STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr msg_ok "Installed Sonarr" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 4fb4f35b..f362c31e 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -95,10 +95,10 @@ systemctl restart syncthing@root.service msg_ok "Installed Syncthing" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 0604dd72..13bfa0a3 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -138,10 +138,10 @@ systemctl enable --now -q tdarr-node.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index cb536f2e..079875b9 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -90,10 +90,10 @@ $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index 44f1c40a..29e86c90 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -90,10 +90,10 @@ systemctl start transmission-daemon msg_ok "Installed Transmission" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 936eac73..a2fa2f92 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -112,10 +112,10 @@ systemctl enable --now -q trilium msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 051e6554..6547ca36 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -71,6 +71,12 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') +cat </etc/apt/sources.list +deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main +EOF + msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade @@ -79,14 +85,13 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y mc msg_ok "Installed Dependencies" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index e07e745a..2d6cab06 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -101,10 +101,10 @@ $STD systemctl enable --now umbrel-startup.service msg_ok "Installed Umbrel" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index fa1c90ea..3b30be60 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -96,10 +96,10 @@ $STD bash unifi-latest.sh --skip --add-repository $LOCAL msg_ok "Installed UniFi Network Application" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index d53bacc8..eb4debfa 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -116,10 +116,10 @@ $STD systemctl enable --now uptime-kuma.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 1421be40..91de64ff 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -173,10 +173,10 @@ $STD systemctl enable --now vaultwarden.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index c07df625..90ff1a86 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -111,10 +111,10 @@ systemctl enable --now -q whisparr msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 2d3e996d..8b04e690 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -105,10 +105,10 @@ $STD systemctl enable --now whoogle.service msg_ok "Installed Whoogle" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 36f48110..6207a120 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -133,10 +133,10 @@ $STD systemctl enable --now wikijs msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 95598151..57a2405e 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -105,10 +105,10 @@ $STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf msg_ok "Installed WireGuard" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 912136e7..784492db 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -92,10 +92,10 @@ $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index c24062c9..1b229424 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -132,10 +132,10 @@ $STD systemctl enable zigbee2mqtt.service msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 02e5b65e..0d2e7530 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -108,10 +108,10 @@ $STD systemctl enable zwave-js-ui msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* if ! getent shadow root | grep -q "^root:[^\!*]"; then msg_info "Customizing Container" -if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi - touch ~/.hushlogin GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) cat <$GETTY_OVERRIDE From 8e736f16800377179781e65bc7c64d7c26bf70ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Feb 2023 13:04:17 -0500 Subject: [PATCH 1100/3335] Update haos-vm-v5.sh tweak --- vm/haos-vm-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 445f7f90..ef7970a0 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -274,7 +274,7 @@ else fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Home Assistant ${BRANCH} Disk Image" +msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image" if [ "$BRANCH" == "$DEV" ]; then URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz else From a79ecedb80fa92f4d27c5dd78f858b8ce287f64d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Feb 2023 15:14:43 -0500 Subject: [PATCH 1101/3335] revert change archive mirrors for Ubuntu (#1028) * revert change archive mirrors for Ubuntu --- install/deconz-v5-install.sh | 6 ------ install/emby-v5-install.sh | 6 ------ install/jellyfin-v5-install.sh | 6 ------ install/omada-v5-install.sh | 6 ------ install/plex-v5-install.sh | 6 ------ install/shinobi-v5-install.sh | 6 ------ install/ubuntu-v5-install.sh | 6 ------ 7 files changed, 42 deletions(-) diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 6a7f82a7..6b90e28a 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index fff7abed..56778328 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index e7633690..07fba79a 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index b56d4564..52c3eaad 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 660fa292..c9aa4532 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 29af4e26..58687086 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update --fix-missing $STD apt-get -y upgrade diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 6547ca36..ad0773de 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -71,12 +71,6 @@ RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e -CODENAME=$(cat /etc/*release | grep "UBUNTU_CODENAME" | awk '{print substr($1, 17, length($1)) }') -cat </etc/apt/sources.list -deb http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -deb-src http://mirror.genesisadaptive.com/ubuntu/ $CODENAME main -EOF - msg_info "Updating Container OS" $STD apt-get update $STD apt-get -y upgrade From d3bceff8ae42f6eb576748b3aa0a39b1a40a5e97 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 00:00:13 -0500 Subject: [PATCH 1102/3335] Misc updates (#1030) * add back mc in ubuntu * omada 5.8.4 --- install/deconz-v5-install.sh | 1 + install/emby-v5-install.sh | 1 + install/jellyfin-v5-install.sh | 1 + install/omada-v5-install.sh | 9 +++++---- install/plex-v5-install.sh | 1 + install/shinobi-v5-install.sh | 2 +- install/ubuntu-v5-install.sh | 1 + 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 6b90e28a..b2292b3c 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -79,6 +79,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 56778328..b2a4deb5 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -79,6 +79,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 07fba79a..92c16950 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -79,6 +79,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y apt-transport-https $STD apt-get install -y software-properties-common msg_ok "Installed Dependencies" diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 52c3eaad..e498ee12 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -79,6 +79,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-get install -y openjdk-8-jre-headless $STD apt-get install -y jsvc @@ -86,9 +87,9 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed Dependencies" -msg_info "Installing Omada Controller v5.7.4" -wget -qL https://static.tp-link.com/upload/software/2022/202211/20221121/Omada_SDN_Controller_v5.7.4_Linux_x64.deb -$STD dpkg -i Omada_SDN_Controller_v5.7.4_Linux_x64.deb +msg_info "Installing Omada Controller v5.8.4" +wget -qL https://static.tp-link.com/upload/software/2023/202301/20230130/Omada_SDN_Controller_v5.8.4_Linux_x64.tar.gz +$STD dpkg -i Omada_SDN_Controller_v5.8.4_Linux_x64.deb msg_ok "Installed Omada Controller" echo "export TERM='xterm-256color'" >>/root/.bashrc @@ -110,7 +111,7 @@ fi if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_v5.7.4_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb +rm -rf Omada_SDN_Controller_v5.8.4_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index c9aa4532..4fc4bfe4 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -79,6 +79,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc $STD apt-get install -y gnupg msg_ok "Installed Dependencies" diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 58687086..c83579f1 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -86,7 +86,7 @@ if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then fi msg_info "Installing Dependencies" -$STD apt-get install -y curl sudo git +$STD apt-get install -y curl sudo git mc $STD apt-get install -y make zip net-tools $STD apt-get install -y gcc g++ cmake msg_ok "Installed Dependencies" diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index ad0773de..0cb3c135 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -79,6 +79,7 @@ msg_ok "Updated Container OS" msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" echo "export TERM='xterm-256color'" >>/root/.bashrc From 6368c9f72fcdf5706e6a54fff8ba2928782c28a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 05:16:14 -0500 Subject: [PATCH 1103/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 80586942..937dcb5c 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -31,7 +31,6 @@ clear containers=$(pct list | tail -n +2 | cut -f1 -d' ') function update_container() { container=$1 - clear header_info name=$(pct exec "$container" hostname) echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} \n" From 1a3e3fb4ab71beb4067aeb6491dea7971497e167 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 11:33:32 -0500 Subject: [PATCH 1104/3335] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index b3b9c59c..733d43ad 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 tteck +Copyright (c) 2021-2023 tteck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 44c614f65dc849b4331920926b1f15e55b1de2bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 12:15:22 -0500 Subject: [PATCH 1105/3335] include information (#1032) --- ct/adguard-v5.sh | 6 ++++++ ct/alpine-v5.sh | 6 ++++++ ct/archlinux-v5.sh | 6 ++++++ ct/audiobookshelf-v5.sh | 6 ++++++ ct/autobrr-v5.sh | 6 ++++++ ct/blocky-v5.sh | 6 ++++++ ct/casaos-v5.sh | 6 ++++++ ct/changedetection-v5.sh | 6 ++++++ ct/create_lxc.sh | 6 ++++++ ct/cronicle-v5.sh | 6 ++++++ ct/daemonsync-v5.sh | 6 ++++++ ct/dashy-v5.sh | 6 ++++++ ct/debian-v5.sh | 6 ++++++ ct/deconz-v5.sh | 6 ++++++ ct/deluge-v5.sh | 6 ++++++ ct/devuan-v5.sh | 6 ++++++ ct/docker-v5.sh | 6 ++++++ ct/emby-v5.sh | 6 ++++++ ct/emqx-v5.sh | 6 ++++++ ct/esphome-v5.sh | 6 ++++++ ct/grafana-v5.sh | 6 ++++++ ct/grocy-v5.sh | 6 ++++++ ct/heimdalldashboard-v5.sh | 6 ++++++ ct/homeassistant-core-v5.sh | 6 ++++++ ct/homeassistant-v5.sh | 6 ++++++ ct/homebridge-v5.sh | 6 ++++++ ct/homepage-v5.sh | 6 ++++++ ct/homer-v5.sh | 6 ++++++ ct/hyperion-v5.sh | 6 ++++++ ct/influxdb-v5.sh | 6 ++++++ ct/iobroker-v5.sh | 6 ++++++ ct/jellyfin-v5.sh | 6 ++++++ ct/k0s-v5.sh | 6 ++++++ ct/kavita-v5.sh | 6 ++++++ ct/keycloak-v5.sh | 6 ++++++ ct/lidarr-v5.sh | 6 ++++++ ct/magicmirror-v5.sh | 6 ++++++ ct/mariadb-v5.sh | 6 ++++++ ct/meshcentral-v5.sh | 6 ++++++ ct/motioneye-v5.sh | 6 ++++++ ct/mqtt-v5.sh | 6 ++++++ ct/n8n-v5.sh | 6 ++++++ ct/navidrome-v5.sh | 6 ++++++ ct/nextcloudpi-v5.sh | 6 ++++++ ct/nginxproxymanager-v5.sh | 6 ++++++ ct/nocodb-v5.sh | 6 ++++++ ct/node-red-v5.sh | 6 ++++++ ct/omada-v5.sh | 6 ++++++ ct/omv-v5.sh | 6 ++++++ ct/openhab-v5.sh | 6 ++++++ ct/paperless-ngx-v5.sh | 6 ++++++ ct/photoprism-v5.sh | 6 ++++++ ct/pihole-v5.sh | 6 ++++++ ct/plex-v5.sh | 6 ++++++ ct/podman-homeassistant-v5.sh | 6 ++++++ ct/podman-v5.sh | 6 ++++++ ct/postgresql-v5.sh | 6 ++++++ ct/prometheus-v5.sh | 6 ++++++ ct/prowlarr-v5.sh | 6 ++++++ ct/radarr-v5.sh | 6 ++++++ ct/readarr-v5.sh | 6 ++++++ ct/rockylinux-v5.sh | 6 ++++++ ct/sabnzbd-v5.sh | 6 ++++++ ct/scrypted-v5.sh | 6 ++++++ ct/shinobi-v5.sh | 6 ++++++ ct/sonarr-v5.sh | 6 ++++++ ct/syncthing-v5.sh | 6 ++++++ ct/tdarr-v5.sh | 6 ++++++ ct/technitiumdns-v5.sh | 6 ++++++ ct/transmission-v5.sh | 6 ++++++ ct/trilium-v5.sh | 6 ++++++ ct/ubuntu-v5.sh | 6 ++++++ ct/umbrel-v5.sh | 6 ++++++ ct/unifi-v5.sh | 6 ++++++ ct/uptimekuma-v5.sh | 6 ++++++ ct/vaultwarden-v5.sh | 6 ++++++ ct/whisparr-v5.sh | 6 ++++++ ct/whoogle-v5.sh | 6 ++++++ ct/wikijs-v5.sh | 6 ++++++ ct/wireguard-v5.sh | 6 ++++++ ct/yunohost-v5.sh | 6 ++++++ ct/zigbee2mqtt-v5.sh | 6 ++++++ ct/zwave-js-ui-v5.sh | 6 ++++++ install/adguard-v5-install.sh | 6 ++++++ install/audiobookshelf-v5-install.sh | 6 ++++++ install/autobrr-v5-install.sh | 6 ++++++ install/blocky-v5-install.sh | 6 ++++++ install/casaos-v5-install.sh | 6 ++++++ install/changedetection-v5-install.sh | 6 ++++++ install/cronicle-v5-install.sh | 6 ++++++ install/daemonsync-v5-install.sh | 6 ++++++ install/dashy-v5-install.sh | 6 ++++++ install/debian-v5-install.sh | 6 ++++++ install/deconz-v5-install.sh | 6 ++++++ install/deluge-v5-install.sh | 6 ++++++ install/devuan-v5-install.sh | 6 ++++++ install/docker-v5-install.sh | 6 ++++++ install/emby-v5-install.sh | 6 ++++++ install/emqx-v5-install.sh | 6 ++++++ install/esphome-v5-install.sh | 6 ++++++ install/grafana-v5-install.sh | 6 ++++++ install/grocy-v5-install.sh | 6 ++++++ install/heimdalldashboard-v5-install.sh | 6 ++++++ install/homeassistant-core-v5-install.sh | 6 ++++++ install/homeassistant-v5-install.sh | 6 ++++++ install/homebridge-v5-install.sh | 6 ++++++ install/homepage-v5-install.sh | 6 ++++++ install/homer-v5-install.sh | 6 ++++++ install/hyperion-v5-install.sh | 6 ++++++ install/influxdb-v5-install.sh | 6 ++++++ install/iobroker-v5-install.sh | 6 ++++++ install/jellyfin-v5-install.sh | 6 ++++++ install/k0s-v5-install.sh | 6 ++++++ install/kavita-v5-install.sh | 6 ++++++ install/keycloak-v5-install.sh | 6 ++++++ install/lidarr-v5-install.sh | 6 ++++++ install/magicmirror-v5-install.sh | 6 ++++++ install/mariadb-v5-install.sh | 6 ++++++ install/meshcentral-v5-install.sh | 6 ++++++ install/motioneye-v5-install.sh | 6 ++++++ install/mqtt-v5-install.sh | 6 ++++++ install/n8n-v5-install.sh | 6 ++++++ install/navidrome-v5-install.sh | 6 ++++++ install/nextcloudpi-v5-install.sh | 6 ++++++ install/nginxproxymanager-v5-install.sh | 6 ++++++ install/nocodb-v5-install.sh | 6 ++++++ install/node-red-v5-install.sh | 6 ++++++ install/omada-v5-install.sh | 6 ++++++ install/omv-v5-install.sh | 6 ++++++ install/openhab-v5-install.sh | 6 ++++++ install/paperless-ngx-v5-install.sh | 6 ++++++ install/photoprism-v5-install.sh | 6 ++++++ install/pihole-v5-install.sh | 6 ++++++ install/plex-v5-install.sh | 6 ++++++ install/podman-homeassistant-v5-install.sh | 6 ++++++ install/podman-v5-install.sh | 6 ++++++ install/postgresql-v5-install.sh | 6 ++++++ install/prometheus-v5-install.sh | 6 ++++++ install/prowlarr-v5-install.sh | 6 ++++++ install/radarr-v5-install.sh | 6 ++++++ install/readarr-v5-install.sh | 6 ++++++ install/sabnzbd-v5-install.sh | 6 ++++++ install/scrypted-v5-install.sh | 6 ++++++ install/shinobi-v5-install.sh | 6 ++++++ install/sonarr-v5-install.sh | 6 ++++++ install/syncthing-v5-install.sh | 6 ++++++ install/tdarr-v5-install.sh | 6 ++++++ install/technitiumdns-v5-install.sh | 6 ++++++ install/transmission-v5-install.sh | 6 ++++++ install/trilium-v5-install.sh | 6 ++++++ install/ubuntu-v5-install.sh | 6 ++++++ install/umbrel-v5-install.sh | 6 ++++++ install/unifi-v5-install.sh | 6 ++++++ install/uptimekuma-v5-install.sh | 6 ++++++ install/vaultwarden-v5-install.sh | 6 ++++++ install/whisparr-v5-install.sh | 6 ++++++ install/whoogle-v5-install.sh | 6 ++++++ install/wikijs-v5-install.sh | 6 ++++++ install/wireguard-v5-install.sh | 6 ++++++ install/yunohost-v5-install.sh | 6 ++++++ install/zigbee2mqtt-v5-install.sh | 6 ++++++ install/zwave-js-ui-v5-install.sh | 6 ++++++ misc/add-tailscale-lxc.sh | 6 ++++++ misc/bluetooth.sh | 6 ++++++ misc/clean-lxcs.sh | 8 +++++++- misc/clean.sh | 6 ++++++ misc/code-server.sh | 6 ++++++ misc/container-restore-from-backup.sh | 6 ++++++ ...container-copy-data-home-assistant-container.sh | 6 ++++++ ...tant-container-copy-data-home-assistant-core.sh | 6 ++++++ ...nt-container-copy-data-podman-home-assistant.sh | 6 ++++++ ...tant-core-copy-data-home-assistant-container.sh | 6 ++++++ ...assistant-core-copy-data-home-assistant-core.sh | 6 ++++++ misc/copy-data/plex-copy-data-plex.sh | 6 ++++++ ...assistant-copy-data-home-assistant-container.sh | 6 ++++++ misc/copy-data/z2m-copy-data-z2m.sh | 6 ++++++ misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh | 6 ++++++ misc/core-restore-from-backup.sh | 6 ++++++ misc/crowdsec.sh | 6 ++++++ misc/edge-kernel.sh | 6 ++++++ misc/filebrowser.sh | 6 ++++++ misc/frigate-support.sh | 6 ++++++ misc/kernel-clean.sh | 8 +++++++- misc/post-pbs-install.sh | 8 +++++++- misc/post-pve-install.sh | 8 +++++++- misc/pyenv.sh | 14 +++++++++++++- misc/scaling-governor.sh | 6 ++++++ misc/update-lxcs.sh | 6 ++++++ misc/usb-passthrough.sh | 6 ++++++ misc/webmin.sh | 5 +++++ vm/haos-vm-v5.sh | 6 ++++++ vm/mikrotik-routeros-v5.sh | 6 ++++++ vm/pimox-haos-vm-v5.sh | 6 ++++++ 193 files changed, 1168 insertions(+), 5 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index d27ffa28..2022e1f7 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___ __ __ diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 4b29ba88..f48475c6 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___ v5 __ _ diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index d3c3009e..5349d521 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___ __ __ _ diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 55e121d0..c55385f7 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___ __ __ __ ______ diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index ba683924..e5fdb60f 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___ __ __ diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index 321a6932..ccf94f66 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ __ diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 994be9a2..416743d9 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ ____ _____ diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 2e9939ff..7ef66909 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ________ ____ __ __ _ diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index ecb62d96..f8326f55 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" == "yes" ]; then set -x; fi YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 8097937e..a8ce108b 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ _ __ diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index bc351a7d..49e06d6c 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ _____ diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 7a5f9354..7f51ba45 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 1f0cb49c..2b3bd1c5 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ _ diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 85f27fe0..f26890fb 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __________ _ _______ diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index ba79ee1c..f2f62f56 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 79871ef6..cc5e9253 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index ae6085f4..25b390a2 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 57c35026..6d9d2fac 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ __ diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index b0e091ca..3ea8ff96 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ________ _______v5 _ __ diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index bf580607..fb44c748 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___________ ____ __ __ diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 20947e81..6ac359a5 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ ____ diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index f715b57e..c1bb4dbd 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __________ _______ __ diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 396e5825..8d890a1f 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ _ _ _ ___ _ _ _ diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 83b04839..f7c432c5 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ _ _ _ ___ diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 04f7f93a..df6808f6 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ ___ _ __ __ diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 851b72bc..5442b1b1 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ______ __ _____________ ____ ________ ____________ diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index a93adf81..620dee04 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 458bbd87..f9b75c3d 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index bd2f7106..81e30620 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ _ diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 9f3889e8..eaf8ada3 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ ______ ____ ____ diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 2099aa8e..55e1d493 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ ____ __ diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index a81b354e..e5b677be 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ____ _____ diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 1e5f3e92..04c0e1f1 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ____ __ __ __ __ diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index acf18be2..e8dd83d4 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ _ __ diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index e3e8eac0..e4a3aad0 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ __ __ diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 636e4e0a..aff50b74 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ _ __ diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 50432f13..5862a8e6 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ___ _ __ ____ diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index d37c0186..6ea66777 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ___ _ ____ ____ diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 68285c3b..79609b9d 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ___ __ ______ __ __ diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index eb08e9b1..f50a8cf5 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ___ __ _ diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index f7995b7f..f5de113d 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ___ ____ _ ____________ diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index beb58747..2132cdd1 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ___ diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index c382844a..2999950c 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ __ _ __ diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 20909da5..bcc07914 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ __ __ ________ ______ _ diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index a1f96474..94a17159 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ __ _ ____ __ ___ diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index be844bf6..c9e31080 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ __ ____ ____ diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 2784b41f..e4016d4d 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ __ __ ____ __ diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 0af724ce..0160d8f5 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 839b8b69..cda88be9 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ ___ ___ _ __ ____ diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 46720606..c183799f 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ _____ ____ diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 5b5d8a6f..050f77e2 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 33a810db..886008c8 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ ______ __________ ____ ____ _________ __ ___ diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 4ecb5d26..03fa249b 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ ____ __ ______ __ ______ diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index c973e8a0..25555eab 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ __ ___ ___ _____ diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 8f88bf64..f6da09c4 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 048c6a50..75b3170c 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index ff6dcbf0..f6c599f6 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ _____ ____ __ diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 898b61b0..3f61b2c8 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ __ diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 3ff3a087..b9398fe7 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index a71f5265..e2c9b2f3 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 71dde5fe..1810c403 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 421a5eab..f548f14b 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ __ __ _ diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 885619eb..01dfcd56 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ ___ ____ __ __ diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 9e0c1244..cc759881 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ __ __ diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 54abd42f..cad79e5c 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ __ _ __ _ diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 7e5f472e..000becd3 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index d11d2c2d..2c1c13d1 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ __ __ _ diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 679b1258..12be69a4 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ __ diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 9fd8c7f3..729a6c3b 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ __ _ __ _ ____ _ _______ diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index ff634702..f99e4644 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ _ _ diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 7a6648e4..e6b8b540 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ _ ___ diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index ece6935e..3416113c 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ____ __ diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index fbf3e650..24c40e7e 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ __ __ diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 7c395c9e..78b76c0c 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ _ _____ diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index af07651f..2af3e44c 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ __ _ __ __ diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 1eff8d4e..6165882d 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ __ ____ _ __ __ diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 3549ade0..0adfdfed 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ ____ _ diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 2027bf44..d3c6b07c 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ ____ ______ ____ ________ ______ diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 80f0cd42..5e4ecb02 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ ___ __ _ _ diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 642ff613..ea6c3d1a 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _ ___ ______ __ diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index ca1efda9..c4b7f2a5 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ __ __ __ diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index c5c789a1..42767d5d 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ _ __ ___ __ _______ ____________ diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 6d3f63cc..293abf26 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _____ _______ __ ______ diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index f4c92d4c..e74135d9 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index 51d38430..0be7f07a 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 4414672e..1485c75b 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 5c4bef55..f51e98fb 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index fa81060c..ada2bb6b 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 2827bfc7..7d2bda09 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 8f7d152c..a8bb2b6d 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 16f410c1..9b5e7eea 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index f6421b9a..565690e2 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index e910d9e5..7a4f410e 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index b2292b3c..2d51c7e0 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 776814e7..da12b769 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/devuan-v5-install.sh b/install/devuan-v5-install.sh index 9da236b1..da159dbe 100644 --- a/install/devuan-v5-install.sh +++ b/install/devuan-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 091dfdec..31ceda72 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index b2a4deb5..066dc17d 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 23df928a..9529d961 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index b2af525e..2a8f81f6 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 2abf3dff..159fefe2 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index d23ff417..f8087bbd 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index fac55718..f0eee420 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 83695041..ac3cc58d 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index f86f089e..071ab8af 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 4e1e4c92..f07731d6 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 3ef04b4b..d4a4e801 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 70d9ee17..bf873e80 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 2eba6ef7..cdf9fd91 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index dc918a9a..5f4d9f67 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 6db17570..9316795f 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 92c16950..11451bf2 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index dcb6de05..fc6f6314 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 21245848..b6e0d230 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index d64ef3a1..ae2a6754 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index d3e8b945..d5798b44 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index f53c1689..9b48fc35 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 72cf2410..07c6486b 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 67cc6747..f37c5614 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 1575f17f..2c177e73 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 53b39b32..980ad410 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index be76bfa3..1881f808 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 33ae8d3e..2dd1b369 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 4396c90c..4b4c4d21 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 99b09e8a..d1b5cd4b 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index d22f7308..c5ecc2fb 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index a127c44d..5b548bf0 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index e498ee12..fffee12b 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 32151fa7..22319f8b 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 54b87c0a..fc7861d1 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 5c076deb..48ed0e08 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index f167d361..fe1093d3 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index fb175b07..0d3ae506 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 4fc4bfe4..f7b00eee 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 56853cf3..53779ee1 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 91d1e340..7b366a9c 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 0fa74a59..d9dba2eb 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 7ee69706..85009f9a 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 5e9bf052..b4e6a048 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index b2829bf8..822edb0f 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 66ad0e93..bffb5dc6 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index bae07f8a..9856ec3a 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index e67b5a15..69805c7f 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index c83579f1..69d1e634 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 9eb09159..1980b551 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + export DEBIAN_FRONTEND=noninteractive if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index f362c31e..38c001a1 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 13bfa0a3..35dc88b0 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 079875b9..39c50d12 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index 29e86c90..f11bbdbf 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index a2fa2f92..8a72a790 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 0cb3c135..d7569a6f 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 2d6cab06..8bfaaadb 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 3b30be60..6d9ece10 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index eb4debfa..674bc025 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 91de64ff..b8d5f39e 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 90ff1a86..b97cd37a 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 8b04e690..0897cac6 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 6207a120..fb3aecbd 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 57a2405e..b36f310d 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 784492db..4598cbd8 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 1b229424..89e08b24 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 0d2e7530..6118ef0f 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 73ee67ee..52de7c9f 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ _ __ __ diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh index 69ea28e4..c95a1815 100644 --- a/misc/bluetooth.sh +++ b/misc/bluetooth.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi set -e clear diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 8c35219a..bb445767 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -1,4 +1,10 @@ -#!/bin/bash +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { clear cat <<"EOF" diff --git a/misc/clean.sh b/misc/clean.sh index 8146ff52..8c604b46 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info() { clear cat <<"EOF" diff --git a/misc/code-server.sh b/misc/code-server.sh index 03285dcb..cc32de97 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ______ __ _____ diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh index bc0a6b52..efb169d1 100644 --- a/misc/container-restore-from-backup.sh +++ b/misc/container-restore-from-backup.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + clear if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi YW=$(echo "\033[33m") diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh index f9410471..0ff1828e 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # Use to copy all data from one Home Assistant LXC to another # run from the Proxmox Shell clear diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh index 29728e47..f278911a 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + clear if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do diff --git a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh index 2442a576..62f9ed8b 100644 --- a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh +++ b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. # run from the Proxmox Shell clear diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh index ab037fc1..3a451f17 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + clear if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index 28e0997b..5244c284 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + clear if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi while true; do diff --git a/misc/copy-data/plex-copy-data-plex.sh b/misc/copy-data/plex-copy-data-plex.sh index 399ddcb0..35e43bea 100644 --- a/misc/copy-data/plex-copy-data-plex.sh +++ b/misc/copy-data/plex-copy-data-plex.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # Use to copy all data from one Plex Media Server LXC to another # run from the Proxmox Shell clear diff --git a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh index d9c1d9dd..8db36359 100644 --- a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh +++ b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. # run from the Proxmox Shell clear diff --git a/misc/copy-data/z2m-copy-data-z2m.sh b/misc/copy-data/z2m-copy-data-z2m.sh index 0cdd7651..69a3573a 100644 --- a/misc/copy-data/z2m-copy-data-z2m.sh +++ b/misc/copy-data/z2m-copy-data-z2m.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # Use to copy all data from one Zigbee2MQTT LXC to another # run from the Proxmox Shell clear diff --git a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh index c45ececc..9f58fc5b 100644 --- a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh +++ b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC # run from the Proxmox Shell clear diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index 6f65801b..0f41adfc 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + clear if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi YW=$(echo "\033[33m") diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index 7f509ba8..712e0b19 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 7214595d..876f5cab 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" function header_info { cat <<"EOF" diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index 893c834b..02545b48 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" _______ __ ____ diff --git a/misc/frigate-support.sh b/misc/frigate-support.sh index 0341c2cd..21b641d5 100644 --- a/misc/frigate-support.sh +++ b/misc/frigate-support.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + echo -e "\e[1;33m This script will Prepare a LXC Container for Frigate \e[0m" while true; do read -p "Did you replace 106 with your LXC ID? Proceed (y/n)?" yn diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 824d708a..053215af 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -1,4 +1,10 @@ -#!/usr/bin/env bash -ex +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ __ ________ diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index 7b29e5f4..2a6ff6f0 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -1,4 +1,10 @@ -#!/usr/bin/env bash -ex +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + set -euo pipefail shopt -s inherit_errexit nullglob YW=$(echo "\033[33m") diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 2c3031fd..0cd732f6 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -1,4 +1,10 @@ -#!/usr/bin/env bash -ex +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ _ _____________ ____ __ ____ __ ____ diff --git a/misc/pyenv.sh b/misc/pyenv.sh index 51120c62..5fb41779 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + set -e YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") @@ -108,7 +114,13 @@ python3 -m pip install wheel &>/dev/null pip3 install --upgrade pip &>/dev/null pip3 install --pre esphome &>/dev/null cat </srv/esphome/start.sh -#!/bin/bash +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + source /srv/esphome/bin/activate esphome dashboard /srv/esphome/ EOF diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index e7eea1d2..edecd2c4 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __________ __ __ diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 937dcb5c..38031eb2 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { clear cat <<"EOF" diff --git a/misc/usb-passthrough.sh b/misc/usb-passthrough.sh index b8623d3b..8274d96b 100644 --- a/misc/usb-passthrough.sh +++ b/misc/usb-passthrough.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + echo -e "\e[1;33m This script will allow USB passthrough to a PRIVILEGED LXC Container ONLY\e[0m" while true; do read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn diff --git a/misc/webmin.sh b/misc/webmin.sh index b997df5f..0095a911 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index ef7970a0..f4e7e4dd 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ __ ___ _ __ __ ____ _____ diff --git a/vm/mikrotik-routeros-v5.sh b/vm/mikrotik-routeros-v5.sh index 0c13b8dc..7e0bcdda 100644 --- a/vm/mikrotik-routeros-v5.sh +++ b/vm/mikrotik-routeros-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" __ ____ __ __ _ __ ____ __ ____ _____ diff --git a/vm/pimox-haos-vm-v5.sh b/vm/pimox-haos-vm-v5.sh index cebce5e2..c116c84a 100644 --- a/vm/pimox-haos-vm-v5.sh +++ b/vm/pimox-haos-vm-v5.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + function header_info { cat <<"EOF" ____ _ __ ___ From e1ae1c7c19d180356ecf4bf5b33e47e64ed00fcf Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 15:43:49 -0500 Subject: [PATCH 1106/3335] Update omada-v5-install.sh correct file extension --- install/omada-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index fffee12b..0271ba38 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -94,7 +94,7 @@ $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed Dependencies" msg_info "Installing Omada Controller v5.8.4" -wget -qL https://static.tp-link.com/upload/software/2023/202301/20230130/Omada_SDN_Controller_v5.8.4_Linux_x64.tar.gz +wget -qL https://static.tp-link.com/upload/software/2023/202301/20230130/Omada_SDN_Controller_v5.8.4_Linux_x64.deb $STD dpkg -i Omada_SDN_Controller_v5.8.4_Linux_x64.deb msg_ok "Installed Omada Controller" From 91772f8c730844587db7a21e9962cbe954ba6dc7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 17:11:02 -0500 Subject: [PATCH 1107/3335] tweak (#1034) --- ct/audiobookshelf-v5.sh | 4 ++-- ct/debian-v5.sh | 4 ++-- ct/deluge-v5.sh | 4 ++-- ct/devuan-v5.sh | 4 ++-- ct/kavita-v5.sh | 4 ++-- ct/lidarr-v5.sh | 4 ++-- ct/prowlarr-v5.sh | 4 ++-- ct/radarr-v5.sh | 4 ++-- ct/readarr-v5.sh | 4 ++-- ct/sabnzbd-v5.sh | 4 ++-- ct/sonarr-v5.sh | 4 ++-- ct/tdarr-v5.sh | 4 ++-- ct/whisparr-v5.sh | 4 ++-- ct/yunohost-v5.sh | 4 ++-- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index c55385f7..981f227d 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 2b3bd1c5..02e30838 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index f2f62f56..e69cd92a 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -337,10 +337,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index cc5e9253..fe55f367 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index e8dd83d4..c5338e4d 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -339,10 +339,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index aff50b74..931ca190 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index b9398fe7..5a6e998d 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index e2c9b2f3..20ed874d 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 1810c403..0dffef6a 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 01dfcd56..40bffdbf 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 000becd3..7ca8a5d7 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 12be69a4..3319a7e3 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 0adfdfed..87043a9b 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -337,10 +337,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index c4b7f2a5..cabde660 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -336,10 +336,10 @@ function install_script() { function update_script() { clear header_info -msg_info "Updating Debian LXC" +msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Debian LXC" +msg_ok "Updated $APP LXC" exit } clear From 4d8285a48425cbee31dc59142230d77f66d999ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Feb 2023 17:50:50 -0500 Subject: [PATCH 1108/3335] Update podman-homeassistant-v5.sh fix ending fi --- ct/podman-homeassistant-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index f6da09c4..b1581dff 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -356,6 +356,7 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit +fi if [ "$UPD" == "2" ]; then msg_info "Installing Home Assistant Comunity Store (HACS)" apt update &>/dev/null From 15c6c046aba1c1a94f8686410c55d3fc4e476ccc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Feb 2023 03:59:42 -0500 Subject: [PATCH 1109/3335] Update paperless-ngx-v5-install.sh correct missing network retries --- install/paperless-ngx-v5-install.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 48ed0e08..10a752ce 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -47,15 +47,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" From 85895bffa7aa947f3ca27c51b0a58320dd65344f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Feb 2023 04:05:21 -0500 Subject: [PATCH 1110/3335] Update magicmirror-v5-install.sh correct missing network retries --- install/magicmirror-v5-install.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 9b48fc35..9f141744 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -47,15 +47,18 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -while [ "$(hostname -I)" = "" ]; do - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - ((NUM--)) - if [ $NUM -eq 0 ]; then - echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - exit 1 - fi +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" From d671df97c91d14b35df144adddb26de1de7bf76c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Feb 2023 12:00:17 -0500 Subject: [PATCH 1111/3335] Update haos-vm-v5.sh code optimization --- vm/haos-vm-v5.sh | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index f4e7e4dd..6a5f5c6c 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -19,12 +19,11 @@ clear header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') -USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | cut -d '"' -f 4) +BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | cut -d '"' -f 4) +DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | cut -d '"' -f 4) +LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | cut -d '"' -f 4) YW=`echo "\033[33m"` BL=`echo "\033[36m"` HA=`echo "\033[1;34m"` @@ -69,13 +68,12 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if (whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58); then - echo "User selected Yes" +if whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then + : else - clear - echo -e "⚠ User exited script \n" - exit + clear && echo -e "⚠ User exited script \n" && exit fi + function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -100,7 +98,7 @@ fi function ARCH_CHECK() { ARCH=$(dpkg --print-architecture) if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -141,20 +139,24 @@ BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-b 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; +while true; do + VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z "$VMID" ]; then + VMID="$NEXTID" + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break else - if echo "$USEDID" | egrep -q "$VMID" - then - echo -e "\n🚨 ${RD}ID $VMID is already in use${CL} \n" - echo -e "Exiting Script \n" - sleep 2; - exit - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue fi -fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + fi +done + MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "i440fx" "Machine i440fx" ON \ "q35" "Machine q35" OFF \ From 4d83642522fbf83e877e6269e01733163a2f95a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Feb 2023 11:44:07 -0500 Subject: [PATCH 1112/3335] Update nextcloudpi-v5.sh check path to update host --- ct/nextcloudpi-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index bcc07914..a8b21172 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -92,7 +92,7 @@ if command -v pveversion >/dev/null 2>&1; then fi fi if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then + if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then msg_error "No ${APP} Installation Found!"; exit fi From ae335b115528b80f0536bff6cb3caadd8a092d8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Feb 2023 20:15:09 -0500 Subject: [PATCH 1113/3335] Update haos-vm-v5.sh more code optimization --- vm/haos-vm-v5.sh | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 6a5f5c6c..d30107d1 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -6,6 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { +clear cat <<"EOF" __ __ ___ _ __ __ ____ _____ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____v5/ /_ / __ \/ ___/ @@ -15,7 +16,6 @@ cat <<"EOF" EOF } -clear header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') @@ -55,11 +55,9 @@ function error_exit() { exit $EXIT } function cleanup_vmid() { - if $(qm status $VMID &>/dev/null); then - if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then - qm stop $VMID - fi - qm destroy $VMID + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null fi } function cleanup() { @@ -71,7 +69,7 @@ pushd $TEMP_DIR >/dev/null if whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then : else - clear && echo -e "⚠ User exited script \n" && exit + header_info && echo -e "⚠ User exited script \n" && exit fi function msg_info() { @@ -87,17 +85,16 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { -if [ `pveversion | grep "pve-manager/7.2\|7.3" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: =>7.2" - echo "Exiting..." - sleep 2 - exit +if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then + if [ "$(dpkg --print-architecture)" != "amd64" ]; then echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 @@ -232,7 +229,6 @@ fi if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else - clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings @@ -240,12 +236,10 @@ fi } function START_SCRIPT() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - clear header_info echo -e "${BL}Using Default Settings${CL}" default_settings else - clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings From 992182d74d54ae040233ba0c6a07d741456a413c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 13:39:23 -0500 Subject: [PATCH 1114/3335] Update haos-vm-v5.sh Code refactoring --- vm/haos-vm-v5.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index d30107d1..22f2a45e 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -20,10 +20,10 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | cut -d '"' -f 4) -BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | cut -d '"' -f 4) -DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | cut -d '"' -f 4) -LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | cut -d '"' -f 4) +VERSIONS=( stable beta dev ) +for version in "${VERSIONS[@]}"; do + eval "$version=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/$version.json | grep "ova" | cut -d '"' -f 4)" +done YW=`echo "\033[33m"` BL=`echo "\033[36m"` HA=`echo "\033[1;34m"` @@ -102,15 +102,15 @@ function ARCH_CHECK() { fi } function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} + echo -e "${DGN}Using HAOS Version: ${BGN}${stable}${CL}" + BRANCH=${stable} echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" VMID=$NEXTID echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" FORMAT=",efitype=4m" MACHINE="" - echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - HN=haos${STABLE} + echo -e "${DGN}Using Hostname: ${BGN}haos${stable}${CL}" + HN=haos${stable} echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" CORE_COUNT="2" echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" @@ -128,11 +128,10 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 4 \ -"$STABLE" "Stable" ON \ -"$BETA" "Beta" OFF \ -"$DEV" "Dev" OFF \ -"$LATEST" "Latest" OFF \ +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ +"$stable" "Stable " ON \ +"$beta" "Beta " OFF \ +"$dev" "Dev " OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi @@ -277,7 +276,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image" -if [ "$BRANCH" == "$DEV" ]; then +if [ "$BRANCH" == "$dev" ]; then URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz else URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz From f1be33211eaa5b2f2a33cce4355c8302a4b237dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 14:02:16 -0500 Subject: [PATCH 1115/3335] Update haos-vm-v5.sh `awk` is more efficient than using `tr` as it doesn't need to create a new process --- vm/haos-vm-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 22f2a45e..f721d285 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -18,7 +18,7 @@ EOF } header_info echo -e "\n Loading..." -GEN_MAC=02:$(openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//' | tr '[:lower:]' '[:upper:]') +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) VERSIONS=( stable beta dev ) for version in "${VERSIONS[@]}"; do From 9e2a0e18f24cb8bcb10f3fbf9e90a615cd5f4e5e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 14:43:58 -0500 Subject: [PATCH 1116/3335] Update haos-vm-v5.sh default settings more readable in code --- vm/haos-vm-v5.sh | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index f721d285..31728e62 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -102,30 +102,30 @@ function ARCH_CHECK() { fi } function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${stable}${CL}" - BRANCH=${stable} - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" - FORMAT=",efitype=4m" - MACHINE="" - echo -e "${DGN}Using Hostname: ${BGN}haos${stable}${CL}" - HN=haos${stable} - echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" - CORE_COUNT="2" - echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" + BRANCH="$stable" + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + HN="haos$stable" + CORE_COUNT="2" + RAM_SIZE="4096" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="yes" + echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${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 HAOS VM using the above default settings${CL}" } function advanced_settings() { BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ From 7b464da33c754763f9ae7747f03bf5ed15cc07f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 14:54:51 -0500 Subject: [PATCH 1117/3335] Update paperless-ngx-v5-install.sh nltk download all --- install/paperless-ngx-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 10a752ce..6df1d813 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -154,7 +154,7 @@ cd /opt/paperless sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt $STD pip install --upgrade pip $STD pip install -r requirements.txt -$STD python3 -m nltk.downloader -d /usr/share/nltk_data stopwords +$STD python3 -m nltk.downloader -d /usr/share/nltk_data all msg_ok "Installed Paperless-ngx" msg_info "Setting up database" From 57b4c2773ba7d188c81376cc99f0f49f3f1d666e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 16:11:12 -0500 Subject: [PATCH 1118/3335] Update paperless-ngx-v5.sh increase disk to 8GB --- ct/paperless-ngx-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 050f77e2..4e8ff9c3 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -20,7 +20,7 @@ clear header_info echo -e "Loading..." APP="Paperless-ngx" -var_disk="4" +var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" From 959cd5800e00f43a675f8f834a2c33468dec29a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 16:44:35 -0500 Subject: [PATCH 1119/3335] Update paperless-ngx-v5-install.sh tweak --- install/paperless-ngx-v5-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 6df1d813..0470345b 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -154,9 +154,12 @@ cd /opt/paperless sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt $STD pip install --upgrade pip $STD pip install -r requirements.txt -$STD python3 -m nltk.downloader -d /usr/share/nltk_data all msg_ok "Installed Paperless-ngx" +msg_info "Installing Natural Language Toolkit (Patience)" +$STD python3 -m nltk.downloader -d /usr/share/nltk_data all +msg_ok "Installed Natural Language Toolkit" + msg_info "Setting up database" DB_USER=paperless DB_PASS="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)" From 0432ea1558b297c8ec4949b8af572c705e55c2f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 20:51:53 -0500 Subject: [PATCH 1120/3335] Update haos-vm-v5.sh add new error_handler --- vm/haos-vm-v5.sh | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index 31728e62..e89c1951 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -37,22 +37,16 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" THIN="discard=on,ssd=1," -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - [ ! -z ${VMID-} ] && cleanup_vmid - exit $EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid } function cleanup_vmid() { if qm status $VMID &>/dev/null; then From 06831d61284aa0cd244cf2b07d84d298f438b946 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Feb 2023 21:17:50 -0500 Subject: [PATCH 1121/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 65b956ed..eb556ee4 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-02-10 + +### Changed + +- **Home Assistant OS VM** + - Code Refactoring + ## 2023-02-05 ### Changed From 0ddf5e210118046c9ee20f18e1389188c676cadb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Feb 2023 20:36:39 -0500 Subject: [PATCH 1122/3335] update pve & arch checks (#1044) * update ARCH_CHECK & PVE_CHECK * header_info * PVE 7 required --- ct/adguard-v5.sh | 28 ++++++++++++++-------------- ct/alpine-v5.sh | 28 ++++++++++++++-------------- ct/archlinux-v5.sh | 28 ++++++++++++++-------------- ct/audiobookshelf-v5.sh | 28 ++++++++++++++-------------- ct/autobrr-v5.sh | 28 ++++++++++++++-------------- ct/blocky-v5.sh | 28 ++++++++++++++-------------- ct/casaos-v5.sh | 28 ++++++++++++++-------------- ct/changedetection-v5.sh | 28 ++++++++++++++-------------- ct/cronicle-v5.sh | 28 ++++++++++++++-------------- ct/daemonsync-v5.sh | 28 ++++++++++++++-------------- ct/dashy-v5.sh | 28 ++++++++++++++-------------- ct/debian-v5.sh | 28 ++++++++++++++-------------- ct/deconz-v5.sh | 28 ++++++++++++++-------------- ct/deluge-v5.sh | 28 ++++++++++++++-------------- ct/devuan-v5.sh | 28 ++++++++++++++-------------- ct/docker-v5.sh | 28 ++++++++++++++-------------- ct/emby-v5.sh | 28 ++++++++++++++-------------- ct/emqx-v5.sh | 28 ++++++++++++++-------------- ct/esphome-v5.sh | 28 ++++++++++++++-------------- ct/grafana-v5.sh | 28 ++++++++++++++-------------- ct/grocy-v5.sh | 28 ++++++++++++++-------------- ct/heimdalldashboard-v5.sh | 28 ++++++++++++++-------------- ct/homeassistant-core-v5.sh | 32 ++++++++++++++++---------------- ct/homeassistant-v5.sh | 28 ++++++++++++++-------------- ct/homebridge-v5.sh | 28 ++++++++++++++-------------- ct/homepage-v5.sh | 28 ++++++++++++++-------------- ct/homer-v5.sh | 28 ++++++++++++++-------------- ct/hyperion-v5.sh | 25 ++++++++++++------------- ct/influxdb-v5.sh | 28 ++++++++++++++-------------- ct/iobroker-v5.sh | 28 ++++++++++++++-------------- ct/jellyfin-v5.sh | 28 ++++++++++++++-------------- ct/k0s-v5.sh | 28 ++++++++++++++-------------- ct/kavita-v5.sh | 28 ++++++++++++++-------------- ct/keycloak-v5.sh | 28 ++++++++++++++-------------- ct/lidarr-v5.sh | 28 ++++++++++++++-------------- ct/magicmirror-v5.sh | 28 ++++++++++++++-------------- ct/mariadb-v5.sh | 28 ++++++++++++++-------------- ct/meshcentral-v5.sh | 28 ++++++++++++++-------------- ct/motioneye-v5.sh | 28 ++++++++++++++-------------- ct/mqtt-v5.sh | 25 ++++++++++++------------- ct/n8n-v5.sh | 28 ++++++++++++++-------------- ct/navidrome-v5.sh | 28 ++++++++++++++-------------- ct/nextcloudpi-v5.sh | 28 ++++++++++++++-------------- ct/nginxproxymanager-v5.sh | 28 ++++++++++++++-------------- ct/nocodb-v5.sh | 28 ++++++++++++++-------------- ct/node-red-v5.sh | 29 ++++++++++++++--------------- ct/omada-v5.sh | 27 ++++++++++++++------------- ct/omv-v5.sh | 28 ++++++++++++++-------------- ct/openhab-v5.sh | 28 ++++++++++++++-------------- ct/paperless-ngx-v5.sh | 28 ++++++++++++++-------------- ct/photoprism-v5.sh | 28 ++++++++++++++-------------- ct/pihole-v5.sh | 28 ++++++++++++++-------------- ct/plex-v5.sh | 28 ++++++++++++++-------------- ct/podman-homeassistant-v5.sh | 28 ++++++++++++++-------------- ct/podman-v5.sh | 28 ++++++++++++++-------------- ct/postgresql-v5.sh | 28 ++++++++++++++-------------- ct/prometheus-v5.sh | 28 ++++++++++++++-------------- ct/prowlarr-v5.sh | 28 ++++++++++++++-------------- ct/radarr-v5.sh | 28 ++++++++++++++-------------- ct/readarr-v5.sh | 28 ++++++++++++++-------------- ct/rockylinux-v5.sh | 28 ++++++++++++++-------------- ct/sabnzbd-v5.sh | 28 ++++++++++++++-------------- ct/scrypted-v5.sh | 28 ++++++++++++++-------------- ct/shinobi-v5.sh | 28 ++++++++++++++-------------- ct/sonarr-v5.sh | 28 ++++++++++++++-------------- ct/syncthing-v5.sh | 28 ++++++++++++++-------------- ct/tdarr-v5.sh | 28 ++++++++++++++-------------- ct/technitiumdns-v5.sh | 28 ++++++++++++++-------------- ct/transmission-v5.sh | 28 ++++++++++++++-------------- ct/trilium-v5.sh | 28 ++++++++++++++-------------- ct/ubuntu-v5.sh | 28 ++++++++++++++-------------- ct/umbrel-v5.sh | 28 ++++++++++++++-------------- ct/unifi-v5.sh | 28 ++++++++++++++-------------- ct/uptimekuma-v5.sh | 28 ++++++++++++++-------------- ct/vaultwarden-v5.sh | 28 ++++++++++++++-------------- ct/whisparr-v5.sh | 28 ++++++++++++++-------------- ct/whoogle-v5.sh | 28 ++++++++++++++-------------- ct/wikijs-v5.sh | 28 ++++++++++++++-------------- ct/wireguard-v5.sh | 28 ++++++++++++++-------------- ct/yunohost-v5.sh | 28 ++++++++++++++-------------- ct/zigbee2mqtt-v5.sh | 28 ++++++++++++++-------------- ct/zwave-js-ui-v5.sh | 28 ++++++++++++++-------------- 82 files changed, 1146 insertions(+), 1148 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 2022e1f7..fa35e0c0 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___ __ __ / | ____/ /___ ___v5______ __________/ / / /| |/ __ / __ / / / / __ / ___/ __ / @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Adguard" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Stopping AdguardHome" systemctl stop AdGuardHome @@ -364,8 +363,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index f48475c6..a7d31ece 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___ v5 __ _ / | / /___ (_)___ ___ / /| | / / __ \/ / __ \/ _ \ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Alpine" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -335,7 +335,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apk update &>/dev/null @@ -343,8 +342,9 @@ apk upgrade &>/dev/null msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 5349d521..c1e68f70 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___ __ __ _ / | __________/ /_ v5 / / (_)___ __ ___ __ / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Arch Linux" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" pacman-key --init @@ -347,8 +346,9 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 981f227d..05dda529 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___ __ __ __ ______ ____ ___ ______/ (_)___v5/ /_ ____ ____ / /_______/ /_ ___ / / __/ / __ `/ / / / __ / / __ \/ __ \/ __ \/ __ \/ //_/ ___/ __ \/ _ \/ / /_ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="audiobookshelf" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index e5fdb60f..1fed6b3b 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___ __ __ / | __ __/ /_____ / /_v5__________ / /| |/ / / / __/ __ \/ __ \/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Autobrr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -337,7 +337,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Stopping ${APP} LXC" systemctl stop autobrr.service @@ -356,8 +355,9 @@ msg_ok "Started ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index ccf94f66..ab491a6e 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ __ / __ )/ /___v5_____/ /____ __ / __ / / __ \/ ___/ //_/ / / / @@ -15,7 +17,6 @@ function header_info { /____/ EOF } -clear header_info echo -e "Loading..." APP="Blocky" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 416743d9..04683e0d 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ ____ _____ / ____/___ __v5______ _/ __ \/ ___/ / / / __ `/ ___/ __ `/ / / /\__ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="CasaOS" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -346,7 +346,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -356,8 +355,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 7ef66909..152f314b 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ________ ____ __ __ _ / ____/ /_v5____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ @@ -15,7 +17,6 @@ function header_info { /____/ EOF } -clear header_info echo -e "Loading..." APP="Change Detection" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" pip3 install changedetection.io --upgrade &>/dev/null @@ -346,8 +345,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index a8ce108b..56c4d075 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ _ __ / ____/________v5____ (_)____/ /__ / / / ___/ __ \/ __ \/ / ___/ / _ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Cronicle" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -341,7 +341,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "2" "Install ${APP} Worker" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then if [[ ! -d /opt/cronicle ]]; then @@ -393,8 +392,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 49e06d6c..ccdd178d 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ _____ / __ \____ ____ ____ ___ ____ ____ / ___/__v5______ _____ / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ @@ -15,7 +17,6 @@ function header_info { /____/ EOF } -clear header_info echo -e "Loading..." APP="Daemon Sync" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 7f51ba45..79981fb6 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____ ______/ /_ __ __ / / / / __ / ___/ __ \/ / / / @@ -15,7 +17,6 @@ function header_info { v5 /____/ EOF } -clear header_info echo -e "Loading..." APP="Dashy" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Stopping ${APP}" systemctl stop dashy @@ -373,8 +372,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 02e30838..03bb03ee 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ _ / __ \___v5/ /_ (_)___ _____ / / / / _ \/ __ \/ / __ `/ __ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Debian" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index f26890fb..61e4b0ab 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __________ _ _______ ____/ /v5 / ____/ __ \/ | / /__ / / __ / _ \/ / / / / / |/ / / / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="deCONZ" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +347,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index e69cd92a..b3824328 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \___ / /_v5______ ____ / / / / _ \/ / / / / __ `/ _ \ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Deluge" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -335,7 +335,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -343,8 +342,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index fe55f367..3951de1f 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ / __ \___ _ ____ ______v5____ / / / / _ \ | / / / / / __ `/ __ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Devuan" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 25b390a2..98ea5d8c 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____ _____/ /_v5__ _____ / / / / __ \/ ___/ //_/ _ \/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Docker" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -345,7 +345,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -353,8 +352,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 6d9d2fac..9cd4053d 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ __ / ____/___ v5_ / /_ __ __ / __/ / __ __ \/ __ \/ / / / @@ -15,7 +17,6 @@ function header_info { /____/ EOF } -clear header_info echo -e "Loading..." APP="Emby" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -346,7 +346,6 @@ function install_script() { fi } function update_script() { -clear header_info LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Stopping ${APP}" @@ -366,8 +365,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 3ea8ff96..dd98ce38 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ________ _______v5 _ __ / ____/ |/ / __ \ | |/ / / __/ / /|_/ / / / / | / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="EMQX" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -346,8 +345,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index fb44c748..b63a2141 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___________ ____ __ __ / ____/ ___// __ \/ / / /___v5____ ___ ___ / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="ESPHome" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -337,7 +337,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Stopping ESPHome" systemctl stop esphomeDashboard @@ -353,8 +352,9 @@ msg_ok "Started ESPHome" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 6ac359a5..ff4b50bb 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ ____ / ____/________ _/ __/___ _____v5____ _ / / __/ ___/ __ / /_/ __ / __ \/ __ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Grafana" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index c1bb4dbd..fccf9569 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __________ _______ __ / __ / ___/ __ \/ ___/ / / / / /_/ / / / /_/ / /__/ /_/ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="grocy" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP}" bash /var/www/html/update.sh @@ -346,8 +345,9 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 8d890a1f..d8ab9f21 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ _ _ _ ___ _ _ _ /\ /\___(_)_ __ ___ __| | __ _| | | / \__ _ ___| |__ | |__ ___ __ _ _ __ __| | / /_/ / _ \ | '_ ` _ \ / _` |/ _` | | | / /\ / _` / __| '_ \| '_ \ / _ \ / _` | '__/ _` | @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Heimdall Dashboard" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Stopping ${APP}" systemctl disable heimdall.service &>/dev/null @@ -426,8 +425,9 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index f7c432c5..0914d90e 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ _ _ _ ___ /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___v5_ __ ___ / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Home Assistant-Core" @@ -66,23 +67,22 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - msg_error "This script requires Proxmox Virtual Environment 7.0 or greater" +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi +} +function ARCH_CHECK() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit fi } -function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi - } if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -348,7 +348,6 @@ function update_script() { "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then @@ -421,8 +420,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index df6808f6..f7787bd9 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ ___ _ __ __ / / / /___v5____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Home Assistant" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -354,7 +354,6 @@ function update_script() { "3" "Install HACS" OFF \ "4" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then msg_info "Updating All Containers" @@ -421,8 +420,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 5442b1b1..78b8e237 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ______ __ _____________ ____ ________ ____________ / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Homebridge" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 620dee04..97550a20 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ / / / /___ ____ ___ ___ ____ ____ _____ ____ / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ @@ -15,7 +17,6 @@ function header_info { /_/ v5 /____/ EOF } -clear header_info echo -e "Loading..." APP="Homepage" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP}" if ! command -v pnpm >/dev/null 2>&1; then @@ -353,8 +352,9 @@ systemctl start homepage msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index f9b75c3d..58de4b1d 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ / / / /___ ____ ___v5___ _____ / /_/ / __ \/ __ `__ \/ _ \/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Homer" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Stopping ${APP}" systemctl stop homer @@ -366,8 +365,9 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 81e30620..13e00b7b 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -6,6 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { +clear cat <<"EOF" __ __ _ / / / /_ ______v5___ _____(_)___ ____ @@ -16,7 +17,6 @@ cat <<"EOF" EOF } -clear header_info echo -e "Loading..." APP="Hyperion" @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index eaf8ada3..4d5e1ca7 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ ______ ____ ____ / _/_v5 / __/ /_ ___ __/ __ \/ __ ) / // __ \/ /_/ / / / / |/_/ / / / __ | @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="InfluxDB" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 55e1d493..97373a1a 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ ____ __ (_)___ / __ )_________ / /_____ _____ / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="ioBroker" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index e5b677be..5281665c 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ____ _____ / /__ / / /_v5__/ __(_)___ __ / / _ \/ / / / / / /_/ / __ \ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Jellyfin" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -348,7 +348,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -356,8 +355,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 04c0e1f1..ce4e94ad 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ____ __ __ __ __ / /__/ __ \_____ / //_/_ __/ /_ ___v5_________ ___ / /____ _____ / //_/ / / / ___/ / ,< / / / / __ \/ _ \/ ___/ __ \/ _ \/ __/ _ \/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="k0s" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index c5338e4d..afa7a8d2 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ _ __ / //_/___ __ v5__(_) /_____ _ / ,< / __ `/ | / / / __/ __ `/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Kavita" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -337,7 +337,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -345,8 +344,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index e4a3aad0..4adf46cf 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ __ __ / //_/__v5__ _______/ /___ ____ _/ /__ / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Keycloak" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +347,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 931ca190..638c94fb 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ _ __ / / (_)___/ /___v5__________ / / / / __ / __ `/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Lidarr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 5862a8e6..ebfa9d20 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ___ _ __ ____ / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="MagicMirror" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" cd /opt/magicmirror @@ -349,8 +348,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 6ea66777..63dadfd9 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ___ _ ____ ____ / |/ /___ ______(_)___ _/ __ \/ __ ) / /|_/ / __ / ___/ / __ / / / / __ | @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="MariaDB" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 79609b9d..0bf47afb 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ___ __ ______ __ __ / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="MeshCentral" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index f50a8cf5..1b1176bb 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ___ __ _ / |/ /___ / /_(_)___ ____v5___ __ _____ / /|_/ / __ \/ __/ / __ \/ __ \/ _ \/ / / / _ \ @@ -15,7 +17,6 @@ function header_info { /____/ EOF } -clear header_info echo -e "Loading..." APP="Motioneye" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" pip install motioneye --upgrade &>/dev/null @@ -346,8 +345,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index f5de113d..5eab6ee6 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -6,6 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { +clear cat <<"EOF" __ ___ ____ _ ____________ / |/ /___v5_____/ __ \__ __(_)_ __/_ __/___ @@ -15,7 +16,6 @@ cat <<"EOF" EOF } -clear header_info echo -e "Loading..." APP="MQTT" @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -337,7 +336,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +345,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 2132cdd1..85f1d604 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ___ / _ \ _ __ | (_) |_v5_ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="n8n" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" npm update -g n8n &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 2999950c..5499040d 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ __ _ __ / | / /___ __ v5__(_)___/ /________ ____ ___ ___ / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Navidrome" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Stopping ${APP}" @@ -358,8 +357,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index a8b21172..20f09b56 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ __ __ ________ ______ _ / | / /__ _ __/ /_/ ____/ /___ __v5______/ / __ \(_) / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="NextCloudPi" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 94a17159..32f9ee26 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ __ _ ____ __ ___ / | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____ / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Nginx Proxy Manager" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | @@ -456,8 +455,9 @@ msg_ok "Cleaned" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index c9e31080..e30d090c 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ __ ____ ____ / | / /___ ____v5___ / __ \/ __ ) / |/ / __ \/ ___/ __ \/ / / / __ | @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="NocoDB" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP}" cd /opt/nocodb @@ -350,8 +349,9 @@ msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index e4016d4d..e2c8ebcd 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ __ __ ____ __ / | / /___ ____/ /__ v5 / __ \___ ____/ / / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Node-Red" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -341,7 +341,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "1" "Update ${APP}" ON \ "2" "Install Themes" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then msg_info "Stopping ${APP}" @@ -367,7 +366,6 @@ THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Scri "solarized-dark" "" OFF \ "solarized-light" "" OFF \ 3>&1 1>&2 2>&3) -clear header_info msg_info "Installing ${THEME} Theme" cd /root/.node-red @@ -383,8 +381,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 0160d8f5..1b1c4a8d 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____ ___v5____ _____/ /___ _ / / / / __ __ \/ __ / __ / __ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Omada" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -345,8 +345,9 @@ function install_script() { advanced_settings fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index cda88be9..75ce494b 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ ___ ___ _ __ ____ / __ \____v5___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="OMV" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +347,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index c183799f..a43e311e 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ _____ ____ ____v5____ ___ ____ / / / / | / __ ) / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="openHAB" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +347,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 4e8ff9c3..49be3557 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____ _____ ___ _____/ /__v5__________ ____ ____ __ __ / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Paperless-ngx" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -345,7 +345,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "1" "Update Paperless-ngx to $RELEASE" ON \ "2" "Paperless-ngx Credentials" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then msg_info "Stopping Paperless-ngx" @@ -415,8 +414,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 886008c8..72f9d070 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ ______ __________ ____ ____ _________ __ ___ / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="PhotoPrism" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -337,7 +337,6 @@ function install_script() { } function update_script() { -clear header_info echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" msg_info "Stopping PhotoPrism" @@ -368,8 +367,9 @@ msg_ok "Started PhotoPrism" msg_ok "Update Successful" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 03fa249b..9df75b50 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ ____ __ ______ __ ______ / __ \/ _/ / / / / __ \/ / / ____/ / /_/ // /___/ /_/ / / / / / / __/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Pihole" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 25555eab..22edee4f 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ __ ___ ___ _____ / __ \/ /__ _ __ / |/ /__v5____/ (_)___ _ / ___/___ ______ _____ _____ / /_/ / / _ \| |/_/ / /|_/ / _ \/ __ / / __ `/ \__ \/ _ \/ ___/ | / / _ \/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Plex" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -352,7 +352,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "2" "Run plexupdate" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" @@ -366,8 +365,9 @@ bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index b1581dff..cef1ac7a 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____ ____/ /___ ___ ____ _____ / /_/ / __ \/ __ / __ __ \/ __ / __ \ @@ -19,7 +21,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Podman-Home Assistant" @@ -68,18 +69,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -347,7 +347,6 @@ function update_script() { "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" @@ -398,8 +397,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 75b3170c..dcf91be9 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____v5____/ /___ ___ ____ _____ / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Podman" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index f6c599f6..e91afbbb 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ _____ ____ __ / __ \____ _____/ /_____ _________ / ___// __ \ / / / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / @@ -15,7 +17,6 @@ function header_info { /____/ EOF } -clear header_info echo -e "Loading..." APP="PostgreSQL" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 3f61b2c8..4a9183d5 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ __ / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Prometheus" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -347,8 +346,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 5a6e998d..4750837b 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \_________ _ __/ /___v5__________ / /_/ / ___/ __ \ | /| / / / __ `/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Prowlarr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 20ed874d..472ba5de 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \____ _____/ /___v5__________ / /_/ / __ `/ __ / __ `/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Radarr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 0dffef6a..8ab9a9c7 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ / __ \___ ____ _____/ /___v5__________ / /_/ / _ \/ __ `/ __ / __ `/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Readarr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index f548f14b..a5b00f02 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ____ __ __ _ / __ \____ _____/ /____ __ / / (_)___v5__ ___ __ / /_/ / __ \/ ___/ //_/ / / / / / / / __ \/ / / / |/_/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Rocky Linux" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" pacman-key --init @@ -348,8 +347,9 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 40bffdbf..9db3ab90 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ ___ ____ __ __ / ___// | / __ )____v5____ / /_ ____/ / \__ \/ /| | / __ / __ \/_ / / __ \/ __ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="SABnzbd" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index cc759881..3c3969cf 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ __ __ / ___/____________v5______ / /____ ____/ / \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Scrypted" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +347,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index cad79e5c..e106c42c 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ __ _ __ _ / ___// /_ (_)___v5____ / /_ (_) \__ \/ __ \/ / __ \/ __ \/ __ \/ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Shinobi" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -346,7 +346,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Updating Shinobi LXC" cd /opt/Shinobi @@ -357,8 +356,9 @@ pm2 restart cron msg_ok "Updated Shinobi LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 7ca8a5d7..593394f4 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ / ___/____ ____ ____v5__________ \__ \/ __ \/ __ \/ __ `/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Sonarr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 2c1c13d1..f8f6d93e 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ __ __ _ / ___/__ ______v5_____/ /_/ /_ (_)___ ____ _ \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Syncthing" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -348,8 +347,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 3319a7e3..c72828f8 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ __ /_ __/___/ /___v5__________ / / / __ / __ `/ ___/ ___/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Tdarr" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 729a6c3b..15ac5433 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ __ _ __ _ ____ _ _______ /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ v5 / __ \/ | / / ___/ / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Technitium DNS" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" dotnetDir="/opt/dotnet" @@ -409,8 +408,9 @@ fi msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index f99e4644..064229a1 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ _ _ /_ __/________ _____v5_________ ___ (_)_________(_)___ ____ / / / ___/ __ `/ __ \/ ___/ __ `__ \/ / ___/ ___/ / __ \/ __ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Transmission" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index e6b8b540..f32b8bc1 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + ______ _ ___ /_ __/_v5_(_) (_)_ ______ ___ / / / ___/ / / / / / / __ `__ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Trilium" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | grep "tag_name" | @@ -366,8 +365,9 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 3416113c..eb23aaa5 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ ____ __ / / / / /_v5__ ______ / /___ __ / / / / __ \/ / / / __ \/ __/ / / / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Ubuntu" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -342,7 +342,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -350,8 +349,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 24c40e7e..913274a1 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ __ __ / / / /___ ___v5/ /_ ________ / / / / / / __ `__ \/ __ \/ ___/ _ \/ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Umbrel" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -346,7 +346,6 @@ function install_script() { fi } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null @@ -354,8 +353,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 78b76c0c..895a5122 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ _ _____ / / / /_v5 (_) __(_) / / / / __ \/ / /_/ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Unifi" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP}" wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh @@ -347,8 +346,9 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 2af3e44c..8454cb81 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ __ _ __ __ / / / /___ / /_(_)___ ___ ___ v5 / //_/_ ______ ___ ____ _ / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Uptime Kuma" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Stopping ${APP}" @@ -364,8 +363,9 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 6165882d..5c9dbddb 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ __ ____ _ __ __ | | / /___ ___v5__/ / /| | / /___ __________/ /__ ____ | | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Vaultwarden" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -351,7 +351,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "3" "Show Admin Token" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" @@ -415,8 +414,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 87043a9b..63161066 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ ____ _ | | / / /_ (_)________ ____v5__________ | | /| / / __ \/ / ___/ __ \/ __ `/ ___/ ___/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Whisparr" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -335,7 +335,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -343,8 +342,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index d3c6b07c..51acf61b 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ ____ ______ ____ ________ ______ | | v5 / / / / / __ \/ __ \/ ____/ / / ____/ | | /| / / /_/ / / / / / / / / __/ / / __/ @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Whoogle" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating ${APP} LXC" pip3 install whoogle-search --upgrade &>/dev/null @@ -346,8 +345,9 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 5e4ecb02..c9912aef 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ ___ __ _ _ | | v5 / (_) /__(_) (_)____ | | /| / / / //_/ / / / ___/ @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Wikijs" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -339,7 +339,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Stopping ${APP}" systemctl stop wikijs @@ -360,8 +359,9 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index ea6c3d1a..249a8205 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _ ___ ______ __ | | / (_)_______ / ____/_ ______ __________/ / | | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Wireguard" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -342,7 +342,6 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "1" "Update ${APP} LXC" ON \ "2" "Install WGDashboard" OFF \ 3>&1 1>&2 2>&3) -clear header_info if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" @@ -402,8 +401,9 @@ exit fi } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index cabde660..7ae9a540 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + __ __ __ __ __ \ \/ /_ ______v5____ / / / /___ _____/ /_ \ / / / / __ \/ __ \/ /_/ / __ \/ ___/ __/ @@ -15,7 +17,6 @@ __ __ __ __ __ EOF } -clear header_info echo -e "Loading..." APP="YunoHost" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -334,7 +334,6 @@ function install_script() { } function update_script() { -clear header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null @@ -342,8 +341,9 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 42767d5d..886b8d43 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ _ __ ___ __ _______ ____________ /__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / @@ -16,7 +18,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Zigbee2MQTT" @@ -65,18 +66,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -338,7 +338,6 @@ function install_script() { fi } function update_script() { -clear header_info cd /opt/zigbee2mqtt @@ -393,8 +392,9 @@ start_zigbee2mqtt echo "Done!" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 293abf26..d114feda 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -6,7 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" +clear +cat <<"EOF" + _____ _______ __ ______ /__ /_ ______ __v5 _____ / / ___/ / / / / _/ / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / @@ -15,7 +17,6 @@ function header_info { EOF } -clear header_info echo -e "Loading..." APP="Zwave-JS-UI" @@ -64,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -337,7 +337,6 @@ function install_script() { fi } function update_script() { -clear header_info RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Stopping Z-wave JS UI" @@ -360,8 +359,9 @@ msg_ok "Cleaned" msg_ok "Updated Successfully!\n" exit } -clear ARCH_CHECK +PVE_CHECK +header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From 36ca6fa9d2eaa878c1a1ebecb2ca7d3d3bef80af Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Feb 2023 20:58:42 -0500 Subject: [PATCH 1123/3335] move checks to function install_script() (#1045) --- ct/adguard-v5.sh | 4 ++-- ct/alpine-v5.sh | 4 ++-- ct/archlinux-v5.sh | 4 ++-- ct/audiobookshelf-v5.sh | 4 ++-- ct/autobrr-v5.sh | 4 ++-- ct/blocky-v5.sh | 4 ++-- ct/casaos-v5.sh | 4 ++-- ct/changedetection-v5.sh | 4 ++-- ct/cronicle-v5.sh | 4 ++-- ct/daemonsync-v5.sh | 4 ++-- ct/dashy-v5.sh | 4 ++-- ct/debian-v5.sh | 4 ++-- ct/deconz-v5.sh | 4 ++-- ct/deluge-v5.sh | 4 ++-- ct/devuan-v5.sh | 4 ++-- ct/docker-v5.sh | 4 ++-- ct/emby-v5.sh | 4 ++-- ct/emqx-v5.sh | 4 ++-- ct/esphome-v5.sh | 4 ++-- ct/grafana-v5.sh | 4 ++-- ct/grocy-v5.sh | 4 ++-- ct/heimdalldashboard-v5.sh | 4 ++-- ct/homeassistant-core-v5.sh | 4 ++-- ct/homeassistant-v5.sh | 4 ++-- ct/homebridge-v5.sh | 4 ++-- ct/homepage-v5.sh | 4 ++-- ct/homer-v5.sh | 4 ++-- ct/hyperion-v5.sh | 4 ++-- ct/influxdb-v5.sh | 4 ++-- ct/iobroker-v5.sh | 4 ++-- ct/jellyfin-v5.sh | 4 ++-- ct/k0s-v5.sh | 4 ++-- ct/kavita-v5.sh | 4 ++-- ct/keycloak-v5.sh | 4 ++-- ct/lidarr-v5.sh | 4 ++-- ct/magicmirror-v5.sh | 4 ++-- ct/mariadb-v5.sh | 4 ++-- ct/meshcentral-v5.sh | 4 ++-- ct/motioneye-v5.sh | 4 ++-- ct/mqtt-v5.sh | 4 ++-- ct/n8n-v5.sh | 4 ++-- ct/navidrome-v5.sh | 4 ++-- ct/nextcloudpi-v5.sh | 4 ++-- ct/nginxproxymanager-v5.sh | 4 ++-- ct/nocodb-v5.sh | 4 ++-- ct/node-red-v5.sh | 4 ++-- ct/omada-v5.sh | 4 ++-- ct/omv-v5.sh | 4 ++-- ct/openhab-v5.sh | 4 ++-- ct/paperless-ngx-v5.sh | 4 ++-- ct/photoprism-v5.sh | 4 ++-- ct/pihole-v5.sh | 4 ++-- ct/plex-v5.sh | 4 ++-- ct/podman-homeassistant-v5.sh | 4 ++-- ct/podman-v5.sh | 4 ++-- ct/postgresql-v5.sh | 4 ++-- ct/prometheus-v5.sh | 4 ++-- ct/prowlarr-v5.sh | 4 ++-- ct/radarr-v5.sh | 4 ++-- ct/readarr-v5.sh | 4 ++-- ct/rockylinux-v5.sh | 4 ++-- ct/sabnzbd-v5.sh | 4 ++-- ct/scrypted-v5.sh | 4 ++-- ct/shinobi-v5.sh | 4 ++-- ct/sonarr-v5.sh | 4 ++-- ct/syncthing-v5.sh | 4 ++-- ct/tdarr-v5.sh | 4 ++-- ct/technitiumdns-v5.sh | 4 ++-- ct/transmission-v5.sh | 4 ++-- ct/trilium-v5.sh | 4 ++-- ct/ubuntu-v5.sh | 4 ++-- ct/umbrel-v5.sh | 4 ++-- ct/unifi-v5.sh | 4 ++-- ct/uptimekuma-v5.sh | 4 ++-- ct/vaultwarden-v5.sh | 4 ++-- ct/whisparr-v5.sh | 4 ++-- ct/whoogle-v5.sh | 4 ++-- ct/wikijs-v5.sh | 4 ++-- ct/wireguard-v5.sh | 4 ++-- ct/yunohost-v5.sh | 4 ++-- ct/zigbee2mqtt-v5.sh | 4 ++-- ct/zwave-js-ui-v5.sh | 4 ++-- 82 files changed, 164 insertions(+), 164 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index fa35e0c0..74934552 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -363,8 +365,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index a7d31ece..754f2e49 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -323,6 +323,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -342,8 +344,6 @@ apk upgrade &>/dev/null msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index c1e68f70..23e9b352 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 05dda529..67b9743f 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 1fed6b3b..08754961 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -325,6 +325,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -355,8 +357,6 @@ msg_ok "Started ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index ab491a6e..d197e42a 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 04683e0d..8bc4d337 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -335,6 +335,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -355,8 +357,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 152f314b..c4b00088 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 56c4d075..6d87466f 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -324,6 +324,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -392,8 +394,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index ccdd178d..70ffccbb 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 79981fb6..e81e0be1 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -372,8 +374,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 03bb03ee..a42ebe1f 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 61e4b0ab..c0985471 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index b3824328..d249c084 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -323,6 +323,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -342,8 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 3951de1f..c494a805 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 98ea5d8c..35a93d52 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -334,6 +334,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -352,8 +354,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 9cd4053d..022e8a4d 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -335,6 +335,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -365,8 +367,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index dd98ce38..c5cd3d70 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index b63a2141..3dda1671 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -352,8 +354,6 @@ msg_ok "Started ESPHome" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index ff4b50bb..9dc81a58 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index fccf9569..97ec5e40 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index d8ab9f21..ebbf5c09 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -425,8 +427,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 0914d90e..f60c6ff5 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -329,6 +329,8 @@ function advanced_settings() { } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -420,8 +422,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index f7787bd9..5887793b 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -337,6 +337,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -420,8 +422,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 78b8e237..caabb1f4 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 97550a20..17d8197b 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -352,8 +354,6 @@ systemctl start homepage msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 58de4b1d..9661e132 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -365,8 +367,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 13e00b7b..4198119d 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 4d5e1ca7..2a8151c3 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 97373a1a..398478a8 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 5281665c..2332180d 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -337,6 +337,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -355,8 +357,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index ce4e94ad..421e517b 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index afa7a8d2..f3c2eebe 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -325,6 +325,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -344,8 +346,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 4adf46cf..2998f12f 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 638c94fb..3f63d0d4 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index ebfa9d20..d43b49c4 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,8 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 63dadfd9..f8604781 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 0bf47afb..f34b8c82 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 1b1176bb..633c6a00 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 5eab6ee6..312134fa 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -324,6 +324,8 @@ function advanced_settings() { } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 85f1d604..8533e434 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 5499040d..ce73bc4c 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -357,8 +359,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 20f09b56..86d2abdb 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 32f9ee26..0c91b4ff 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -455,8 +457,6 @@ msg_ok "Cleaned" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index e30d090c..1248bb47 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,8 +351,6 @@ msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index e2c8ebcd..0f5dbf28 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -381,8 +383,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 1b1c4a8d..f0fe5e7b 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -335,6 +335,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ function install_script() { advanced_settings fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 75ce494b..fc816afb 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index a43e311e..936d9cfb 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 49be3557..7c02f6f2 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -414,8 +416,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 72f9d070..c5421e36 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -325,6 +325,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -367,8 +369,6 @@ msg_ok "Started PhotoPrism" msg_ok "Update Successful" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 9df75b50..e81072e6 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 22edee4f..ad63a59e 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -336,6 +336,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -365,8 +367,6 @@ bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index cef1ac7a..585fb563 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -330,6 +330,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -397,8 +399,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index dcf91be9..3ba54738 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index e91afbbb..bca3cb47 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 4a9183d5..687b8205 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 4750837b..b0aadbb5 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 472ba5de..17f60707 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 8ab9a9c7..e8a323b0 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index a5b00f02..aeb48aeb 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 9db3ab90..863ea945 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 3c3969cf..1c950d52 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index e106c42c..184f05d1 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -335,6 +335,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -356,8 +358,6 @@ pm2 restart cron msg_ok "Updated Shinobi LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 593394f4..a887509c 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index f8f6d93e..2dd091c6 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,8 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index c72828f8..9d088413 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 15ac5433..80727dc5 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -408,8 +410,6 @@ fi msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 064229a1..f1f69af9 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index f32b8bc1..a52e0963 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -365,8 +367,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index eb23aaa5..78a1d4bc 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -331,6 +331,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,8 +351,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 913274a1..75bb0d59 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -335,6 +335,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -353,8 +355,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 895a5122..e13aa3a9 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,8 +348,6 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 8454cb81..64c0a2eb 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -363,8 +365,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 5c9dbddb..9eb335e9 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -414,8 +416,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 63161066..912b2df8 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -323,6 +323,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -342,8 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 51acf61b..2713bc4b 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -345,8 +347,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index c9912aef..1ed58c5a 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -359,8 +361,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 249a8205..4738f193 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -401,8 +403,6 @@ exit fi } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 7ae9a540..d73d52c9 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -322,6 +322,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -341,8 +343,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 886b8d43..879efc0a 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -327,6 +327,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -392,8 +394,6 @@ start_zigbee2mqtt echo "Done!" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index d114feda..d5e8b421 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -326,6 +326,8 @@ function advanced_settings() { fi } function install_script() { +ARCH_CHECK +PVE_CHECK if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -359,8 +361,6 @@ msg_ok "Cleaned" msg_ok "Updated Successfully!\n" exit } -ARCH_CHECK -PVE_CHECK header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi From 03ff3750bfbf90d10f74a527347538eaeb52dd22 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Feb 2023 21:10:20 -0500 Subject: [PATCH 1124/3335] tweak (#1046) --- ct/adguard-v5.sh | 2 +- ct/alpine-v5.sh | 2 +- ct/archlinux-v5.sh | 2 +- ct/audiobookshelf-v5.sh | 2 +- ct/autobrr-v5.sh | 2 +- ct/blocky-v5.sh | 2 +- ct/casaos-v5.sh | 2 +- ct/changedetection-v5.sh | 2 +- ct/cronicle-v5.sh | 2 +- ct/daemonsync-v5.sh | 2 +- ct/dashy-v5.sh | 2 +- ct/debian-v5.sh | 2 +- ct/deconz-v5.sh | 2 +- ct/deluge-v5.sh | 2 +- ct/devuan-v5.sh | 2 +- ct/docker-v5.sh | 2 +- ct/emby-v5.sh | 2 +- ct/emqx-v5.sh | 2 +- ct/esphome-v5.sh | 2 +- ct/grafana-v5.sh | 2 +- ct/grocy-v5.sh | 2 +- ct/heimdalldashboard-v5.sh | 2 +- ct/homeassistant-core-v5.sh | 2 +- ct/homeassistant-v5.sh | 2 +- ct/homebridge-v5.sh | 2 +- ct/homepage-v5.sh | 2 +- ct/homer-v5.sh | 2 +- ct/hyperion-v5.sh | 2 +- ct/influxdb-v5.sh | 2 +- ct/iobroker-v5.sh | 2 +- ct/jellyfin-v5.sh | 2 +- ct/k0s-v5.sh | 2 +- ct/kavita-v5.sh | 2 +- ct/keycloak-v5.sh | 2 +- ct/lidarr-v5.sh | 2 +- ct/magicmirror-v5.sh | 2 +- ct/mariadb-v5.sh | 2 +- ct/meshcentral-v5.sh | 2 +- ct/motioneye-v5.sh | 2 +- ct/mqtt-v5.sh | 2 +- ct/n8n-v5.sh | 2 +- ct/navidrome-v5.sh | 2 +- ct/nextcloudpi-v5.sh | 2 +- ct/nginxproxymanager-v5.sh | 2 +- ct/nocodb-v5.sh | 2 +- ct/node-red-v5.sh | 2 +- ct/omada-v5.sh | 2 +- ct/omv-v5.sh | 2 +- ct/openhab-v5.sh | 2 +- ct/paperless-ngx-v5.sh | 2 +- ct/photoprism-v5.sh | 2 +- ct/pihole-v5.sh | 2 +- ct/plex-v5.sh | 2 +- ct/podman-homeassistant-v5.sh | 2 +- ct/podman-v5.sh | 2 +- ct/postgresql-v5.sh | 2 +- ct/prometheus-v5.sh | 2 +- ct/prowlarr-v5.sh | 2 +- ct/radarr-v5.sh | 2 +- ct/readarr-v5.sh | 2 +- ct/rockylinux-v5.sh | 2 +- ct/sabnzbd-v5.sh | 2 +- ct/scrypted-v5.sh | 2 +- ct/shinobi-v5.sh | 2 +- ct/sonarr-v5.sh | 2 +- ct/syncthing-v5.sh | 2 +- ct/tdarr-v5.sh | 2 +- ct/technitiumdns-v5.sh | 2 +- ct/transmission-v5.sh | 2 +- ct/trilium-v5.sh | 2 +- ct/ubuntu-v5.sh | 2 +- ct/umbrel-v5.sh | 2 +- ct/unifi-v5.sh | 2 +- ct/uptimekuma-v5.sh | 2 +- ct/vaultwarden-v5.sh | 2 +- ct/whisparr-v5.sh | 2 +- ct/whoogle-v5.sh | 2 +- ct/wikijs-v5.sh | 2 +- ct/wireguard-v5.sh | 2 +- ct/yunohost-v5.sh | 2 +- ct/zigbee2mqtt-v5.sh | 2 +- ct/zwave-js-ui-v5.sh | 2 +- 82 files changed, 82 insertions(+), 82 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 74934552..844fd239 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -365,7 +366,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 754f2e49..01242e04 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -325,6 +325,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -344,7 +345,6 @@ apk upgrade &>/dev/null msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 23e9b352..f9154d57 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 67b9743f..51f3fbe5 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 08754961..4f1ed7cd 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -327,6 +327,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -357,7 +358,6 @@ msg_ok "Started ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index d197e42a..bc869719 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 8bc4d337..8657add4 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -337,6 +337,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -357,7 +358,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index c4b00088..4df5b5b3 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 6d87466f..7b1835c1 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -326,6 +326,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -394,7 +395,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 70ffccbb..339180a7 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index e81e0be1..9449b137 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -374,7 +375,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index a42ebe1f..8819bc73 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index c0985471..0ba3f34f 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index d249c084..49f23d87 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -325,6 +325,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -344,7 +345,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index c494a805..65b4e0ea 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 35a93d52..cc5e4797 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -336,6 +336,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -354,7 +355,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 022e8a4d..1874ee85 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -337,6 +337,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -367,7 +368,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index c5cd3d70..614b4045 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 3dda1671..91dbc0b5 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -354,7 +355,6 @@ msg_ok "Started ESPHome" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 9dc81a58..2662a04d 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 97ec5e40..9563990b 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index ebbf5c09..6596aa0b 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -427,7 +428,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index f60c6ff5..e3ada4d1 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -331,6 +331,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -422,7 +423,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 5887793b..ee46dbe8 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -339,6 +339,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -422,7 +423,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index caabb1f4..80634649 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 17d8197b..fae8323e 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -354,7 +355,6 @@ systemctl start homepage msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 9661e132..36c823ef 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -367,7 +368,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 4198119d..29c990c5 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 2a8151c3..ec9f8b24 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 398478a8..9e37fd2b 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 2332180d..51915187 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -339,6 +339,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -357,7 +358,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 421e517b..e91106f2 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index f3c2eebe..94bd161d 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -327,6 +327,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -346,7 +347,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 2998f12f..b106d2c9 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 3f63d0d4..fe6acc9a 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index d43b49c4..c6802492 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -350,7 +351,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index f8604781..e56b6b44 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index f34b8c82..1b16dc68 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 633c6a00..0017ab4d 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 312134fa..efe46ded 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -326,6 +326,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 8533e434..c6828567 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index ce73bc4c..bc6db67b 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -359,7 +360,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 86d2abdb..2afbaa12 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 0c91b4ff..aa9ca1a9 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -457,7 +458,6 @@ msg_ok "Cleaned" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 1248bb47..929112bd 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -351,7 +352,6 @@ msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 0f5dbf28..f5f1fba1 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -383,7 +384,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index f0fe5e7b..ae6ad8a5 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -337,6 +337,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ PVE_CHECK advanced_settings fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index fc816afb..13b0bb86 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 936d9cfb..bb41242f 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 7c02f6f2..fa744442 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -416,7 +417,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index c5421e36..4953243d 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -327,6 +327,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -369,7 +370,6 @@ msg_ok "Started PhotoPrism" msg_ok "Update Successful" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index e81072e6..b2b7db58 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index ad63a59e..e7188938 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -338,6 +338,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -367,7 +368,6 @@ bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 585fb563..c1ba384f 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -332,6 +332,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -399,7 +400,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 3ba54738..0fa602e5 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index bca3cb47..a8f24ded 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 687b8205..8d6b444f 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index b0aadbb5..dec41aee 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 17f60707..70f6d794 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index e8a323b0..e79a0e14 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index aeb48aeb..56403ea1 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 863ea945..d34674ca 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 1c950d52..acf11373 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 184f05d1..08aca23c 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -337,6 +337,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -358,7 +359,6 @@ pm2 restart cron msg_ok "Updated Shinobi LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index a887509c..47397bdd 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 2dd091c6..e6ad0979 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -349,7 +350,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 9d088413..d078ef54 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 80727dc5..374a8b32 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -410,7 +411,6 @@ fi msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index f1f69af9..1e823bd0 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index a52e0963..1a8818ff 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -367,7 +368,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 78a1d4bc..4c8eeff3 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -333,6 +333,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -351,7 +352,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 75bb0d59..a0964a32 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -337,6 +337,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -355,7 +356,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index e13aa3a9..08fc5a77 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -348,7 +349,6 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 64c0a2eb..fc2b2662 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -365,7 +366,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 9eb335e9..e08c9440 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -416,7 +417,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 912b2df8..64b76ebf 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -325,6 +325,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -344,7 +345,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 2713bc4b..a5e65954 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -347,7 +348,6 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 1ed58c5a..b69e504c 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -361,7 +362,6 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 4738f193..c18bf9f6 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -403,7 +404,6 @@ exit fi } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index d73d52c9..bc234a6c 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -324,6 +324,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -343,7 +344,6 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 879efc0a..71465d15 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -329,6 +329,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -394,7 +395,6 @@ start_zigbee2mqtt echo "Done!" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index d5e8b421..1e4dd191 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -328,6 +328,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -361,7 +362,6 @@ msg_ok "Cleaned" msg_ok "Updated Successfully!\n" exit } -header_info if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From 8e98eb061706586fad3bccbcae5bcb5ee8722704 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 06:05:07 -0500 Subject: [PATCH 1125/3335] code refactoring (#1047) --- ct/adguard-v5.sh | 66 +++++++++++++++-------------- ct/alpine-v5.sh | 62 +++++++++++++--------------- ct/archlinux-v5.sh | 62 +++++++++++++--------------- ct/audiobookshelf-v5.sh | 58 +++++++++++++------------- ct/autobrr-v5.sh | 66 +++++++++++++++-------------- ct/blocky-v5.sh | 67 +++++++++++++++--------------- ct/casaos-v5.sh | 72 ++++++++++++++++---------------- ct/changedetection-v5.sh | 67 +++++++++++++++--------------- ct/cronicle-v5.sh | 63 +++++++++++++--------------- ct/daemonsync-v5.sh | 67 +++++++++++++++--------------- ct/dashy-v5.sh | 66 ++++++++++++++--------------- ct/debian-v5.sh | 58 +++++++++++++------------- ct/deconz-v5.sh | 67 +++++++++++++++--------------- ct/deluge-v5.sh | 65 +++++++++++++++-------------- ct/devuan-v5.sh | 58 +++++++++++++------------- ct/docker-v5.sh | 67 ++++++++++++++---------------- ct/emby-v5.sh | 66 ++++++++++++++--------------- ct/emqx-v5.sh | 62 +++++++++++++--------------- ct/esphome-v5.sh | 67 +++++++++++++++--------------- ct/grafana-v5.sh | 67 +++++++++++++++--------------- ct/grocy-v5.sh | 67 +++++++++++++++--------------- ct/heimdalldashboard-v5.sh | 67 +++++++++++++++--------------- ct/homeassistant-core-v5.sh | 65 +++++++++++++++-------------- ct/homeassistant-v5.sh | 73 ++++++++++++++++---------------- ct/homebridge-v5.sh | 67 +++++++++++++++--------------- ct/homepage-v5.sh | 67 +++++++++++++++--------------- ct/homer-v5.sh | 63 +++++++++++++++------------- ct/hyperion-v5.sh | 67 +++++++++++++++--------------- ct/influxdb-v5.sh | 67 +++++++++++++++--------------- ct/iobroker-v5.sh | 67 +++++++++++++++--------------- ct/jellyfin-v5.sh | 67 +++++++++++++++--------------- ct/k0s-v5.sh | 67 +++++++++++++++--------------- ct/kavita-v5.sh | 66 +++++++++++++++-------------- ct/keycloak-v5.sh | 67 +++++++++++++++--------------- ct/lidarr-v5.sh | 63 +++++++++++++++------------- ct/magicmirror-v5.sh | 67 +++++++++++++++--------------- ct/mariadb-v5.sh | 67 +++++++++++++++--------------- ct/meshcentral-v5.sh | 67 +++++++++++++++--------------- ct/motioneye-v5.sh | 67 +++++++++++++++--------------- ct/mqtt-v5.sh | 66 +++++++++++++++-------------- ct/n8n-v5.sh | 67 +++++++++++++++--------------- ct/navidrome-v5.sh | 66 ++++++++++++++--------------- ct/nextcloudpi-v5.sh | 67 +++++++++++++++--------------- ct/nginxproxymanager-v5.sh | 67 +++++++++++++++--------------- ct/nocodb-v5.sh | 68 +++++++++++++++--------------- ct/node-red-v5.sh | 66 ++++++++++++++--------------- ct/omada-v5.sh | 78 ++++++++++++++++++++--------------- ct/omv-v5.sh | 67 +++++++++++++++--------------- ct/openhab-v5.sh | 67 +++++++++++++++--------------- ct/paperless-ngx-v5.sh | 66 ++++++++++++++--------------- ct/photoprism-v5.sh | 68 +++++++++++++++--------------- ct/pihole-v5.sh | 67 +++++++++++++++--------------- ct/plex-v5.sh | 67 +++++++++++++++--------------- ct/podman-homeassistant-v5.sh | 66 ++++++++++++++--------------- ct/podman-v5.sh | 67 +++++++++++++++--------------- ct/postgresql-v5.sh | 67 +++++++++++++++--------------- ct/prometheus-v5.sh | 67 +++++++++++++++--------------- ct/prowlarr-v5.sh | 63 +++++++++++++++------------- ct/radarr-v5.sh | 63 +++++++++++++++------------- ct/readarr-v5.sh | 63 +++++++++++++++------------- ct/rockylinux-v5.sh | 72 ++++++++++++++++---------------- ct/sabnzbd-v5.sh | 63 +++++++++++++++------------- ct/scrypted-v5.sh | 67 +++++++++++++++--------------- ct/shinobi-v5.sh | 67 +++++++++++++++--------------- ct/sonarr-v5.sh | 63 +++++++++++++++------------- ct/syncthing-v5.sh | 67 +++++++++++++++--------------- ct/tdarr-v5.sh | 63 +++++++++++++++------------- ct/technitiumdns-v5.sh | 67 +++++++++++++++--------------- ct/transmission-v5.sh | 63 +++++++++++++++------------- ct/trilium-v5.sh | 67 +++++++++++++++--------------- ct/ubuntu-v5.sh | 58 +++++++++++++------------- ct/umbrel-v5.sh | 73 ++++++++++++++++---------------- ct/unifi-v5.sh | 67 +++++++++++++++--------------- ct/uptimekuma-v5.sh | 67 +++++++++++++++--------------- ct/vaultwarden-v5.sh | 65 +++++++++++++++-------------- ct/whisparr-v5.sh | 63 +++++++++++++++------------- ct/whoogle-v5.sh | 67 +++++++++++++++--------------- ct/wikijs-v5.sh | 67 +++++++++++++++--------------- ct/wireguard-v5.sh | 66 ++++++++++++++--------------- ct/yunohost-v5.sh | 63 +++++++++++++++------------- ct/zigbee2mqtt-v5.sh | 67 +++++++++++++++--------------- ct/zwave-js-ui-v5.sh | 67 +++++++++++++++--------------- 82 files changed, 2760 insertions(+), 2653 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 844fd239..3ad5b01f 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,39 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/AdGuardHome ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +307,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -366,7 +346,29 @@ msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/AdGuardHome ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 01242e04..52f86cca 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/alpine-release ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -325,6 +302,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -345,7 +323,25 @@ apk upgrade &>/dev/null msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index f9154d57..a979ffeb 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/pacman.d ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,25 @@ pacman -Sy archlinux-keyring && pacman -Su msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 51f3fbe5..903f34b0 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,25 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 4f1ed7cd..049e4585 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,40 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /root/.config/autobrr ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -327,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -358,7 +337,30 @@ msg_ok "Started ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /root/.config/autobrr/config.toml ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index bc869719..b88f4392 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/blocky/ ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/blocky ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 8657add4..26f8fedb 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/docker ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -140,7 +117,7 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" @@ -312,10 +289,10 @@ function advanced_settings() { SSH="no" fi if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" FUSE="yes" else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then @@ -337,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -358,7 +336,29 @@ msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/docker ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then FEATURES="fuse=1,keyctl=1,nesting=1" diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 4df5b5b3..bfc1b6d6 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/changedetection.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -348,7 +326,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/changedetection.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 7b1835c1..614a20c4 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,38 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} Master LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - SERVER="y" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} SUPPORT" --yesno "Options to Update or Install ${APP} Worker on $hostname. Proceed?" 10 58); then - echo "User selected Support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -326,7 +306,9 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info +SERVER="y" if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -356,10 +338,6 @@ msg_ok "Updated ${APP}" exit fi if [ "$UPD" == "2" ]; then - if [[ -d /opt/cronicle ]]; then - msg_error "${APP} Installation Found!"; - exit - fi LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) IP=$(hostname -I | awk '{print $1}') msg_info "Installing Dependencies" @@ -395,7 +373,24 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 339180a7..96b9b8fb 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/daemonsync ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/daemonsync ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 9449b137..493fd3d1 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/dashy.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -375,7 +353,29 @@ msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/dashy.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 8819bc73..c79f61fa 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,25 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 0ba3f34f..56b55259 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index 49f23d87..e8349ab1 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,37 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -325,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -341,11 +323,34 @@ function update_script() { header_info msg_info "Updating $APP LXC" apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +pip3 install deluge[all] --upgrade msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/deluged.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 65b4e0ea..4f7d5ea0 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,25 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index cc5e4797..0afd7a11 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,39 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/docker ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" @@ -139,7 +117,7 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" @@ -311,10 +289,10 @@ function advanced_settings() { SSH="no" fi if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" FUSE="yes" else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then @@ -336,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -355,7 +334,25 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then FEATURES="fuse=1,keyctl=1,nesting=1" diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 1874ee85..2859c147 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/emby-server ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" @@ -337,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -368,7 +346,29 @@ msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/emby-server ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 614b4045..01b760c9 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -348,7 +326,25 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 91dbc0b5..cd8cc028 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /usr/local/bin/esphome ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -355,7 +333,30 @@ msg_ok "Started ESPHome" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /usr/local/bin/esphome ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 2662a04d..fa798d4a 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 9563990b..c49d1c5a 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -348,7 +326,30 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 6596aa0b..bca0c925 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/Heimdall ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -428,7 +406,30 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Heimdall ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index e3ada4d1..828d9424 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -62,8 +62,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -72,39 +72,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /srv/homeassistant ]]; then - msg_error "No Home Assistant Core Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC" 10 58); then - echo "User selected Support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" @@ -331,6 +309,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -423,7 +402,29 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /srv/homeassistant ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index ee46dbe8..010dcf7a 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /root/hass_config ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then - echo "User selected support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -141,7 +118,7 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" @@ -314,10 +291,10 @@ function advanced_settings() { SSH="no" fi if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" FUSE="yes" else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then @@ -339,6 +316,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -423,7 +401,30 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /var/lib/docker/volumes/hass_config/_data + ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then FEATURES="fuse=1,keyctl=1,nesting=1" diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 80634649..8fda38e7 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homebridge.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index fae8323e..4246a5f3 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/homepage.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -355,7 +333,30 @@ systemctl start homepage msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homepage.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 36c823ef..c18bd377 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -368,7 +350,30 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/homer ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 29c990c5..92cdc544 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index ec9f8b24..d7b62cd4 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 9e37fd2b..d657eeea 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/iobroker ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/iobroker ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 51915187..d0a8cf82 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /usr/lib/jellyfin ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" @@ -339,6 +316,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -358,7 +336,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /usr/lib/jellyfin ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index e91106f2..143292ca 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/k0s/k0s.yaml ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/k0s/k0s.yaml ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 94bd161d..77e3889a 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,40 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/Kavita ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -327,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -347,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Kavita ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index b106d2c9..11f0d9ea 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/keycloak.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/keycloak.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index fe6acc9a..e4877512 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/lidarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index c6802492..5f8b8704 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/magicmirror ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -351,7 +329,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/magicmirror ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index e56b6b44..7705a589 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 1b16dc68..c34c5709 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/meshcentral ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/meshcentral ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 0017ab4d..78a5ff8b 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/motioneye.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -348,7 +326,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/motioneye.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index efe46ded..831ea218 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -59,8 +59,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -69,39 +69,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -326,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -348,7 +328,29 @@ msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index c6828567..4e9ffc1e 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/n8n.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/n8n.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index bc6db67b..8ad6a7d0 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/navidrome ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -360,7 +338,29 @@ msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/navidrome ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 2afbaa12..2832dfd5 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index aa9ca1a9..35e7df35 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /lib/systemd/system/npm.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -458,7 +436,30 @@ msg_ok "Cleaned" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /lib/systemd/system/npm.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 929112bd..7bce9820 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/nocodb.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,10 +327,32 @@ npm install -s --save nocodb &>/dev/null systemctl restart nocodb.service msg_ok "Updated ${APP}" msg_ok "Update Successfull" - exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/nocodb.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index f5f1fba1..934d59a3 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /root/.node-red ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then - echo "User selected support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -384,7 +362,29 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/.node-red ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index ae6ad8a5..72f16b52 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/tplink ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" @@ -337,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -347,8 +325,42 @@ header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings fi + exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +function update_script() { +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/tplink ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 13b0bb86..544f073c 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index bb41242f..74d31c86 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index fa744442..e11ba30b 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/paperless ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then - echo "User selected support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -417,7 +395,29 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/paperless ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 4953243d..ecc2399f 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,40 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/photoprism ]]; then - msg_error "No PhotoPrism Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Yes" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi +} + function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -327,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -370,7 +349,30 @@ msg_ok "Started PhotoPrism" msg_ok "Update Successful" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/photoprism ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index b2b7db58..d22efe08 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/pihole ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pihole ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index e7188938..5f0cae8a 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" @@ -338,6 +315,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -368,7 +346,30 @@ bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index c1ba384f..e03bca6a 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -64,8 +64,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -74,41 +74,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -332,6 +309,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -400,7 +378,29 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homeassistant.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 0fa602e5..93d108b9 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/containers/registries.conf ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/containers/registries.conf ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index a8f24ded..3c052a86 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 8d6b444f..bf6a2cf6 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/prometheus.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/prometheus.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index dec41aee..d7ffa755 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/prowlarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 70f6d794..815cc4fd 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/radarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index e79a0e14..769e1020 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/readarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 56403ea1..ea9c9550 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/pacman.d ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,13 +322,35 @@ header_info function update_script() { header_info msg_info "Updating ${APP} LXC" -pacman-key --init -pacman-key --populate archlinux -pacman -Sy archlinux-keyring && pacman -Su +dnf -y update +dnf -y upgrade msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pacman.d ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index d34674ca..e923ad36 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/sabnzbd ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index acf11373..6b90147f 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/scrypted.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/scrypted.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 08aca23c..14b4850c 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/Shinobi ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" @@ -337,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -359,7 +337,30 @@ pm2 restart cron msg_ok "Updated Shinobi LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Shinobi ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 47397bdd..d948ab5b 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index e6ad0979..2b0e83a7 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index d078ef54..5813b5a6 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/tdarr ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 374a8b32..099d6b65 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/dns ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -411,7 +389,30 @@ fi msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/dns ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 1e823bd0..0ee5d068 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/transmission-daemon/settings.json ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 1a8818ff..3ac54cb0 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/trilium/ ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -368,7 +346,30 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d ! -d /opt/trilium ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 4c8eeff3..f283066b 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" @@ -333,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -352,7 +334,25 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index a0964a32..e70695d1 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /root/umbrel ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -140,7 +117,7 @@ function default_settings() { VLAN="" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" SSH="no" - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" VERB="no" @@ -312,10 +289,10 @@ function advanced_settings() { SSH="no" fi if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" FUSE="yes" else - echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" FUSE="no" fi if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then @@ -337,6 +314,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -356,7 +334,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/umbrel ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then FEATURES="fuse=1,keyctl=1,nesting=1" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 08fc5a77..2e2bce79 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /usr/lib/unifi ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -349,7 +327,30 @@ msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /usr/lib/unifi ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index fc2b2662..a7d24e82 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/uptime-kuma ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -366,7 +344,30 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/uptime-kuma ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index e08c9440..d3fd4f29 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,39 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then - echo "User selected support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" @@ -328,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -417,7 +396,29 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 64b76ebf..7a3beee5 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,37 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -325,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -345,7 +327,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/whisparr ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index a5e65954..6d4d9093 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /usr/local/bin/whoogle-search ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -348,7 +326,30 @@ msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /usr/local/bin/whoogle-search ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index b69e504c..6091efaf 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/wikijs ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -362,7 +340,30 @@ msg_ok "Started ${APP}" msg_ok "Update Successfull" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/wikijs ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index c18bf9f6..8bac4026 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/pivpn/wireguard ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -404,7 +382,29 @@ exit fi } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pivpn/wireguard ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index bc234a6c..c5b72d48 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,37 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -324,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null msg_ok "Updated $APP LXC" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 71465d15..fc238d95 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -61,8 +61,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -71,41 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/zigbee2mqtt ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" @@ -329,6 +306,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -395,7 +373,30 @@ start_zigbee2mqtt echo "Done!" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/zigbee2mqtt ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 1e4dd191..a56356b4 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -60,8 +60,8 @@ function msg_ok() { } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { @@ -70,41 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." sleep 2 - exit +exit fi } function ARCH_CHECK() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/zwave-js-ui ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi - if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - echo "User selected Update" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" @@ -328,6 +305,7 @@ function advanced_settings() { function install_script() { ARCH_CHECK PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info @@ -362,7 +340,30 @@ msg_ok "Cleaned" msg_ok "Updated Successfully!\n" exit } -if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/zwave-js-ui ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="nesting=1,keyctl=1" From 8f3e3f524817d18b57acc8ee2e583e7e608f3070 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 10:11:43 -0500 Subject: [PATCH 1126/3335] Create olivetin.sh --- misc/olivetin.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 misc/olivetin.sh diff --git a/misc/olivetin.sh b/misc/olivetin.sh new file mode 100644 index 00000000..0b7fee72 --- /dev/null +++ b/misc/olivetin.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ___ _______ + / __ \/ (_) _____/_ __(_)___ + / / / / / / | / / _ \/ / / / __ \ +/ /_/ / / /| |/ / __/ / / / / / / +\____/_/_/ |___/\___/_/ /_/_/ /_/ + +EOF +} + +IP=$(hostname -I | awk '{print $1}') +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +APP="OliveTin" +hostname="$(hostname)" +set-e +header_info + +while true; do + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Installing ${APP}" +RELEASE=$(curl -s https://api.github.com/repos/OliveTin/OliveTin/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q github.com/OliveTin/OliveTin/releases/download/$RELEASE/OliveTin_linux_amd64.deb +dpkg -i OliveTin_linux_amd64.deb &>/dev/null +rm OliveTin_linux_amd64.deb +systemctl enable --now OliveTin &>/dev/null +# configuration file path /etc/OliveTin/config.yaml +msg_ok "Installed ${APP} on $hostname" + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://$IP:1337${CL} \n" From 9e82e8c963bac8b23f9595bc4f116e6e656d9eb4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 10:37:16 -0500 Subject: [PATCH 1127/3335] Update olivetin.sh --- misc/olivetin.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/olivetin.sh b/misc/olivetin.sh index 0b7fee72..69a884b9 100644 --- a/misc/olivetin.sh +++ b/misc/olivetin.sh @@ -53,7 +53,6 @@ msg_info "Installing ${APP}" RELEASE=$(curl -s https://api.github.com/repos/OliveTin/OliveTin/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q github.com/OliveTin/OliveTin/releases/download/$RELEASE/OliveTin_linux_amd64.deb dpkg -i OliveTin_linux_amd64.deb &>/dev/null -rm OliveTin_linux_amd64.deb systemctl enable --now OliveTin &>/dev/null # configuration file path /etc/OliveTin/config.yaml msg_ok "Installed ${APP} on $hostname" From fce7ef9a1f53fea312249543071221358948b3e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 10:41:12 -0500 Subject: [PATCH 1128/3335] Update olivetin.sh --- misc/olivetin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/olivetin.sh b/misc/olivetin.sh index 69a884b9..da7f19e5 100644 --- a/misc/olivetin.sh +++ b/misc/olivetin.sh @@ -50,7 +50,7 @@ function msg_ok() { } msg_info "Installing ${APP}" -RELEASE=$(curl -s https://api.github.com/repos/OliveTin/OliveTin/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/OliveTin/OliveTin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q github.com/OliveTin/OliveTin/releases/download/$RELEASE/OliveTin_linux_amd64.deb dpkg -i OliveTin_linux_amd64.deb &>/dev/null systemctl enable --now OliveTin &>/dev/null From 2d9cf318f0a7e8f72fdf2652c353491948ad5835 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 10:43:40 -0500 Subject: [PATCH 1129/3335] Update olivetin.sh --- misc/olivetin.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/olivetin.sh b/misc/olivetin.sh index da7f19e5..cfef03a7 100644 --- a/misc/olivetin.sh +++ b/misc/olivetin.sh @@ -19,6 +19,7 @@ EOF IP=$(hostname -I | awk '{print $1}') YW=$(echo "\033[33m") +BL=$(echo "\033[36m") GN=$(echo "\033[1;92m") CL=$(echo "\033[m") BFR="\\r\\033[K" @@ -54,6 +55,7 @@ RELEASE=$(curl -s https://api.github.com/repos/OliveTin/OliveTin/releases/latest wget -q github.com/OliveTin/OliveTin/releases/download/$RELEASE/OliveTin_linux_amd64.deb dpkg -i OliveTin_linux_amd64.deb &>/dev/null systemctl enable --now OliveTin &>/dev/null +rm OliveTin_linux_amd64.deb # configuration file path /etc/OliveTin/config.yaml msg_ok "Installed ${APP} on $hostname" From 3fb399d1d22e811b862d6ac1ffd25ad34d3aa24c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 11:00:03 -0500 Subject: [PATCH 1130/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index eb556ee4..a094aa45 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-02-12 + +### Changed + +- **OliveTin** + - NEW Script + ## 2023-02-10 ### Changed From 55f30917b4eb629f8e618d6a1659945af59276ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 17:28:14 -0500 Subject: [PATCH 1131/3335] Update omada-v5.sh fix exit --- ct/omada-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 72f16b52..6fc4e144 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -324,8 +324,8 @@ header_info header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi exit + fi } function update_script() { From d08c1ab3d69284c36e9d38a44122fb2e1bf7f1c8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Feb 2023 17:36:08 -0500 Subject: [PATCH 1132/3335] Update omada-v5.sh --- ct/omada-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 6fc4e144..929591ec 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -324,7 +324,6 @@ header_info header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - exit fi } From 0fdd88a5ed7d10f60c2ccede9d4e467a2bb8305b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Feb 2023 04:49:07 -0500 Subject: [PATCH 1133/3335] Update trilium-v5.sh fix syntax error in conditional expression --- ct/trilium-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 3ac54cb0..62a54f47 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -356,7 +356,7 @@ if command -v pveversion >/dev/null 2>&1; then install_script fi -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d ! -d /opt/trilium ]]; then +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!" exit fi From b2f7ebe759fbecc266af980850840cd7c461174e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Feb 2023 08:23:46 -0500 Subject: [PATCH 1134/3335] Update olivetin.sh tweak --- misc/olivetin.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/olivetin.sh b/misc/olivetin.sh index cfef03a7..c8015572 100644 --- a/misc/olivetin.sh +++ b/misc/olivetin.sh @@ -51,12 +51,10 @@ function msg_ok() { } msg_info "Installing ${APP}" -RELEASE=$(curl -s https://api.github.com/repos/OliveTin/OliveTin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget -q github.com/OliveTin/OliveTin/releases/download/$RELEASE/OliveTin_linux_amd64.deb +wget -q https://github.com/OliveTin/OliveTin/releases/latest/download/OliveTin_linux_amd64.deb dpkg -i OliveTin_linux_amd64.deb &>/dev/null systemctl enable --now OliveTin &>/dev/null rm OliveTin_linux_amd64.deb -# configuration file path /etc/OliveTin/config.yaml msg_ok "Installed ${APP} on $hostname" msg_ok "Completed Successfully!\n" From 20aabb856ccc820004abd115ac140df0be4a2cf7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Feb 2023 14:02:54 -0500 Subject: [PATCH 1135/3335] Create rstptoweb-v5.sh --- ct/rstptoweb-v5.sh | 386 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 386 insertions(+) create mode 100644 ct/rstptoweb-v5.sh diff --git a/ct/rstptoweb-v5.sh b/ct/rstptoweb-v5.sh new file mode 100644 index 00000000..d067026b --- /dev/null +++ b/ct/rstptoweb-v5.sh @@ -0,0 +1,386 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _______________ __ _ ____________ + / __ \/ ___/_ __/ __ \/ /_____| | v5 / / ____/ __ ) + / /_/ /\__ \ / / / /_/ / __/ __ \ | /| / / __/ / __ | + / _, _/___/ // / / ____/ /_/ /_/ / |/ |/ / /___/ /_/ / +/_/ |_|/____//_/ /_/ \__/\____/|__/|__/_____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="RSTPtoWEB" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +header_info +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8083 ${CL} \n" From 7e83e15ffdbe4f51e956be2ef8b162d3fe8777c3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Feb 2023 14:04:11 -0500 Subject: [PATCH 1136/3335] Create rstptoweb-v5-install.sh --- install/rstptoweb-v5-install.sh | 144 ++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 install/rstptoweb-v5-install.sh diff --git a/install/rstptoweb-v5-install.sh b/install/rstptoweb-v5-install.sh new file mode 100644 index 00000000..6a7c1d30 --- /dev/null +++ b/install/rstptoweb-v5-install.sh @@ -0,0 +1,144 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY +done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Golang" +$STD wget https://golang.org/dl/go1.20.1.linux-amd64.tar.gz +$STD tar -xzf go1.20.1.linux-amd64.tar.gz -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +rm -rf go1.20.1.linux-amd64.tar.gz +msg_ok "Installed Golang" + +msg_info "Installing RSTPtoWEB" +$STD git clone https://github.com/deepch/RTSPtoWeb /opt/rtsptoweb +cat <>/opt/rtsptoweb/start +#!/bin/bash +cd /opt/rtsptoweb && GO111MODULE=on go run *.go +EOF +chmod +x /opt/rtsptoweb/start +msg_ok "Installed RSTPtoWEB" + +msg_info "Creating Service" +service_path="/etc/systemd/system/rtsptoweb.service" +echo "[Unit] +Description=RTSP to Web Streaming Service +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/opt/rtsptoweb/start + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable -q --now rtsptoweb +msg_ok "Created Service" + +echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* +if ! getent shadow root | grep -q "^root:[^\!*]"; then + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9827898521d3cd81f81a155d34ccc8402e82e194 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Feb 2023 21:18:17 -0500 Subject: [PATCH 1137/3335] Create go2rtc-v5-install.sh --- install/go2rtc-v5-install.sh | 133 +++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 install/go2rtc-v5-install.sh diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh new file mode 100644 index 00000000..ef8044d8 --- /dev/null +++ b/install/go2rtc-v5-install.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY +done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing go2rtc" +mkdir -p /opt/go2rtc +cd /opt/go2rtc +wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 +chmod +x go2rtc_linux_amd64 +msg_ok "Installed go2rtc" + +msg_info "Creating Service" +service_path="/etc/systemd/system/go2rtc.service" +echo "[Unit] +Description=go2rtc service +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/opt/go2rtc/go2rtc_linux_amd64 + +[Install] +WantedBy=multi-user.target" >$service_path +msg_ok "Created Service" + +echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* +if ! getent shadow root | grep -q "^root:[^\!*]"; then + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 61f42f8f8f4481cf852b1a80dd8d14224c417d7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Feb 2023 21:19:34 -0500 Subject: [PATCH 1138/3335] Create go2rtc-v5.sh --- ct/go2rtc-v5.sh | 387 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 ct/go2rtc-v5.sh diff --git a/ct/go2rtc-v5.sh b/ct/go2rtc-v5.sh new file mode 100644 index 00000000..2ab170aa --- /dev/null +++ b/ct/go2rtc-v5.sh @@ -0,0 +1,387 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ + ____ _____ |__ \ _____/ /__v5__ + / __ `/ __ \__/ // ___/ __/ ___/ + / /_/ / /_/ / __// / / /_/ /__ + \__, /\____/____/_/ \__/\___/ +/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="go2rtc" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +header_info +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:1984${CL} \n" From c016ea85026d64d746c5e95ae418efd3f965278f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Feb 2023 21:24:00 -0500 Subject: [PATCH 1139/3335] Update go2rtc-v5-install.sh --- install/go2rtc-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh index ef8044d8..532e4a30 100644 --- a/install/go2rtc-v5-install.sh +++ b/install/go2rtc-v5-install.sh @@ -107,6 +107,7 @@ ExecStart=/opt/go2rtc/go2rtc_linux_amd64 [Install] WantedBy=multi-user.target" >$service_path +systemctl enable -q --now go2rtc msg_ok "Created Service" echo "export TERM='xterm-256color'" >>/root/.bashrc From 11aa80c9783e71fab22efbddca17fab4ee8106ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Feb 2023 05:41:09 -0500 Subject: [PATCH 1140/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a094aa45..ec418768 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,15 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-02-16 + +### Changed + +- **RSTPtoWEB LXC** + - NEW Script +- **go2rtc LXC** + - NEW Script + ## 2023-02-12 ### Changed From ed2330edc027ed37b6e32c3ac311ffcdf2458d38 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Feb 2023 20:01:15 -0500 Subject: [PATCH 1141/3335] Update wikijs-v5.sh fix update process --- ct/wikijs-v5.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 6091efaf..2baebf4a 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -325,17 +325,26 @@ msg_info "Stopping ${APP}" systemctl stop wikijs msg_ok "Stopped ${APP}" +msg_info "Backing up Data" +mkdir -p data-backup +cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup +msg_ok "Backed up Data" + msg_info "Updating ${APP}" -cp /opt/wikijs/config.yml ~/config.yml.bak rm -rf /opt/wikijs/* cd /opt/wikijs -wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz &>/dev/null +wget -q https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz tar xzf wiki-js.tar.gz -cp ~/config.yml.bak ./config.yml msg_ok "Updated ${APP}" +msg_info "Restoring Data" +cp -R ~/data-backup/* /opt/wikijs +rm -rf ~/data-backup +npm rebuild sqlite3 &>/dev/null +msg_ok "Restored Data" + msg_info "Starting ${APP}" -systemctl stop wikijs +systemctl start wikijs msg_ok "Started ${APP}" msg_ok "Update Successfull" exit From 49db75a8c697a9f46798dafe51abfbb8e6cc73e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 Feb 2023 05:19:46 -0500 Subject: [PATCH 1142/3335] Update paperless-ngx-v5-install.sh fix for v1.13.0 --- install/paperless-ngx-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 0470345b..90d0d518 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -154,6 +154,7 @@ cd /opt/paperless sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt $STD pip install --upgrade pip $STD pip install -r requirements.txt +curl -s -o /opt/paperless/paperless.conf https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/paperless.conf.example msg_ok "Installed Paperless-ngx" msg_info "Installing Natural Language Toolkit (Patience)" From 1acbf02e080f1e6d0f0fd757f1f2712a7d4d955c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 Feb 2023 07:26:58 -0500 Subject: [PATCH 1143/3335] Update dashy-v5.sh set default storage 6GB --- ct/dashy-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 493fd3d1..52a132c6 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -20,7 +20,7 @@ EOF header_info echo -e "Loading..." APP="Dashy" -var_disk="3" +var_disk="6" var_cpu="2" var_ram="2048" var_os="debian" From 0d1131ff6d93a60d88756a1e9be44a7ca08ce0a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 Feb 2023 13:48:02 -0500 Subject: [PATCH 1144/3335] Update photoprism-v5-install.sh update golang to 1.20.1 --- install/photoprism-v5-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index fe1093d3..f674597e 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -107,8 +107,8 @@ $STD apt-get -y install nodejs msg_ok "Installed Node.js" msg_info "Installing Golang (Patience)" -$STD wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz -$STD tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local +$STD wget https://golang.org/dl/go1.20.1.linux-amd64.tar.gz +$STD tar -xzf go1.20.1.linux-amd64.tar.gz -C /usr/local $STD ln -s /usr/local/go/bin/go /usr/local/bin/go $STD go install github.com/tianon/gosu@latest $STD go install golang.org/x/tools/cmd/goimports@latest @@ -205,7 +205,7 @@ $STD apt-get autoremove $STD apt-get autoclean rm -rf /var/{cache,log}/* \ /photoprism \ - /go1.19.3.linux-amd64.tar.gz \ + /go1.20.1.linux-amd64.tar.gz \ /libtensorflow-linux-avx2-1.15.2.tar.gz \ /libtensorflow-linux-avx-1.15.2.tar.gz \ /libtensorflow-linux-cpu-1.15.2.tar.gz From e4b01b02a9f76c6582d67f81fc9f8058cc158b94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 Feb 2023 16:58:54 -0500 Subject: [PATCH 1145/3335] Update photoprism-v5-install.sh code refactoring --- install/photoprism-v5-install.sh | 41 +++++++++++++++++--------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index f674597e..7946d390 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -8,7 +8,6 @@ if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -106,10 +105,15 @@ msg_info "Installing Node.js" $STD apt-get -y install nodejs msg_ok "Installed Node.js" -msg_info "Installing Golang (Patience)" -$STD wget https://golang.org/dl/go1.20.1.linux-amd64.tar.gz -$STD tar -xzf go1.20.1.linux-amd64.tar.gz -C /usr/local +msg_info "Installing Golang" +set +o pipefail +RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) +wget -q https://golang.org/dl/$RELEASE +$STD tar -xzf $RELEASE -C /usr/local $STD ln -s /usr/local/go/bin/go /usr/local/bin/go +msg_ok "Installed Golang" + +msg_info "Installing Go Dependencies" $STD go install github.com/tianon/gosu@latest $STD go install golang.org/x/tools/cmd/goimports@latest $STD go install github.com/psampaz/go-mod-outdated@latest @@ -121,20 +125,21 @@ cp /usr/local/go/bin/richgo /usr/local/bin/richgo cp /usr/local/go/bin/gosu /usr/local/sbin/gosu chown root:root /usr/local/sbin/gosu chmod 755 /usr/local/sbin/gosu -msg_ok "Installed Golang" +msg_ok "Installed Go Dependencies" msg_info "Installing Tensorflow" -if [[ "$AVX" =~ avx2 ]]; then - $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz - $STD tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz -elif [[ "$AVX" =~ avx ]]; then - $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz - $STD tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz +if grep -q avx2 /proc/cpuinfo; then + suffix="avx2-" +elif grep -q avx /proc/cpuinfo; then + suffix="avx-" else - $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz - $STD tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz + suffix="" fi -$STD ldconfig +version=$(curl -s https://dl.photoprism.org/tensorflow/amd64/ | grep -o "libtensorflow-amd64-$suffix.*\\.tar.gz" | head -n 1) +wget -q https://dl.photoprism.org/tensorflow/amd64/$version +tar -C /usr/local -xzf $version +ldconfig +set -o pipefail msg_ok "Installed Tensorflow" msg_info "Cloning PhotoPrism" @@ -205,12 +210,10 @@ $STD apt-get autoremove $STD apt-get autoclean rm -rf /var/{cache,log}/* \ /photoprism \ - /go1.20.1.linux-amd64.tar.gz \ - /libtensorflow-linux-avx2-1.15.2.tar.gz \ - /libtensorflow-linux-avx-1.15.2.tar.gz \ - /libtensorflow-linux-cpu-1.15.2.tar.gz + /$RELEASE \ + /$version msg_ok "Cleaned" msg_info "Starting PhotoPrism" -$STD systemctl enable --now photoprism +systemctl enable -q --now photoprism msg_ok "Started PhotoPrism" From 652df53f754377c5fe1de6f380d49270b1201715 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Feb 2023 09:36:32 -0500 Subject: [PATCH 1146/3335] Update homepage-v5.sh fix linting error --- ct/homepage-v5.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 4246a5f3..67da0282 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -327,6 +327,8 @@ fi cd /opt/homepage systemctl stop homepage git pull --force &>/dev/null +sed -i 's/prowlarr: dynamic(() => import("\.\/prowlarr\/component")),/\/\/ &/' /opt/homepage/src/widgets/components.js +rm -rf /opt/homepage/src/widgets/prowlarr/component.jsx pnpm install &>/dev/null pnpm build &>/dev/null systemctl start homepage From 65ea70bdffd7cc8c88f8561b0124067c958b408f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Feb 2023 09:37:48 -0500 Subject: [PATCH 1147/3335] Update homepage-v5-install.sh fix linting error --- install/homepage-v5-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index d4a4e801..e9c66cba 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -102,6 +102,8 @@ $STD git clone https://github.com/benphelps/homepage.git /opt/homepage cd /opt/homepage mkdir -p config cp /opt/homepage/src/skeleton/* /opt/homepage/config +sed -i 's/prowlarr: dynamic(() => import("\.\/prowlarr\/component")),/\/\/ &/' /opt/homepage/src/widgets/components.js +rm -rf /opt/homepage/src/widgets/prowlarr/component.jsx $STD pnpm install $STD pnpm build msg_ok "Installed Homepage" From a8ed97f39ecb1b7745aebd8da360cfa6f17d926d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Feb 2023 04:33:48 -0500 Subject: [PATCH 1148/3335] Update nginxproxymanager-v5.sh fix cleanup --- ct/nginxproxymanager-v5.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 35e7df35..3d1be04b 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -10,11 +10,11 @@ clear cat <<"EOF" _ __ _ ____ __ ___ - / | / /___ _(_)___ _ __ / __ \_________ _ ____ __ / |/ /___ _____ ____ _____ ____ _____ + / | / /___ _(_)___ _ __ / __ \_________v5_ ____ __ / |/ /___ _____ ____ _____ ____ _____ / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ / /| / /_/ / / / / /> < / ____/ / / /_/ /> Date: Mon, 20 Feb 2023 04:35:08 -0500 Subject: [PATCH 1149/3335] Update nginxproxymanager-v5-install.sh fix cleanup --- install/nginxproxymanager-v5-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index d1b5cd4b..8e16f101 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -270,6 +270,7 @@ $STD systemctl enable --now npm msg_ok "Started Services" msg_info "Cleaning up" +rm -rf ../nginx-proxy-manager-* $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 565e4349ff5a04757ff8230ba9f0b470f9128d46 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 Feb 2023 10:53:30 -0500 Subject: [PATCH 1150/3335] Update photoprism-v5-install.sh fix cpu only suffix --- install/photoprism-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 7946d390..084c512e 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -133,7 +133,7 @@ if grep -q avx2 /proc/cpuinfo; then elif grep -q avx /proc/cpuinfo; then suffix="avx-" else - suffix="" + suffix="1" fi version=$(curl -s https://dl.photoprism.org/tensorflow/amd64/ | grep -o "libtensorflow-amd64-$suffix.*\\.tar.gz" | head -n 1) wget -q https://dl.photoprism.org/tensorflow/amd64/$version From 1780cd99c50d0a15d64769a77e81c6c6991b1af2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Feb 2023 15:42:48 -0500 Subject: [PATCH 1151/3335] Update update-lxcs.sh Start the container and perform an update if it is not a template. --- misc/update-lxcs.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 38031eb2..7aa00b17 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -49,16 +49,11 @@ function update_container() { esac } header_info -read -p "Skip stopped containers? [y/N]" -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]]; then - skip=no -else - skip=yes -fi + for container in $containers; do status=$(pct status $container) - if [ "$skip" == "no" ] && [ "$status" == "status: stopped" ]; then + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" pct start $container echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" From a36d736bf41805d6dc6f7cf3845cd9da732f9837 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Feb 2023 15:57:12 -0500 Subject: [PATCH 1152/3335] Update clean.sh define default action (N) --- misc/clean.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index 8c604b46..1d32009e 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -29,7 +29,7 @@ if [[ -z "$cache" ]]; then else echo -e "$cache \n" echo -e "${GN}Cache in $name${CL}" - read -p "Would you like to remove the selected cache listed above? [y/n] " -n 1 -r + read -p "Would you like to remove the selected cache listed above? [y/N] " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "Removing cache" @@ -47,7 +47,7 @@ if [[ -z "$logs" ]]; then else echo -e "$logs \n" echo -e "${GN}Logs in $name${CL}" - read -p "Would you like to remove the selected logs listed above? [y/n] " -n 1 -r + read -p "Would you like to remove the selected logs listed above? [y/N] " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "Removing logs" From 3efdce3526b901aa073f809da3b8f84005ca1cc8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Feb 2023 16:02:51 -0500 Subject: [PATCH 1153/3335] Update clean-lxcs.sh Start the container and prompt to clean if it is not a template. --- misc/clean-lxcs.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index bb445767..0456383d 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -42,17 +42,11 @@ function clean_container() { echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/main/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } -read -p "Skip stopped containers? [y/N]" -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]]; then - skip=no -else - skip=yes -fi for container in $containers; do status=$(pct status $container) - if [ "$skip" == "no" ] && [ "$status" == "status: stopped" ]; then + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" pct start $container echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" From 6690a31ff79eb17d6177a12f40ffe4d76be7f22f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Feb 2023 05:24:50 -0500 Subject: [PATCH 1154/3335] Update homepage-v5.sh revert linting error fix --- ct/homepage-v5.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 67da0282..4246a5f3 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -327,8 +327,6 @@ fi cd /opt/homepage systemctl stop homepage git pull --force &>/dev/null -sed -i 's/prowlarr: dynamic(() => import("\.\/prowlarr\/component")),/\/\/ &/' /opt/homepage/src/widgets/components.js -rm -rf /opt/homepage/src/widgets/prowlarr/component.jsx pnpm install &>/dev/null pnpm build &>/dev/null systemctl start homepage From b724abc81bdae8e60c3834d138fbf185e5f23872 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Feb 2023 05:25:40 -0500 Subject: [PATCH 1155/3335] Update homepage-v5-install.sh revert linting error fix --- install/homepage-v5-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index e9c66cba..d4a4e801 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -102,8 +102,6 @@ $STD git clone https://github.com/benphelps/homepage.git /opt/homepage cd /opt/homepage mkdir -p config cp /opt/homepage/src/skeleton/* /opt/homepage/config -sed -i 's/prowlarr: dynamic(() => import("\.\/prowlarr\/component")),/\/\/ &/' /opt/homepage/src/widgets/components.js -rm -rf /opt/homepage/src/widgets/prowlarr/component.jsx $STD pnpm install $STD pnpm build msg_ok "Installed Homepage" From 911d19cab6be9bf8cbb7f7abdbd4455438d3d860 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Feb 2023 12:48:16 -0500 Subject: [PATCH 1156/3335] Update update-lxcs.sh add option to exclude an additional container by adding the CTID at the end of the shell command --- misc/update-lxcs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 7aa00b17..b423b508 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -34,7 +34,8 @@ while true; do esac done clear -containers=$(pct list | tail -n +2 | cut -f1 -d' ') +exclude_container="$@" +containers=$(pct list | tail -n +2 | cut -f1 -d' ' | grep -vE "^($exclude_container)$") function update_container() { container=$1 header_info @@ -49,7 +50,6 @@ function update_container() { esac } header_info - for container in $containers; do status=$(pct status $container) template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") From e840f2f26f5358e6d9b38c1223584d6ce3eecf88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Feb 2023 14:29:27 -0500 Subject: [PATCH 1157/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ec418768..67641b69 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,14 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-02-23 + +### Changed + +- **Proxmox LXC Updater** + - Skip all templates, allowing for the starting, updating, and shutting down of containers to be resumed automatically. + - Exclude an additional container by adding the CTID at the end of the shell command ( -s 103). + ## 2023-02-16 ### Changed From 271f29bc59cc2131a50c968c0cb235294fa6b325 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Feb 2023 01:00:53 -0500 Subject: [PATCH 1158/3335] don't trap Internet/DNS check error (#1098) --- install/adguard-v5-install.sh | 2 ++ install/audiobookshelf-v5-install.sh | 2 ++ install/autobrr-v5-install.sh | 2 ++ install/blocky-v5-install.sh | 2 ++ install/casaos-v5-install.sh | 2 ++ install/changedetection-v5-install.sh | 2 ++ install/cronicle-v5-install.sh | 2 ++ install/daemonsync-v5-install.sh | 2 ++ install/dashy-v5-install.sh | 2 ++ install/debian-v5-install.sh | 2 ++ install/deconz-v5-install.sh | 2 ++ install/deluge-v5-install.sh | 2 ++ install/devuan-v5-install.sh | 2 ++ install/docker-v5-install.sh | 2 ++ install/emby-v5-install.sh | 2 ++ install/emqx-v5-install.sh | 2 ++ install/esphome-v5-install.sh | 2 ++ install/go2rtc-v5-install.sh | 2 ++ install/grafana-v5-install.sh | 2 ++ install/grocy-v5-install.sh | 2 ++ install/heimdalldashboard-v5-install.sh | 2 ++ install/homeassistant-core-v5-install.sh | 2 ++ install/homeassistant-v5-install.sh | 2 ++ install/homebridge-v5-install.sh | 2 ++ install/homepage-v5-install.sh | 2 ++ install/homer-v5-install.sh | 2 ++ install/hyperion-v5-install.sh | 2 ++ install/influxdb-v5-install.sh | 2 ++ install/iobroker-v5-install.sh | 2 ++ install/jellyfin-v5-install.sh | 2 ++ install/k0s-v5-install.sh | 2 ++ install/kavita-v5-install.sh | 2 ++ install/keycloak-v5-install.sh | 2 ++ install/lidarr-v5-install.sh | 2 ++ install/magicmirror-v5-install.sh | 2 ++ install/mariadb-v5-install.sh | 2 ++ install/meshcentral-v5-install.sh | 2 ++ install/motioneye-v5-install.sh | 2 ++ install/mqtt-v5-install.sh | 2 ++ install/n8n-v5-install.sh | 2 ++ install/navidrome-v5-install.sh | 2 ++ install/nextcloudpi-v5-install.sh | 2 ++ install/nginxproxymanager-v5-install.sh | 2 ++ install/nocodb-v5-install.sh | 2 ++ install/node-red-v5-install.sh | 2 ++ install/omada-v5-install.sh | 2 ++ install/omv-v5-install.sh | 2 ++ install/openhab-v5-install.sh | 2 ++ install/paperless-ngx-v5-install.sh | 2 ++ install/photoprism-v5-install.sh | 2 ++ install/pihole-v5-install.sh | 2 ++ install/plex-v5-install.sh | 2 ++ install/podman-homeassistant-v5-install.sh | 2 ++ install/podman-v5-install.sh | 2 ++ install/postgresql-v5-install.sh | 2 ++ install/prometheus-v5-install.sh | 2 ++ install/prowlarr-v5-install.sh | 2 ++ install/radarr-v5-install.sh | 2 ++ install/readarr-v5-install.sh | 2 ++ install/rstptoweb-v5-install.sh | 2 ++ install/sabnzbd-v5-install.sh | 2 ++ install/scrypted-v5-install.sh | 2 ++ install/shinobi-v5-install.sh | 2 ++ install/sonarr-v5-install.sh | 2 ++ install/syncthing-v5-install.sh | 2 ++ install/tdarr-v5-install.sh | 2 ++ install/technitiumdns-v5-install.sh | 2 ++ install/transmission-v5-install.sh | 2 ++ install/trilium-v5-install.sh | 2 ++ install/ubuntu-v5-install.sh | 2 ++ install/umbrel-v5-install.sh | 2 ++ install/unifi-v5-install.sh | 2 ++ install/uptimekuma-v5-install.sh | 2 ++ install/vaultwarden-v5-install.sh | 2 ++ install/whisparr-v5-install.sh | 2 ++ install/whoogle-v5-install.sh | 2 ++ install/wikijs-v5-install.sh | 2 ++ install/wireguard-v5-install.sh | 2 ++ install/yunohost-v5-install.sh | 2 ++ install/zigbee2mqtt-v5-install.sh | 2 ++ install/zwave-js-ui-v5-install.sh | 2 ++ 81 files changed, 162 insertions(+) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index e74135d9..27f82a04 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index 0be7f07a..0f9018d4 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 1485c75b..094d2d9d 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index f51e98fb..565fb004 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index ada2bb6b..e2bec076 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 7d2bda09..5a582c98 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index a8bb2b6d..785cd1bc 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 9b5e7eea..d4f703ee 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 565690e2..a4aa247f 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 7a4f410e..03b42c31 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 2d51c7e0..7dee64a5 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index da12b769..9164cce2 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/devuan-v5-install.sh b/install/devuan-v5-install.sh index da159dbe..2ab60b40 100644 --- a/install/devuan-v5-install.sh +++ b/install/devuan-v5-install.sh @@ -60,6 +60,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -73,6 +74,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 31ceda72..dbd591e7 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 066dc17d..be0e0a42 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 9529d961..d63e51b7 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 2a8f81f6..d18f2873 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh index 532e4a30..9cc1f08e 100644 --- a/install/go2rtc-v5-install.sh +++ b/install/go2rtc-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 159fefe2..7229d99b 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index f8087bbd..9bebd2fe 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index f0eee420..9f132699 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index ac3cc58d..9418516a 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 071ab8af..be302148 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index f07731d6..5d640d5f 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index d4a4e801..e3efeb37 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index bf873e80..48193db5 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index cdf9fd91..5d34310d 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 5f4d9f67..5cafffaa 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 9316795f..1b658cde 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 11451bf2..31bf0c17 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index fc6f6314..c64cc71d 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index b6e0d230..19c4c8b4 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index ae2a6754..f272ec54 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index d5798b44..dfbda183 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 9f141744..85845a72 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 07c6486b..25468b0a 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index f37c5614..c001071e 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 2c177e73..97a8efbb 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 980ad410..9f2960b7 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 1881f808..31446ae5 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 2dd1b369..732a7951 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 4b4c4d21..b845b2f8 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 8e16f101..1973553b 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index c5ecc2fb..33377c85 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index 5b548bf0..9f59d1b8 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 0271ba38..176b67fc 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 22319f8b..8fc871f8 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index fc7861d1..6e181437 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 90d0d518..6279188b 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 084c512e..39373a05 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 0d3ae506..a472ab55 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -64,6 +64,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -77,6 +78,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index f7b00eee..a3ca2992 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 53779ee1..8d768fcb 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 7b366a9c..d0f315ab 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index d9dba2eb..810dca0a 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 85009f9a..71274e88 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index b4e6a048..41c47fa4 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 822edb0f..e7a01987 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index bffb5dc6..4a8d6b22 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/rstptoweb-v5-install.sh b/install/rstptoweb-v5-install.sh index 6a7c1d30..227c0d7a 100644 --- a/install/rstptoweb-v5-install.sh +++ b/install/rstptoweb-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 9856ec3a..ee5a2fb0 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 69805c7f..a5546fe3 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 69d1e634..45a8cc09 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update --fix-missing diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 1980b551..8b1eeda9 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 38c001a1..74911940 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 35dc88b0..e5e9cdb5 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 39c50d12..8c7d1369 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index f11bbdbf..0f8706fe 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 8a72a790..3c3cb8a1 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index d7569a6f..21202a71 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 8bfaaadb..6800d9ed 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 6d9ece10..84f8cdfb 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -64,6 +64,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -77,6 +78,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 674bc025..6ba658ac 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index b8d5f39e..21c3f47d 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index b97cd37a..360d9ab7 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 0897cac6..2aa1607e 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index fb3aecbd..4f5dd643 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index b36f310d..4c5d5c11 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR OPTIONS_PATH='/options.conf' cat >$OPTIONS_PATH <<'EOF' diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 4598cbd8..50cf173a 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -62,6 +62,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -75,6 +76,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 89e08b24..e9bf9173 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 6118ef0f..d63fe7fc 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -63,6 +63,7 @@ msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" set +e +trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt @@ -76,6 +77,7 @@ fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" $STD apt-get update From f0706c924d2777146fe138d6cd22403ba00c8338 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Feb 2023 16:35:41 -0500 Subject: [PATCH 1159/3335] Update technitiumdns-v5-install.sh add ASP.NET Core Runtime --- install/technitiumdns-v5-install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 8c7d1369..ab510388 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -90,6 +90,14 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Installing ASP.NET Core Runtime" +wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +$STD dpkg -i packages-microsoft-prod.deb +rm -rf packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y aspnetcore-runtime-7.0 +msg_ok "Installed ASP.NET Core Runtime" + msg_info "Installing Technitium DNS" systemctl stop systemd-resolved echo "DNSStubListener=no" >>/etc/systemd/resolved.conf From 9aea5320f3cf1b46d24bf13125bfbca3c6aa4250 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Feb 2023 16:54:13 -0500 Subject: [PATCH 1160/3335] Update technitiumdns-v5.sh check for ASP.NET Core Runtime, if not present, install --- ct/technitiumdns-v5.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 099d6b65..f3aa425a 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -335,6 +335,14 @@ echo "===============================" echo "Technitium DNS Server Update" echo "===============================" +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 + rm packages-microsoft-prod.deb +fi + if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then dotnetFound="yes" else From 22a437ee09a1d05fb6491f83b6c8278a635b8f06 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Feb 2023 17:27:00 -0500 Subject: [PATCH 1161/3335] Update technitiumdns-v5.sh tweak update --- ct/technitiumdns-v5.sh | 71 +++--------------------------------------- 1 file changed, 5 insertions(+), 66 deletions(-) diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index f3aa425a..8fc9d666 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -320,20 +320,7 @@ header_info function update_script() { header_info -msg_info "Updating ${APP} LXC" -dotnetDir="/opt/dotnet" -dnsDir="/etc/dns" -dnsTar="/etc/dns/DnsServerPortable.tar.gz" -dnsUrl="https://download.technitium.com/dns/DnsServerPortable.tar.gz" - -mkdir -p $dnsDir -installLog="$dnsDir/install.log" -echo "" >$installLog - -echo "" -echo "===============================" -echo "Technitium DNS Server Update" -echo "===============================" +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 @@ -342,58 +329,10 @@ if ! dpkg -s aspnetcore-runtime-7.0 > /dev/null 2>&1; then apt-get install -y aspnetcore-runtime-7.0 rm packages-microsoft-prod.deb fi - -if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then - dotnetFound="yes" -else - dotnetFound="no" -fi - -if [ -d $dotnetDir ]; then - dotnetUpdate="yes" - echo "Updating .NET 7 Runtime..." -fi - -curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 7.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1 - -if [ ! -f "/usr/bin/dotnet" ]; then - ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1 -fi - -if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then - if [ "$dotnetUpdate" = "yes" ]; then - echo ".NET 7 Runtime was updated successfully!" - fi -else - echo "Failed to update .NET 7 Runtime. Please try again." - exit 1 -fi - -if curl -o $dnsTar --fail $dnsUrl >>$installLog 2>&1; then - if [ -d $dnsDir ]; then - echo "Updating Technitium DNS Server..." - fi - - tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1 - - if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]; then - if [ -f "/etc/systemd/system/dns.service" ]; then - echo "Restarting systemd service..." - systemctl restart dns.service >>$installLog 2>&1 - fi - - echo "" - echo "Technitium DNS Server was updated successfully!" - else - echo "" - echo "Failed to update Technitium DNS Server: systemd was not detected." - exit 1 - fi -else - echo "" - echo "Failed to download Technitium DNS Server from: $dnsUrl" - exit 1 -fi +wget -q https://download.technitium.com/dns/DnsServerPortable.tar.gz +tar -zxf DnsServerPortable.tar.gz -C /etc/dns/ &>/dev/null +rm -rf DnsServerPortable.tar.gz +systemctl restart dns.service msg_ok "Update Successfull" exit } From 7759485a62fcc812d4694485fad8d34124fb8ae5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Feb 2023 19:52:10 -0500 Subject: [PATCH 1162/3335] qBittorrent & Jackett (#1106) --- ct/jackett-v5.sh | 391 +++++++++++++++++++++++++++++ ct/qbittorrent-v5.sh | 392 ++++++++++++++++++++++++++++++ install/jackett-v5-install.sh | 139 +++++++++++ install/qbittorrent-v5-install.sh | 131 ++++++++++ 4 files changed, 1053 insertions(+) create mode 100644 ct/jackett-v5.sh create mode 100644 ct/qbittorrent-v5.sh create mode 100644 install/jackett-v5-install.sh create mode 100644 install/qbittorrent-v5-install.sh diff --git a/ct/jackett-v5.sh b/ct/jackett-v5.sh new file mode 100644 index 00000000..9ee88af0 --- /dev/null +++ b/ct/jackett-v5.sh @@ -0,0 +1,391 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ __ + / /___ ______/ /_____v5/ /_/ /_ + __ / / __ `/ ___/ //_/ _ \/ __/ __/ +/ /_/ / /_/ / /__/ ,< / __/ /_/ /_ +\____/\__,_/\___/_/|_|\___/\__/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="Jackett" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/jackett.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9117${CL}\n" diff --git a/ct/qbittorrent-v5.sh b/ct/qbittorrent-v5.sh new file mode 100644 index 00000000..0af5fe13 --- /dev/null +++ b/ct/qbittorrent-v5.sh @@ -0,0 +1,392 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _ __ __ __ + ____ _/ __ )(_) /_/ /_____ _____________v5____ / /_ + / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ +/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_ +\__, /_____/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="qBittorrent" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + PW="" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="Automatic Login" PW=" " + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" + advanced_settings + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then + msg_error "No ${APP} Installation Found!" + exit +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL}\n" diff --git a/install/jackett-v5-install.sh b/install/jackett-v5-install.sh new file mode 100644 index 00000000..fd323953 --- /dev/null +++ b/install/jackett-v5-install.sh @@ -0,0 +1,139 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY +done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Jackett" +RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz +tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt +rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz +msg_ok "Installed Jackett" + +msg_info "Creating Service" +cat </etc/systemd/system/jackett.service +[Unit] +Description=Jackett Daemon +After=network.target +[Service] +SyslogIdentifier=jackett +Restart=always +RestartSec=5 +Type=simple +WorkingDirectory=/opt/Jackett +ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh +TimeoutStopSec=30 +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now jackett.service +msg_ok "Created Service" + +echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* +if ! getent shadow root | grep -q "^root:[^\!*]"; then + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/qbittorrent-v5-install.sh b/install/qbittorrent-v5-install.sh new file mode 100644 index 00000000..3a7d4edb --- /dev/null +++ b/install/qbittorrent-v5-install.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS" +sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen +locale-gen >/dev/null +for ((i=RETRY_NUM; i>0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY +done +if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(hostname -I)" + +set +e +trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apt-get update +$STD apt-get -y upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing qbittorrent-nox" +$STD apt-get install -y qbittorrent-nox +msg_ok "qbittorrent-nox" + +msg_info "Creating Service" +cat </etc/systemd/system/qbittorrent-nox.service +[Unit] +Description=qBittorrent client +After=network.target +[Service] +ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090 +Restart=always +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now qbittorrent-nox +msg_ok "Created Service" + +echo "export TERM='xterm-256color'" >>/root/.bashrc +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +chmod -x /etc/update-motd.d/* +if ! getent shadow root | grep -q "^root:[^\!*]"; then + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +fi +if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 4d78d5233c3753d718473fbd18fc556cad475166 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Feb 2023 21:21:49 -0500 Subject: [PATCH 1163/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 67641b69..ade68f84 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,8 +1,16 @@ - # Change Log All notable changes to this project will be documented in this file. +## 2023-02-24 + +### Changed + +- **qBittorrent LXC** (Thanks @romka777) + - NEW Script +- **Jackett LXC** (Thanks @romka777) + - NEW Script + ## 2023-02-23 ### Changed From 2c27ff2cfeebf0b86b5fc737ea5b04c3bb402124 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Feb 2023 21:41:25 -0500 Subject: [PATCH 1164/3335] Update wireguard-v5.sh (#1109) (#1110) Fix typo in service file that prevents WGDashboard from starting on boot Co-authored-by: Logan Long --- ct/wireguard-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 8bac4026..23d3d675 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -361,7 +361,7 @@ msg_ok "Installed WGDashboard" msg_info "Creating Service" service_path="/etc/systemd/system/wg-dashboard.service" echo "[Unit] -After=netword.service +After=systemd-networkd.service [Service] WorkingDirectory=/etc/wgdashboard/src From c6648215141906d3c9b9aab77e1746ba645f3e7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Mar 2023 14:15:42 -0500 Subject: [PATCH 1165/3335] Update homeassistant-core-v5-install.sh python 3.11.1 --- install/homeassistant-core-v5-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 9418516a..03b48123 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -135,10 +135,10 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path) msg_ok "Installed pyenv" . ~/.bashrc set -e -msg_info "Installing Python 3.10.8" -$STD pyenv install 3.10.8 -pyenv global 3.10.8 -msg_ok "Installed Python 3.10.8" +msg_info "Installing Python 3.11.1" +$STD pyenv install 3.11.1 +pyenv global 3.11.1 +msg_ok "Installed Python 3.11.1" msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant From 9f322e803c31b180f273c6cddcba91814ba7de78 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Mar 2023 15:04:19 -0500 Subject: [PATCH 1166/3335] Update hyperion-v5.sh fix update --- ct/hyperion-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 92cdc544..77124f48 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -322,7 +322,7 @@ function update_script() { header_info msg_info "Updating ${APP} LXC" apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +apt-get install -y hyperion &>/dev/null msg_ok "Updated ${APP} LXC" msg_ok "Update Successfull" exit From 2be4c2ccc55bc2b8e1d45c57d31fbac420474d16 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Mar 2023 18:48:59 -0500 Subject: [PATCH 1167/3335] Update omada-v5-install.sh v5.9.9 --- install/omada-v5-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index 176b67fc..c7edf4f4 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -95,9 +95,9 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed Dependencies" -msg_info "Installing Omada Controller v5.8.4" -wget -qL https://static.tp-link.com/upload/software/2023/202301/20230130/Omada_SDN_Controller_v5.8.4_Linux_x64.deb -$STD dpkg -i Omada_SDN_Controller_v5.8.4_Linux_x64.deb +msg_info "Installing Omada Controller v5.9.9" +wget -qL https://static.tp-link.com/upload/software/2023/202302/20230227/Omada_SDN_Controller_v5.9.9_Linux_x64.deb +$STD dpkg -i Omada_SDN_Controller_v5.9.9_Linux_x64.deb msg_ok "Installed Omada Controller" echo "export TERM='xterm-256color'" >>/root/.bashrc @@ -119,7 +119,7 @@ fi if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_v5.8.4_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb +rm -rf Omada_SDN_Controller_v5.9.9_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 8488668d1b04147306edf36630bc3674bf774e9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Mar 2023 06:19:08 -0500 Subject: [PATCH 1168/3335] Update jellyfin-v5-install.sh use Intel OpenCL ICD for Ubuntu 22.04 and later --- install/jellyfin-v5-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 31bf0c17..5b386716 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -97,7 +97,11 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then $STD apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then $STD apt-get -y install beignet-opencl-icd; fi + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd + else + $STD apt-get install -y intel-opencl-icd + fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* From 0c4356090812fd4079ffc63ba8b04f30e206617a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Mar 2023 06:43:45 -0500 Subject: [PATCH 1169/3335] Update emby-v5-install.sh use Intel OpenCL ICD for Ubuntu 22.04 and later --- install/emby-v5-install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index be0e0a42..9129f141 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -95,8 +95,11 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then $STD apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then $STD apt-get -y install beignet-opencl-icd; fi - + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd + else + $STD apt-get install -y intel-opencl-icd + fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* From 1ca55a8d54f8b8366d7ed1882e08be29bf4a8792 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Mar 2023 06:45:45 -0500 Subject: [PATCH 1170/3335] Update plex-v5-install.sh use Intel OpenCL ICD for Ubuntu 22.04 and later --- install/plex-v5-install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index a3ca2992..41a071c7 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -96,8 +96,11 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then $STD apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then $STD apt-get -y install beignet-opencl-icd; fi - + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd + else + $STD apt-get install -y intel-opencl-icd + fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* From c159c1add28d6f7986f5a46e255dab0bbc5056c3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Mar 2023 07:20:28 -0500 Subject: [PATCH 1171/3335] Update homeassistant-v5.sh fix update --- ct/homeassistant-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 010dcf7a..4d3a1750 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -27,7 +27,6 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -NEXTID=$(pvesh get /cluster/nextid) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") From d883f952760a3571171620e8ec61dd9225e7cb09 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 Mar 2023 07:45:47 -0500 Subject: [PATCH 1172/3335] Update homeassistant-v5.sh fix directory check --- ct/homeassistant-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 4d3a1750..69a43f87 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -409,7 +409,7 @@ if command -v pveversion >/dev/null 2>&1; then install_script fi -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /var/lib/docker/volumes/hass_config/_data +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/docker/volumes/hass_config/_data ]]; then msg_error "No ${APP} Installation Found!" exit From 6d1d4a278cae4a04276ce1c10c86523158d1c74e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Mar 2023 14:40:39 -0500 Subject: [PATCH 1173/3335] Update alpine-v5.sh v3.17 --- ct/alpine-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 52f86cca..d88c7153 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -25,7 +25,7 @@ var_disk="0.1" var_cpu="1" var_ram="512" var_os="alpine" -var_version="3.16" +var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" INTEGER='^[0-9]+$' From f79e6fad5ef6ea0c00deb6eb16dcab7dd69fadaf Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Mar 2023 20:53:34 -0500 Subject: [PATCH 1174/3335] Create alpine-vaultwarden-v5-install.sh --- install/alpine-vaultwarden-v5-install.sh | 84 ++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 install/alpine-vaultwarden-v5-install.sh diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh new file mode 100644 index 00000000..97d76c46 --- /dev/null +++ b/install/alpine-vaultwarden-v5-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +set +e +trap - ERR + +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apk update +$STD apk upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apk add bash +$STD apk add curl +$STD apk add openssl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing Vaultwarden" +$STD apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing vaultwarden +cat </etc/conf.d/vaultwarden +export DATA_FOLDER=/var/lib/vaultwarden +export WEB_VAULT_ENABLED=true +export ADMIN_TOKEN=$(openssl rand -base64 48) +export ROCKET_ADDRESS=0.0.0.0 +EOF +$STD rc-service vaultwarden start +$STD rc-update add vaultwarden default +msg_ok "Installed Vaultwarden" +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + $STD /etc/init.d/sshd start +fi From abfb9f59f3848ab9b09d9f64ef1276a22b9fddb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Mar 2023 20:55:19 -0500 Subject: [PATCH 1175/3335] Create alpine-vaultwarden-v5.sh --- ct/alpine-vaultwarden-v5.sh | 417 ++++++++++++++++++++++++++++++++++++ 1 file changed, 417 insertions(+) create mode 100644 ct/alpine-vaultwarden-v5.sh diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh new file mode 100644 index 00000000..e438351e --- /dev/null +++ b/ct/alpine-vaultwarden-v5.sh @@ -0,0 +1,417 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ ____ __ +| | / /___ ___ __/ / /__ ______ __________/ /__v5____ +| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ +| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / +|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ + Alpine 3.17 + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Vaultwarden" +var_disk="0.3" +var_cpu="1" +var_ram="512" +var_os="alpine" +var_version="3.17" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +INTEGER='^[0-9]+$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + PW="-password alpine" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} +function advanced_settings() { + CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi + PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $PW1 ]; then + PW1="alpine" PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + fi + fi + CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_ID ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi + fi + CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CT_NAME ]; then + HN="$NSAPP" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${CT_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $DISK_SIZE ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi + fi + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $GATE1 ]; then + GATE1="Default" GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + fi + fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" + DISABLEIP6="yes" + else + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $SD ]; then + SD="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + else + SX=$SD + SD="-searchdomain=$SD" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + fi + fi + NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NX=$NS + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MAC1 ]; then + MAC1="Default" MAC="" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" + SSH="yes" + else + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" + VERB="yes" + else + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { + normal=$(echo "\033[m") + menu=$(echo "\033[36m") + number=$(echo "\033[33m") + fgred=$(echo "\033[31m") + printf "\n${menu}*********************************************${normal}\n" + printf "${menu}**${number} 1)${normal} Update Vaultwarden \n" + printf "${menu}**${number} 2)${normal} View Admin Token\n" + printf "\n${menu}*********************************************${normal}\n" + printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." + read opt + +while [ "$opt" != "" ]; do + case $opt in + 1) + clear + echo -e "${fgred}Update Vaultwarden${normal}" + apk update &>/dev/null + apk upgrade --update-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing vaultwarden + + break + ;; + 2) + clear + echo -e "${fgred}View the Admin Token${normal}" + cat /etc/conf.d/vaultwarden | grep "ADMIN_TOKEN" | awk '{print substr($2, 7) }' + + break + ;; + x) + exit + ;; + \n) + exit + ;; + *) + clear + echo -e "Please choose an option from the menu" + update_script + ;; + esac +done +exit +} +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/conf.d/vaultwarden ]]; then + msg_error "No ${APP} Installation Found!" +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/conf.d/vaultwarden ]]; then + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From 3ba88d9b6942f4ef657fb2dae93ed4335dffb060 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 Mar 2023 21:18:52 -0500 Subject: [PATCH 1176/3335] Update alpine-vaultwarden-v5.sh lower ram --- ct/alpine-vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index e438351e..4b0704c1 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -22,7 +22,7 @@ echo -e "Loading..." APP="Alpine-Vaultwarden" var_disk="0.3" var_cpu="1" -var_ram="512" +var_ram="256" var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') From 4ec92846abda8b9c5bb47fccb885e94a5503183b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Mar 2023 07:22:29 -0500 Subject: [PATCH 1177/3335] Update alpine-vaultwarden-v5-install.sh Code refactoring --- install/alpine-vaultwarden-v5-install.sh | 43 +++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 97d76c46..6c1a5d80 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) @@ -7,7 +7,13 @@ if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi +if [ "$DISABLEIPV6" == "yes" ]; then +$STD sysctl net.ipv6.conf.all.disable_ipv6=1 +$STD sysctl net.ipv6.conf.default.disable_ipv6=1 +echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +$STD sysctl -p /etc/sysctl.d/99-sysctl.conf +fi YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -15,17 +21,18 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") RETRY_NUM=10 RETRY_EVERY=3 +i=$RETRY_NUM CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" set -Eeuo pipefail -trap 'error_handler $LINENO' ERR +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" } @@ -44,8 +51,36 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +msg_info "Setting up Container OS " +while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i-1)) +done + +if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" + set +e trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi From c887a6bea19c9e4180fa4a90519b858c453bfcd8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Mar 2023 08:56:36 -0500 Subject: [PATCH 1178/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ade68f84..ea375c30 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-07 + +### Changed + +- **Alpine-Vaultwarden LXC** + - NEW Script + ## 2023-02-24 ### Changed From 0e1a3ae998a146990bd94ce706d62796b9241ac3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Mar 2023 12:09:28 -0500 Subject: [PATCH 1179/3335] set time zone (#1131) Retrieve the time zone from Proxmox and configure the container to use the same time zone --- ct/adguard-v5.sh | 4 +++- ct/alpine-v5.sh | 4 +++- ct/alpine-vaultwarden-v5.sh | 4 +++- ct/archlinux-v5.sh | 4 +++- ct/audiobookshelf-v5.sh | 4 +++- ct/autobrr-v5.sh | 4 +++- ct/blocky-v5.sh | 4 +++- ct/casaos-v5.sh | 1 + ct/changedetection-v5.sh | 4 +++- ct/cronicle-v5.sh | 1 + ct/daemonsync-v5.sh | 4 +++- ct/dashy-v5.sh | 4 +++- ct/debian-v5.sh | 4 +++- ct/deconz-v5.sh | 4 +++- ct/deluge-v5.sh | 4 +++- ct/devuan-v5.sh | 4 +++- ct/docker-v5.sh | 1 + ct/emby-v5.sh | 4 +++- ct/emqx-v5.sh | 4 +++- ct/esphome-v5.sh | 4 +++- ct/go2rtc-v5.sh | 4 +++- ct/grafana-v5.sh | 4 +++- ct/grocy-v5.sh | 4 +++- ct/heimdalldashboard-v5.sh | 4 +++- ct/homeassistant-core-v5.sh | 4 +++- ct/homeassistant-v5.sh | 1 + ct/homebridge-v5.sh | 4 +++- ct/homepage-v5.sh | 4 +++- ct/homer-v5.sh | 4 +++- ct/hyperion-v5.sh | 4 +++- ct/influxdb-v5.sh | 4 +++- ct/iobroker-v5.sh | 4 +++- ct/jackett-v5.sh | 4 +++- ct/jellyfin-v5.sh | 4 +++- ct/k0s-v5.sh | 4 +++- ct/kavita-v5.sh | 4 +++- ct/keycloak-v5.sh | 4 +++- ct/lidarr-v5.sh | 4 +++- ct/magicmirror-v5.sh | 4 +++- ct/mariadb-v5.sh | 4 +++- ct/meshcentral-v5.sh | 4 +++- ct/motioneye-v5.sh | 4 +++- ct/mqtt-v5.sh | 4 +++- ct/n8n-v5.sh | 4 +++- ct/navidrome-v5.sh | 4 +++- ct/nextcloudpi-v5.sh | 4 +++- ct/nginxproxymanager-v5.sh | 4 +++- ct/nocodb-v5.sh | 4 +++- ct/node-red-v5.sh | 4 +++- ct/omada-v5.sh | 4 +++- ct/omv-v5.sh | 4 +++- ct/openhab-v5.sh | 4 +++- ct/paperless-ngx-v5.sh | 4 +++- ct/photoprism-v5.sh | 4 +++- ct/pihole-v5.sh | 4 +++- ct/plex-v5.sh | 4 +++- ct/podman-homeassistant-v5.sh | 4 +++- ct/podman-v5.sh | 4 +++- ct/postgresql-v5.sh | 4 +++- ct/prometheus-v5.sh | 4 +++- ct/prowlarr-v5.sh | 4 +++- ct/qbittorrent-v5.sh | 4 +++- ct/radarr-v5.sh | 4 +++- ct/readarr-v5.sh | 4 +++- ct/rockylinux-v5.sh | 4 +++- ct/rstptoweb-v5.sh | 4 +++- ct/sabnzbd-v5.sh | 4 +++- ct/scrypted-v5.sh | 4 +++- ct/shinobi-v5.sh | 4 +++- ct/sonarr-v5.sh | 4 +++- ct/syncthing-v5.sh | 4 +++- ct/tdarr-v5.sh | 4 +++- ct/technitiumdns-v5.sh | 4 +++- ct/transmission-v5.sh | 4 +++- ct/trilium-v5.sh | 4 +++- ct/ubuntu-v5.sh | 4 +++- ct/umbrel-v5.sh | 1 + ct/unifi-v5.sh | 4 +++- ct/uptimekuma-v5.sh | 4 +++- ct/vaultwarden-v5.sh | 4 +++- ct/whisparr-v5.sh | 4 +++- ct/whoogle-v5.sh | 4 +++- ct/wikijs-v5.sh | 4 +++- ct/wireguard-v5.sh | 4 +++- ct/yunohost-v5.sh | 4 +++- ct/zigbee2mqtt-v5.sh | 4 +++- ct/zwave-js-ui-v5.sh | 4 +++- install/adguard-v5-install.sh | 1 + install/audiobookshelf-v5-install.sh | 1 + install/autobrr-v5-install.sh | 1 + install/blocky-v5-install.sh | 1 + install/casaos-v5-install.sh | 1 + install/changedetection-v5-install.sh | 1 + install/cronicle-v5-install.sh | 1 + install/daemonsync-v5-install.sh | 1 + install/dashy-v5-install.sh | 1 + install/debian-v5-install.sh | 1 + install/deconz-v5-install.sh | 1 + install/deluge-v5-install.sh | 1 + install/docker-v5-install.sh | 1 + install/emby-v5-install.sh | 1 + install/emqx-v5-install.sh | 1 + install/esphome-v5-install.sh | 1 + install/go2rtc-v5-install.sh | 1 + install/grafana-v5-install.sh | 1 + install/grocy-v5-install.sh | 1 + install/heimdalldashboard-v5-install.sh | 1 + install/homeassistant-core-v5-install.sh | 1 + install/homeassistant-v5-install.sh | 1 + install/homebridge-v5-install.sh | 1 + install/homepage-v5-install.sh | 1 + install/homer-v5-install.sh | 1 + install/hyperion-v5-install.sh | 1 + install/influxdb-v5-install.sh | 1 + install/iobroker-v5-install.sh | 1 + install/jackett-v5-install.sh | 1 + install/jellyfin-v5-install.sh | 1 + install/k0s-v5-install.sh | 1 + install/kavita-v5-install.sh | 1 + install/keycloak-v5-install.sh | 1 + install/lidarr-v5-install.sh | 1 + install/magicmirror-v5-install.sh | 1 + install/mariadb-v5-install.sh | 1 + install/meshcentral-v5-install.sh | 1 + install/motioneye-v5-install.sh | 1 + install/mqtt-v5-install.sh | 1 + install/n8n-v5-install.sh | 1 + install/navidrome-v5-install.sh | 1 + install/nextcloudpi-v5-install.sh | 1 + install/nginxproxymanager-v5-install.sh | 1 + install/nocodb-v5-install.sh | 1 + install/node-red-v5-install.sh | 1 + install/omada-v5-install.sh | 1 + install/omv-v5-install.sh | 1 + install/openhab-v5-install.sh | 1 + install/paperless-ngx-v5-install.sh | 1 + install/photoprism-v5-install.sh | 1 + install/pihole-v5-install.sh | 1 + install/plex-v5-install.sh | 1 + install/podman-homeassistant-v5-install.sh | 1 + install/podman-v5-install.sh | 1 + install/postgresql-v5-install.sh | 1 + install/prometheus-v5-install.sh | 1 + install/prowlarr-v5-install.sh | 1 + install/qbittorrent-v5-install.sh | 1 + install/radarr-v5-install.sh | 1 + install/readarr-v5-install.sh | 1 + install/rstptoweb-v5-install.sh | 1 + install/sabnzbd-v5-install.sh | 1 + install/scrypted-v5-install.sh | 1 + install/shinobi-v5-install.sh | 1 + install/sonarr-v5-install.sh | 1 + install/syncthing-v5-install.sh | 1 + install/tdarr-v5-install.sh | 1 + install/technitiumdns-v5-install.sh | 1 + install/transmission-v5-install.sh | 1 + install/trilium-v5-install.sh | 1 + install/ubuntu-v5-install.sh | 1 + install/umbrel-v5-install.sh | 1 + install/unifi-v5-install.sh | 1 + install/uptimekuma-v5-install.sh | 1 + install/vaultwarden-v5-install.sh | 1 + install/whisparr-v5-install.sh | 1 + install/whoogle-v5-install.sh | 1 + install/wikijs-v5-install.sh | 1 + install/wireguard-v5-install.sh | 1 + install/yunohost-v5-install.sh | 1 + install/zigbee2mqtt-v5-install.sh | 1 + install/zwave-js-ui-v5-install.sh | 1 + 169 files changed, 333 insertions(+), 82 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 3ad5b01f..32b043ef 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -376,7 +377,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index d88c7153..3c42c898 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -28,6 +28,7 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -349,7 +350,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 4b0704c1..06df8c11 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -27,6 +27,7 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -382,7 +383,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index a979ffeb..99b50c6e 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -27,6 +27,7 @@ var_os="archlinux" var_version="base" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -353,7 +354,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 903f34b0..98128a73 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,7 +353,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 049e4585..bdb2b666 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -368,7 +369,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index b88f4392..573e06b0 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 26f8fedb..dfe1fe4d 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index bfc1b6d6..1ba4ed72 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 614a20c4..ac90461a 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 96b9b8fb..196fe544 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 52a132c6..afd67aae 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -383,7 +384,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index c79f61fa..278f8bb9 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,7 +353,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 56b55259..38df740b 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -27,6 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -359,7 +360,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index e8349ab1..fd515d61 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 4f7d5ea0..29ee1464 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -27,6 +27,7 @@ var_os="devuan" var_version="4.0" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,7 +353,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 0afd7a11..f8bada16 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 2859c147..dd20a0b3 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -27,6 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -376,7 +377,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 01b760c9..4828a5b4 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,7 +353,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index cd8cc028..e9ca6cf2 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -364,7 +365,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/go2rtc-v5.sh b/ct/go2rtc-v5.sh index 2ab170aa..3efc59bf 100644 --- a/ct/go2rtc-v5.sh +++ b/ct/go2rtc-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,7 +353,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index fa798d4a..f94b18e7 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index c49d1c5a..2525cdb2 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index bca0c925..656db61a 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -437,7 +438,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 828d9424..40c2d5d1 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -432,7 +433,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 69a43f87..bc1614ca 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 8fda38e7..cf330c37 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 4246a5f3..8ef34ca2 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -364,7 +365,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index c18bd377..fcf78f88 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -381,7 +382,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 77124f48..ada0c0d7 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index d7b62cd4..74d8063e 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index d657eeea..f022bcb4 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/jackett-v5.sh b/ct/jackett-v5.sh index 9ee88af0..554548b5 100644 --- a/ct/jackett-v5.sh +++ b/ct/jackett-v5.sh @@ -26,6 +26,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -356,7 +357,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index d0a8cf82..5af15bc0 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -28,6 +28,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -367,7 +368,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 143292ca..9cf74443 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 77e3889a..d1869d7b 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 11f0d9ea..8f0ebe5c 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -359,7 +360,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index e4877512..0383aded 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 5f8b8704..606b6b41 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -360,7 +361,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 7705a589..5e1dd9ab 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index c34c5709..336e5d9f 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 78a5ff8b..e000822a 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index 831ea218..a43ce1b9 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -26,6 +26,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 4e9ffc1e..cac60cdc 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 8ad6a7d0..4cb57222 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -368,7 +369,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 2832dfd5..1e663eaa 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 3d1be04b..71d7c8e6 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -467,7 +468,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 7bce9820..af343280 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -360,7 +361,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 934d59a3..7051fbf2 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -392,7 +393,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 929591ec..1f7b2c6d 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -27,6 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -367,7 +368,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 544f073c..f98708b7 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -359,7 +360,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 74d31c86..a21c2b72 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -359,7 +360,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index e11ba30b..1f0d2ce0 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -425,7 +426,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index ecc2399f..21de9379 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -380,7 +381,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index d22efe08..2838c254 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 5f0cae8a..77f384ed 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -27,6 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -377,7 +378,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index e03bca6a..a7beabb3 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -31,6 +31,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -408,7 +409,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 93d108b9..05cd6537 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 3c052a86..91bf1f6a 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index bf6a2cf6..a55e74cc 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index d7ffa755..c23b23a5 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/qbittorrent-v5.sh b/ct/qbittorrent-v5.sh index 0af5fe13..ef84f26a 100644 --- a/ct/qbittorrent-v5.sh +++ b/ct/qbittorrent-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 815cc4fd..77559143 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 769e1020..7ab40901 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index ea9c9550..ddd6517b 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -28,6 +28,7 @@ var_os="rockylinux" var_version="9" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/rstptoweb-v5.sh b/ct/rstptoweb-v5.sh index d067026b..670fbe2d 100644 --- a/ct/rstptoweb-v5.sh +++ b/ct/rstptoweb-v5.sh @@ -26,6 +26,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -351,7 +352,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index e923ad36..3076ab52 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 6b90147f..aff8cf7b 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -359,7 +360,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 14b4850c..9d854a57 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -27,6 +27,7 @@ var_os="ubuntu" var_version="22.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -368,7 +369,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index d948ab5b..608ce718 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 2b0e83a7..4997662a 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -359,7 +360,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 5813b5a6..eb311112 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 8fc9d666..e05f3be3 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -367,7 +368,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 0ee5d068..b1f3aab6 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 62a54f47..28b04449 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -377,7 +378,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index f283066b..7319b8f2 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -27,6 +27,7 @@ var_os="ubuntu" var_version="22.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -360,7 +361,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index e70695d1..d7640ab9 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 2e2bce79..b91ad8c2 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index a7d24e82..7659983d 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -375,7 +376,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index d3fd4f29..135bbe1b 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -426,7 +427,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 7a3beee5..a31ac005 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -358,7 +359,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 6d4d9093..4058cbe1 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 2baebf4a..50da63bd 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -380,7 +381,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 23d3d675..4522791f 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -412,7 +413,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index c5b72d48..bf8f1798 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -357,7 +358,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index fc238d95..460c4980 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -28,6 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -404,7 +405,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index a56356b4..23e88c38 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -27,6 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" +timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -371,7 +372,8 @@ else FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null +export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP export VERBOSE=$VERB diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index 27f82a04..ac6bf8fd 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index 0f9018d4..c24e600c 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 094d2d9d..7446e75e 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 565fb004..275f5e09 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index e2bec076..efda281c 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 5a582c98..a400759a 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 785cd1bc..daba7eb7 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index d4f703ee..f92e786c 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index a4aa247f..cec3a16f 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 03b42c31..53f5a875 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 7dee64a5..bdef4d6c 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 9164cce2..42325e53 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index dbd591e7..906534e2 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 9129f141..41bedf3d 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index d63e51b7..8c791710 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index d18f2873..d653ee25 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh index 9cc1f08e..51d6831f 100644 --- a/install/go2rtc-v5-install.sh +++ b/install/go2rtc-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 7229d99b..f09c81a7 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 9bebd2fe..92242165 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 9f132699..f287b687 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 03b48123..a1190ce0 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index be302148..5f8fe843 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 5d640d5f..b150c163 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index e3efeb37..0b261e03 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 48193db5..23831e78 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 5d34310d..580817b7 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 5cafffaa..4280456a 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 1b658cde..6f9cda96 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/jackett-v5-install.sh b/install/jackett-v5-install.sh index fd323953..9f257f5b 100644 --- a/install/jackett-v5-install.sh +++ b/install/jackett-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 5b386716..8faa5d27 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index c64cc71d..138d51ce 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 19c4c8b4..76fdf021 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index f272ec54..6858e15b 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index dfbda183..aa990c17 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 85845a72..3dbaf0a6 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 25468b0a..db5eb164 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index c001071e..7861a8fd 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 97a8efbb..f112d854 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 9f2960b7..3be1d8a0 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 31446ae5..fbafc2db 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index 732a7951..c6a7f04e 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index b845b2f8..8d25928a 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 1973553b..960bb71f 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 33377c85..270436a8 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index 9f59d1b8..fcc4c371 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index c7edf4f4..ad68dec6 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 8fc871f8..d9169e75 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 6e181437..30b9f61d 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 6279188b..c48908f2 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index 39373a05..b9c0782f 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index a472ab55..5976ac9e 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -48,6 +48,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 41a071c7..b15b104c 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 8d768fcb..59918724 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index d0f315ab..89114aba 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 810dca0a..3c98caef 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 71274e88..36ad41fc 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 41c47fa4..0877c3e9 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/qbittorrent-v5-install.sh b/install/qbittorrent-v5-install.sh index 3a7d4edb..7569b0fd 100644 --- a/install/qbittorrent-v5-install.sh +++ b/install/qbittorrent-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index e7a01987..7344a496 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index 4a8d6b22..c1fb8f85 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/rstptoweb-v5-install.sh b/install/rstptoweb-v5-install.sh index 227c0d7a..c0d51ac9 100644 --- a/install/rstptoweb-v5-install.sh +++ b/install/rstptoweb-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index ee5a2fb0..9434927a 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index a5546fe3..42080a83 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index 45a8cc09..d0f77c28 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 8b1eeda9..fb878c3a 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 74911940..bc6edfbc 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index e5e9cdb5..2a3ef8c4 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index ab510388..4513b3db 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index 0f8706fe..e6fa9751 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index 3c3cb8a1..ccb0f1af 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 21202a71..c77cadc8 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 6800d9ed..d6331941 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 84f8cdfb..54d9f90a 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -48,6 +48,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 6ba658ac..6a175b1c 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 21c3f47d..0da9f03c 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 360d9ab7..204074cf 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 2aa1607e..40eec029 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 4f5dd643..09e417c6 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 4c5d5c11..87e9bf33 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 50cf173a..19e7869d 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -46,6 +46,7 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index e9bf9173..a7a38c91 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index d63fe7fc..83e8d30a 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -47,6 +47,7 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +timedatectl set-timezone $tz for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break From 0e10ca682325bf6a0ddb6c7ce8ffba34e61c811c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Mar 2023 12:17:34 -0500 Subject: [PATCH 1180/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ea375c30..adc51ea3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. - **Alpine-Vaultwarden LXC** - NEW Script +- **All LXC Scripts** + - Retrieve the time zone from Proxmox and configure the container to use the same time zone ## 2023-02-24 From ad1d6303022f4b2ce3199cd74be17398d221ac34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 Mar 2023 15:14:31 -0500 Subject: [PATCH 1181/3335] fix tz unbound varible --- ct/casaos-v5.sh | 1 + ct/docker-v5.sh | 1 + ct/homeassistant-v5.sh | 1 + ct/umbrel-v5.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index dfe1fe4d..1e59b4ae 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -368,6 +368,7 @@ FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export tz=$timezone export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index f8bada16..a5183550 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -362,6 +362,7 @@ FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export tz=$timezone export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index bc1614ca..5537dc7e 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -433,6 +433,7 @@ FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export tz=$timezone export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index d7640ab9..c45af0b5 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -367,6 +367,7 @@ FEATURES="keyctl=1,nesting=1" fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export tz=$timezone export ST=$FUSE export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP From 1f9b959a471b0f47fe5f2ce40726b9e455900883 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 05:28:15 -0500 Subject: [PATCH 1182/3335] modified the code for setting the time zone --- ct/adguard-v5.sh | 2 +- ct/alpine-v5.sh | 2 +- ct/alpine-vaultwarden-v5.sh | 2 +- ct/archlinux-v5.sh | 2 +- ct/audiobookshelf-v5.sh | 2 +- ct/autobrr-v5.sh | 2 +- ct/blocky-v5.sh | 2 +- ct/casaos-v5.sh | 2 +- ct/changedetection-v5.sh | 2 +- ct/cronicle-v5.sh | 2 +- ct/daemonsync-v5.sh | 2 +- ct/dashy-v5.sh | 2 +- ct/debian-v5.sh | 2 +- ct/deconz-v5.sh | 2 +- ct/deluge-v5.sh | 2 +- ct/devuan-v5.sh | 2 +- ct/docker-v5.sh | 2 +- ct/emby-v5.sh | 2 +- ct/emqx-v5.sh | 2 +- ct/esphome-v5.sh | 2 +- ct/go2rtc-v5.sh | 2 +- ct/grafana-v5.sh | 2 +- ct/grocy-v5.sh | 2 +- ct/heimdalldashboard-v5.sh | 2 +- ct/homeassistant-core-v5.sh | 2 +- ct/homeassistant-v5.sh | 2 +- ct/homebridge-v5.sh | 2 +- ct/homepage-v5.sh | 2 +- ct/homer-v5.sh | 2 +- ct/hyperion-v5.sh | 2 +- ct/influxdb-v5.sh | 2 +- ct/iobroker-v5.sh | 2 +- ct/jackett-v5.sh | 2 +- ct/jellyfin-v5.sh | 2 +- ct/k0s-v5.sh | 2 +- ct/kavita-v5.sh | 2 +- ct/keycloak-v5.sh | 2 +- ct/lidarr-v5.sh | 2 +- ct/magicmirror-v5.sh | 2 +- ct/mariadb-v5.sh | 2 +- ct/meshcentral-v5.sh | 2 +- ct/motioneye-v5.sh | 2 +- ct/mqtt-v5.sh | 2 +- ct/n8n-v5.sh | 2 +- ct/navidrome-v5.sh | 2 +- ct/nextcloudpi-v5.sh | 2 +- ct/nginxproxymanager-v5.sh | 2 +- ct/nocodb-v5.sh | 2 +- ct/node-red-v5.sh | 2 +- ct/omada-v5.sh | 2 +- ct/omv-v5.sh | 2 +- ct/openhab-v5.sh | 2 +- ct/paperless-ngx-v5.sh | 2 +- ct/photoprism-v5.sh | 2 +- ct/pihole-v5.sh | 2 +- ct/plex-v5.sh | 2 +- ct/podman-homeassistant-v5.sh | 2 +- ct/podman-v5.sh | 2 +- ct/postgresql-v5.sh | 2 +- ct/prometheus-v5.sh | 2 +- ct/prowlarr-v5.sh | 2 +- ct/qbittorrent-v5.sh | 2 +- ct/radarr-v5.sh | 2 +- ct/readarr-v5.sh | 2 +- ct/rockylinux-v5.sh | 2 +- ct/rstptoweb-v5.sh | 2 +- ct/sabnzbd-v5.sh | 2 +- ct/scrypted-v5.sh | 2 +- ct/shinobi-v5.sh | 2 +- ct/sonarr-v5.sh | 2 +- ct/syncthing-v5.sh | 2 +- ct/tdarr-v5.sh | 2 +- ct/technitiumdns-v5.sh | 2 +- ct/transmission-v5.sh | 2 +- ct/trilium-v5.sh | 2 +- ct/ubuntu-v5.sh | 2 +- ct/umbrel-v5.sh | 2 +- ct/unifi-v5.sh | 2 +- ct/uptimekuma-v5.sh | 2 +- ct/vaultwarden-v5.sh | 2 +- ct/whisparr-v5.sh | 2 +- ct/whoogle-v5.sh | 2 +- ct/wikijs-v5.sh | 2 +- ct/wireguard-v5.sh | 2 +- ct/yunohost-v5.sh | 2 +- ct/zigbee2mqtt-v5.sh | 2 +- ct/zwave-js-ui-v5.sh | 2 +- install/adguard-v5-install.sh | 3 ++- install/audiobookshelf-v5-install.sh | 3 ++- install/autobrr-v5-install.sh | 3 ++- install/blocky-v5-install.sh | 3 ++- install/casaos-v5-install.sh | 3 ++- install/changedetection-v5-install.sh | 3 ++- install/cronicle-v5-install.sh | 3 ++- install/daemonsync-v5-install.sh | 3 ++- install/dashy-v5-install.sh | 3 ++- install/debian-v5-install.sh | 3 ++- install/deconz-v5-install.sh | 3 ++- install/deluge-v5-install.sh | 3 ++- install/docker-v5-install.sh | 3 ++- install/emby-v5-install.sh | 3 ++- install/emqx-v5-install.sh | 3 ++- install/esphome-v5-install.sh | 3 ++- install/go2rtc-v5-install.sh | 3 ++- install/grafana-v5-install.sh | 3 ++- install/grocy-v5-install.sh | 3 ++- install/heimdalldashboard-v5-install.sh | 3 ++- install/homeassistant-core-v5-install.sh | 3 ++- install/homeassistant-v5-install.sh | 3 ++- install/homebridge-v5-install.sh | 3 ++- install/homepage-v5-install.sh | 3 ++- install/homer-v5-install.sh | 3 ++- install/hyperion-v5-install.sh | 3 ++- install/influxdb-v5-install.sh | 3 ++- install/iobroker-v5-install.sh | 3 ++- install/jackett-v5-install.sh | 3 ++- install/jellyfin-v5-install.sh | 3 ++- install/k0s-v5-install.sh | 3 ++- install/kavita-v5-install.sh | 3 ++- install/keycloak-v5-install.sh | 3 ++- install/lidarr-v5-install.sh | 3 ++- install/magicmirror-v5-install.sh | 3 ++- install/mariadb-v5-install.sh | 3 ++- install/meshcentral-v5-install.sh | 3 ++- install/motioneye-v5-install.sh | 3 ++- install/mqtt-v5-install.sh | 3 ++- install/n8n-v5-install.sh | 3 ++- install/navidrome-v5-install.sh | 3 ++- install/nextcloudpi-v5-install.sh | 3 ++- install/nginxproxymanager-v5-install.sh | 3 ++- install/nocodb-v5-install.sh | 3 ++- install/node-red-v5-install.sh | 3 ++- install/omada-v5-install.sh | 3 ++- install/omv-v5-install.sh | 3 ++- install/openhab-v5-install.sh | 3 ++- install/paperless-ngx-v5-install.sh | 3 ++- install/photoprism-v5-install.sh | 3 ++- install/pihole-v5-install.sh | 3 ++- install/plex-v5-install.sh | 3 ++- install/podman-homeassistant-v5-install.sh | 3 ++- install/podman-v5-install.sh | 3 ++- install/postgresql-v5-install.sh | 3 ++- install/prometheus-v5-install.sh | 3 ++- install/prowlarr-v5-install.sh | 3 ++- install/qbittorrent-v5-install.sh | 3 ++- install/radarr-v5-install.sh | 3 ++- install/readarr-v5-install.sh | 3 ++- install/rstptoweb-v5-install.sh | 3 ++- install/sabnzbd-v5-install.sh | 3 ++- install/scrypted-v5-install.sh | 3 ++- install/shinobi-v5-install.sh | 3 ++- install/sonarr-v5-install.sh | 3 ++- install/syncthing-v5-install.sh | 3 ++- install/tdarr-v5-install.sh | 3 ++- install/technitiumdns-v5-install.sh | 3 ++- install/transmission-v5-install.sh | 3 ++- install/trilium-v5-install.sh | 3 ++- install/ubuntu-v5-install.sh | 3 ++- install/umbrel-v5-install.sh | 3 ++- install/unifi-v5-install.sh | 3 ++- install/uptimekuma-v5-install.sh | 3 ++- install/vaultwarden-v5-install.sh | 3 ++- install/whisparr-v5-install.sh | 3 ++- install/whoogle-v5-install.sh | 3 ++- install/wikijs-v5-install.sh | 3 ++- install/wireguard-v5-install.sh | 3 ++- install/yunohost-v5-install.sh | 3 ++- install/zigbee2mqtt-v5-install.sh | 3 ++- install/zwave-js-ui-v5-install.sh | 3 ++- 169 files changed, 251 insertions(+), 169 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 32b043ef..b642f680 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 3c42c898..349f840f 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -28,7 +28,7 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 06df8c11..37f11493 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -27,7 +27,7 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 99b50c6e..69b82639 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -27,7 +27,7 @@ var_os="archlinux" var_version="base" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 98128a73..a9790f62 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index bdb2b666..36f1d9b2 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index 573e06b0..cbbb49ff 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 1e59b4ae..ee8ab94a 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 1ba4ed72..7283f909 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index ac90461a..06918b55 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 196fe544..aa53ad77 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index afd67aae..6a8c85b2 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 278f8bb9..54cc5976 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 38df740b..86fda9a6 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -27,7 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index fd515d61..11d82a66 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 29ee1464..2b124e54 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -27,7 +27,7 @@ var_os="devuan" var_version="4.0" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index a5183550..e0f39952 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index dd20a0b3..ec6c54f5 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -27,7 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 4828a5b4..22f05ffc 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index e9ca6cf2..e75e9f07 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/go2rtc-v5.sh b/ct/go2rtc-v5.sh index 3efc59bf..11af6313 100644 --- a/ct/go2rtc-v5.sh +++ b/ct/go2rtc-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index f94b18e7..ccddc65d 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 2525cdb2..02944358 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 656db61a..b09170c6 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 40c2d5d1..81ac9bb9 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index 5537dc7e..da4c31ed 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index cf330c37..e77dbc51 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 8ef34ca2..32bc3745 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index fcf78f88..bca46fb8 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index ada0c0d7..f57f81b0 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 74d8063e..7306046c 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index f022bcb4..77e5a5e8 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/jackett-v5.sh b/ct/jackett-v5.sh index 554548b5..485c97cf 100644 --- a/ct/jackett-v5.sh +++ b/ct/jackett-v5.sh @@ -26,7 +26,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 5af15bc0..d124f71a 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -28,7 +28,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 9cf74443..510c5aba 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index d1869d7b..d2a0aee0 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 8f0ebe5c..65043f38 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 0383aded..c5973a74 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 606b6b41..8da28b49 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 5e1dd9ab..ca18035a 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 336e5d9f..be017202 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index e000822a..907f9182 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index a43ce1b9..e16e0acd 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -26,7 +26,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index cac60cdc..046c20c7 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 4cb57222..99606d17 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 1e663eaa..4087e191 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 71d7c8e6..e2a6f421 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index af343280..7f5cc1b4 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 7051fbf2..6fae8624 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 1f7b2c6d..e3b04bc1 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -27,7 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index f98708b7..542c9fa3 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index a21c2b72..23f0c177 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 1f0d2ce0..4ffeb59a 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 21de9379..d182a728 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 2838c254..486e2d28 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 77f384ed..62243b55 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -27,7 +27,7 @@ var_os="ubuntu" var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index a7beabb3..9553f229 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -31,7 +31,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 05cd6537..a388ea5f 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index 91bf1f6a..d8072ccf 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index a55e74cc..d0977b6c 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index c23b23a5..e73b7249 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/qbittorrent-v5.sh b/ct/qbittorrent-v5.sh index ef84f26a..5eb36c37 100644 --- a/ct/qbittorrent-v5.sh +++ b/ct/qbittorrent-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 77559143..cf7cf23f 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 7ab40901..4b32964c 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index ddd6517b..96f1f30e 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -28,7 +28,7 @@ var_os="rockylinux" var_version="9" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/rstptoweb-v5.sh b/ct/rstptoweb-v5.sh index 670fbe2d..e0bebee4 100644 --- a/ct/rstptoweb-v5.sh +++ b/ct/rstptoweb-v5.sh @@ -26,7 +26,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 3076ab52..a3f9457d 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index aff8cf7b..1021fd8c 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 9d854a57..f2411855 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -27,7 +27,7 @@ var_os="ubuntu" var_version="22.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 608ce718..f7f6d4b3 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 4997662a..780653b1 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index eb311112..d15c5de0 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index e05f3be3..6927ee63 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index b1f3aab6..a7aad0ce 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 28b04449..688a2a60 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 7319b8f2..3a07a06b 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -27,7 +27,7 @@ var_os="ubuntu" var_version="22.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index c45af0b5..6adff888 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index b91ad8c2..2b299529 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 7659983d..ad5cc724 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 135bbe1b..055e893d 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index a31ac005..1f51216c 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 4058cbe1..93fc469b 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 50da63bd..685f8783 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index 4522791f..cc16fabd 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index bf8f1798..52629130 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 460c4980..53543482 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -28,7 +28,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 23e88c38..510cb5fc 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -27,7 +27,7 @@ var_os="debian" var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(timedatectl | grep "Time zone" | awk '{print $3}') +timezone=$(cat /etc/timezone) INTEGER='^[0-9]+$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index ac6bf8fd..ddb9f4bc 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index c24e600c..c13f57e8 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 7446e75e..5b7e9d52 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 275f5e09..70788fde 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index efda281c..f94c4b34 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index a400759a..32823161 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index daba7eb7..63f13711 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index f92e786c..87b1bf68 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index cec3a16f..0835c349 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 53f5a875..8d8c09e0 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index bdef4d6c..391c2857 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index 42325e53..fcfb590d 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 906534e2..4a50c10d 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 41bedf3d..600df6cd 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 8c791710..0f51f30c 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index d653ee25..62d289b7 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh index 51d6831f..d06fe33c 100644 --- a/install/go2rtc-v5-install.sh +++ b/install/go2rtc-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index f09c81a7..5dc1ed99 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index 92242165..adf67d9a 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index f287b687..7f2fa02e 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index a1190ce0..614c3576 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 5f8fe843..07c8707a 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index b150c163..9fda9f34 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 0b261e03..8f07e05f 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 23831e78..4b5d77fc 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 580817b7..828a5630 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 4280456a..4ef3826e 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index 6f9cda96..b541522f 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/jackett-v5-install.sh b/install/jackett-v5-install.sh index 9f257f5b..711b3804 100644 --- a/install/jackett-v5-install.sh +++ b/install/jackett-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 8faa5d27..7f3667cb 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 138d51ce..9929af37 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 76fdf021..2bafec40 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 6858e15b..33c4e567 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index aa990c17..fb5c1159 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index 3dbaf0a6..e46fb200 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index db5eb164..58031075 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 7861a8fd..85084330 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index f112d854..83cbd1c0 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 3be1d8a0..9e35158f 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index fbafc2db..60481d2a 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index c6a7f04e..a1a136fd 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 8d25928a..5382bf00 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 960bb71f..ce7e2cb4 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index 270436a8..b2a77d13 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index fcc4c371..a8437881 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index ad68dec6..e7e38878 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index d9169e75..55aa1f09 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 30b9f61d..74372081 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index c48908f2..6e7e3e49 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index b9c0782f..a51074eb 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 5976ac9e..6e25aea0 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -48,7 +48,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index b15b104c..701636a2 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 59918724..02878114 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index 89114aba..b551de69 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 3c98caef..6ac71f6e 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 36ad41fc..35434a3a 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 0877c3e9..7d4a80a4 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/qbittorrent-v5-install.sh b/install/qbittorrent-v5-install.sh index 7569b0fd..95512544 100644 --- a/install/qbittorrent-v5-install.sh +++ b/install/qbittorrent-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 7344a496..6b73dfc4 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index c1fb8f85..d6e2dea2 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/rstptoweb-v5-install.sh b/install/rstptoweb-v5-install.sh index c0d51ac9..dbc1d606 100644 --- a/install/rstptoweb-v5-install.sh +++ b/install/rstptoweb-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index 9434927a..e135afb6 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 42080a83..1054b8d1 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index d0f77c28..ff165a74 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index fb878c3a..955d0cc6 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index bc6edfbc..958a63f6 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 2a3ef8c4..79c00018 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 4513b3db..3650c52a 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index e6fa9751..b3708485 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index ccb0f1af..aba37afa 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index c77cadc8..19a880a3 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index d6331941..236d4a10 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 54d9f90a..55a08456 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -48,7 +48,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index 6a175b1c..b0fdb9b4 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 0da9f03c..3c737500 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 204074cf..0ba49544 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 40eec029..6044e6d1 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 09e417c6..2c5433eb 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 87e9bf33..52a617b4 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index 19e7869d..b1baf047 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -46,7 +46,8 @@ function msg_error() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index a7a38c91..3bcde768 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index 83e8d30a..e97b125d 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -47,7 +47,8 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null -timedatectl set-timezone $tz +echo $tz > /etc/timezone +ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do if [ "$(hostname -I)" != "" ]; then break From 259ba993a22197d1bc406f4ee6c309f6a444fbdf Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 14:55:40 -0500 Subject: [PATCH 1183/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 0cd732f6..8404bc56 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -66,15 +66,15 @@ function msg_ok() { clear header_info read -r -p "Disable Enterprise Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Disabling Enterprise Repository" sleep 2 - sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list + sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list msg_ok "Disabled Enterprise Repository" fi read -r -p "Add/Correct PVE7 Sources (sources.list)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Adding or Correcting PVE7 Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib @@ -85,8 +85,9 @@ EOF msg_ok "Added or Corrected PVE7 Sources" fi + read -r -p "Enable No-Subscription Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Enabling No-Subscription Repository" cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription @@ -96,7 +97,7 @@ EOF fi read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Adding Beta/Test Repository and set disabled" cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pve bullseye pvetest @@ -106,7 +107,7 @@ EOF fi read -r -p "Disable Subscription Nag? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Disabling Subscription Nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null @@ -114,7 +115,7 @@ if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ] fi read -r -p "Update Proxmox VE 7 now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Updating Proxmox VE 7 (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null @@ -122,7 +123,7 @@ if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ] fi read -r -p "Reboot Proxmox VE 7 now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Rebooting Proxmox VE 7" sleep 2 msg_ok "Completed Post Install Routines" From 12d5a78a303acf5423e8b5770c6bc80e30b34a98 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 15:03:22 -0500 Subject: [PATCH 1184/3335] match input if it's "y" or "yes" (case-insensitive) --- install/adguard-v5-install.sh | 2 +- install/alpine-vaultwarden-v5-install.sh | 2 +- install/audiobookshelf-v5-install.sh | 2 +- install/autobrr-v5-install.sh | 2 +- install/blocky-v5-install.sh | 2 +- install/casaos-v5-install.sh | 2 +- install/changedetection-v5-install.sh | 2 +- install/cronicle-v5-install.sh | 2 +- install/daemonsync-v5-install.sh | 2 +- install/dashy-v5-install.sh | 2 +- install/debian-v5-install.sh | 2 +- install/deconz-v5-install.sh | 2 +- install/deluge-v5-install.sh | 2 +- install/devuan-v5-install.sh | 2 +- install/docker-v5-install.sh | 6 +++--- install/emby-v5-install.sh | 2 +- install/emqx-v5-install.sh | 2 +- install/esphome-v5-install.sh | 2 +- install/go2rtc-v5-install.sh | 2 +- install/grafana-v5-install.sh | 2 +- install/grocy-v5-install.sh | 2 +- install/heimdalldashboard-v5-install.sh | 2 +- install/homeassistant-core-v5-install.sh | 2 +- install/homeassistant-v5-install.sh | 2 +- install/homebridge-v5-install.sh | 2 +- install/homepage-v5-install.sh | 2 +- install/homer-v5-install.sh | 2 +- install/hyperion-v5-install.sh | 2 +- install/influxdb-v5-install.sh | 4 ++-- install/iobroker-v5-install.sh | 2 +- install/jackett-v5-install.sh | 2 +- install/jellyfin-v5-install.sh | 2 +- install/k0s-v5-install.sh | 4 ++-- install/kavita-v5-install.sh | 2 +- install/keycloak-v5-install.sh | 2 +- install/lidarr-v5-install.sh | 2 +- install/magicmirror-v5-install.sh | 2 +- install/mariadb-v5-install.sh | 4 ++-- install/meshcentral-v5-install.sh | 2 +- install/motioneye-v5-install.sh | 2 +- install/mqtt-v5-install.sh | 2 +- install/n8n-v5-install.sh | 2 +- install/navidrome-v5-install.sh | 2 +- install/nextcloudpi-v5-install.sh | 2 +- install/nginxproxymanager-v5-install.sh | 2 +- install/nocodb-v5-install.sh | 2 +- install/node-red-v5-install.sh | 2 +- install/omada-v5-install.sh | 2 +- install/omv-v5-install.sh | 2 +- install/openhab-v5-install.sh | 2 +- install/paperless-ngx-v5-install.sh | 2 +- install/photoprism-v5-install.sh | 2 +- install/pihole-v5-install.sh | 2 +- install/plex-v5-install.sh | 2 +- install/podman-homeassistant-v5-install.sh | 2 +- install/podman-v5-install.sh | 2 +- install/postgresql-v5-install.sh | 4 ++-- install/prometheus-v5-install.sh | 2 +- install/prowlarr-v5-install.sh | 2 +- install/qbittorrent-v5-install.sh | 2 +- install/radarr-v5-install.sh | 2 +- install/readarr-v5-install.sh | 2 +- install/rstptoweb-v5-install.sh | 2 +- install/sabnzbd-v5-install.sh | 2 +- install/scrypted-v5-install.sh | 4 ++-- install/shinobi-v5-install.sh | 2 +- install/sonarr-v5-install.sh | 2 +- install/syncthing-v5-install.sh | 2 +- install/tdarr-v5-install.sh | 2 +- install/technitiumdns-v5-install.sh | 2 +- install/transmission-v5-install.sh | 2 +- install/trilium-v5-install.sh | 2 +- install/ubuntu-v5-install.sh | 2 +- install/umbrel-v5-install.sh | 2 +- install/unifi-v5-install.sh | 4 ++-- install/uptimekuma-v5-install.sh | 2 +- install/vaultwarden-v5-install.sh | 2 +- install/whisparr-v5-install.sh | 2 +- install/whoogle-v5-install.sh | 2 +- install/wikijs-v5-install.sh | 2 +- install/wireguard-v5-install.sh | 2 +- install/yunohost-v5-install.sh | 2 +- install/zigbee2mqtt-v5-install.sh | 2 +- install/zwave-js-ui-v5-install.sh | 2 +- misc/bluetooth.sh | 4 ++-- misc/post-pbs-install.sh | 14 +++++++------- misc/pyenv.sh | 6 +++--- 87 files changed, 104 insertions(+), 104 deletions(-) diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh index ddb9f4bc..4f8ae86e 100644 --- a/install/adguard-v5-install.sh +++ b/install/adguard-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 6c1a5d80..187fb8c1 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -74,7 +74,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh index c13f57e8..f32761b2 100644 --- a/install/audiobookshelf-v5-install.sh +++ b/install/audiobookshelf-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh index 5b7e9d52..61a9c8c2 100644 --- a/install/autobrr-v5-install.sh +++ b/install/autobrr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/blocky-v5-install.sh b/install/blocky-v5-install.sh index 70788fde..aa1722b0 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh index f94c4b34..22f05ba7 100644 --- a/install/casaos-v5-install.sh +++ b/install/casaos-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh index 32823161..433ee0f9 100644 --- a/install/changedetection-v5-install.sh +++ b/install/changedetection-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh index 63f13711..d9addbf6 100644 --- a/install/cronicle-v5-install.sh +++ b/install/cronicle-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh index 87b1bf68..abe4dec6 100644 --- a/install/daemonsync-v5-install.sh +++ b/install/daemonsync-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh index 0835c349..1bd8e71d 100644 --- a/install/dashy-v5-install.sh +++ b/install/dashy-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh index 8d8c09e0..ef9e1a6f 100644 --- a/install/debian-v5-install.sh +++ b/install/debian-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh index 391c2857..ad060379 100644 --- a/install/deconz-v5-install.sh +++ b/install/deconz-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh index fcfb590d..dbc85972 100644 --- a/install/deluge-v5-install.sh +++ b/install/deluge-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/devuan-v5-install.sh b/install/devuan-v5-install.sh index 2ab60b40..a8ca650d 100644 --- a/install/devuan-v5-install.sh +++ b/install/devuan-v5-install.sh @@ -64,7 +64,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 4a50c10d..806f7f8b 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -117,7 +117,7 @@ $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" read -r -p "Would you like to add Portainer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then PORTAINER="Y" else PORTAINER="N" @@ -138,7 +138,7 @@ if [[ $PORTAINER == "Y" ]]; then fi read -r -p "Would you like to add Docker Compose? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then DOCKER_COMPOSE="Y" else DOCKER_COMPOSE="N" diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh index 600df6cd..0a41c2c5 100644 --- a/install/emby-v5-install.sh +++ b/install/emby-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh index 0f51f30c..853a3cdb 100644 --- a/install/emqx-v5-install.sh +++ b/install/emqx-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh index 62d289b7..7bd8b99f 100644 --- a/install/esphome-v5-install.sh +++ b/install/esphome-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh index d06fe33c..57577695 100644 --- a/install/go2rtc-v5-install.sh +++ b/install/go2rtc-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh index 5dc1ed99..9b327c23 100644 --- a/install/grafana-v5-install.sh +++ b/install/grafana-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh index adf67d9a..f5bf1469 100644 --- a/install/grocy-v5-install.sh +++ b/install/grocy-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh index 7f2fa02e..4fcc9888 100644 --- a/install/heimdalldashboard-v5-install.sh +++ b/install/heimdalldashboard-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh index 614c3576..71f3186d 100644 --- a/install/homeassistant-core-v5-install.sh +++ b/install/homeassistant-core-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh index 07c8707a..12a5efbc 100644 --- a/install/homeassistant-v5-install.sh +++ b/install/homeassistant-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh index 9fda9f34..ac0fec01 100644 --- a/install/homebridge-v5-install.sh +++ b/install/homebridge-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh index 8f07e05f..ca0fe0c4 100644 --- a/install/homepage-v5-install.sh +++ b/install/homepage-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh index 4b5d77fc..539c4aed 100644 --- a/install/homer-v5-install.sh +++ b/install/homer-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh index 828a5630..4e2668f2 100644 --- a/install/hyperion-v5-install.sh +++ b/install/hyperion-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 4ef3826e..5e1a28c9 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -119,7 +119,7 @@ $STD systemctl enable --now influxdb msg_ok "Installed InfluxDB" read -r -p "Would you like to add Telegraf? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then TELEGRAF="Y" else TELEGRAF="N" diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh index b541522f..7c8152b3 100644 --- a/install/iobroker-v5-install.sh +++ b/install/iobroker-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/jackett-v5-install.sh b/install/jackett-v5-install.sh index 711b3804..7baee1b1 100644 --- a/install/jackett-v5-install.sh +++ b/install/jackett-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh index 7f3667cb..821bfe0e 100644 --- a/install/jellyfin-v5-install.sh +++ b/install/jellyfin-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index 9929af37..b7c7db8d 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -101,7 +101,7 @@ k0s config create > /etc/k0s/k0s.yaml msg_ok "Installed k0s Kubernetes" read -r -p "Would you like to add Helm Package Manager? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then HELM="Y" else HELM="N" diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh index 2bafec40..fb3d3af2 100644 --- a/install/kavita-v5-install.sh +++ b/install/kavita-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh index 33c4e567..65fc382c 100644 --- a/install/keycloak-v5-install.sh +++ b/install/keycloak-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh index fb5c1159..35354173 100644 --- a/install/lidarr-v5-install.sh +++ b/install/lidarr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-v5-install.sh index e46fb200..3cfc369d 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 58031075..84ae6eca 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -99,7 +99,7 @@ $STD apt-get install -y mariadb-server msg_ok "Installed MariaDB" read -r -p "Would you like to add Adminer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then ADMINER="Y" else ADMINER="N" diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh index 85084330..f0b22abb 100644 --- a/install/meshcentral-v5-install.sh +++ b/install/meshcentral-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh index 83cbd1c0..14ea8991 100644 --- a/install/motioneye-v5-install.sh +++ b/install/motioneye-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh index 9e35158f..3f13f8a4 100644 --- a/install/mqtt-v5-install.sh +++ b/install/mqtt-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh index 60481d2a..76a45c05 100644 --- a/install/n8n-v5-install.sh +++ b/install/n8n-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh index a1a136fd..67a38067 100644 --- a/install/navidrome-v5-install.sh +++ b/install/navidrome-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh index 5382bf00..6ccada06 100644 --- a/install/nextcloudpi-v5-install.sh +++ b/install/nextcloudpi-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index ce7e2cb4..830c02fa 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh index b2a77d13..fb618460 100644 --- a/install/nocodb-v5-install.sh +++ b/install/nocodb-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh index a8437881..e20934ef 100644 --- a/install/node-red-v5-install.sh +++ b/install/node-red-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh index e7e38878..6e79e690 100644 --- a/install/omada-v5-install.sh +++ b/install/omada-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh index 55aa1f09..6f0e8a1e 100644 --- a/install/omv-v5-install.sh +++ b/install/omv-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh index 74372081..1899ae34 100644 --- a/install/openhab-v5-install.sh +++ b/install/openhab-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-v5-install.sh index 6e7e3e49..5efaa813 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/photoprism-v5-install.sh b/install/photoprism-v5-install.sh index a51074eb..ac39c48d 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh index 6e25aea0..63df2f5b 100644 --- a/install/pihole-v5-install.sh +++ b/install/pihole-v5-install.sh @@ -70,7 +70,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh index 701636a2..f866c55e 100644 --- a/install/plex-v5-install.sh +++ b/install/plex-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh index 02878114..4b594c70 100644 --- a/install/podman-homeassistant-v5-install.sh +++ b/install/podman-homeassistant-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh index b551de69..3e2aa3e8 100644 --- a/install/podman-v5-install.sh +++ b/install/podman-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 6ac71f6e..ceaee9ea 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -206,7 +206,7 @@ sudo systemctl restart postgresql msg_ok "Installed PostgreSQL" read -r -p "Would you like to add Adminer? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then ADMINER="Y" else ADMINER="N" diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh index 35434a3a..7d561256 100644 --- a/install/prometheus-v5-install.sh +++ b/install/prometheus-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh index 7d4a80a4..565541ac 100644 --- a/install/prowlarr-v5-install.sh +++ b/install/prowlarr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/qbittorrent-v5-install.sh b/install/qbittorrent-v5-install.sh index 95512544..8ced8627 100644 --- a/install/qbittorrent-v5-install.sh +++ b/install/qbittorrent-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh index 6b73dfc4..655bf395 100644 --- a/install/radarr-v5-install.sh +++ b/install/radarr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh index d6e2dea2..f2388649 100644 --- a/install/readarr-v5-install.sh +++ b/install/readarr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/rstptoweb-v5-install.sh b/install/rstptoweb-v5-install.sh index dbc1d606..f1c28169 100644 --- a/install/rstptoweb-v5-install.sh +++ b/install/rstptoweb-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh index e135afb6..9d9cb825 100644 --- a/install/sabnzbd-v5-install.sh +++ b/install/sabnzbd-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 1054b8d1..0ee2a517 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -148,7 +148,7 @@ $STD python3 -m pip install aiofiles debugpy typing_extensions typing msg_ok "Installed Python3" read -r -p "Would you like to add Coral Edge TPU support? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then CORAL="Y" else CORAL="N" diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh index ff165a74..755148af 100644 --- a/install/shinobi-v5-install.sh +++ b/install/shinobi-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh index 955d0cc6..9ca338dc 100644 --- a/install/sonarr-v5-install.sh +++ b/install/sonarr-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh index 958a63f6..315a88da 100644 --- a/install/syncthing-v5-install.sh +++ b/install/syncthing-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh index 79c00018..705a53ce 100644 --- a/install/tdarr-v5-install.sh +++ b/install/tdarr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh index 3650c52a..8570aebc 100644 --- a/install/technitiumdns-v5-install.sh +++ b/install/technitiumdns-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh index b3708485..c2e22764 100644 --- a/install/transmission-v5-install.sh +++ b/install/transmission-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh index aba37afa..05a61efa 100644 --- a/install/trilium-v5-install.sh +++ b/install/trilium-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh index 19a880a3..9f1409ff 100644 --- a/install/ubuntu-v5-install.sh +++ b/install/ubuntu-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh index 236d4a10..8846aa68 100644 --- a/install/umbrel-v5-install.sh +++ b/install/umbrel-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh index 55a08456..1eaa6cf3 100644 --- a/install/unifi-v5-install.sh +++ b/install/unifi-v5-install.sh @@ -70,7 +70,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" @@ -94,7 +94,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" read -r -p "Local Controller? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then LOCAL="--local-controller" else LOCAL="" diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh index b0fdb9b4..d9c8284b 100644 --- a/install/uptimekuma-v5-install.sh +++ b/install/uptimekuma-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-v5-install.sh index 3c737500..c1d63e1f 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh index 0ba49544..82d4dce7 100644 --- a/install/whisparr-v5-install.sh +++ b/install/whisparr-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh index 6044e6d1..816a32df 100644 --- a/install/whoogle-v5-install.sh +++ b/install/whoogle-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh index 2c5433eb..71a6e946 100644 --- a/install/wikijs-v5-install.sh +++ b/install/wikijs-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh index 52a617b4..4d1b3127 100644 --- a/install/wireguard-v5-install.sh +++ b/install/wireguard-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh index b1baf047..b8366bf0 100644 --- a/install/yunohost-v5-install.sh +++ b/install/yunohost-v5-install.sh @@ -68,7 +68,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh index 3bcde768..ae1ec650 100644 --- a/install/zigbee2mqtt-v5-install.sh +++ b/install/zigbee2mqtt-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh index e97b125d..41cfb081 100644 --- a/install/zwave-js-ui-v5-install.sh +++ b/install/zwave-js-ui-v5-install.sh @@ -69,7 +69,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh index c95a1815..d3a3ca60 100644 --- a/misc/bluetooth.sh +++ b/misc/bluetooth.sh @@ -41,7 +41,7 @@ clear EOF read -r -p "Switch from dbus-daemon to dbus-broker? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then cat <>/etc/apt/sources.list deb http://deb.debian.org/debian bullseye-backports main contrib non-free @@ -52,7 +52,7 @@ apt-get -t bullseye-backports install -y dbus-broker &>/dev/null systemctl enable dbus-broker.service &>/dev/null fi read -r -p "Install BlueZ? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then apt-get -t bullseye-backports install -y bluez* &>/dev/null fi echo -e "Finished, reboot for changes to take affect" diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index 2a6ff6f0..39a0a320 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -58,7 +58,7 @@ function msg_ok() { clear header_info read -r -p "Disable Enterprise Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Disabling Enterprise Repository" sleep 2 sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list @@ -66,7 +66,7 @@ if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ] fi read -r -p "Add/Correct PBS Sources (sources.list)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Adding or Correcting PBS Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib @@ -78,7 +78,7 @@ EOF fi read -r -p "Enable No-Subscription Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Enabling No-Subscription Repository" cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription @@ -88,7 +88,7 @@ EOF fi read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Adding Beta/Test Repository and set disabled" cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pbs bullseye pbstest @@ -98,7 +98,7 @@ EOF fi read -r -p "Disable Subscription Nag? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Disabling Subscription Nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null @@ -106,7 +106,7 @@ if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ] fi read -r -p "Update Proxmox Backup Server now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Updating Proxmox Backup Server (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null @@ -114,7 +114,7 @@ if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ] fi read -r -p "Reboot Proxmox Backup Server now? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Rebooting Proxmox Backup Server" sleep 2 msg_ok "Completed Post Install Routines" diff --git a/misc/pyenv.sh b/misc/pyenv.sh index 5fb41779..ca43a5fd 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -69,7 +69,7 @@ pyenv install 3.10.8 &>/dev/null pyenv global 3.10.8 msg_ok "Installed Python 3.10.8" read -r -p "Would you like to install Home Assistant Beta? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then HA="Y" fi if [[ $HA == "Y" ]]; then @@ -101,7 +101,7 @@ hass fi read -r -p "Would you like to install ESPHome Beta? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then ESP="Y" fi if [[ $ESP == "Y" ]]; then @@ -146,7 +146,7 @@ exec $SHELL fi read -r -p "Would you like to install Matter-Server (Beta)? " prompt -if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then MTR="Y" fi if [[ $MTR == "Y" ]]; then From 6d2a8a2ec4f714f32335c3da56418695226386cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 15:23:14 -0500 Subject: [PATCH 1185/3335] Update docker-v5-install.sh code refactoring --- install/docker-v5-install.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh index 806f7f8b..83339fb5 100644 --- a/install/docker-v5-install.sh +++ b/install/docker-v5-install.sh @@ -118,12 +118,6 @@ msg_ok "Installed Docker $DOCKER_LATEST_VERSION" read -r -p "Would you like to add Portainer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - PORTAINER="Y" -else - PORTAINER="N" -fi - -if [[ $PORTAINER == "Y" ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null $STD docker run -d \ @@ -139,12 +133,6 @@ fi read -r -p "Would you like to add Docker Compose? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - DOCKER_COMPOSE="Y" -else - DOCKER_COMPOSE="N" -fi - -if [[ $DOCKER_COMPOSE == "Y" ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins From 7305fa4f0ace2d1ba487d29c587ae48ec15112ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 15:37:32 -0500 Subject: [PATCH 1186/3335] code refactoring --- install/influxdb-v5-install.sh | 6 ------ install/k0s-v5-install.sh | 6 ------ install/mariadb-v5-install.sh | 6 ------ install/postgresql-v5-install.sh | 6 ------ install/scrypted-v5-install.sh | 6 ------ misc/pyenv.sh | 17 ++++------------- 6 files changed, 4 insertions(+), 43 deletions(-) diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh index 5e1a28c9..31fe8ece 100644 --- a/install/influxdb-v5-install.sh +++ b/install/influxdb-v5-install.sh @@ -120,12 +120,6 @@ msg_ok "Installed InfluxDB" read -r -p "Would you like to add Telegraf? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - TELEGRAF="Y" -else - TELEGRAF="N" -fi - -if [[ $TELEGRAF == "Y" ]]; then msg_info "Installing Telegraf" $STD apt-get install -y telegraf msg_ok "Installed Telegraf" diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh index b7c7db8d..c5bb38f5 100644 --- a/install/k0s-v5-install.sh +++ b/install/k0s-v5-install.sh @@ -102,12 +102,6 @@ msg_ok "Installed k0s Kubernetes" read -r -p "Would you like to add Helm Package Manager? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - HELM="Y" -else - HELM="N" -fi - -if [[ $HELM == "Y" ]]; then msg_info "Installing Helm" $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) msg_ok "Installed Helm" diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh index 84ae6eca..63b2899e 100644 --- a/install/mariadb-v5-install.sh +++ b/install/mariadb-v5-install.sh @@ -100,12 +100,6 @@ msg_ok "Installed MariaDB" read -r -p "Would you like to add Adminer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - ADMINER="Y" -else - ADMINER="N" -fi - -if [[ $ADMINER == "Y" ]]; then msg_info "Installing Adminer" $STD apt install -y adminer $STD a2enconf adminer diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index ceaee9ea..6c589a4f 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -207,12 +207,6 @@ msg_ok "Installed PostgreSQL" read -r -p "Would you like to add Adminer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - ADMINER="Y" -else - ADMINER="N" -fi - -if [[ $ADMINER == "Y" ]]; then msg_info "Installing Adminer" $STD apt install -y adminer $STD sudo a2enconf adminer diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh index 0ee2a517..60b1e6e9 100644 --- a/install/scrypted-v5-install.sh +++ b/install/scrypted-v5-install.sh @@ -149,12 +149,6 @@ msg_ok "Installed Python3" read -r -p "Would you like to add Coral Edge TPU support? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - CORAL="Y" -else - CORAL="N" -fi - -if [[ $CORAL == "Y" ]]; then msg_info "Adding Coral Edge TPU Support" $STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list' diff --git a/misc/pyenv.sh b/misc/pyenv.sh index ca43a5fd..675a0344 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -64,15 +64,12 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path) msg_ok "Installed pyenv" . ~/.bashrc set -e -msg_info "Installing Python 3.10.8" -pyenv install 3.10.8 &>/dev/null -pyenv global 3.10.8 -msg_ok "Installed Python 3.10.8" +msg_info "Installing Python 3.11.1" +pyenv install 3.11.1 &>/dev/null +pyenv global 3.11.1 +msg_ok "Installed Python 3.11.1" read -r -p "Would you like to install Home Assistant Beta? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - HA="Y" -fi -if [[ $HA == "Y" ]]; then msg_info "Installing Home Assistant Beta" cat </etc/systemd/system/homeassistant.service [Unit] @@ -102,9 +99,6 @@ fi read -r -p "Would you like to install ESPHome Beta? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - ESP="Y" -fi -if [[ $ESP == "Y" ]]; then msg_info "Installing ESPHome Beta" mkdir /srv/esphome cd /srv/esphome @@ -147,9 +141,6 @@ fi read -r -p "Would you like to install Matter-Server (Beta)? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - MTR="Y" -fi -if [[ $MTR == "Y" ]]; then msg_info "Installing Matter Server" apt-get install -y \ libcairo2-dev \ From 6b10aa922afa27301eae8aaf7c45e20dc99bca02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 19:08:45 -0500 Subject: [PATCH 1187/3335] Update usb-passthrough.sh clean --- misc/usb-passthrough.sh | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/misc/usb-passthrough.sh b/misc/usb-passthrough.sh index 8274d96b..851b3e06 100644 --- a/misc/usb-passthrough.sh +++ b/misc/usb-passthrough.sh @@ -15,31 +15,6 @@ while true; do esac done -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null CHAR_DEVS+=("166:.*") From a153da3465b071626ddc6b18db341612ec30a470 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 20:19:37 -0500 Subject: [PATCH 1188/3335] Update scaling-governor.sh menu options dynamically based on the available scaling governors --- misc/scaling-governor.sh | 111 ++++++++++----------------------------- 1 file changed, 27 insertions(+), 84 deletions(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index edecd2c4..20138b08 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -5,21 +5,19 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -function header_info { - cat <<"EOF" +header_info() { +clear +cat < Date: Wed, 8 Mar 2023 20:29:42 -0500 Subject: [PATCH 1189/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index adc51ea3..2b5c2a03 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,14 @@ # Change Log All notable changes to this project will be documented in this file. + +## 2023-03-08 + +### Changed + +- **Proxmox CPU Scaling Governor** + - Menu options dynamically based on the available scaling governors. + ## 2023-03-07 ### Changed From 7a22dbfa98274c06bef6afc132b0e0f5897130a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Mar 2023 20:56:23 -0500 Subject: [PATCH 1190/3335] Update scaling-governor.sh tweak --- misc/scaling-governor.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 20138b08..1ca70809 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -17,7 +17,6 @@ Scaling Governors EOF } while true; do - header_info read -p "View CPU Scaling Governors. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; From de020b93afd4d73e44bcb22b2dfb83746dec904d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Mar 2023 03:40:38 -0500 Subject: [PATCH 1191/3335] Update scaling-governor.sh revert 7a22dbf --- misc/scaling-governor.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 1ca70809..20138b08 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -17,6 +17,7 @@ Scaling Governors EOF } while true; do + header_info read -p "View CPU Scaling Governors. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; From e396345058e8f6d58475ac483d47d154d2f9fa76 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Mar 2023 22:06:56 -0500 Subject: [PATCH 1192/3335] code refactoring (#1141) * code refactoring * allow decimal numbers (such as 0.1) in addition to integers * adjust password menu --- ct/adguard-v5.sh | 329 +++++++++++++++++-------------- ct/alpine-v5.sh | 328 +++++++++++++++++-------------- ct/alpine-vaultwarden-v5.sh | 328 +++++++++++++++++-------------- ct/archlinux-v5.sh | 330 +++++++++++++++++-------------- ct/audiobookshelf-v5.sh | 330 +++++++++++++++++-------------- ct/autobrr-v5.sh | 330 +++++++++++++++++-------------- ct/blocky-v5.sh | 330 +++++++++++++++++-------------- ct/casaos-v5.sh | 359 ++++++++++++++++++---------------- ct/changedetection-v5.sh | 330 +++++++++++++++++-------------- ct/cronicle-v5.sh | 330 +++++++++++++++++-------------- ct/daemonsync-v5.sh | 330 +++++++++++++++++-------------- ct/dashy-v5.sh | 330 +++++++++++++++++-------------- ct/debian-v5.sh | 330 +++++++++++++++++-------------- ct/deconz-v5.sh | 334 +++++++++++++++++-------------- ct/deluge-v5.sh | 330 +++++++++++++++++-------------- ct/devuan-v5.sh | 330 +++++++++++++++++-------------- ct/docker-v5.sh | 345 +++++++++++++++++--------------- ct/emby-v5.sh | 341 +++++++++++++++++--------------- ct/emqx-v5.sh | 330 +++++++++++++++++-------------- ct/esphome-v5.sh | 331 +++++++++++++++++-------------- ct/go2rtc-v5.sh | 330 +++++++++++++++++-------------- ct/grafana-v5.sh | 330 +++++++++++++++++-------------- ct/grocy-v5.sh | 330 +++++++++++++++++-------------- ct/heimdalldashboard-v5.sh | 330 +++++++++++++++++-------------- ct/homeassistant-core-v5.sh | 328 +++++++++++++++++-------------- ct/homeassistant-v5.sh | 344 +++++++++++++++++--------------- ct/homebridge-v5.sh | 330 +++++++++++++++++-------------- ct/homepage-v5.sh | 330 +++++++++++++++++-------------- ct/homer-v5.sh | 330 +++++++++++++++++-------------- ct/hyperion-v5.sh | 334 +++++++++++++++++-------------- ct/influxdb-v5.sh | 330 +++++++++++++++++-------------- ct/iobroker-v5.sh | 330 +++++++++++++++++-------------- ct/jackett-v5.sh | 330 +++++++++++++++++-------------- ct/jellyfin-v5.sh | 342 +++++++++++++++++--------------- ct/k0s-v5.sh | 330 +++++++++++++++++-------------- ct/kavita-v5.sh | 330 +++++++++++++++++-------------- ct/keycloak-v5.sh | 330 +++++++++++++++++-------------- ct/lidarr-v5.sh | 330 +++++++++++++++++-------------- ct/magicmirror-v5.sh | 330 +++++++++++++++++-------------- ct/mariadb-v5.sh | 330 +++++++++++++++++-------------- ct/meshcentral-v5.sh | 330 +++++++++++++++++-------------- ct/motioneye-v5.sh | 330 +++++++++++++++++-------------- ct/mqtt-v5.sh | 329 +++++++++++++++++-------------- ct/n8n-v5.sh | 330 +++++++++++++++++-------------- ct/navidrome-v5.sh | 330 +++++++++++++++++-------------- ct/nextcloudpi-v5.sh | 334 +++++++++++++++++-------------- ct/nginxproxymanager-v5.sh | 330 +++++++++++++++++-------------- ct/nocodb-v5.sh | 330 +++++++++++++++++-------------- ct/node-red-v5.sh | 331 +++++++++++++++++-------------- ct/omada-v5.sh | 341 +++++++++++++++++--------------- ct/omv-v5.sh | 334 +++++++++++++++++-------------- ct/openhab-v5.sh | 330 +++++++++++++++++-------------- ct/paperless-ngx-v5.sh | 331 +++++++++++++++++-------------- ct/photoprism-v5.sh | 330 +++++++++++++++++-------------- ct/pihole-v5.sh | 330 +++++++++++++++++-------------- ct/plex-v5.sh | 342 +++++++++++++++++--------------- ct/podman-homeassistant-v5.sh | 330 +++++++++++++++++-------------- ct/podman-v5.sh | 330 +++++++++++++++++-------------- ct/postgresql-v5.sh | 330 +++++++++++++++++-------------- ct/prometheus-v5.sh | 330 +++++++++++++++++-------------- ct/prowlarr-v5.sh | 330 +++++++++++++++++-------------- ct/qbittorrent-v5.sh | 330 +++++++++++++++++-------------- ct/radarr-v5.sh | 330 +++++++++++++++++-------------- ct/readarr-v5.sh | 330 +++++++++++++++++-------------- ct/rockylinux-v5.sh | 10 +- ct/rstptoweb-v5.sh | 330 +++++++++++++++++-------------- ct/sabnzbd-v5.sh | 330 +++++++++++++++++-------------- ct/scrypted-v5.sh | 330 +++++++++++++++++-------------- ct/shinobi-v5.sh | 342 +++++++++++++++++--------------- ct/sonarr-v5.sh | 330 +++++++++++++++++-------------- ct/syncthing-v5.sh | 330 +++++++++++++++++-------------- ct/tdarr-v5.sh | 330 +++++++++++++++++-------------- ct/technitiumdns-v5.sh | 330 +++++++++++++++++-------------- ct/transmission-v5.sh | 330 +++++++++++++++++-------------- ct/trilium-v5.sh | 330 +++++++++++++++++-------------- ct/ubuntu-v5.sh | 342 +++++++++++++++++--------------- ct/umbrel-v5.sh | 345 +++++++++++++++++--------------- ct/unifi-v5.sh | 330 +++++++++++++++++-------------- ct/uptimekuma-v5.sh | 330 +++++++++++++++++-------------- ct/vaultwarden-v5.sh | 329 +++++++++++++++++-------------- ct/whisparr-v5.sh | 330 +++++++++++++++++-------------- ct/whoogle-v5.sh | 330 +++++++++++++++++-------------- ct/wikijs-v5.sh | 330 +++++++++++++++++-------------- ct/wireguard-v5.sh | 330 +++++++++++++++++-------------- ct/yunohost-v5.sh | 330 +++++++++++++++++-------------- ct/zigbee2mqtt-v5.sh | 331 +++++++++++++++++-------------- ct/zwave-js-ui-v5.sh | 331 +++++++++++++++++-------------- 87 files changed, 15659 insertions(+), 12886 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index b642f680..73a5eb9c 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,186 +123,217 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } function install_script() { diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 349f840f..6357beb8 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -29,7 +29,7 @@ var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,183 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="alpine" PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 37f11493..644f43da 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -28,7 +28,7 @@ var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,183 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="alpine" PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 69b82639..26385a0a 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -28,7 +28,7 @@ var_version="base" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="archlinux" PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index a9790f62..ca4e5c9b 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 36f1d9b2..b0ad08cc 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index cbbb49ff..64b905d2 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index ee8ab94a..074c4065 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -124,209 +124,226 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" +else + FUSE="no" +fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi -} -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi +fi } + function update_script() { header_info msg_info "Updating ${APP} LXC" diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 7283f909..64899ce7 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 06918b55..c3c5069e 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index aa53ad77..bb50f147 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 6a8c85b2..0b63ea64 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 54cc5976..b0c885f4 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 86fda9a6..cdeb7a75 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -28,7 +28,7 @@ var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index 11d82a66..7d95aa64 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 2b124e54..ac845530 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -28,7 +28,7 @@ var_version="4.0" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password" 8 58 $NSAPP --title "ROOT PASSWORD" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="$NSAPP" PW="-password $NSAPP" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index e0f39952..677398a0 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -124,194 +124,226 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" +else + FUSE="no" +fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -327,6 +359,7 @@ header_info advanced_settings fi } + function update_script() { header_info msg_info "Updating ${APP} LXC" diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index ec6c54f5..d138f812 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -28,7 +28,7 @@ var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,195 +123,229 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ +if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit-script +fi +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -327,6 +361,7 @@ header_info advanced_settings fi } + function update_script() { header_info LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 22f05ffc..45bbd9fa 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index e75e9f07..5cb1c4f2 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -318,6 +350,7 @@ header_info advanced_settings fi } + function update_script() { header_info msg_info "Stopping ESPHome" diff --git a/ct/go2rtc-v5.sh b/ct/go2rtc-v5.sh index 11af6313..cf95a685 100644 --- a/ct/go2rtc-v5.sh +++ b/ct/go2rtc-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index ccddc65d..2984483f 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 02944358..ca85cf3f 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index b09170c6..8853bb2b 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 81ac9bb9..988b31df 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -125,186 +125,216 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } function install_script() { diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index da4c31ed..391f8080 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -125,194 +125,225 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" +else + FUSE="no" +fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -328,6 +359,7 @@ header_info advanced_settings fi } + function update_script() { UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update ALL Containers" ON \ diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index e77dbc51..955813c7 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 32bc3745..cc799cb4 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index bca46fb8..c99f3a70 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index f57f81b0..13e1168c 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index 7306046c..3f1e42ed 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 77e5a5e8..7e74a9f4 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/jackett-v5.sh b/ct/jackett-v5.sh index 485c97cf..72a6a925 100644 --- a/ct/jackett-v5.sh +++ b/ct/jackett-v5.sh @@ -27,7 +27,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -121,187 +121,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index d124f71a..b043cf38 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -29,7 +29,7 @@ var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -86,7 +86,6 @@ fi function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -125,195 +124,229 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ +if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit-script +fi +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -329,6 +362,7 @@ header_info advanced_settings fi } + function update_script() { header_info msg_info "Updating ${APP} LXC" diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 510c5aba..cdf959f6 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index d2a0aee0..32c7b540 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index 65043f38..7c2d8149 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index c5973a74..2fa8eab1 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 8da28b49..87f20b9a 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index ca18035a..2bee684d 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index be017202..0899b146 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 907f9182..245f2439 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index e16e0acd..46cfed5f 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -27,7 +27,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -121,186 +121,217 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } function install_script() { diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 046c20c7..13184630 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 99606d17..c5d4eeb2 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 4087e191..79ad1cff 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index e2a6f421..1d22c093 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 7f5cc1b4..50b929cb 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index 6fae8624..e0a5fbf4 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -318,6 +350,7 @@ header_info advanced_settings fi } + function update_script() { UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index e3b04bc1..c9b9defc 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -28,7 +28,7 @@ var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,195 +123,230 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ +if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit-script +fi + +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 542c9fa3..692f323b 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index 23f0c177..45150c44 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 4ffeb59a..88b62649 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -319,6 +351,7 @@ header_info advanced_settings fi } + function update_script() { RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') SER=/etc/systemd/system/paperless-task-queue.service diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index d182a728..f128744e 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 486e2d28..f4e541af 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 62243b55..a1d4b466 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -28,7 +28,7 @@ var_version="20.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -85,7 +85,6 @@ fi function default_settings() { echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" CT_TYPE="0" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -124,195 +123,229 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ +if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit-script +fi +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -328,6 +361,7 @@ header_info advanced_settings fi } + function update_script() { UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ "1" "Update LXC" ON \ diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index 9553f229..daba5aec 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -32,7 +32,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -126,187 +126,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index a388ea5f..582e0831 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index d8072ccf..47a66cf8 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index d0977b6c..34856e1a 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index e73b7249..758bf5a3 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/qbittorrent-v5.sh b/ct/qbittorrent-v5.sh index 5eb36c37..b52a8f49 100644 --- a/ct/qbittorrent-v5.sh +++ b/ct/qbittorrent-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index cf7cf23f..e9eb9667 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 4b32964c..4d555119 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 96f1f30e..e13fcb60 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -29,7 +29,7 @@ var_version="9" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,6 +123,13 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ @@ -304,6 +311,7 @@ function advanced_settings() { advanced_settings fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/rstptoweb-v5.sh b/ct/rstptoweb-v5.sh index e0bebee4..803d52c9 100644 --- a/ct/rstptoweb-v5.sh +++ b/ct/rstptoweb-v5.sh @@ -27,7 +27,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -121,187 +121,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index a3f9457d..a0f77356 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index 1021fd8c..25867b90 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index f2411855..c2c2a019 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -28,7 +28,7 @@ var_version="22.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,195 +123,230 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ +if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" OFF \ "22.04" "Jammy" ON \ "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit-script +fi + +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -327,6 +362,7 @@ header_info advanced_settings fi } + function update_script() { header_info msg_info "Updating Shinobi LXC" diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index f7f6d4b3..6018fcc2 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 780653b1..0f88a88d 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index d15c5de0..4a879ece 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 6927ee63..44b424f3 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index a7aad0ce..5fb1e37d 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 688a2a60..3c447d88 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 3a07a06b..79bcc700 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -28,7 +28,7 @@ var_version="22.04" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,195 +123,230 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 11 58 4 \ +if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ "18.04" "Bionic" OFF \ "20.04" "Focal" OFF \ "22.04" "Jammy" ON \ "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}"; fi - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" +else + exit-script +fi + +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -327,6 +362,7 @@ header_info advanced_settings fi } + function update_script() { header_info msg_info "Updating ${APP} LXC" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 6adff888..ee339e2b 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -124,194 +124,226 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}" - FUSE="yes" - else - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" +else + FUSE="no" +fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -327,6 +359,7 @@ header_info advanced_settings fi } + function update_script() { header_info msg_info "Updating ${APP} LXC" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 2b299529..571c30fb 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index ad5cc724..09623497 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 055e893d..bda9fadf 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,218 @@ function default_settings() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 1f51216c..21b45677 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index 93fc469b..ec26eadb 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 685f8783..3848eb4c 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index cc16fabd..8fce1701 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index 52629130..6d324d78 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD (leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 53543482..f16cc025 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -29,7 +29,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -123,187 +123,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -319,6 +351,7 @@ header_info advanced_settings fi } + function update_script() { header_info cd /opt/zigbee2mqtt diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 510cb5fc..c4f360a6 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -28,7 +28,7 @@ var_version="11" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+$' +INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -122,187 +122,219 @@ function default_settings() { VERB="no" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" ON \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then - PW1="Automatic Login" PW=" " - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW1="Automatic Login" + PW=" " else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE1="Default" + GATE="" else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + GATE=",gw=$GATE1" fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU1="Default" + MTU="" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + MTU=",mtu=$MTU1" fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SX=Host + SD="" else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + SX=$SD + SD="-searchdomain=$SD" fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + NS="-nameserver=$NX" fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC1="Default" + MAC="" else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + VLAN=",tag=$VLAN1" fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else +else clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings - fi +fi } + function install_script() { ARCH_CHECK PVE_CHECK @@ -318,6 +350,7 @@ header_info advanced_settings fi } + function update_script() { header_info RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From ba7a7c172069ee2926f3d2756d8880599b2ab3a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Mar 2023 09:27:46 -0500 Subject: [PATCH 1193/3335] Update alpine-vaultwarden-v5-install.sh revert 12d5a78 Alpine doesn't like parameter expansion `${prompt,,}` fixes https://github.com/tteck/Proxmox/issues/1144 --- install/alpine-vaultwarden-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 187fb8c1..6c1a5d80 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -74,7 +74,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" From c47326ff2544b6a507f670b70b32ecbbb71204d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Mar 2023 09:50:48 -0500 Subject: [PATCH 1194/3335] Update alpine-vaultwarden-v5-install.sh match input if it's "y" or "yes" (case-insensitive) change `=~` operator in favor of `grep -Ei` in Alpine Linux --- install/alpine-vaultwarden-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 6c1a5d80..92e668b4 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -74,7 +74,7 @@ trap - ERR if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" From dc4e460b3cd094b43c93307f13814745396d04b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Mar 2023 19:36:10 -0500 Subject: [PATCH 1195/3335] Update update-lxcs.sh use the command line to exclude multiple containers simultaneously --- misc/update-lxcs.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index b423b508..b1a6827a 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -34,8 +34,7 @@ while true; do esac done clear -exclude_container="$@" -containers=$(pct list | tail -n +2 | cut -f1 -d' ' | grep -vE "^($exclude_container)$") +excluded_containers=("$@") function update_container() { container=$1 header_info @@ -50,10 +49,22 @@ function update_container() { esac } header_info -for container in $containers; do - status=$(pct status $container) - template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") - if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then +for container in $(pct list | tail -n +2 | cut -f1 -d' '); do + excluded=false + for excluded_container in "${excluded_containers[@]}"; do + if [ "$container" == "$excluded_container" ]; then + excluded=true + break + fi + done + if [ "$excluded" == true ]; then + header_info + echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}" + sleep 1 + else + status=$(pct status $container) + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" pct start $container echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" @@ -63,6 +74,7 @@ for container in $containers; do pct shutdown $container & elif [ "$status" == "status: running" ]; then update_container $container + fi fi done wait From c18d373ff75c2af44201112ea4089c87e98c577b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Mar 2023 19:41:37 -0500 Subject: [PATCH 1196/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2b5c2a03..b932261a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,12 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-10 + +### Changed + +- **Proxmox LXC Updater** + - You can use the command line to exclude multiple containers simultaneously. ## 2023-03-08 From 41109f0a8d331856c84d69786e9e16a141a125d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 04:07:19 -0500 Subject: [PATCH 1197/3335] Update cronicle-v5.sh add export variable fixes https://github.com/tteck/Proxmox/issues/1148 --- ct/cronicle-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index c3c5069e..890b08cc 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -432,6 +432,7 @@ else fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +export tz=$timezone export SERV=$SERVER export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP From 43f92cee142d18ce85840d5ade78c68b67e5fa08 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 06:22:43 -0500 Subject: [PATCH 1198/3335] Update alpine-vaultwarden-v5-install.sh --- install/alpine-vaultwarden-v5-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 92e668b4..5ab2786b 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -66,6 +66,11 @@ if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | c echo -e " 🖧 Check Network Settings" exit 1 fi +cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community +https://dl-cdn.alpinelinux.org/alpine/edge/testing +EOF msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" @@ -102,7 +107,7 @@ $STD apk add mc msg_ok "Installed Dependencies" msg_info "Installing Vaultwarden" -$STD apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing vaultwarden +$STD apk add --no-cache vaultwarden cat </etc/conf.d/vaultwarden export DATA_FOLDER=/var/lib/vaultwarden export WEB_VAULT_ENABLED=true From 119b1c07911db0eab7ca01709a4d0467c6f377c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 06:32:34 -0500 Subject: [PATCH 1199/3335] Update alpine-vaultwarden-v5-install.sh --- install/alpine-vaultwarden-v5-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 5ab2786b..492ea700 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -110,6 +110,7 @@ msg_info "Installing Vaultwarden" $STD apk add --no-cache vaultwarden cat </etc/conf.d/vaultwarden export DATA_FOLDER=/var/lib/vaultwarden +export WEB_VAULT_FOLDER=/var/lib/vaultwarden/web-vault export WEB_VAULT_ENABLED=true export ADMIN_TOKEN=$(openssl rand -base64 48) export ROCKET_ADDRESS=0.0.0.0 @@ -117,6 +118,15 @@ EOF $STD rc-service vaultwarden start $STD rc-update add vaultwarden default msg_ok "Installed Vaultwarden" + +msg_info "Downloading Web-Vault" +WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') +$STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz +$STD tar -xzf bw_web_$WEBVAULT.tar.gz -C /var/lib/vaultwarden/ +msg_ok "Downloaded Web-Vault" + echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd if [[ "${SSH_ROOT}" == "yes" ]]; then $STD rc-update add sshd From 1a1cd2d0f9439338d405fdb03a32ad07dcd2f0e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 09:42:23 -0500 Subject: [PATCH 1200/3335] Update alpine-vaultwarden-v5-install.sh switch to edge repos --- install/alpine-vaultwarden-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 492ea700..83deed2d 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -67,8 +67,8 @@ if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | c exit 1 fi cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community +https://dl-cdn.alpinelinux.org/alpine/edge/main +https://dl-cdn.alpinelinux.org/alpine/edge/community https://dl-cdn.alpinelinux.org/alpine/edge/testing EOF msg_ok "Set up Container OS" From e1f4f4b436667e218ee18ec484d866a3da74eb8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 09:50:42 -0500 Subject: [PATCH 1201/3335] Update alpine-vaultwarden-v5-install.sh --- install/alpine-vaultwarden-v5-install.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 83deed2d..5d28238a 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -93,7 +93,7 @@ set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" -$STD apk update +$STD apk update -a $STD apk upgrade msg_ok "Updated Container OS" @@ -119,14 +119,6 @@ $STD rc-service vaultwarden start $STD rc-update add vaultwarden default msg_ok "Installed Vaultwarden" -msg_info "Downloading Web-Vault" -WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') -$STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz -$STD tar -xzf bw_web_$WEBVAULT.tar.gz -C /var/lib/vaultwarden/ -msg_ok "Downloaded Web-Vault" - echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd if [[ "${SSH_ROOT}" == "yes" ]]; then $STD rc-update add sshd From f58bde28c83ea957de1f8f38886eb86409972a99 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 09:55:16 -0500 Subject: [PATCH 1202/3335] Update alpine-vaultwarden-v5-install.sh --- install/alpine-vaultwarden-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index 5d28238a..a2b42c45 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -93,7 +93,7 @@ set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR msg_info "Updating Container OS" -$STD apk update -a +$STD apk update $STD apk upgrade msg_ok "Updated Container OS" From 9bfbb57f110654decfb56ad187ed4bcd1e630516 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 10:09:26 -0500 Subject: [PATCH 1203/3335] Update alpine-vaultwarden-v5.sh change update --- ct/alpine-vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 644f43da..74548ddc 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -369,7 +369,7 @@ while [ "$opt" != "" ]; do clear echo -e "${fgred}Update Vaultwarden${normal}" apk update &>/dev/null - apk upgrade --update-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing vaultwarden + apk upgrade &>/dev/null break ;; From e6db5a353b349a203a5b61e3a6caa38ed6d39d13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 12:47:11 -0500 Subject: [PATCH 1204/3335] Update postgresql-v5-install.sh ensure that the PostgreSQL database server uses UTF-8 encoding and collation --- install/postgresql-v5-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/postgresql-v5-install.sh b/install/postgresql-v5-install.sh index 6c589a4f..7a003eb5 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-v5-install.sh @@ -47,6 +47,9 @@ function msg_error() { msg_info "Setting up Container OS " sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale-gen >/dev/null +LANG=$(grep -v '^#' /etc/locale.gen | grep -o '^[^ ]*') +update-locale LANG=$LANG +echo "export LANG=$LANG" >> ~/.bashrc echo $tz > /etc/timezone ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i=RETRY_NUM; i>0; i--)); do From d0311a3f1bef1ce5704adf65b4bf936798f0af22 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Mar 2023 13:44:53 -0500 Subject: [PATCH 1205/3335] Update casaos-v5.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add function install_script 🤷🏻‍♂️ --- ct/casaos-v5.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 074c4065..7c00c6b3 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -344,6 +344,22 @@ else fi } +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + function update_script() { header_info msg_info "Updating ${APP} LXC" From ea7d5ae5140f54d8a28bc50ca2c77d7a12f3d7c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Mar 2023 03:42:02 -0400 Subject: [PATCH 1206/3335] Update vaultwarden-v5.sh recommend 4vCPU & 4096MiB RAM minimum for update --- ct/vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index bda9fadf..88de3398 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -367,7 +367,7 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb header_info if [ "$UPD" == "1" ]; then -echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" +echo -e "\n ⚠️ Ensure you set 4vCPU & 4096MiB RAM minimum!!! \n" msg_info "Stopping Vaultwarden" systemctl stop vaultwarden.service msg_ok "Stopped Vaultwarden" From aee311706eb7475818c7535c82870228d37afe48 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Mar 2023 08:01:43 -0400 Subject: [PATCH 1207/3335] Update clean-lxcs.sh skip non Debian/Ubuntu containers --- misc/clean-lxcs.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 0456383d..0273c2e3 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -function header_info { +function header_info() { clear cat <<"EOF" ________ __ _ ________ @@ -44,6 +44,13 @@ function clean_container() { } for container in $containers; do + os=$(pct config "$container" | awk '/^ostype/ {print $2}') + if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ]; then + header_info + echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL} \n" + sleep 1 + continue + fi status=$(pct status $container) template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then From f8c38b8177002b059d36c2dd826d514627b92232 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Mar 2023 09:45:06 -0400 Subject: [PATCH 1208/3335] Add AppDaemon install to HA Core script (#1167) (#1168) Co-authored-by: Sergio Rius --- ct/homeassistant-core-v5.sh | 75 ++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index 988b31df..cbb5aea1 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -356,10 +356,11 @@ header_info function update_script() { PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update Core" ON \ "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ + "4" "Install/Update AppDaemon" OFF \ 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then @@ -431,6 +432,78 @@ echo -e "FileBrowser should be reachable by going to the following URL. ${BL}http://$IP:8080${CL} admin|changeme\n" exit fi +if [ "$UPD" == "4" ]; then + clear + header_info + if [[ ! -d /srv/appdaemon ]]; then + msg_info "Installing AppDaemon" + mkdir /srv/appdaemon + cd /srv/appdaemon + python3 -m venv . + source bin/activate + pip install appdaemon &>/dev/null + mkdir -p /root/.homeassistant/appdaemon/apps + cat > /root/.homeassistant/appdaemon/appdaemon.yaml << EOF +# Sample appdaemon.yml file +# For configuration, please visit: https://appdaemon.readthedocs.io/en/latest/CONFIGURE.html +appdaemon: + time_zone: CET + latitude: 51.725 + longitude: 14.3434 + elevation: 0 + plugins: + HASS: + type: hass + ha_url: + token: +http: + url: http://127.0.0.1:5050 +admin: +api: +EOF + msg_ok "Installed AppDaemon" + + msg_info "Creating Service" + cat > /etc/systemd/system/appdaemon.service << EOF +[Unit] +Description=AppDaemon +After=homeassistant.service +Requires=homeassistant.service +[Service] +Type=simple +WorkingDirectory=/root/.homeassistant/appdaemon +ExecStart=/srv/appdaemon/bin/appdaemon -c "/root/.homeassistant/appdaemon" +RestartForceExitStatus=100 +[Install] +WantedBy=multi-user.target +EOF + systemctl enable --now appdaemon &>/dev/null + msg_ok "Created Service" + + msg_ok "Completed Successfully!\n" + echo -e "AppDaemon should be reachable by going to the following URL. + ${BL}http://$IP:5050${CL}\n" + exit + else + msg_info "Upgrading AppDaemon" + msg_info "Stopping AppDaemon" + systemctl stop appdaemon + msg_ok "Stopped AppDaemon" + + msg_info "Updating AppDaemon" + source /srv/appdaemon/bin/activate + pip install --upgrade appdaemon &>/dev/null + msg_ok "Updated AppDaemon" + + msg_info "Starting AppDaemon" + systemctl start appdaemon + sleep 2 + msg_ok "Started AppDaemon" + msg_ok "Update Successful" + echo -e "\n Go to http://${IP}:5050 \n" + exit + fi +fi } if command -v pveversion >/dev/null 2>&1; then From 0f607b725f8f8e03605fdadafa163d7619f5c4e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Mar 2023 15:39:25 -0400 Subject: [PATCH 1209/3335] Alpine-Grafana (#1171) * Created Alpine LXC (#1170) * Update alpine-grafana-v5-install.sh add base dependencies * Update alpine-grafana-v5.sh remove space --------- Co-authored-by: nicedevil007 --- ct/alpine-grafana-v5.sh | 421 +++++++++++++++++++++++++++ install/alpine-grafana-v5-install.sh | 118 ++++++++ 2 files changed, 539 insertions(+) create mode 100644 ct/alpine-grafana-v5.sh create mode 100644 install/alpine-grafana-v5-install.sh diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh new file mode 100644 index 00000000..fcdca216 --- /dev/null +++ b/ct/alpine-grafana-v5.sh @@ -0,0 +1,421 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ ____ + / ____/________ _/ __/___ _____v5____ _ + / / __/ ___/ __ / /_/ __ / __ \/ __ / +/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / +\____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Grafana" +var_disk="0.5" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +timezone=$(cat /etc/timezone) +INTEGER='^[0-9]+([.][0-9]+)?$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + PW="-password alpine" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function advanced_settings() { +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} + +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { +header_info +msg_info "Updating ${APP} LXC" +apk update &>/dev/null +apk upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export tz=$timezone +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/install/alpine-grafana-v5-install.sh b/install/alpine-grafana-v5-install.sh new file mode 100644 index 00000000..0b697f30 --- /dev/null +++ b/install/alpine-grafana-v5-install.sh @@ -0,0 +1,118 @@ +#!/bin/sh + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then +$STD sysctl net.ipv6.conf.all.disable_ipv6=1 +$STD sysctl net.ipv6.conf.default.disable_ipv6=1 +echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +$STD sysctl -p /etc/sysctl.d/99-sysctl.conf +fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +i=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i-1)) +done + +if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community +EOF +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" + +set +e +trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi + +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apk update +$STD apk upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apk add bash +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing Grafana" +$STD apk add --no-cache grafana +$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana +$STD rc-service grafana start +$STD rc-update add grafana default +msg_ok "Installed Grafana" + +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + $STD /etc/init.d/sshd start +fi From d1438e1e5ed768635e9098347330598c80a80650 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Mar 2023 15:52:56 -0400 Subject: [PATCH 1210/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b932261a..ff0bf564 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-15 + +### Changed + +- **Alpine-Grafana LXC** (Thanks @nicedevil007) + - NEW Script + ## 2023-03-10 ### Changed From 51def5ec4cf420f356cda77d6b1407eb9c9b2b27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Mar 2023 20:25:07 -0400 Subject: [PATCH 1211/3335] Update post-pve-install.sh (#1175) (#1176) Use a more specific regular expression to locate the line to modify. Co-authored-by: Alex Leigh --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 8404bc56..2e03f852 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -109,7 +109,7 @@ fi read -r -p "Disable Subscription Nag? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Disabling Subscription Nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag (Delete browser cache)" fi From 7458878882eda234a0a8df8183a52b871b0b4578 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Mar 2023 21:13:28 -0400 Subject: [PATCH 1212/3335] Update nginxproxymanager-v5.sh pause update until new version is confirmed working --- ct/nginxproxymanager-v5.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 1d22c093..a9ee5f89 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -357,7 +357,8 @@ header_info RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - +echo -e "Please wait until new version ${RELEASE} is confirmed working" +exit msg_info "Stopping Services" systemctl stop openresty systemctl stop npm From 2d47b876b24acbc3bdfb02543ea0f8bd46e1cf76 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Mar 2023 21:31:40 -0400 Subject: [PATCH 1213/3335] Update nginxproxymanager-v5-install.sh hold v2.9.19 --- install/nginxproxymanager-v5-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 830c02fa..12bd374a 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -139,10 +139,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v${RELEASE}" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz -cd ./nginx-proxy-manager-${RELEASE} -msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" +msg_info "Downloading Nginx Proxy Manager v2.9.19" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.19 -O - | tar -xz +cd ./nginx-proxy-manager-2.9.19 +msg_ok "Downloaded Nginx Proxy Manager v2.9.19" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python From 78831d5bdea95523a264e368507d09f230ec5798 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Mar 2023 08:26:26 -0400 Subject: [PATCH 1214/3335] Update nginxproxymanager-v5.sh fix update --- ct/nginxproxymanager-v5.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index a9ee5f89..1befe0d3 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -356,9 +356,7 @@ function update_script() { header_info RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') -echo -e "Please wait until new version ${RELEASE} is confirmed working" -exit + awk '{print substr($2, 3, length($2)-4) }') msg_info "Stopping Services" systemctl stop openresty systemctl stop npm @@ -454,6 +452,7 @@ EOF fi cd /app export NODE_ENV=development +sed -i 's/"liquidjs": "\^12\.9\.20",/"liquidjs": "\^10.6.1",/g' package.json yarn install --network-timeout=30000 &>/dev/null msg_ok "Initialized Backend" From e943987ea2a0af8b7e062106f5d6d21f26fdb3ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Mar 2023 08:29:45 -0400 Subject: [PATCH 1215/3335] Update nginxproxymanager-v5-install.sh fix install --- install/nginxproxymanager-v5-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 12bd374a..359271c0 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -139,10 +139,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v2.9.19" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.19 -O - | tar -xz -cd ./nginx-proxy-manager-2.9.19 -msg_ok "Downloaded Nginx Proxy Manager v2.9.19" +msg_info "Downloading Nginx Proxy Manager v$RELEASE" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v$RELEASE -O - | tar -xz +cd ./nginx-proxy-manager-$RELEASE +msg_ok "Downloaded Nginx Proxy Manager v$RELEASE" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python @@ -227,6 +227,7 @@ EOF fi cd /app export NODE_ENV=development +sed -i 's/"liquidjs": "\^12\.9\.20",/"liquidjs": "\^10.6.1",/g' package.json $STD yarn install --network-timeout=30000 msg_ok "Initialized Backend" From 5e217698524145dda9bd35096c405118dd88a737 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 09:05:08 -0400 Subject: [PATCH 1216/3335] AdGuardHome-Alpine LXC (#1181) (#1185) * Alpine AdGuardHome LXC Co-authored-by: nicedevil007 --- ct/alpine-adguard-v5.sh | 486 +++++++++++++++++++++++++++ install/alpine-adguard-v5-install.sh | 123 +++++++ 2 files changed, 609 insertions(+) create mode 100644 ct/alpine-adguard-v5.sh create mode 100644 install/alpine-adguard-v5-install.sh diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh new file mode 100644 index 00000000..a2fb5ad0 --- /dev/null +++ b/ct/alpine-adguard-v5.sh @@ -0,0 +1,486 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ __ + / | ____/ /___ ___v5______ __________/ / + / /| |/ __ / __ / / / / __ / ___/ __ / + / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / +/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-AdGuard" +var_disk="0.3" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +timezone=$(cat /etc/timezone) +INTEGER='^[0-9]+([.][0-9]+)?$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + PW="-password alpine" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function advanced_settings() { +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} + +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { + header_info + normal=$(echo "\033[m") + menu=$(echo "\033[36m") + number=$(echo "\033[33m") + fgred=$(echo "\033[31m") + printf "\n${menu}*********************************************${normal}\n" + printf "${menu}**${number} 1)${normal} Update LXC OS \n" + printf "${menu}**${number} 2)${normal} Update AdGuardHome\n" + printf "${menu}*********************************************${normal}\n" + printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." + read opt + +while [ "$opt" != "" ]; do + case $opt in + 1) + clear + echo -e "${fgred}Update LXC OS${normal}" + msg_info "Updating LXC OS" + apk update &>/dev/null + apk upgrade &>/dev/null + msg_ok "Update Successfull" + + break + ;; + 2) + clear + echo -e "${fgred}Update AdGuardHome${normal}" + msg_info "Stopping AdguardHome" + /opt/AdGuardHome/AdGuardHome -s stop &>/dev/null + msg_ok "Stopped AdguardHome" + + VER=$(curl -sqI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); + msg_info "Updating AdguardHome to $VER" + wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" + tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null + mkdir -p adguard-backup + cp -rf /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ + cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome + cp -r adguard-backup/* /opt/AdGuardHome/ + msg_ok "Updated AdguardHome" + + msg_info "Starting AdguardHome" + /opt/AdGuardHome/AdGuardHome -s start &>/dev/null + msg_ok "Started AdguardHome" + + msg_info "Cleaning Up" + rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup + msg_ok "Cleaned" + msg_ok "Update Successfull" + + break + ;; + x) + clear + echo -e "⚠ User exited script \n" + exit + ;; + \n) + clear + echo -e "⚠ User exited script \n" + exit + ;; + *) + clear + echo -e "Please choose an option from the menu" + update_script + ;; + esac +done + + +exit +} + +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /opt/AdGuardHome ]]; then + msg_error "No ${APP} Installation Found!" +fi + +if ! command -v pveversion >/dev/null 2>&1; then + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export tz=$timezone +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/install/alpine-adguard-v5-install.sh b/install/alpine-adguard-v5-install.sh new file mode 100644 index 00000000..0e858b7c --- /dev/null +++ b/install/alpine-adguard-v5-install.sh @@ -0,0 +1,123 @@ +#!/bin/sh + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then +$STD sysctl net.ipv6.conf.all.disable_ipv6=1 +$STD sysctl net.ipv6.conf.default.disable_ipv6=1 +echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +$STD sysctl -p /etc/sysctl.d/99-sysctl.conf +fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +i=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i-1)) +done + +if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community +EOF +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" + +set +e +trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi + +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apk update +$STD apk upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apk add wget +$STD apk add bash +$STD apk add curl +$STD apk add nano +$STD apk add mc +$STD apk add openssh +msg_ok "Installed Dependencies" + +msg_info "Installing AdguardHome" +VER=$(curl --silent -qI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); +$STD wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" +$STD tar -xvf AdGuardHome_linux_amd64.tar.gz >/dev/null 2>&1 +$STD mv AdGuardHome /opt +$STD rm AdGuardHome_linux_amd64.tar.gz +$STD chmod +x /opt/AdGuardHome/AdGuardHome +$STD /opt/AdGuardHome/AdGuardHome -s install +$STD /opt/AdGuardHome/AdGuardHome -s start +$STD msg_ok "Installed AdguardHome" + +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + $STD /etc/init.d/sshd start +fi From ac97609e1b7d03c2ab9a5839e31fbaa9f5fbd5af Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 09:27:00 -0400 Subject: [PATCH 1217/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ff0bf564..cfafe62d 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-18 + +### Changed + +- **Alpine-AdGuard Home LXC** (Thanks @nicedevil007) + - NEW Script + ## 2023-03-15 ### Changed From c71eb79e792fd40910eb70415cfed0f858731180 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 12:10:03 -0400 Subject: [PATCH 1218/3335] Update nginxproxymanager-v5.sh issue fixed in v2.9.21 --- ct/nginxproxymanager-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 1befe0d3..a12eb9dd 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -452,7 +452,6 @@ EOF fi cd /app export NODE_ENV=development -sed -i 's/"liquidjs": "\^12\.9\.20",/"liquidjs": "\^10.6.1",/g' package.json yarn install --network-timeout=30000 &>/dev/null msg_ok "Initialized Backend" From 1508ca2443bc0214e46da1fe261d212af1c11740 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 12:11:54 -0400 Subject: [PATCH 1219/3335] Update nginxproxymanager-v5-install.sh fixed issue in v2.9.21 --- install/nginxproxymanager-v5-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index 359271c0..d66e0adf 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -227,7 +227,6 @@ EOF fi cd /app export NODE_ENV=development -sed -i 's/"liquidjs": "\^12\.9\.20",/"liquidjs": "\^10.6.1",/g' package.json $STD yarn install --network-timeout=30000 msg_ok "Initialized Backend" From aea844765e295e73bf0e0f5f9bc0fc4c26481e7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:33:00 -0400 Subject: [PATCH 1220/3335] Create alpine-zigbee2mqtt-v5-install.sh --- install/alpine-zigbee2mqtt-v5-install.sh | 117 +++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 install/alpine-zigbee2mqtt-v5-install.sh diff --git a/install/alpine-zigbee2mqtt-v5-install.sh b/install/alpine-zigbee2mqtt-v5-install.sh new file mode 100644 index 00000000..3616d418 --- /dev/null +++ b/install/alpine-zigbee2mqtt-v5-install.sh @@ -0,0 +1,117 @@ +#!/bin/sh + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then +$STD sysctl net.ipv6.conf.all.disable_ipv6=1 +$STD sysctl net.ipv6.conf.default.disable_ipv6=1 +echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +$STD sysctl -p /etc/sysctl.d/99-sysctl.conf +fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +i=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i-1)) +done + +if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/edge/main +https://dl-cdn.alpinelinux.org/alpine/edge/community +https://dl-cdn.alpinelinux.org/alpine/edge/testing +EOF +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" + +set +e +trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi + +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apk update +$STD apk upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apk add bash +$STD apk add curl +$STD apk add openssl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing $APPLICATION" +$STD apk add zigbee2mqtt +msg_ok "Installed $APPLICATION" + +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + $STD /etc/init.d/sshd start +fi From ddd76642433f05aee116535aa705dec43ab4b587 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:36:28 -0400 Subject: [PATCH 1221/3335] Create alpine-zigbee2mqtt-v5.sh --- ct/alpine-zigbee2mqtt-v5.sh | 461 ++++++++++++++++++++++++++++++++++++ 1 file changed, 461 insertions(+) create mode 100644 ct/alpine-zigbee2mqtt-v5.sh diff --git a/ct/alpine-zigbee2mqtt-v5.sh b/ct/alpine-zigbee2mqtt-v5.sh new file mode 100644 index 00000000..20c39476 --- /dev/null +++ b/ct/alpine-zigbee2mqtt-v5.sh @@ -0,0 +1,461 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ _ __ ___ __ _______ ____________ +/__ / (_)___ _/ /_ ___v5___ |__ \ / |/ / __ \/_ __/_ __/ + / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / + / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / +/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ + /____/ Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Zigbee2MQTT" +var_disk="0.3" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +timezone=$(cat /etc/timezone) +INTEGER='^[0-9]+([.][0-9]+)?$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" + CT_TYPE="0" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + PW="-password alpine" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function advanced_settings() { +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" ON \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} + +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { + normal=$(echo "\033[m") + menu=$(echo "\033[36m") + number=$(echo "\033[33m") + fgred=$(echo "\033[31m") + printf "\n${menu}*********************************************${normal}\n" + printf "${menu}**${number} 1)${normal} Update ${APP} \n" + printf "\n${menu}*********************************************${normal}\n" + printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." + read opt + +while [ "$opt" != "" ]; do + case $opt in + 1) + clear + echo -e "${fgred}Update ${APP}${normal}" + apk update &>/dev/null + apk upgrade &>/dev/null + + break + ;; + x) + exit + ;; + \n) + exit + ;; + *) + clear + echo -e "Please choose an option from the menu" + update_script + ;; + esac +done +exit +} +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then + msg_error "No ${APP} Installation Found!" +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/zigbee2mqtt/configuration.yaml ]]; then + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export tz=$timezone +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From 3d15e5b026287c3644d8ce047aff7398e95671a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:40:44 -0400 Subject: [PATCH 1222/3335] Update alpine-vaultwarden-v5-install.sh Tweak --- install/alpine-vaultwarden-v5-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh index a2b42c45..02edeb1a 100644 --- a/install/alpine-vaultwarden-v5-install.sh +++ b/install/alpine-vaultwarden-v5-install.sh @@ -106,8 +106,8 @@ $STD apk add nano $STD apk add mc msg_ok "Installed Dependencies" -msg_info "Installing Vaultwarden" -$STD apk add --no-cache vaultwarden +msg_info "Installing $APPLICATION" +$STD apk add vaultwarden cat </etc/conf.d/vaultwarden export DATA_FOLDER=/var/lib/vaultwarden export WEB_VAULT_FOLDER=/var/lib/vaultwarden/web-vault @@ -117,7 +117,7 @@ export ROCKET_ADDRESS=0.0.0.0 EOF $STD rc-service vaultwarden start $STD rc-update add vaultwarden default -msg_ok "Installed Vaultwarden" +msg_ok "Installed $APPLICATION" echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd if [[ "${SSH_ROOT}" == "yes" ]]; then From fc5521f2f96ab966279adf5879d3e8c4dd1e9646 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:43:10 -0400 Subject: [PATCH 1223/3335] Update alpine-adguard-v5-install.sh Tweak --- install/alpine-adguard-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-adguard-v5-install.sh b/install/alpine-adguard-v5-install.sh index 0e858b7c..a5c73b3f 100644 --- a/install/alpine-adguard-v5-install.sh +++ b/install/alpine-adguard-v5-install.sh @@ -105,7 +105,7 @@ $STD apk add mc $STD apk add openssh msg_ok "Installed Dependencies" -msg_info "Installing AdguardHome" +msg_info "Installing $APPLICATION" VER=$(curl --silent -qI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); $STD wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" $STD tar -xvf AdGuardHome_linux_amd64.tar.gz >/dev/null 2>&1 @@ -114,7 +114,7 @@ $STD rm AdGuardHome_linux_amd64.tar.gz $STD chmod +x /opt/AdGuardHome/AdGuardHome $STD /opt/AdGuardHome/AdGuardHome -s install $STD /opt/AdGuardHome/AdGuardHome -s start -$STD msg_ok "Installed AdguardHome" +$STD msg_ok "Installed $APPLICATION" echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd if [[ "${SSH_ROOT}" == "yes" ]]; then From 2de9410db96a5f4de390766bbdeb6dd725e2b8c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:44:12 -0400 Subject: [PATCH 1224/3335] Update alpine-grafana-v5-install.sh Tweak --- install/alpine-grafana-v5-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/alpine-grafana-v5-install.sh b/install/alpine-grafana-v5-install.sh index 0b697f30..efd75bef 100644 --- a/install/alpine-grafana-v5-install.sh +++ b/install/alpine-grafana-v5-install.sh @@ -104,12 +104,12 @@ $STD apk add nano $STD apk add mc msg_ok "Installed Dependencies" -msg_info "Installing Grafana" -$STD apk add --no-cache grafana +msg_info "Installing $APPLICATION" +$STD apk add grafana $STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana $STD rc-service grafana start $STD rc-update add grafana default -msg_ok "Installed Grafana" +msg_ok "Installed $APPLICATION" echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd if [[ "${SSH_ROOT}" == "yes" ]]; then From 03c2c620d4fa0701f81b0389f0b12cefb712d32b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:58:26 -0400 Subject: [PATCH 1225/3335] Update alpine-adguard-v5.sh Tweak --- ct/alpine-adguard-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh index a2fb5ad0..a618d254 100644 --- a/ct/alpine-adguard-v5.sh +++ b/ct/alpine-adguard-v5.sh @@ -13,7 +13,7 @@ cat <<"EOF" / /| |/ __ / __ / / / / __ / ___/ __ / / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / /_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ - /____/ + /____/ Alpine EOF } From 269bffed7e4d1567693e042d010e1f6593994d1c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:59:16 -0400 Subject: [PATCH 1226/3335] Update alpine-grafana-v5.sh Tweak --- ct/alpine-grafana-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh index fcdca216..72f76fa1 100644 --- a/ct/alpine-grafana-v5.sh +++ b/ct/alpine-grafana-v5.sh @@ -13,6 +13,7 @@ cat <<"EOF" / / __/ ___/ __ / /_/ __ / __ \/ __ / / /_/ / / / /_/ / __/ /_/ / / / / /_/ / \____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ + Alpine EOF } From 84f00ebfabcbcc99947bf0bd6948019e2654e532 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 16:59:39 -0400 Subject: [PATCH 1227/3335] Update alpine-vaultwarden-v5.sh Tweak --- ct/alpine-vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 74548ddc..7d62d2e9 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -13,7 +13,7 @@ cat <<"EOF" | | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ | |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / |___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ - Alpine 3.17 + Alpine EOF } From 5df97b8a2026a5ec0153d75e052fb5ad5662ebdd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 17:16:35 -0400 Subject: [PATCH 1228/3335] Update alpine-zigbee2mqtt-v5.sh Tweak --- ct/alpine-zigbee2mqtt-v5.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/alpine-zigbee2mqtt-v5.sh b/ct/alpine-zigbee2mqtt-v5.sh index 20c39476..aef1bdfb 100644 --- a/ct/alpine-zigbee2mqtt-v5.sh +++ b/ct/alpine-zigbee2mqtt-v5.sh @@ -457,5 +457,3 @@ pct set $CTID -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" From 3881ae9873138fb12d251f8ed5c2d9447f4c2bd7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 17:43:12 -0400 Subject: [PATCH 1229/3335] Create alpine-docker-v5-install.sh --- install/alpine-docker-v5-install.sh | 150 ++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 install/alpine-docker-v5-install.sh diff --git a/install/alpine-docker-v5-install.sh b/install/alpine-docker-v5-install.sh new file mode 100644 index 00000000..9d036f0c --- /dev/null +++ b/install/alpine-docker-v5-install.sh @@ -0,0 +1,150 @@ +#!/bin/sh + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi +silent() { "$@" > /dev/null 2>&1; } +if [ "$DISABLEIPV6" == "yes" ]; then +$STD sysctl net.ipv6.conf.all.disable_ipv6=1 +$STD sysctl net.ipv6.conf.default.disable_ipv6=1 +echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf +$STD sysctl -p /etc/sysctl.d/99-sysctl.conf +fi +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +BL=$(echo "\033[36m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +RETRY_NUM=10 +RETRY_EVERY=3 +i=$RETRY_NUM +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +BFR="\\r\\033[K" +HOLD="-" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Setting up Container OS " +while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i-1)) +done + +if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 +fi +cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/edge/main +https://dl-cdn.alpinelinux.org/alpine/edge/community +https://dl-cdn.alpinelinux.org/alpine/edge/testing +EOF +msg_ok "Set up Container OS" +msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" + +set +e +trap - ERR +if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi +fi + +RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') +if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +msg_info "Updating Container OS" +$STD apk update +$STD apk upgrade +msg_ok "Updated Container OS" + +msg_info "Installing Dependencies" +$STD apk add bash +$STD apk add curl +$STD apk add openssl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing $APPLICATION" +$STD apk add docker +$STD rc-service docker start +$STD rc-update add docker default +msg_ok "Installed $APPLICATION" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") + +read -r -p "Would you like to add Portainer? " prompt +if echo "$prompt" | grep -Eq "^(y|yes)$"; then + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + docker volume create portainer_data >/dev/null + $STD docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +fi + +read -r -p "Would you like to add Docker Compose? " prompt +if echo "$prompt" | grep -Eq "^(y|yes)$"; then + msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} + mkdir -p $DOCKER_CONFIG/cli-plugins + curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose + msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" +fi + +echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd +if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + $STD /etc/init.d/sshd start +fi From fbdffa0d94beee11b8b1f8dd58cc12fabd155dd3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 17:44:27 -0400 Subject: [PATCH 1230/3335] Create alpine-docker-v5.sh --- ct/alpine-docker-v5.sh | 464 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 464 insertions(+) create mode 100644 ct/alpine-docker-v5.sh diff --git a/ct/alpine-docker-v5.sh b/ct/alpine-docker-v5.sh new file mode 100644 index 00000000..638b1855 --- /dev/null +++ b/ct/alpine-docker-v5.sh @@ -0,0 +1,464 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \____ _____/ /_v5__ _____ + / / / / __ \/ ___/ //_/ _ \/ ___/ + / /_/ / /_/ / /__/ ,< / __/ / +/_____/\____/\___/_/|_|\___/_/ + Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Docker" +var_disk="2" +var_cpu="1" +var_ram="1024" +var_os="alpine" +var_version="3.17" +NSAPP=$(echo ${APP,,} | tr -d ' ') +var_install="${NSAPP}-v5-install" +timezone=$(cat /etc/timezone) +INTEGER='^[0-9]+([.][0-9]+)?$' +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function PVE_CHECK() { +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 +exit +fi +} +function ARCH_CHECK() { +if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 +exit +fi +} + +function default_settings() { + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + PW="-password alpine" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET=dhcp + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function advanced_settings() { +if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" On \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" +else + exit-script +fi + +if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" +else + exit-script +fi + +if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi +else + exit +fi + +if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" +else + exit-script +fi + +if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi +else + exit-script +fi + +if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi +else + exit-script +fi + +if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi +else + exit-script +fi + +if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi +else + exit-script +fi + +if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi +else + exit-script +fi +if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" +else + DISABLEIP6="no" +fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + +if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" +else + exit-script +fi + +if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" +else + exit-script +fi + +if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" +else + exit-script +fi + +if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi +else + exit-script +fi + +if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" +else + exit-script +fi + +if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" +else + SSH="no" +fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + +if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" +else + VERB="no" +fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + +if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" +else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings +fi +} + +function install_script() { +ARCH_CHECK +PVE_CHECK +NEXTID=$(pvesh get /cluster/nextid) +header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function update_script() { + normal=$(echo "\033[m") + menu=$(echo "\033[36m") + number=$(echo "\033[33m") + fgred=$(echo "\033[31m") + printf "\n${menu}*********************************************${normal}\n" + printf "${menu}**${number} 1)${normal} Update ${APP} \n" + printf "\n${menu}*********************************************${normal}\n" + printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." + read opt + +while [ "$opt" != "" ]; do + case $opt in + 1) + clear + echo -e "${fgred}Update ${APP}${normal}" + apk update &>/dev/null + apk upgrade &>/dev/null + + break + ;; + x) + exit + ;; + \n) + exit + ;; + *) + clear + echo -e "Please choose an option from the menu" + update_script + ;; + esac +done +exit +} +if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then + msg_error "No ${APP} Installation Found!" +fi + +if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/zigbee2mqtt/configuration.yaml ]]; then + update_script +fi + +if [ "$VERB" == "yes" ]; then set -x; fi +if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" +else + FEATURES="nesting=1" +fi +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +export tz=$timezone +export DISABLEIPV6=$DISABLEIP6 +export APPLICATION=$APP +export VERBOSE=$VERB +export SSH_ROOT=${SSH} +export CTID=$CT_ID +export PCT_OSTYPE=$var_os +export PCT_OSVERSION=$var_version +export PCT_DISK_SIZE=$DISK_SIZE +export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW +" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit +LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF +if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 +msg_info "Starting LXC Container" +pct start $CTID +msg_ok "Started LXC Container" +lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit +IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +pct set $CTID -description "# ${APP} LXC +### https://tteck.github.io/Proxmox/ +" +msg_ok "Completed Successfully!\n" From 73cae0aa6073bf64f94f14d82ed62409c3709050 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 20:08:24 -0400 Subject: [PATCH 1231/3335] Update CHANGELOG.MD - Alpine-Docker LXC - Alpine-Zigbee2MQTT LXC --- CHANGELOG.MD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index cfafe62d..6bf0a220 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file. - **Alpine-AdGuard Home LXC** (Thanks @nicedevil007) - NEW Script +- **Alpine-Docker LXC** + - NEW Script +- **Alpine-Zigbee2MQTT LXC** + - NEW Script ## 2023-03-15 From 32a1ccb59a04a2f7dc46e087cec23c2f3af329e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 20:24:10 -0400 Subject: [PATCH 1232/3335] Update alpine-docker-v5.sh fix directory check --- ct/alpine-docker-v5.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/alpine-docker-v5.sh b/ct/alpine-docker-v5.sh index 638b1855..d0ec1d2f 100644 --- a/ct/alpine-docker-v5.sh +++ b/ct/alpine-docker-v5.sh @@ -396,12 +396,12 @@ if command -v pveversion >/dev/null 2>&1; then install_script fi -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then - msg_error "No ${APP} Installation Found!" -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/zigbee2mqtt/configuration.yaml ]]; then - update_script +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -d /etc/docker ]]; then + msg_error "No ${APP} Installation Found!" + else + update_script + fi fi if [ "$VERB" == "yes" ]; then set -x; fi From 54259a84c165246375546a34b0b5152b558acfb3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 20:26:11 -0400 Subject: [PATCH 1233/3335] Update alpine-zigbee2mqtt-v5.sh Tweak --- ct/alpine-zigbee2mqtt-v5.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/alpine-zigbee2mqtt-v5.sh b/ct/alpine-zigbee2mqtt-v5.sh index aef1bdfb..209018a1 100644 --- a/ct/alpine-zigbee2mqtt-v5.sh +++ b/ct/alpine-zigbee2mqtt-v5.sh @@ -396,12 +396,12 @@ if command -v pveversion >/dev/null 2>&1; then install_script fi -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then - msg_error "No ${APP} Installation Found!" -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/zigbee2mqtt/configuration.yaml ]]; then - update_script +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then + msg_error "No ${APP} Installation Found!" + else + update_script + fi fi if [ "$VERB" == "yes" ]; then set -x; fi From ec8fe397125b26ad538a7f5adfbc5c45d72b7025 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 20:28:21 -0400 Subject: [PATCH 1234/3335] Update alpine-vaultwarden-v5.sh Tweak --- ct/alpine-vaultwarden-v5.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 7d62d2e9..2123918d 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -404,13 +404,12 @@ if command -v pveversion >/dev/null 2>&1; then install_script fi -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/conf.d/vaultwarden ]]; then - msg_error "No ${APP} Installation Found!" -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/conf.d/vaultwarden ]]; then - update_script -fi +if ! command -v pveversion >/dev/null 2>&1; then + if [[ ! -f /etc/conf.d/vaultwarden ]]; then + msg_error "No ${APP} Installation Found!" + else + update_script + fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From 268a36a87102544a4d37f23a9e076349173706f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 20:32:07 -0400 Subject: [PATCH 1235/3335] Update alpine-grafana-v5.sh Tweak --- ct/alpine-grafana-v5.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh index 72f76fa1..e2b6f275 100644 --- a/ct/alpine-grafana-v5.sh +++ b/ct/alpine-grafana-v5.sh @@ -371,13 +371,11 @@ if command -v pveversion >/dev/null 2>&1; then fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit + if [[ ! -f /etc/conf.d/grafana ]]; then + msg_error "No ${APP} Installation Found!" + else + update_script fi - update_script -fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From cde33cf00e227a3625bde332fb92fc8442a5b415 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 20:34:33 -0400 Subject: [PATCH 1236/3335] Update alpine-adguard-v5.sh Tweak --- ct/alpine-adguard-v5.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh index a618d254..06819168 100644 --- a/ct/alpine-adguard-v5.sh +++ b/ct/alpine-adguard-v5.sh @@ -435,13 +435,12 @@ if command -v pveversion >/dev/null 2>&1; then install_script fi -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /opt/AdGuardHome ]]; then - msg_error "No ${APP} Installation Found!" -fi - if ! command -v pveversion >/dev/null 2>&1; then - update_script -fi + if [[ ! -d /opt/AdGuardHome ]]; then + msg_error "No ${APP} Installation Found!" + else + update_script + fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From dcd1a633b80cc82cf89070cbc27d826839c6fd2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 22:32:45 -0400 Subject: [PATCH 1237/3335] Update alpine-docker-v5-install.sh tweak --- install/alpine-docker-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-docker-v5-install.sh b/install/alpine-docker-v5-install.sh index 9d036f0c..8a36fa0e 100644 --- a/install/alpine-docker-v5-install.sh +++ b/install/alpine-docker-v5-install.sh @@ -67,8 +67,8 @@ if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | c exit 1 fi cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/edge/main -https://dl-cdn.alpinelinux.org/alpine/edge/community +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community https://dl-cdn.alpinelinux.org/alpine/edge/testing EOF msg_ok "Set up Container OS" From 1bd635936a142328051c346378a412f650a939b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Mar 2023 22:33:32 -0400 Subject: [PATCH 1238/3335] Update alpine-zigbee2mqtt-v5-install.sh tweak --- install/alpine-zigbee2mqtt-v5-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-zigbee2mqtt-v5-install.sh b/install/alpine-zigbee2mqtt-v5-install.sh index 3616d418..26c35768 100644 --- a/install/alpine-zigbee2mqtt-v5-install.sh +++ b/install/alpine-zigbee2mqtt-v5-install.sh @@ -67,8 +67,8 @@ if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | c exit 1 fi cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/edge/main -https://dl-cdn.alpinelinux.org/alpine/edge/community +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community https://dl-cdn.alpinelinux.org/alpine/edge/testing EOF msg_ok "Set up Container OS" From 187befbb59bb06e573c8f6dfd26eb7f5dd3fdf51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:21:05 -0400 Subject: [PATCH 1239/3335] Update alpine-adguard-v5.sh --- ct/alpine-adguard-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh index 06819168..96ab78ba 100644 --- a/ct/alpine-adguard-v5.sh +++ b/ct/alpine-adguard-v5.sh @@ -441,6 +441,7 @@ if ! command -v pveversion >/dev/null 2>&1; then else update_script fi +fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From bbfabfc8f6cc311c12830daf8a040733dfac35de Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:31:48 -0400 Subject: [PATCH 1240/3335] Update alpine-vaultwarden-v5.sh --- ct/alpine-vaultwarden-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index 2123918d..c6c2ed81 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -410,6 +410,7 @@ if ! command -v pveversion >/dev/null 2>&1; then else update_script fi +fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From 243b65695c9a3b0289f78fac186565f9c185f95f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:32:45 -0400 Subject: [PATCH 1241/3335] Update alpine-grafana-v5.sh --- ct/alpine-grafana-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh index e2b6f275..b5dea2fe 100644 --- a/ct/alpine-grafana-v5.sh +++ b/ct/alpine-grafana-v5.sh @@ -376,6 +376,7 @@ if ! command -v pveversion >/dev/null 2>&1; then else update_script fi +fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then From 96e040fcb44faf95cec3c1b5b59708405d18f5c8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:42:55 -0400 Subject: [PATCH 1242/3335] Update alpine-adguard-v5.sh --- ct/alpine-adguard-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh index 96ab78ba..ce03722e 100644 --- a/ct/alpine-adguard-v5.sh +++ b/ct/alpine-adguard-v5.sh @@ -27,7 +27,6 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") From 939c9fe7d247e48e99f3086d59ec59e2a9a97a75 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:43:48 -0400 Subject: [PATCH 1243/3335] Update alpine-docker-v5.sh --- ct/alpine-docker-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-docker-v5.sh b/ct/alpine-docker-v5.sh index d0ec1d2f..5d92c547 100644 --- a/ct/alpine-docker-v5.sh +++ b/ct/alpine-docker-v5.sh @@ -27,7 +27,6 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,6 +351,7 @@ header_info } function update_script() { + header_info normal=$(echo "\033[m") menu=$(echo "\033[36m") number=$(echo "\033[33m") From de1d37ebf2c136f28273cd0243d4921bbfb37006 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:44:28 -0400 Subject: [PATCH 1244/3335] Update alpine-grafana-v5.sh --- ct/alpine-grafana-v5.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh index b5dea2fe..d84b776a 100644 --- a/ct/alpine-grafana-v5.sh +++ b/ct/alpine-grafana-v5.sh @@ -27,7 +27,6 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") From 2a6d09477f311448f94a1d8d64b8c85afa7e290e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:45:13 -0400 Subject: [PATCH 1245/3335] Update alpine-vaultwarden-v5.sh --- ct/alpine-vaultwarden-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index c6c2ed81..f9aa6c81 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -27,7 +27,6 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,6 +351,7 @@ header_info } function update_script() { + header_info normal=$(echo "\033[m") menu=$(echo "\033[36m") number=$(echo "\033[33m") From 766adccf7a222cfd445f5385eef1ff4e2f9f253e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 09:46:12 -0400 Subject: [PATCH 1246/3335] Update alpine-zigbee2mqtt-v5.sh --- ct/alpine-zigbee2mqtt-v5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-zigbee2mqtt-v5.sh b/ct/alpine-zigbee2mqtt-v5.sh index 209018a1..329c3fe7 100644 --- a/ct/alpine-zigbee2mqtt-v5.sh +++ b/ct/alpine-zigbee2mqtt-v5.sh @@ -27,7 +27,6 @@ var_os="alpine" var_version="3.17" NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) INTEGER='^[0-9]+([.][0-9]+)?$' YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -352,6 +351,7 @@ header_info } function update_script() { + header_info normal=$(echo "\033[m") menu=$(echo "\033[36m") number=$(echo "\033[33m") From 3d3161b1e72e87ecbb865a7a92c22c8be380cf64 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 13:01:11 -0400 Subject: [PATCH 1247/3335] Created Update/Config for Alpine-Grafana (#1191) (#1192) Feature to configure the IP address on which the service is listening has been implemented Co-authored-by: nicedevil007 --- ct/alpine-grafana-v5.sh | 73 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh index d84b776a..6766e031 100644 --- a/ct/alpine-grafana-v5.sh +++ b/ct/alpine-grafana-v5.sh @@ -351,12 +351,73 @@ header_info } function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apk update &>/dev/null -apk upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" + header_info + normal=$(echo "\033[m") + menu=$(echo "\033[36m") + number=$(echo "\033[33m") + fgred=$(echo "\033[31m") + LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + printf "\n${menu}*********************************************${normal}\n" + printf "${menu}**${number} 1)${normal} Update LXC OS + Grafana \n" + printf "${menu}**${number} 2)${normal} Allow 0.0.0.0 for listening \n" + printf "${menu}**${number} 3)${normal} Allow only ${LXCIP} for listening \n" + printf "${menu}*********************************************${normal}\n" + printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." + read opt + +while [ "$opt" != "" ]; do + case $opt in + 1) + clear + echo -e "${fgred}Update LXC OS${normal}" + msg_info "Updating LXC OS + Grafana" + apk update &>/dev/null + apk upgrade &>/dev/null + msg_ok "Update Successfull" + + break + ;; + 2) + clear + echo -e "${fgred}Updating Grafana Config with IP: ${LXCIP}${normal}" + msg_info "Stopping Grafana" + service grafana stop &>/dev/null + sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana + msg_ok "Restarted Grafana" + service grafana start &>/dev/null + + break + ;; + 3) + clear + echo -e "${fgred}Updating Grafana Config with host IP: ${LXCIP}${normal}" + msg_info "Stopping Grafana" + service grafana stop &>/dev/null + sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana + msg_ok "Restarted Grafana" + service grafana start &>/dev/null + + break + ;; + x) + clear + echo -e "⚠ User exited script \n" + exit + ;; + \n) + clear + echo -e "⚠ User exited script \n" + exit + ;; + *) + clear + echo -e "Please choose an option from the menu" + update_script + ;; + esac +done + + exit } From df68e1fa781511ffa83c269a50254ce004be4c20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 13:49:00 -0400 Subject: [PATCH 1248/3335] Update alpine-grafana-v5.sh fix timezone --- ct/alpine-grafana-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh index 6766e031..d9abeb4f 100644 --- a/ct/alpine-grafana-v5.sh +++ b/ct/alpine-grafana-v5.sh @@ -338,6 +338,7 @@ function install_script() { ARCH_CHECK PVE_CHECK NEXTID=$(pvesh get /cluster/nextid) +timezone=$(cat /etc/timezone) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info From 0647dc67a13398ecb355429961b7102d482bea50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 13:49:59 -0400 Subject: [PATCH 1249/3335] Update alpine-zigbee2mqtt-v5.sh --- ct/alpine-zigbee2mqtt-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-zigbee2mqtt-v5.sh b/ct/alpine-zigbee2mqtt-v5.sh index 329c3fe7..ed80ad45 100644 --- a/ct/alpine-zigbee2mqtt-v5.sh +++ b/ct/alpine-zigbee2mqtt-v5.sh @@ -338,6 +338,7 @@ function install_script() { ARCH_CHECK PVE_CHECK NEXTID=$(pvesh get /cluster/nextid) +timezone=$(cat /etc/timezone) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info From cab8db92bbf27c7da6ce1756d1a51a0466752a14 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 13:50:21 -0400 Subject: [PATCH 1250/3335] Update alpine-vaultwarden-v5.sh --- ct/alpine-vaultwarden-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh index f9aa6c81..731adbc7 100644 --- a/ct/alpine-vaultwarden-v5.sh +++ b/ct/alpine-vaultwarden-v5.sh @@ -338,6 +338,7 @@ function install_script() { ARCH_CHECK PVE_CHECK NEXTID=$(pvesh get /cluster/nextid) +timezone=$(cat /etc/timezone) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info From 79e7f7b38cf99636139c0ea291a36333d832240d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 13:50:45 -0400 Subject: [PATCH 1251/3335] Update alpine-docker-v5.sh --- ct/alpine-docker-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-docker-v5.sh b/ct/alpine-docker-v5.sh index 5d92c547..b220ed08 100644 --- a/ct/alpine-docker-v5.sh +++ b/ct/alpine-docker-v5.sh @@ -338,6 +338,7 @@ function install_script() { ARCH_CHECK PVE_CHECK NEXTID=$(pvesh get /cluster/nextid) +timezone=$(cat /etc/timezone) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info From 754dec41fc960c46acc38faa38b4c97ea0a78044 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 13:51:09 -0400 Subject: [PATCH 1252/3335] Update alpine-adguard-v5.sh --- ct/alpine-adguard-v5.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh index ce03722e..4ed5ea19 100644 --- a/ct/alpine-adguard-v5.sh +++ b/ct/alpine-adguard-v5.sh @@ -338,6 +338,7 @@ function install_script() { ARCH_CHECK PVE_CHECK NEXTID=$(pvesh get /cluster/nextid) +timezone=$(cat /etc/timezone) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info From 6fccc26c9fdf745498354c47faf1a79ddf6bf5bf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 18:53:39 -0400 Subject: [PATCH 1253/3335] Update nginxproxymanager-v5-install.sh add certbot-dns-cloudflare --- install/nginxproxymanager-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index d66e0adf..b33ddb02 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -113,7 +113,7 @@ $STD python3 -m venv /opt/certbot/ if [ "$(getconf LONG_BIT)" = "32" ]; then $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 fi -$STD python3 -m pip install --no-cache-dir cffi certbot +$STD python3 -m pip install --no-cache-dir cffi certbot certbot-dns-cloudflare msg_ok "Installed Python" msg_info "Installing Openresty" From c43dcea48ed2e9e45a5a698bac954b8258e995fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Mar 2023 19:11:13 -0400 Subject: [PATCH 1254/3335] Update nginxproxymanager-v5-install.sh revert add certbot-dns-cloudflare --- install/nginxproxymanager-v5-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-v5-install.sh index b33ddb02..d66e0adf 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-v5-install.sh @@ -113,7 +113,7 @@ $STD python3 -m venv /opt/certbot/ if [ "$(getconf LONG_BIT)" = "32" ]; then $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 fi -$STD python3 -m pip install --no-cache-dir cffi certbot certbot-dns-cloudflare +$STD python3 -m pip install --no-cache-dir cffi certbot msg_ok "Installed Python" msg_info "Installing Openresty" From 92596e895583b475d1724ee5550bd01e6bc92693 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Mar 2023 15:48:20 -0400 Subject: [PATCH 1255/3335] Update sabnzbd-v5.sh create update --- ct/sabnzbd-v5.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index a0f77356..0f3aab85 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -353,10 +353,16 @@ header_info function update_script() { header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_info "Updating $APP" +systemctl stop sabnzbd.service +RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null +\cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null +rm -rf SABnzbd-${RELEASE} +cd /opt/sabnzbd +python3 -m pip install -r requirements.txt &>/dev/null +systemctl start sabnzbd.service +msg_ok "Updated $APP" exit } @@ -375,7 +381,7 @@ if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/sabnzbd ]]; then fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP}. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit From 4175b8d5f6766b26bd7f1863d2a1ef1bd2d6bcfe Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Mar 2023 20:48:20 -0400 Subject: [PATCH 1256/3335] The latest iteration of the scripts (#1220) --- ct/adguard-v5.sh | 444 ------------- ct/adguard.sh | 87 +++ ct/alpine-adguard-v5.sh | 486 --------------- ct/alpine-adguard.sh | 87 +++ ct/alpine-docker-v5.sh | 465 -------------- ct/alpine-docker.sh | 77 +++ ct/alpine-grafana-v5.sh | 482 -------------- ct/alpine-grafana.sh | 94 +++ ct/alpine-v5.sh | 419 ------------- ct/alpine-vaultwarden-v5.sh | 456 -------------- ct/alpine-vaultwarden.sh | 87 +++ ct/alpine-zigbee2mqtt-v5.sh | 460 -------------- ct/alpine-zigbee2mqtt.sh | 79 +++ ct/alpine.sh | 70 +++ ct/{archlinux-v5.sh => archlinux.sh} | 3 +- ct/audiobookshelf-v5.sh | 421 ------------- ct/audiobookshelf.sh | 69 +++ ct/autobrr-v5.sh | 437 ------------- ct/autobrr.sh | 80 +++ ct/blocky-v5.sh | 425 ------------- ct/blocky.sh | 67 ++ ct/casaos-v5.sh | 453 -------------- ct/casaos.sh | 70 +++ ct/changedetection-v5.sh | 426 ------------- ct/changedetection.sh | 69 +++ ct/cronicle-v5.sh | 468 -------------- ct/cronicle.sh | 108 ++++ ct/daemonsync-v5.sh | 427 ------------- ct/daemonsync.sh | 69 +++ ct/dashy-v5.sh | 452 -------------- ct/dashy.sh | 95 +++ ct/debian-v5.sh | 419 ------------- ct/debian.sh | 67 ++ ct/deconz-v5.sh | 442 ------------- ct/deconz.sh | 69 +++ ct/deluge-v5.sh | 427 ------------- ct/deluge.sh | 70 +++ ct/devuan-v5.sh | 419 ------------- ct/devuan.sh | 67 ++ ct/docker-v5.sh | 446 ------------- ct/docker.sh | 68 ++ ct/emby-v5.sh | 460 -------------- ct/emby.sh | 80 +++ ct/emqx-v5.sh | 421 ------------- ct/emqx.sh | 69 +++ ct/esphome-v5.sh | 434 ------------- ct/esphome.sh | 77 +++ ct/go2rtc-v5.sh | 421 ------------- ct/go2rtc.sh | 70 +++ ct/grafana-v5.sh | 427 ------------- ct/grafana.sh | 70 +++ ct/grocy-v5.sh | 426 ------------- ct/grocy.sh | 69 +++ ct/heimdalldashboard-v5.sh | 506 --------------- ct/heimdalldashboard.sh | 149 +++++ ct/homeassistant-core-v5.sh | 586 ------------------ ct/homeassistant-core.sh | 216 +++++++ ct/homeassistant-v5.sh | 520 ---------------- ct/homeassistant.sh | 138 +++++ ct/homebridge-v5.sh | 427 ------------- ct/homebridge.sh | 70 +++ ct/homepage-v5.sh | 433 ------------- ct/homepage.sh | 76 +++ ct/homer-v5.sh | 450 -------------- ct/homer.sh | 93 +++ ct/hyperion-v5.sh | 441 ------------- ct/hyperion.sh | 71 +++ ct/influxdb-v5.sh | 425 ------------- ct/influxdb.sh | 68 ++ ct/iobroker-v5.sh | 427 ------------- ct/iobroker.sh | 70 +++ ct/jackett-v5.sh | 425 ------------- ct/jackett.sh | 69 +++ ct/jellyfin-v5.sh | 450 -------------- ct/jellyfin.sh | 70 +++ ct/k0s-v5.sh | 425 ------------- ct/k0s.sh | 68 ++ ct/kavita-v5.sh | 426 ------------- ct/kavita.sh | 69 +++ ct/keycloak-v5.sh | 428 ------------- ct/keycloak.sh | 71 +++ ct/lidarr-v5.sh | 426 ------------- ct/lidarr.sh | 69 +++ ct/magicmirror-v5.sh | 429 ------------- ct/magicmirror.sh | 72 +++ ct/mariadb-v5.sh | 425 ------------- ct/mariadb.sh | 68 ++ ct/meshcentral-v5.sh | 427 ------------- ct/meshcentral.sh | 70 +++ ct/motioneye-v5.sh | 426 ------------- ct/motioneye.sh | 69 +++ ct/mqtt-v5.sh | 424 ------------- ct/mqtt.sh | 68 ++ ct/n8n-v5.sh | 427 ------------- ct/n8n.sh | 70 +++ ct/navidrome-v5.sh | 437 ------------- ct/navidrome.sh | 80 +++ ct/nextcloudpi-v5.sh | 427 ------------- ct/nextcloudpi.sh | 70 +++ ct/nginxproxymanager-v5.sh | 535 ---------------- ct/nginxproxymanager.sh | 180 ++++++ ct/nocodb-v5.sh | 429 ------------- ct/nocodb.sh | 72 +++ ct/node-red-v5.sh | 462 -------------- ct/node-red.sh | 105 ++++ ct/omada-v5.sh | 439 ------------- ct/omada.sh | 70 +++ ct/omv-v5.sh | 438 ------------- ct/omv.sh | 70 +++ ct/openhab-v5.sh | 428 ------------- ct/openhab.sh | 71 +++ ct/paperless-ngx-v5.sh | 495 --------------- ct/paperless-ngx.sh | 142 +++++ ct/photoprism-v5.sh | 452 -------------- ct/photoprism.sh | 99 +++ ct/pihole-v5.sh | 427 ------------- ct/pihole.sh | 71 +++ ct/plex-v5.sh | 460 -------------- ct/plex.sh | 81 +++ ct/podman-homeassistant-v5.sh | 497 --------------- ct/podman-homeassistant.sh | 121 ++++ ct/podman-v5.sh | 425 ------------- ct/podman.sh | 69 +++ ct/postgresql-v5.sh | 425 ------------- ct/postgresql.sh | 69 +++ ct/prometheus-v5.sh | 427 ------------- ct/prometheus.sh | 71 +++ ct/prowlarr-v5.sh | 426 ------------- ct/prowlarr.sh | 70 +++ ct/qbittorrent-v5.sh | 426 ------------- ct/qbittorrent.sh | 70 +++ ct/radarr-v5.sh | 426 ------------- ct/radarr.sh | 70 +++ ct/readarr-v5.sh | 426 ------------- ct/readarr.sh | 70 +++ ct/rockylinux-v5.sh | 400 ------------ ct/rockylinux.sh | 69 +++ ct/rstptoweb-v5.sh | 420 ------------- ct/rstptoweb.sh | 69 +++ ct/sabnzbd-v5.sh | 432 ------------- ct/sabnzbd.sh | 76 +++ ct/scrypted-v5.sh | 442 ------------- ct/scrypted.sh | 72 +++ ct/shinobi-v5.sh | 441 ------------- ct/shinobi.sh | 74 +++ ct/sonarr-v5.sh | 426 ------------- ct/sonarr.sh | 70 +++ ct/syncthing-v5.sh | 428 ------------- ct/syncthing.sh | 72 +++ ct/tdarr-v5.sh | 426 ------------- ct/tdarr.sh | 70 +++ ct/technitiumdns-v5.sh | 436 ------------- ct/technitiumdns.sh | 80 +++ ct/transmission-v5.sh | 426 ------------- ct/transmission.sh | 70 +++ ct/trilium-v5.sh | 446 ------------- ct/trilium.sh | 90 +++ ct/ubuntu-v5.sh | 431 ------------- ct/ubuntu.sh | 68 ++ ct/umbrel-v5.sh | 452 -------------- ct/umbrel.sh | 70 +++ ct/unifi-v5.sh | 427 ------------- ct/unifi.sh | 71 +++ ct/uptimekuma-v5.sh | 444 ------------- ct/uptimekuma.sh | 88 +++ ct/vaultwarden-v5.sh | 498 --------------- ct/vaultwarden.sh | 145 +++++ ct/whisparr-v5.sh | 427 ------------- ct/whisparr.sh | 71 +++ ct/whoogle-v5.sh | 426 ------------- ct/whoogle.sh | 70 +++ ct/wikijs-v5.sh | 449 -------------- ct/wikijs.sh | 93 +++ ct/wireguard-v5.sh | 479 -------------- ct/wireguard.sh | 123 ++++ ct/yunohost-v5.sh | 426 ------------- ct/yunohost.sh | 70 +++ ct/zigbee2mqtt-v5.sh | 486 --------------- ct/zigbee2mqtt.sh | 134 ++++ ct/zwave-js-ui-v5.sh | 455 -------------- ct/zwave-js-ui.sh | 87 +++ install/adguard-install.sh | 37 ++ install/adguard-v5-install.sh | 125 ---- install/alpine-adguard-install.sh | 35 ++ install/alpine-adguard-v5-install.sh | 123 ---- install/alpine-docker-install.sh | 61 ++ install/alpine-docker-v5-install.sh | 150 ----- install/alpine-grafana-install.sh | 31 + install/alpine-grafana-v5-install.sh | 118 ---- install/alpine-vaultwarden-install.sh | 38 ++ install/alpine-vaultwarden-v5-install.sh | 126 ---- install/alpine-zigbee2mqtt-install.sh | 28 + install/alpine-zigbee2mqtt-v5-install.sh | 117 ---- install/audiobookshelf-install.sh | 36 ++ install/audiobookshelf-v5-install.sh | 123 ---- install/autobrr-install.sh | 57 ++ install/autobrr-v5-install.sh | 144 ----- ...blocky-v5-install.sh => blocky-install.sh} | 105 +--- install/casaos-install.sh | 45 ++ install/casaos-v5-install.sh | 133 ---- install/changedetection-install.sh | 50 ++ install/changedetection-v5-install.sh | 137 ---- install/cronicle-install.sh | 56 ++ install/cronicle-v5-install.sh | 143 ----- install/daemonsync-install.sh | 35 ++ install/daemonsync-v5-install.sh | 123 ---- install/dashy-install.sh | 65 ++ install/dashy-v5-install.sh | 153 ----- install/debian-install.sh | 28 + install/debian-v5-install.sh | 115 ---- install/deconz-install.sh | 58 ++ install/deconz-v5-install.sh | 146 ----- install/deluge-install.sh | 73 +++ install/deluge-v5-install.sh | 160 ----- install/devuan-install.sh | 28 + install/devuan-v5-install.sh | 98 --- install/docker-install.sh | 77 +++ install/docker-v5-install.sh | 165 ----- install/emby-install.sh | 52 ++ install/emby-v5-install.sh | 140 ----- install/emqx-install.sh | 34 + install/emqx-v5-install.sh | 121 ---- install/esphome-install.sh | 54 ++ install/esphome-v5-install.sh | 142 ----- install/go2rtc-install.sh | 51 ++ install/go2rtc-v5-install.sh | 138 ----- install/grafana-install.sh | 41 ++ install/grafana-v5-install.sh | 131 ---- install/grocy-install.sh | 72 +++ install/grocy-v5-install.sh | 160 ----- install/heimdalldashboard-install.sh | 65 ++ install/heimdalldashboard-v5-install.sh | 153 ----- install/homeassistant-core-install.sh | 107 ++++ install/homeassistant-core-v5-install.sh | 195 ------ install/homeassistant-install.sh | 92 +++ install/homeassistant-v5-install.sh | 180 ------ install/homebridge-install.sh | 44 ++ install/homebridge-v5-install.sh | 132 ---- install/homepage-install.sh | 65 ++ install/homepage-v5-install.sh | 152 ----- install/homer-install.sh | 54 ++ install/homer-v5-install.sh | 141 ----- install/hyperion-install.sh | 39 ++ install/hyperion-v5-install.sh | 126 ---- install/influxdb-install.sh | 61 ++ install/influxdb-v5-install.sh | 149 ----- install/iobroker-install.sh | 32 + install/iobroker-v5-install.sh | 120 ---- install/jackett-install.sh | 54 ++ install/jackett-v5-install.sh | 141 ----- install/jellyfin-install.sh | 76 +++ install/jellyfin-v5-install.sh | 164 ----- install/k0s-install.sh | 43 ++ install/k0s-v5-install.sh | 130 ---- install/kavita-install.sh | 54 ++ install/kavita-v5-install.sh | 142 ----- install/keycloak-install.sh | 51 ++ install/keycloak-v5-install.sh | 139 ----- install/lidarr-install.sh | 60 ++ install/lidarr-v5-install.sh | 147 ----- ...r-v5-install.sh => magicmirror-install.sh} | 106 +--- install/mariadb-install.sh | 43 ++ install/mariadb-v5-install.sh | 131 ---- install/meshcentral-install.sh | 43 ++ install/meshcentral-v5-install.sh | 131 ---- install/motioneye-install.sh | 62 ++ install/motioneye-v5-install.sh | 150 ----- install/mqtt-install.sh | 39 ++ install/mqtt-v5-install.sh | 127 ---- install/n8n-install.sh | 54 ++ install/n8n-v5-install.sh | 142 ----- install/navidrome-install.sh | 84 +++ install/navidrome-v5-install.sh | 171 ----- install/nextcloudpi-install.sh | 35 ++ install/nextcloudpi-v5-install.sh | 122 ---- ...nstall.sh => nginxproxymanager-install.sh} | 106 +--- install/nocodb-install.sh | 61 ++ install/nocodb-v5-install.sh | 149 ----- install/node-red-install.sh | 64 ++ install/node-red-v5-install.sh | 152 ----- install/omada-install.sh | 39 ++ install/omada-v5-install.sh | 127 ---- install/omv-install.sh | 50 ++ install/omv-v5-install.sh | 138 ----- install/openhab-install.sh | 49 ++ install/openhab-v5-install.sh | 137 ---- ...v5-install.sh => paperless-ngx-install.sh} | 107 +--- ...sm-v5-install.sh => photoprism-install.sh} | 106 +--- install/pihole-install.sh | 54 ++ install/pihole-v5-install.sh | 143 ----- install/plex-install.sh | 55 ++ install/plex-v5-install.sh | 143 ----- install/podman-homeassistant-install.sh | 54 ++ install/podman-homeassistant-v5-install.sh | 142 ----- install/podman-install.sh | 34 + install/podman-v5-install.sh | 121 ---- ...ql-v5-install.sh => postgresql-install.sh} | 109 +--- install/prometheus-install.sh | 64 ++ install/prometheus-v5-install.sh | 152 ----- install/prowlarr-install.sh | 58 ++ install/prowlarr-v5-install.sh | 145 ----- install/qbittorrent-install.sh | 46 ++ install/qbittorrent-v5-install.sh | 133 ---- install/radarr-install.sh | 58 ++ install/radarr-v5-install.sh | 145 ----- install/readarr-install.sh | 58 ++ install/readarr-v5-install.sh | 145 ----- install/rstptoweb-install.sh | 61 ++ install/rstptoweb-v5-install.sh | 148 ----- install/sabnzbd-install.sh | 62 ++ install/sabnzbd-v5-install.sh | 149 ----- install/scrypted-install.sh | 117 ++++ install/scrypted-v5-install.sh | 203 ------ install/shinobi-install.sh | 90 +++ install/shinobi-v5-install.sh | 178 ------ install/sonarr-install.sh | 37 ++ install/sonarr-v5-install.sh | 125 ---- install/syncthing-install.sh | 41 ++ install/syncthing-v5-install.sh | 128 ---- install/tdarr-install.sh | 85 +++ install/tdarr-v5-install.sh | 172 ----- install/technitiumdns-install.sh | 43 ++ install/technitiumdns-v5-install.sh | 131 ---- install/transmission-install.sh | 36 ++ install/transmission-v5-install.sh | 123 ---- install/trilium-install.sh | 59 ++ install/trilium-v5-install.sh | 146 ----- install/ubuntu-install.sh | 28 + install/ubuntu-v5-install.sh | 116 ---- install/umbrel-install.sh | 46 ++ install/umbrel-v5-install.sh | 133 ---- install/unifi-install.sh | 40 ++ install/unifi-v5-install.sh | 129 ---- install/uptimekuma-install.sh | 61 ++ install/uptimekuma-v5-install.sh | 149 ----- ...n-v5-install.sh => vaultwarden-install.sh} | 106 +--- install/whisparr-install.sh | 58 ++ install/whisparr-v5-install.sh | 145 ----- install/whoogle-install.sh | 50 ++ install/whoogle-v5-install.sh | 138 ----- install/wikijs-install.sh | 78 +++ install/wikijs-v5-install.sh | 166 ----- install/wireguard-install.sh | 49 ++ install/wireguard-v5-install.sh | 138 ----- install/yunohost-install.sh | 38 ++ install/yunohost-v5-install.sh | 125 ---- install/zigbee2mqtt-install.sh | 77 +++ install/zigbee2mqtt-v5-install.sh | 165 ----- install/zwave-js-ui-install.sh | 54 ++ install/zwave-js-ui-v5-install.sh | 142 ----- misc/alpine-install.func | 116 ++++ misc/alpine.func | 400 ++++++++++++ misc/debian.func | 403 ++++++++++++ misc/docker.func | 409 ++++++++++++ misc/install.func | 133 ++++ misc/ubuntu.func | 428 +++++++++++++ vm/haos-vm-v5.sh | 323 +++++----- ...ik-routeros-v5.sh => mikrotik-routeros.sh} | 273 ++++---- vm/{pimox-haos-vm-v5.sh => pimox-haos-vm.sh} | 315 +++++----- 359 files changed, 14171 insertions(+), 52404 deletions(-) delete mode 100644 ct/adguard-v5.sh create mode 100644 ct/adguard.sh delete mode 100644 ct/alpine-adguard-v5.sh create mode 100644 ct/alpine-adguard.sh delete mode 100644 ct/alpine-docker-v5.sh create mode 100644 ct/alpine-docker.sh delete mode 100644 ct/alpine-grafana-v5.sh create mode 100644 ct/alpine-grafana.sh delete mode 100644 ct/alpine-v5.sh delete mode 100644 ct/alpine-vaultwarden-v5.sh create mode 100644 ct/alpine-vaultwarden.sh delete mode 100644 ct/alpine-zigbee2mqtt-v5.sh create mode 100644 ct/alpine-zigbee2mqtt.sh create mode 100644 ct/alpine.sh rename ct/{archlinux-v5.sh => archlinux.sh} (99%) delete mode 100644 ct/audiobookshelf-v5.sh create mode 100644 ct/audiobookshelf.sh delete mode 100644 ct/autobrr-v5.sh create mode 100644 ct/autobrr.sh delete mode 100644 ct/blocky-v5.sh create mode 100644 ct/blocky.sh delete mode 100644 ct/casaos-v5.sh create mode 100644 ct/casaos.sh delete mode 100644 ct/changedetection-v5.sh create mode 100644 ct/changedetection.sh delete mode 100644 ct/cronicle-v5.sh create mode 100644 ct/cronicle.sh delete mode 100644 ct/daemonsync-v5.sh create mode 100644 ct/daemonsync.sh delete mode 100644 ct/dashy-v5.sh create mode 100644 ct/dashy.sh delete mode 100644 ct/debian-v5.sh create mode 100644 ct/debian.sh delete mode 100644 ct/deconz-v5.sh create mode 100644 ct/deconz.sh delete mode 100644 ct/deluge-v5.sh create mode 100644 ct/deluge.sh delete mode 100644 ct/devuan-v5.sh create mode 100644 ct/devuan.sh delete mode 100644 ct/docker-v5.sh create mode 100644 ct/docker.sh delete mode 100644 ct/emby-v5.sh create mode 100644 ct/emby.sh delete mode 100644 ct/emqx-v5.sh create mode 100644 ct/emqx.sh delete mode 100644 ct/esphome-v5.sh create mode 100644 ct/esphome.sh delete mode 100644 ct/go2rtc-v5.sh create mode 100644 ct/go2rtc.sh delete mode 100644 ct/grafana-v5.sh create mode 100644 ct/grafana.sh delete mode 100644 ct/grocy-v5.sh create mode 100644 ct/grocy.sh delete mode 100644 ct/heimdalldashboard-v5.sh create mode 100644 ct/heimdalldashboard.sh delete mode 100644 ct/homeassistant-core-v5.sh create mode 100644 ct/homeassistant-core.sh delete mode 100644 ct/homeassistant-v5.sh create mode 100644 ct/homeassistant.sh delete mode 100644 ct/homebridge-v5.sh create mode 100644 ct/homebridge.sh delete mode 100644 ct/homepage-v5.sh create mode 100644 ct/homepage.sh delete mode 100644 ct/homer-v5.sh create mode 100644 ct/homer.sh delete mode 100644 ct/hyperion-v5.sh create mode 100644 ct/hyperion.sh delete mode 100644 ct/influxdb-v5.sh create mode 100644 ct/influxdb.sh delete mode 100644 ct/iobroker-v5.sh create mode 100644 ct/iobroker.sh delete mode 100644 ct/jackett-v5.sh create mode 100644 ct/jackett.sh delete mode 100644 ct/jellyfin-v5.sh create mode 100644 ct/jellyfin.sh delete mode 100644 ct/k0s-v5.sh create mode 100644 ct/k0s.sh delete mode 100644 ct/kavita-v5.sh create mode 100644 ct/kavita.sh delete mode 100644 ct/keycloak-v5.sh create mode 100644 ct/keycloak.sh delete mode 100644 ct/lidarr-v5.sh create mode 100644 ct/lidarr.sh delete mode 100644 ct/magicmirror-v5.sh create mode 100644 ct/magicmirror.sh delete mode 100644 ct/mariadb-v5.sh create mode 100644 ct/mariadb.sh delete mode 100644 ct/meshcentral-v5.sh create mode 100644 ct/meshcentral.sh delete mode 100644 ct/motioneye-v5.sh create mode 100644 ct/motioneye.sh delete mode 100644 ct/mqtt-v5.sh create mode 100644 ct/mqtt.sh delete mode 100644 ct/n8n-v5.sh create mode 100644 ct/n8n.sh delete mode 100644 ct/navidrome-v5.sh create mode 100644 ct/navidrome.sh delete mode 100644 ct/nextcloudpi-v5.sh create mode 100644 ct/nextcloudpi.sh delete mode 100644 ct/nginxproxymanager-v5.sh create mode 100644 ct/nginxproxymanager.sh delete mode 100644 ct/nocodb-v5.sh create mode 100644 ct/nocodb.sh delete mode 100644 ct/node-red-v5.sh create mode 100644 ct/node-red.sh delete mode 100644 ct/omada-v5.sh create mode 100644 ct/omada.sh delete mode 100644 ct/omv-v5.sh create mode 100644 ct/omv.sh delete mode 100644 ct/openhab-v5.sh create mode 100644 ct/openhab.sh delete mode 100644 ct/paperless-ngx-v5.sh create mode 100644 ct/paperless-ngx.sh delete mode 100644 ct/photoprism-v5.sh create mode 100644 ct/photoprism.sh delete mode 100644 ct/pihole-v5.sh create mode 100644 ct/pihole.sh delete mode 100644 ct/plex-v5.sh create mode 100644 ct/plex.sh delete mode 100644 ct/podman-homeassistant-v5.sh create mode 100644 ct/podman-homeassistant.sh delete mode 100644 ct/podman-v5.sh create mode 100644 ct/podman.sh delete mode 100644 ct/postgresql-v5.sh create mode 100644 ct/postgresql.sh delete mode 100644 ct/prometheus-v5.sh create mode 100644 ct/prometheus.sh delete mode 100644 ct/prowlarr-v5.sh create mode 100644 ct/prowlarr.sh delete mode 100644 ct/qbittorrent-v5.sh create mode 100644 ct/qbittorrent.sh delete mode 100644 ct/radarr-v5.sh create mode 100644 ct/radarr.sh delete mode 100644 ct/readarr-v5.sh create mode 100644 ct/readarr.sh delete mode 100644 ct/rockylinux-v5.sh create mode 100644 ct/rockylinux.sh delete mode 100644 ct/rstptoweb-v5.sh create mode 100644 ct/rstptoweb.sh delete mode 100644 ct/sabnzbd-v5.sh create mode 100644 ct/sabnzbd.sh delete mode 100644 ct/scrypted-v5.sh create mode 100644 ct/scrypted.sh delete mode 100644 ct/shinobi-v5.sh create mode 100644 ct/shinobi.sh delete mode 100644 ct/sonarr-v5.sh create mode 100644 ct/sonarr.sh delete mode 100644 ct/syncthing-v5.sh create mode 100644 ct/syncthing.sh delete mode 100644 ct/tdarr-v5.sh create mode 100644 ct/tdarr.sh delete mode 100644 ct/technitiumdns-v5.sh create mode 100644 ct/technitiumdns.sh delete mode 100644 ct/transmission-v5.sh create mode 100644 ct/transmission.sh delete mode 100644 ct/trilium-v5.sh create mode 100644 ct/trilium.sh delete mode 100644 ct/ubuntu-v5.sh create mode 100644 ct/ubuntu.sh delete mode 100644 ct/umbrel-v5.sh create mode 100644 ct/umbrel.sh delete mode 100644 ct/unifi-v5.sh create mode 100644 ct/unifi.sh delete mode 100644 ct/uptimekuma-v5.sh create mode 100644 ct/uptimekuma.sh delete mode 100644 ct/vaultwarden-v5.sh create mode 100644 ct/vaultwarden.sh delete mode 100644 ct/whisparr-v5.sh create mode 100644 ct/whisparr.sh delete mode 100644 ct/whoogle-v5.sh create mode 100644 ct/whoogle.sh delete mode 100644 ct/wikijs-v5.sh create mode 100644 ct/wikijs.sh delete mode 100644 ct/wireguard-v5.sh create mode 100644 ct/wireguard.sh delete mode 100644 ct/yunohost-v5.sh create mode 100644 ct/yunohost.sh delete mode 100644 ct/zigbee2mqtt-v5.sh create mode 100644 ct/zigbee2mqtt.sh delete mode 100644 ct/zwave-js-ui-v5.sh create mode 100644 ct/zwave-js-ui.sh create mode 100644 install/adguard-install.sh delete mode 100644 install/adguard-v5-install.sh create mode 100644 install/alpine-adguard-install.sh delete mode 100644 install/alpine-adguard-v5-install.sh create mode 100644 install/alpine-docker-install.sh delete mode 100644 install/alpine-docker-v5-install.sh create mode 100644 install/alpine-grafana-install.sh delete mode 100644 install/alpine-grafana-v5-install.sh create mode 100644 install/alpine-vaultwarden-install.sh delete mode 100644 install/alpine-vaultwarden-v5-install.sh create mode 100644 install/alpine-zigbee2mqtt-install.sh delete mode 100644 install/alpine-zigbee2mqtt-v5-install.sh create mode 100644 install/audiobookshelf-install.sh delete mode 100644 install/audiobookshelf-v5-install.sh create mode 100644 install/autobrr-install.sh delete mode 100644 install/autobrr-v5-install.sh rename install/{blocky-v5-install.sh => blocky-install.sh} (79%) create mode 100644 install/casaos-install.sh delete mode 100644 install/casaos-v5-install.sh create mode 100644 install/changedetection-install.sh delete mode 100644 install/changedetection-v5-install.sh create mode 100644 install/cronicle-install.sh delete mode 100644 install/cronicle-v5-install.sh create mode 100644 install/daemonsync-install.sh delete mode 100644 install/daemonsync-v5-install.sh create mode 100644 install/dashy-install.sh delete mode 100644 install/dashy-v5-install.sh create mode 100644 install/debian-install.sh delete mode 100644 install/debian-v5-install.sh create mode 100644 install/deconz-install.sh delete mode 100644 install/deconz-v5-install.sh create mode 100644 install/deluge-install.sh delete mode 100644 install/deluge-v5-install.sh create mode 100644 install/devuan-install.sh delete mode 100644 install/devuan-v5-install.sh create mode 100644 install/docker-install.sh delete mode 100644 install/docker-v5-install.sh create mode 100644 install/emby-install.sh delete mode 100644 install/emby-v5-install.sh create mode 100644 install/emqx-install.sh delete mode 100644 install/emqx-v5-install.sh create mode 100644 install/esphome-install.sh delete mode 100644 install/esphome-v5-install.sh create mode 100644 install/go2rtc-install.sh delete mode 100644 install/go2rtc-v5-install.sh create mode 100644 install/grafana-install.sh delete mode 100644 install/grafana-v5-install.sh create mode 100644 install/grocy-install.sh delete mode 100644 install/grocy-v5-install.sh create mode 100644 install/heimdalldashboard-install.sh delete mode 100644 install/heimdalldashboard-v5-install.sh create mode 100644 install/homeassistant-core-install.sh delete mode 100644 install/homeassistant-core-v5-install.sh create mode 100644 install/homeassistant-install.sh delete mode 100644 install/homeassistant-v5-install.sh create mode 100644 install/homebridge-install.sh delete mode 100644 install/homebridge-v5-install.sh create mode 100644 install/homepage-install.sh delete mode 100644 install/homepage-v5-install.sh create mode 100644 install/homer-install.sh delete mode 100644 install/homer-v5-install.sh create mode 100644 install/hyperion-install.sh delete mode 100644 install/hyperion-v5-install.sh create mode 100644 install/influxdb-install.sh delete mode 100644 install/influxdb-v5-install.sh create mode 100644 install/iobroker-install.sh delete mode 100644 install/iobroker-v5-install.sh create mode 100644 install/jackett-install.sh delete mode 100644 install/jackett-v5-install.sh create mode 100644 install/jellyfin-install.sh delete mode 100644 install/jellyfin-v5-install.sh create mode 100644 install/k0s-install.sh delete mode 100644 install/k0s-v5-install.sh create mode 100644 install/kavita-install.sh delete mode 100644 install/kavita-v5-install.sh create mode 100644 install/keycloak-install.sh delete mode 100644 install/keycloak-v5-install.sh create mode 100644 install/lidarr-install.sh delete mode 100644 install/lidarr-v5-install.sh rename install/{magicmirror-v5-install.sh => magicmirror-install.sh} (61%) create mode 100644 install/mariadb-install.sh delete mode 100644 install/mariadb-v5-install.sh create mode 100644 install/meshcentral-install.sh delete mode 100644 install/meshcentral-v5-install.sh create mode 100644 install/motioneye-install.sh delete mode 100644 install/motioneye-v5-install.sh create mode 100644 install/mqtt-install.sh delete mode 100644 install/mqtt-v5-install.sh create mode 100644 install/n8n-install.sh delete mode 100644 install/n8n-v5-install.sh create mode 100644 install/navidrome-install.sh delete mode 100644 install/navidrome-v5-install.sh create mode 100644 install/nextcloudpi-install.sh delete mode 100644 install/nextcloudpi-v5-install.sh rename install/{nginxproxymanager-v5-install.sh => nginxproxymanager-install.sh} (62%) create mode 100644 install/nocodb-install.sh delete mode 100644 install/nocodb-v5-install.sh create mode 100644 install/node-red-install.sh delete mode 100644 install/node-red-v5-install.sh create mode 100644 install/omada-install.sh delete mode 100644 install/omada-v5-install.sh create mode 100644 install/omv-install.sh delete mode 100644 install/omv-v5-install.sh create mode 100644 install/openhab-install.sh delete mode 100644 install/openhab-v5-install.sh rename install/{paperless-ngx-v5-install.sh => paperless-ngx-install.sh} (64%) rename install/{photoprism-v5-install.sh => photoprism-install.sh} (53%) create mode 100644 install/pihole-install.sh delete mode 100644 install/pihole-v5-install.sh create mode 100644 install/plex-install.sh delete mode 100644 install/plex-v5-install.sh create mode 100644 install/podman-homeassistant-install.sh delete mode 100644 install/podman-homeassistant-v5-install.sh create mode 100644 install/podman-install.sh delete mode 100644 install/podman-v5-install.sh rename install/{postgresql-v5-install.sh => postgresql-install.sh} (60%) create mode 100644 install/prometheus-install.sh delete mode 100644 install/prometheus-v5-install.sh create mode 100644 install/prowlarr-install.sh delete mode 100644 install/prowlarr-v5-install.sh create mode 100644 install/qbittorrent-install.sh delete mode 100644 install/qbittorrent-v5-install.sh create mode 100644 install/radarr-install.sh delete mode 100644 install/radarr-v5-install.sh create mode 100644 install/readarr-install.sh delete mode 100644 install/readarr-v5-install.sh create mode 100644 install/rstptoweb-install.sh delete mode 100644 install/rstptoweb-v5-install.sh create mode 100644 install/sabnzbd-install.sh delete mode 100644 install/sabnzbd-v5-install.sh create mode 100644 install/scrypted-install.sh delete mode 100644 install/scrypted-v5-install.sh create mode 100644 install/shinobi-install.sh delete mode 100644 install/shinobi-v5-install.sh create mode 100644 install/sonarr-install.sh delete mode 100644 install/sonarr-v5-install.sh create mode 100644 install/syncthing-install.sh delete mode 100644 install/syncthing-v5-install.sh create mode 100644 install/tdarr-install.sh delete mode 100644 install/tdarr-v5-install.sh create mode 100644 install/technitiumdns-install.sh delete mode 100644 install/technitiumdns-v5-install.sh create mode 100644 install/transmission-install.sh delete mode 100644 install/transmission-v5-install.sh create mode 100644 install/trilium-install.sh delete mode 100644 install/trilium-v5-install.sh create mode 100644 install/ubuntu-install.sh delete mode 100644 install/ubuntu-v5-install.sh create mode 100644 install/umbrel-install.sh delete mode 100644 install/umbrel-v5-install.sh create mode 100644 install/unifi-install.sh delete mode 100644 install/unifi-v5-install.sh create mode 100644 install/uptimekuma-install.sh delete mode 100644 install/uptimekuma-v5-install.sh rename install/{vaultwarden-v5-install.sh => vaultwarden-install.sh} (50%) create mode 100644 install/whisparr-install.sh delete mode 100644 install/whisparr-v5-install.sh create mode 100644 install/whoogle-install.sh delete mode 100644 install/whoogle-v5-install.sh create mode 100644 install/wikijs-install.sh delete mode 100644 install/wikijs-v5-install.sh create mode 100644 install/wireguard-install.sh delete mode 100644 install/wireguard-v5-install.sh create mode 100644 install/yunohost-install.sh delete mode 100644 install/yunohost-v5-install.sh create mode 100644 install/zigbee2mqtt-install.sh delete mode 100644 install/zigbee2mqtt-v5-install.sh create mode 100644 install/zwave-js-ui-install.sh delete mode 100644 install/zwave-js-ui-v5-install.sh create mode 100644 misc/alpine-install.func create mode 100644 misc/alpine.func create mode 100644 misc/debian.func create mode 100644 misc/docker.func create mode 100644 misc/install.func create mode 100644 misc/ubuntu.func rename vm/{mikrotik-routeros-v5.sh => mikrotik-routeros.sh} (51%) rename vm/{pimox-haos-vm-v5.sh => pimox-haos-vm.sh} (50%) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh deleted file mode 100644 index 73a5eb9c..00000000 --- a/ct/adguard-v5.sh +++ /dev/null @@ -1,444 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ___ __ __ - / | ____/ /___ ___v5______ __________/ / - / /| |/ __ / __ / / / / __ / ___/ __ / - / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / -/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ - /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Adguard" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping AdguardHome" -systemctl stop AdGuardHome -msg_ok "Stopped AdguardHome" - -msg_info "Updating AdguardHome" -wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz -tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null -mkdir -p adguard-backup -cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ -cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome -cp -r adguard-backup/* /opt/AdGuardHome/ -msg_ok "Updated AdguardHome" - -msg_info "Starting AdguardHome" -systemctl start AdGuardHome -msg_ok "Started AdguardHome" - -msg_info "Cleaning Up" -rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup -msg_ok "Cleaned" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/AdGuardHome ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/adguard.sh b/ct/adguard.sh new file mode 100644 index 00000000..682fc877 --- /dev/null +++ b/ct/adguard.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ __ + / | ____/ /___ ___ ______ __________/ / + / /| |/ __ / __ / / / / __ / ___/ __ / + / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / +/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Adguard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping AdguardHome" +systemctl stop AdGuardHome +msg_ok "Stopped AdguardHome" + +msg_info "Updating AdguardHome" +wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz +tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null +mkdir -p adguard-backup +cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ +cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome +cp -r adguard-backup/* /opt/AdGuardHome/ +msg_ok "Updated AdguardHome" + +msg_info "Starting AdguardHome" +systemctl start AdGuardHome +msg_ok "Started AdguardHome" + +msg_info "Cleaning Up" +rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup +msg_ok "Cleaned" +msg_ok "Update Successfull" +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}:3000${CL} \n" diff --git a/ct/alpine-adguard-v5.sh b/ct/alpine-adguard-v5.sh deleted file mode 100644 index 4ed5ea19..00000000 --- a/ct/alpine-adguard-v5.sh +++ /dev/null @@ -1,486 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ___ __ __ - / | ____/ /___ ___v5______ __________/ / - / /| |/ __ / __ / / / / __ / ___/ __ / - / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / -/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ - /____/ Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-AdGuard" -var_disk="0.3" -var_cpu="1" -var_ram="256" -var_os="alpine" -var_version="3.17" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - PW="-password alpine" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -timezone=$(cat /etc/timezone) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - header_info - normal=$(echo "\033[m") - menu=$(echo "\033[36m") - number=$(echo "\033[33m") - fgred=$(echo "\033[31m") - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Update LXC OS \n" - printf "${menu}**${number} 2)${normal} Update AdGuardHome\n" - printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." - read opt - -while [ "$opt" != "" ]; do - case $opt in - 1) - clear - echo -e "${fgred}Update LXC OS${normal}" - msg_info "Updating LXC OS" - apk update &>/dev/null - apk upgrade &>/dev/null - msg_ok "Update Successfull" - - break - ;; - 2) - clear - echo -e "${fgred}Update AdGuardHome${normal}" - msg_info "Stopping AdguardHome" - /opt/AdGuardHome/AdGuardHome -s stop &>/dev/null - msg_ok "Stopped AdguardHome" - - VER=$(curl -sqI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); - msg_info "Updating AdguardHome to $VER" - wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" - tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null - mkdir -p adguard-backup - cp -rf /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ - cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome - cp -r adguard-backup/* /opt/AdGuardHome/ - msg_ok "Updated AdguardHome" - - msg_info "Starting AdguardHome" - /opt/AdGuardHome/AdGuardHome -s start &>/dev/null - msg_ok "Started AdguardHome" - - msg_info "Cleaning Up" - rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup - msg_ok "Cleaned" - msg_ok "Update Successfull" - - break - ;; - x) - clear - echo -e "⚠ User exited script \n" - exit - ;; - \n) - clear - echo -e "⚠ User exited script \n" - exit - ;; - *) - clear - echo -e "Please choose an option from the menu" - update_script - ;; - esac -done - - -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /opt/AdGuardHome ]]; then - msg_error "No ${APP} Installation Found!" - else - update_script - fi -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh new file mode 100644 index 00000000..4604fbcb --- /dev/null +++ b/ct/alpine-adguard.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ___ __ __ + / | ____/ /___ ___ ______ __________/ / + / /| |/ __ / __ / / / / __ / ___/ __ / + / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / +/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ + /____/ Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-AdGuard" +var_disk="0.3" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password alpine" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ + "1" "Update LXC OS" \ + "2" "Manually Update AdGuardHome" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + 2) + header_info + echo "In the process of creating a method to update" + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/alpine-docker-v5.sh b/ct/alpine-docker-v5.sh deleted file mode 100644 index b220ed08..00000000 --- a/ct/alpine-docker-v5.sh +++ /dev/null @@ -1,465 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ____ __ - / __ \____ _____/ /_v5__ _____ - / / / / __ \/ ___/ //_/ _ \/ ___/ - / /_/ / /_/ / /__/ ,< / __/ / -/_____/\____/\___/_/|_|\___/_/ - Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-Docker" -var_disk="2" -var_cpu="1" -var_ram="1024" -var_os="alpine" -var_version="3.17" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - PW="-password alpine" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" On \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -timezone=$(cat /etc/timezone) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - header_info - normal=$(echo "\033[m") - menu=$(echo "\033[36m") - number=$(echo "\033[33m") - fgred=$(echo "\033[31m") - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Update ${APP} \n" - printf "\n${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." - read opt - -while [ "$opt" != "" ]; do - case $opt in - 1) - clear - echo -e "${fgred}Update ${APP}${normal}" - apk update &>/dev/null - apk upgrade &>/dev/null - - break - ;; - x) - exit - ;; - \n) - exit - ;; - *) - clear - echo -e "Please choose an option from the menu" - update_script - ;; - esac -done -exit -} -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -d /etc/docker ]]; then - msg_error "No ${APP} Installation Found!" - else - update_script - fi -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh new file mode 100644 index 00000000..21bd2144 --- /dev/null +++ b/ct/alpine-docker.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ____ __ + / __ \____ _____/ /_ __ _____ + / / / / __ \/ ___/ //_/ _ \/ ___/ + / /_/ / /_/ / /__/ ,< / __/ / +/_____/\____/\___/_/|_|\___/_/ + Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Docker" +var_disk="2" +var_cpu="1" +var_ram="1024" +var_os="alpine" +var_version="3.17" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password alpine" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + "1" "Check for Docker Updates" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + esac +done + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/alpine-grafana-v5.sh b/ct/alpine-grafana-v5.sh deleted file mode 100644 index d9abeb4f..00000000 --- a/ct/alpine-grafana-v5.sh +++ /dev/null @@ -1,482 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ______ ____ - / ____/________ _/ __/___ _____v5____ _ - / / __/ ___/ __ / /_/ __ / __ \/ __ / -/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / -\____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ - Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-Grafana" -var_disk="0.5" -var_cpu="1" -var_ram="256" -var_os="alpine" -var_version="3.17" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - PW="-password alpine" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -timezone=$(cat /etc/timezone) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - header_info - normal=$(echo "\033[m") - menu=$(echo "\033[36m") - number=$(echo "\033[33m") - fgred=$(echo "\033[31m") - LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Update LXC OS + Grafana \n" - printf "${menu}**${number} 2)${normal} Allow 0.0.0.0 for listening \n" - printf "${menu}**${number} 3)${normal} Allow only ${LXCIP} for listening \n" - printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." - read opt - -while [ "$opt" != "" ]; do - case $opt in - 1) - clear - echo -e "${fgred}Update LXC OS${normal}" - msg_info "Updating LXC OS + Grafana" - apk update &>/dev/null - apk upgrade &>/dev/null - msg_ok "Update Successfull" - - break - ;; - 2) - clear - echo -e "${fgred}Updating Grafana Config with IP: ${LXCIP}${normal}" - msg_info "Stopping Grafana" - service grafana stop &>/dev/null - sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana - msg_ok "Restarted Grafana" - service grafana start &>/dev/null - - break - ;; - 3) - clear - echo -e "${fgred}Updating Grafana Config with host IP: ${LXCIP}${normal}" - msg_info "Stopping Grafana" - service grafana stop &>/dev/null - sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana - msg_ok "Restarted Grafana" - service grafana start &>/dev/null - - break - ;; - x) - clear - echo -e "⚠ User exited script \n" - exit - ;; - \n) - clear - echo -e "⚠ User exited script \n" - exit - ;; - *) - clear - echo -e "Please choose an option from the menu" - update_script - ;; - esac -done - - -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/conf.d/grafana ]]; then - msg_error "No ${APP} Installation Found!" - else - update_script - fi -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh new file mode 100644 index 00000000..4dd13bda --- /dev/null +++ b/ct/alpine-grafana.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ______ ____ + / ____/________ _/ __/___ _____ ____ _ + / / __/ ___/ __ / /_/ __ / __ \/ __ / +/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / +\____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ + Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Grafana" +var_disk="0.5" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password alpine" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" --cancel-button Exit-Script 11 58 3 \ + "1" "Check for Grafana Updates" \ + "2" "Allow 0.0.0.0 for listening" \ + "3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + 2) + sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana + service grafana restart + exit + ;; + 3) + sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana + service grafana restart + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh deleted file mode 100644 index 6357beb8..00000000 --- a/ct/alpine-v5.sh +++ /dev/null @@ -1,419 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ___ v5 __ _ - / | / /___ (_)___ ___ - / /| | / / __ \/ / __ \/ _ \ - / ___ |/ / /_/ / / / / / __/ -/_/ |_/_/ .___/_/_/ /_/\___/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine" -var_disk="0.1" -var_cpu="1" -var_ram="512" -var_os="alpine" -var_version="3.17" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - PW="-password alpine" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apk update &>/dev/null -apk upgrade &>/dev/null -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/alpine-vaultwarden-v5.sh b/ct/alpine-vaultwarden-v5.sh deleted file mode 100644 index 731adbc7..00000000 --- a/ct/alpine-vaultwarden-v5.sh +++ /dev/null @@ -1,456 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - _ __ ____ __ -| | / /___ ___ __/ / /__ ______ __________/ /__v5____ -| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ -| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / -|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ - Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-Vaultwarden" -var_disk="0.3" -var_cpu="1" -var_ram="256" -var_os="alpine" -var_version="3.17" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - PW="-password alpine" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -timezone=$(cat /etc/timezone) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - header_info - normal=$(echo "\033[m") - menu=$(echo "\033[36m") - number=$(echo "\033[33m") - fgred=$(echo "\033[31m") - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Update Vaultwarden \n" - printf "${menu}**${number} 2)${normal} View Admin Token\n" - printf "\n${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." - read opt - -while [ "$opt" != "" ]; do - case $opt in - 1) - clear - echo -e "${fgred}Update Vaultwarden${normal}" - apk update &>/dev/null - apk upgrade &>/dev/null - - break - ;; - 2) - clear - echo -e "${fgred}View the Admin Token${normal}" - cat /etc/conf.d/vaultwarden | grep "ADMIN_TOKEN" | awk '{print substr($2, 7) }' - - break - ;; - x) - exit - ;; - \n) - exit - ;; - *) - clear - echo -e "Please choose an option from the menu" - update_script - ;; - esac -done -exit -} -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/conf.d/vaultwarden ]]; then - msg_error "No ${APP} Installation Found!" - else - update_script - fi -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh new file mode 100644 index 00000000..0f6c9930 --- /dev/null +++ b/ct/alpine-vaultwarden.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + _ __ ____ __ +| | / /___ ___ __/ / /__ ______ __________/ /__ ____ +| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ +| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / +|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ + Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Vaultwarden" +var_disk="0.3" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password alpine" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ + "1" "Update VaultWarden" \ + "2" "Show Admin Token" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + 2) + whiptail --title "ADMIN TOKEN" --msgbox "$(cat /etc/conf.d/vaultwarden | grep ADMIN_TOKEN | awk '{print substr($2, 13) }')" 7 68 + clear + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/alpine-zigbee2mqtt-v5.sh b/ct/alpine-zigbee2mqtt-v5.sh deleted file mode 100644 index ed80ad45..00000000 --- a/ct/alpine-zigbee2mqtt-v5.sh +++ /dev/null @@ -1,460 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - _____ _ __ ___ __ _______ ____________ -/__ / (_)___ _/ /_ ___v5___ |__ \ / |/ / __ \/_ __/_ __/ - / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / - / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / -/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ - /____/ Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-Zigbee2MQTT" -var_disk="0.3" -var_cpu="1" -var_ram="256" -var_os="alpine" -var_version="3.17" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - PW="-password alpine" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -timezone=$(cat /etc/timezone) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - header_info - normal=$(echo "\033[m") - menu=$(echo "\033[36m") - number=$(echo "\033[33m") - fgred=$(echo "\033[31m") - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Update ${APP} \n" - printf "\n${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." - read opt - -while [ "$opt" != "" ]; do - case $opt in - 1) - clear - echo -e "${fgred}Update ${APP}${normal}" - apk update &>/dev/null - apk upgrade &>/dev/null - - break - ;; - x) - exit - ;; - \n) - exit - ;; - *) - clear - echo -e "Please choose an option from the menu" - update_script - ;; - esac -done -exit -} -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then - msg_error "No ${APP} Installation Found!" - else - update_script - fi -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- ash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh new file mode 100644 index 00000000..28bcaf3b --- /dev/null +++ b/ct/alpine-zigbee2mqtt.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + _____ _ __ ___ __ _______ ____________ +/__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ + / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / + / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / +/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ + /____/ Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Zigbee2MQTT" +var_disk="0.3" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password alpine" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + "1" "Check for Zigbee2MQTT Updates" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/alpine.sh b/ct/alpine.sh new file mode 100644 index 00000000..19074a97 --- /dev/null +++ b/ct/alpine.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ _ + / | / /___ (_)___ ___ + / /| | / / __ \/ / __ \/ _ \ + / ___ |/ / /_/ / / / / / __/ +/_/ |_/_/ .___/_/_/ /_/\___/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine" +var_disk="0.1" +var_cpu="1" +var_ram="512" +var_os="alpine" +var_version="3.17" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password alpine" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ + "1" "Check for Alpine Updates" ON \ + 3>&1 1>&2 2>&3) + +header_info +if [ "$UPD" == "1" ]; then +apk update && apk upgrade +exit; +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/archlinux-v5.sh b/ct/archlinux.sh similarity index 99% rename from ct/archlinux-v5.sh rename to ct/archlinux.sh index 26385a0a..62f04bb3 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux.sh @@ -8,9 +8,8 @@ function header_info { clear cat <<"EOF" - ___ __ __ _ - / | __________/ /_ v5 / / (_)___ __ ___ __ + / | __________/ /_ / / (_)___ __ ___ __ / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ / ___ |/ / / /__/ / / / / /___/ / / / / /_/ /> < /_/ |_/_/ \___/_/ /_/ /_____/_/_/ /_/\__,_/_/|_| diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh deleted file mode 100644 index ca4e5c9b..00000000 --- a/ct/audiobookshelf-v5.sh +++ /dev/null @@ -1,421 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ___ __ __ __ ______ - ____ ___ ______/ (_)___v5/ /_ ____ ____ / /_______/ /_ ___ / / __/ - / __ `/ / / / __ / / __ \/ __ \/ __ \/ __ \/ //_/ ___/ __ \/ _ \/ / /_ -/ /_/ / /_/ / /_/ / / /_/ / /_/ / /_/ / /_/ / ,< (__ ) / / / __/ / __/ -\__,_/\__,_/\__,_/_/\____/_.___/\____/\____/_/|_/____/_/ /_/\___/_/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="audiobookshelf" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:13378${CL} \n" diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh new file mode 100644 index 00000000..7e1de964 --- /dev/null +++ b/ct/audiobookshelf.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ __ __ ______ + ____ ___ ______/ (_)___ / /_ ____ ____ / /_______/ /_ ___ / / __/ + / __ `/ / / / __ / / __ \/ __ \/ __ \/ __ \/ //_/ ___/ __ \/ _ \/ / /_ +/ /_/ / /_/ / /_/ / / /_/ / /_/ / /_/ / /_/ / ,< (__ ) / / / __/ / __/ +\__,_/\__,_/\__,_/_/\____/_.___/\____/\____/_/|_/____/_/ /_/\___/_/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="audiobookshelf" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:13378${CL} \n" diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh deleted file mode 100644 index b0ad08cc..00000000 --- a/ct/autobrr-v5.sh +++ /dev/null @@ -1,437 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ___ __ __ - / | __ __/ /_____ / /_v5__________ - / /| |/ / / / __/ __ \/ __ \/ ___/ ___/ - / ___ / /_/ / /_/ /_/ / /_/ / / / / -/_/ |_\__,_/\__/\____/_.___/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Autobrr" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping ${APP} LXC" -systemctl stop autobrr.service -msg_ok "Stopped ${APP} LXC" - -msg_info "Updating ${APP} LXC" -rm -rf /usr/local/bin/* -wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) -tar -C /usr/local/bin -xzf autobrr*.tar.gz -rm -rf autobrr*.tar.gz -msg_ok "Updated ${APP} LXC" - -msg_info "Starting ${APP} LXC" -systemctl start autobrr.service -msg_ok "Started ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /root/.config/autobrr/config.toml ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:7474${CL} \n" diff --git a/ct/autobrr.sh b/ct/autobrr.sh new file mode 100644 index 00000000..7571c138 --- /dev/null +++ b/ct/autobrr.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ __ + / | __ __/ /_____ / /_ __________ + / /| |/ / / / __/ __ \/ __ \/ ___/ ___/ + / ___ / /_/ / /_/ /_/ / /_/ / / / / +/_/ |_\__,_/\__/\____/_.___/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Autobrr" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /root/.config/autobrr/config.toml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP} LXC" +systemctl stop autobrr.service +msg_ok "Stopped ${APP} LXC" + +msg_info "Updating ${APP} LXC" +rm -rf /usr/local/bin/* +wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) +tar -C /usr/local/bin -xzf autobrr*.tar.gz +rm -rf autobrr*.tar.gz +msg_ok "Updated ${APP} LXC" + +msg_info "Starting ${APP} LXC" +systemctl start autobrr.service +msg_ok "Started ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7474${CL} \n" diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh deleted file mode 100644 index 64b905d2..00000000 --- a/ct/blocky-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ __ - / __ )/ /___v5_____/ /____ __ - / __ / / __ \/ ___/ //_/ / / / - / /_/ / / /_/ / /__/ ,< / /_/ / -/_____/_/\____/\___/_/|_|\__, / - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Blocky" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/blocky ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/blocky.sh b/ct/blocky.sh new file mode 100644 index 00000000..cfa21ed8 --- /dev/null +++ b/ct/blocky.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ __ + / __ )/ /___ _____/ /____ __ + / __ / / __ \/ ___/ //_/ / / / + / /_/ / / /_/ / /__/ ,< / /_/ / +/_____/_/\____/\___/_/|_|\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Blocky" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh deleted file mode 100644 index 7c00c6b3..00000000 --- a/ct/casaos-v5.sh +++ /dev/null @@ -1,453 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ ____ _____ - / ____/___ __v5______ _/ __ \/ ___/ - / / / __ `/ ___/ __ `/ / / /\__ \ -/ /___/ /_/ (__ ) /_/ / /_/ /___/ / -\____/\__,_/____/\__,_/\____//____/ - -EOF -} -header_info -echo -e "Loading..." -APP="CasaOS" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" -else - FUSE="no" -fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/docker ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export ST=$FUSE -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP} ${CL} \n" diff --git a/ct/casaos.sh b/ct/casaos.sh new file mode 100644 index 00000000..e7bcf8e2 --- /dev/null +++ b/ct/casaos.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docker.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ ____ _____ + / ____/___ __________ _/ __ \/ ___/ + / / / __ `/ ___/ __ `/ / / /\__ \ +/ /___/ /_/ (__ ) /_/ / /_/ /___/ / +\____/\__,_/____/\__,_/\____//____/ + +EOF +} +header_info +echo -e "Loading..." +APP="CasaOS" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + FUSE="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +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} ${CL} \n" diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh deleted file mode 100644 index 64899ce7..00000000 --- a/ct/changedetection-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ________ ____ __ __ _ - / ____/ /_v5____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ - / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ -/ /___/ / / / /_/ / / / / /_/ / __/ / /_/ / __/ /_/ __/ /__/ /_/ / /_/ / / / / -\____/_/ /_/\__,_/_/ /_/\__, /\___/ /_____/\___/\__/\___/\___/\__/_/\____/_/ /_/ - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Change Detection" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -pip3 install changedetection.io --upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/changedetection.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/changedetection.sh b/ct/changedetection.sh new file mode 100644 index 00000000..3f94891c --- /dev/null +++ b/ct/changedetection.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ ____ __ __ _ + / ____/ /_ ____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ + / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ +/ /___/ / / / /_/ / / / / /_/ / __/ / /_/ / __/ /_/ __/ /__/ /_/ / /_/ / / / / +\____/_/ /_/\__,_/_/ /_/\__, /\___/ /_____/\___/\__/\___/\___/\__/_/\____/_/ /_/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Change Detection" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +pip3 install changedetection.io --upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh deleted file mode 100644 index 890b08cc..00000000 --- a/ct/cronicle-v5.sh +++ /dev/null @@ -1,468 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ _ __ - / ____/________v5____ (_)____/ /__ - / / / ___/ __ \/ __ \/ / ___/ / _ \ -/ /___/ / / /_/ / / / / / /__/ / __/ -\____/_/ \____/_/ /_/_/\___/_/\___/ - -EOF -} -header_info -echo -e "Loading..." -APP="Cronicle" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -hostname="$(hostname)" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info -SERVER="y" - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP}" ON \ - "2" "Install ${APP} Worker" OFF \ - 3>&1 1>&2 2>&3) - -header_info -if [ "$UPD" == "1" ]; then - if [[ ! -d /opt/cronicle ]]; then - msg_error "No ${APP} Installation Found!"; - exit - fi -msg_info "Updating ${APP}" -/opt/cronicle/bin/control.sh upgrade &>/dev/null -msg_ok "Updated ${APP}" -exit -fi -if [ "$UPD" == "2" ]; then -LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing Dependencies" - -apt-get install -y git &>/dev/null -apt-get install -y make &>/dev/null -apt-get install -y g++ &>/dev/null -apt-get install -y gcc &>/dev/null -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) &>/dev/null -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" - -msg_info "Installing Cronicle Worker" -mkdir -p /opt/cronicle -cd /opt/cronicle -tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 &>/dev/null -npm install &>/dev/null -node bin/build.js dist &>/dev/null -sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json -/opt/cronicle/bin/control.sh start &>/dev/null -cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null -chmod 775 /etc/init.d/cronicled -update-rc.d cronicled defaults &>/dev/null -msg_ok "Installed Cronicle Worker on $hostname" -echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export SERV=$SERVER -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Primary should be reachable by going to the following URL. - ${BL}http://${IP}:3012${CL} admin|admin \n" diff --git a/ct/cronicle.sh b/ct/cronicle.sh new file mode 100644 index 00000000..85019ee5 --- /dev/null +++ b/ct/cronicle.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ _ __ + / ____/________ ____ (_)____/ /__ + / / / ___/ __ \/ __ \/ / ___/ / _ \ +/ /___/ / / /_/ / / / / / /__/ / __/ +\____/_/ \____/_/ /_/_/\___/_/\___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Cronicle" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP}" ON \ + "2" "Install ${APP} Worker" OFF \ + 3>&1 1>&2 2>&3) + +header_info +msg_info "Updating ${APP}" +/opt/cronicle/bin/control.sh upgrade &>/dev/null +msg_ok "Updated ${APP}" +exit +fi +if [ "$UPD" == "2" ]; then +LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +IP=$(hostname -I | awk '{print $1}') +msg_info "Installing Dependencies" + +apt-get install -y git &>/dev/null +apt-get install -y make &>/dev/null +apt-get install -y g++ &>/dev/null +apt-get install -y gcc &>/dev/null +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) &>/dev/null +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +apt-get install -y nodejs &>/dev/null +msg_ok "Installed Node.js" + +msg_info "Installing Cronicle Worker" +mkdir -p /opt/cronicle +cd /opt/cronicle +tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 &>/dev/null +npm install &>/dev/null +node bin/build.js dist &>/dev/null +sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json +/opt/cronicle/bin/control.sh start &>/dev/null +cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null +chmod 775 /etc/init.d/cronicled +update-rc.d cronicled defaults &>/dev/null +msg_ok "Installed Cronicle Worker on $hostname" +echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" +exit +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Primary should be reachable by going to the following URL. + ${BL}http://${IP}:3012${CL} admin|admin \n" diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh deleted file mode 100644 index bb50f147..00000000 --- a/ct/daemonsync-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ _____ - / __ \____ ____ ____ ___ ____ ____ / ___/__v5______ _____ - / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ - / /_/ / /_/ / __/ / / / / / /_/ / / / / ___/ / /_/ / / / / /__ -/_____/\__,_/\___/_/ /_/ /_/\____/_/ /_/ /____/\__, /_/ /_/\___/ - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Daemon Sync" -var_disk="8" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/daemonsync ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh new file mode 100644 index 00000000..5b0a2ee6 --- /dev/null +++ b/ct/daemonsync.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _____ + / __ \____ ____ ____ ___ ____ ____ / ___/__ ______ _____ + / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ + / /_/ / /_/ / __/ / / / / / /_/ / / / / ___/ / /_/ / / / / /__ +/_____/\__,_/\___/_/ /_/ /_/\____/_/ /_/ /____/\__, /_/ /_/\___/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Daemon Sync" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8084${CL} \n" diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh deleted file mode 100644 index 0b63ea64..00000000 --- a/ct/dashy-v5.sh +++ /dev/null @@ -1,452 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____ ______/ /_ __ __ - / / / / __ / ___/ __ \/ / / / - / /_/ / /_/ (__ ) / / / /_/ / -/_____/\__,_/____/_/ /_/\__, / - v5 /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Dashy" -var_disk="6" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping ${APP}" -systemctl stop dashy -msg_ok "Stopped ${APP}" - -msg_info "Backing up conf.yml" -cd ~ -cp -R /dashy/public/conf.yml conf.yml -msg_ok "Backed up conf.yml" - -msg_info "Updating Dashy" -cd /dashy -git merge &>/dev/null -git pull origin master &>/dev/null -yarn &>/dev/null -yarn build &>/dev/null -msg_ok "Updated Dashy" - -msg_info "Restoring conf.yml" -cd ~ -cp -R conf.yml /dashy/public -msg_ok "Restored conf.yml" - -msg_info "Cleaning" -rm -rf conf.yml -msg_ok "Cleaned" - -msg_info "Starting Dashy" -systemctl start dashy -msg_ok "Started Dashy" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/dashy.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/dashy.sh b/ct/dashy.sh new file mode 100644 index 00000000..63338364 --- /dev/null +++ b/ct/dashy.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \____ ______/ /_ __ __ + / / / / __ / ___/ __ \/ / / / + / /_/ / /_/ (__ ) / / / /_/ / +/_____/\__,_/____/_/ /_/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Dashy" +var_disk="6" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP}" +systemctl stop dashy +msg_ok "Stopped ${APP}" + +msg_info "Backing up conf.yml" +cd ~ +cp -R /dashy/public/conf.yml conf.yml +msg_ok "Backed up conf.yml" + +msg_info "Updating Dashy" +cd /dashy +git merge &>/dev/null +git pull origin master &>/dev/null +yarn &>/dev/null +yarn build &>/dev/null +msg_ok "Updated Dashy" + +msg_info "Restoring conf.yml" +cd ~ +cp -R conf.yml /dashy/public +msg_ok "Restored conf.yml" + +msg_info "Cleaning" +rm -rf conf.yml +msg_ok "Cleaned" + +msg_info "Starting Dashy" +systemctl start dashy +msg_ok "Started Dashy" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:4000${CL} \n" diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh deleted file mode 100644 index b0c885f4..00000000 --- a/ct/debian-v5.sh +++ /dev/null @@ -1,419 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ _ - / __ \___v5/ /_ (_)___ _____ - / / / / _ \/ __ \/ / __ `/ __ \ - / /_/ / __/ /_/ / / /_/ / / / / -/_____/\___/_.___/_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Debian" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/debian.sh b/ct/debian.sh new file mode 100644 index 00000000..3ece2f2a --- /dev/null +++ b/ct/debian.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ _ + / __ \___ / /_ (_)___ _____ + / / / / _ \/ __ \/ / __ `/ __ \ + / /_/ / __/ /_/ / / /_/ / / / / +/_____/\___/_.___/_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Debian" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" \ No newline at end of file diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh deleted file mode 100644 index cdeb7a75..00000000 --- a/ct/deconz-v5.sh +++ /dev/null @@ -1,442 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __________ _ _______ - ____/ /v5 / ____/ __ \/ | / /__ / - / __ / _ \/ / / / / / |/ / / / -/ /_/ / __/ /___/ /_/ / /| / / /__ -\__,_/\___/\____/\____/_/ |_/ /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="deCONZ" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL}\n" diff --git a/ct/deconz.sh b/ct/deconz.sh new file mode 100644 index 00000000..d43073f8 --- /dev/null +++ b/ct/deconz.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __________ _ _______ + ____/ /__ / ____/ __ \/ | / /__ / + / __ / _ \/ / / / / / |/ / / / +/ /_/ / __/ /___/ /_/ / /| / / /__ +\__,_/\___/\____/\____/_/ |_/ /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="deCONZ" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="ubuntu" +var_version="20.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL}\n" diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh deleted file mode 100644 index 7d95aa64..00000000 --- a/ct/deluge-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \___ / /_v5______ ____ - / / / / _ \/ / / / / __ `/ _ \ - / /_/ / __/ / /_/ / /_/ / __/ -/_____/\___/_/\__,_/\__, /\___/ - /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Deluge" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -pip3 install deluge[all] --upgrade -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/deluged.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8112${CL} \n" diff --git a/ct/deluge.sh b/ct/deluge.sh new file mode 100644 index 00000000..da8ce1eb --- /dev/null +++ b/ct/deluge.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \___ / /_ ______ ____ + / / / / _ \/ / / / / __ `/ _ \ + / /_/ / __/ / /_/ / /_/ / __/ +/_____/\___/_/\__,_/\__, /\___/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Deluge" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/deluged.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +pip3 install deluge[all] --upgrade +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8112${CL} \n" diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh deleted file mode 100644 index ac845530..00000000 --- a/ct/devuan-v5.sh +++ /dev/null @@ -1,419 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ - / __ \___ _ ____ ______v5____ - / / / / _ \ | / / / / / __ `/ __ \ - / /_/ / __/ |/ / /_/ / /_/ / / / / -/_____/\___/|___/\__,_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Devuan" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="devuan" -var_version="4.0" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}$NSAPP${CL}" - PW="-password $NSAPP" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/devuan.sh b/ct/devuan.sh new file mode 100644 index 00000000..6c51b605 --- /dev/null +++ b/ct/devuan.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ + / __ \___ _ ____ ______ ____ + / / / / _ \ | / / / / / __ `/ __ \ + / /_/ / __/ |/ / /_/ / /_/ / / / / +/_____/\___/|___/\__,_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Devuan" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="devuan" +var_version="4.0" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh deleted file mode 100644 index 677398a0..00000000 --- a/ct/docker-v5.sh +++ /dev/null @@ -1,446 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____ _____/ /_v5__ _____ - / / / / __ \/ ___/ //_/ _ \/ ___/ - / /_/ / /_/ / /__/ ,< / __/ / -/_____/\____/\___/_/|_|\___/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Docker" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" -else - FUSE="no" -fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export ST=$FUSE -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/docker.sh b/ct/docker.sh new file mode 100644 index 00000000..37ca3808 --- /dev/null +++ b/ct/docker.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docker.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \____ _____/ /_ __ _____ + / / / / __ \/ ___/ //_/ _ \/ ___/ + / /_/ / /_/ / /__/ ,< / __/ / +/_____/\____/\___/_/|_|\___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Docker" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + FUSE="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh deleted file mode 100644 index d138f812..00000000 --- a/ct/emby-v5.sh +++ /dev/null @@ -1,460 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ __ - / ____/___ v5_ / /_ __ __ - / __/ / __ __ \/ __ \/ / / / - / /___/ / / / / / /_/ / /_/ / -/_____/_/ /_/ /_/_.___/\__, / - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Emby" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit-script -fi -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -msg_info "Stopping ${APP}" -systemctl stop emby-server -msg_ok "Stopped ${APP}" - -msg_info "Updating ${APP}" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null -dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null -rm emby-server-deb_${LATEST}_amd64.deb -msg_ok "Updated ${APP}" - -msg_info "Starting ${APP}" -systemctl start emby-server -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/emby-server ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/emby.sh b/ct/emby.sh new file mode 100644 index 00000000..dd296190 --- /dev/null +++ b/ct/emby.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ + / ____/___ ___ / /_ __ __ + / __/ / __ __ \/ __ \/ / / / + / /___/ / / / / / /_/ / /_/ / +/_____/_/ /_/ /_/_.___/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Emby" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/emby-server ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +msg_info "Stopping ${APP}" +systemctl stop emby-server +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null +dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null +rm emby-server-deb_${LATEST}_amd64.deb +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start emby-server +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh deleted file mode 100644 index 45bbd9fa..00000000 --- a/ct/emqx-v5.sh +++ /dev/null @@ -1,421 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ________ _______v5 _ __ - / ____/ |/ / __ \ | |/ / - / __/ / /|_/ / / / / | / - / /___/ / / / /_/ / / | -/_____/_/ /_/\___\_\/_/|_| - -EOF -} -header_info -echo -e "Loading..." -APP="EMQX" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:18083${CL} \n" diff --git a/ct/emqx.sh b/ct/emqx.sh new file mode 100644 index 00000000..69afa53d --- /dev/null +++ b/ct/emqx.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ _______ _ __ + / ____/ |/ / __ \ | |/ / + / __/ / /|_/ / / / / | / + / /___/ / / / /_/ / / | +/_____/_/ /_/\___\_\/_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="EMQX" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +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}:18083${CL} \n" diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh deleted file mode 100644 index 5cb1c4f2..00000000 --- a/ct/esphome-v5.sh +++ /dev/null @@ -1,434 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ___________ ____ __ __ - / ____/ ___// __ \/ / / /___v5____ ___ ___ - / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ - / /___ ___/ / ____/ __ / /_/ / / / / / / __/ -/_____//____/_/ /_/ /_/\____/_/ /_/ /_/\___/ - -EOF -} -header_info -echo -e "Loading..." -APP="ESPHome" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping ESPHome" -systemctl stop esphomeDashboard -msg_ok "Stopped ESPHome" - -msg_info "Updating ESPHome" -pip3 install esphome --upgrade &>/dev/null -msg_ok "Updated ESPHome" - -msg_info "Starting ESPHome" -systemctl start esphomeDashboard -msg_ok "Started ESPHome" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /usr/local/bin/esphome ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/esphome.sh b/ct/esphome.sh new file mode 100644 index 00000000..1c25bd4f --- /dev/null +++ b/ct/esphome.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___________ ____ __ __ + / ____/ ___// __ \/ / / /___ ____ ___ ___ + / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ + / /___ ___/ / ____/ __ / /_/ / / / / / / __/ +/_____//____/_/ /_/ /_/\____/_/ /_/ /_/\___/ + +EOF +} +header_info +echo -e "Loading..." +APP="ESPHome" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /usr/local/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ESPHome" +systemctl stop esphomeDashboard +msg_ok "Stopped ESPHome" + +msg_info "Updating ESPHome" +pip3 install esphome --upgrade &>/dev/null +msg_ok "Updated ESPHome" + +msg_info "Starting ESPHome" +systemctl start esphomeDashboard +msg_ok "Started ESPHome" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6052${CL} \n" diff --git a/ct/go2rtc-v5.sh b/ct/go2rtc-v5.sh deleted file mode 100644 index cf95a685..00000000 --- a/ct/go2rtc-v5.sh +++ /dev/null @@ -1,421 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ___ __ - ____ _____ |__ \ _____/ /__v5__ - / __ `/ __ \__/ // ___/ __/ ___/ - / /_/ / /_/ / __// / / /_/ /__ - \__, /\____/____/_/ \__/\___/ -/____/ - -EOF -} -header_info -echo -e "Loading..." -APP="go2rtc" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:1984${CL} \n" diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh new file mode 100644 index 00000000..ebd1fade --- /dev/null +++ b/ct/go2rtc.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ + ____ _____ |__ \ _____/ /______ + / __ `/ __ \__/ // ___/ __/ ___/ + / /_/ / /_/ / __// / / /_/ /__ + \__, /\____/____/_/ \__/\___/ +/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="go2rtc" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:1984${CL} \n" diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh deleted file mode 100644 index 2984483f..00000000 --- a/ct/grafana-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ ____ - / ____/________ _/ __/___ _____v5____ _ - / / __/ ___/ __ / /_/ __ / __ \/ __ / -/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / -\____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Grafana" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grafana.sh b/ct/grafana.sh new file mode 100644 index 00000000..f908c465 --- /dev/null +++ b/ct/grafana.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ ____ + / ____/________ _/ __/___ _____ ____ _ + / / __/ ___/ __ / /_/ __ / __ \/ __ / +/ /_/ / / / /_/ / __/ /_/ / / / / /_/ / +\____/_/ \__,_/_/ \__,_/_/ /_/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Grafana" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh deleted file mode 100644 index ca85cf3f..00000000 --- a/ct/grocy-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __________ _______ __ - / __ / ___/ __ \/ ___/ / / / - / /_/ / / / /_/ / /__/ /_/ / - \__, /_/ v5\____/\___/\__, / -/____/ /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="grocy" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP}" -bash /var/www/html/update.sh -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/grocy.sh b/ct/grocy.sh new file mode 100644 index 00000000..bf7a05b8 --- /dev/null +++ b/ct/grocy.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __________ _______ __ + / __ / ___/ __ \/ ___/ / / / + / /_/ / / / /_/ / /__/ /_/ / + \__, /_/ \____/\___/\__, / +/____/ /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="grocy" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +bash /var/www/html/update.sh +msg_ok "Updated ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh deleted file mode 100644 index 8853bb2b..00000000 --- a/ct/heimdalldashboard-v5.sh +++ /dev/null @@ -1,506 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ _ _ _ ___ _ _ _ - /\ /\___(_)_ __ ___ __| | __ _| | | / \__ _ ___| |__ | |__ ___ __ _ _ __ __| | - / /_/ / _ \ | '_ ` _ \ / _` |/ _` | | | / /\ / _` / __| '_ \| '_ \ / _ \ / _` | '__/ _` | -/ __ / __/ | | | | | | (_| | (_| | | |v5/ /_// (_| \__ \ | | | |_) | (_) | (_| | | | (_| | -\/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_| /___,' \__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_| - -EOF -} -header_info -echo -e "Loading..." -APP="Heimdall Dashboard" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping ${APP}" -systemctl disable heimdall.service &>/dev/null -systemctl stop heimdall -sleep 1 -msg_ok "Stopped ${APP}" - -msg_info "Backing up Data" -if [ -d "/opt/Heimdall-2.4.6" ]; then - cp -R /opt/Heimdall-2.4.6/database database-backup - cp -R /opt/Heimdall-2.4.6/public public-backup -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - cp -R /opt/Heimdall-2.4.7b/database database-backup - cp -R /opt/Heimdall-2.4.7b/public public-backup -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - cp -R /opt/Heimdall-2.4.8/database database-backup - cp -R /opt/Heimdall-2.4.8/public public-backup -else - cp -R /opt/Heimdall/database database-backup - cp -R /opt/Heimdall/public public-backup -fi -sleep 1 -msg_ok "Backed up Data" - -RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -msg_info "Updating Heimdall Dashboard to ${RELEASE}" -curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null -tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -if [ ! -d "/opt/Heimdall" ]; then - mv Heimdall-${VER} /opt/Heimdall -else - cp -R Heimdall-${VER}/* /opt/Heimdall -fi - -service_path="/etc/systemd/system/heimdall.service" -echo "[Unit] -Description=Heimdall -After=network.target -[Service] -Restart=always -RestartSec=5 -Type=simple -User=root -WorkingDirectory=/opt/Heimdall -ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 -TimeoutStopSec=30 -[Install] -WantedBy=multi-user.target" >$service_path -msg_ok "Updated Heimdall Dashboard to ${RELEASE}" - -msg_info "Restoring Data" -cp -R database-backup/* /opt/Heimdall/database -cp -R public-backup/* /opt/Heimdall/public -sleep 1 -msg_ok "Restored Data" - -msg_info "Cleanup" -if [ -d "/opt/Heimdall-2.4.6" ]; then - rm -rf /opt/Heimdall-2.4.6 - rm -rf /opt/v2.4.6.tar.gz -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - rm -rf /opt/Heimdall-2.4.7b - rm -rf /opt/v2.4.7b.tar.gz -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - rm -rf /opt/Heimdall-2.4.8 - rm -rf /opt/v2.4.8.tar.gz -fi - -rm -rf ${RELEASE}.tar.gz -rm -rf Heimdall-${VER} -rm -rf public-backup -rm -rf database-backup -rm -rf Heimdall -sleep 1 -msg_ok "Cleaned" - -msg_info "Starting ${APP}" -systemctl enable --now heimdall.service &>/dev/null -sleep 2 -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Heimdall ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh new file mode 100644 index 00000000..3a631eeb --- /dev/null +++ b/ct/heimdalldashboard.sh @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ _ _ _ ___ _ _ _ + /\ /\___(_)_ __ ___ __| | __ _| | | / \__ _ ___| |__ | |__ ___ __ _ _ __ __| | + / /_/ / _ \ | '_ ` _ \ / _` |/ _` | | | / /\ / _` / __| '_ \| '_ \ / _ \ / _` | '__/ _` | +/ __ / __/ | | | | | | (_| | (_| | | | / /_// (_| \__ \ | | | |_) | (_) | (_| | | | (_| | +\/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_| /___,' \__,_|___/_| |_|_.__/ \___/ \__,_|_| \__,_| + +EOF +} +header_info +echo -e "Loading..." +APP="Heimdall Dashboard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP}" +systemctl disable heimdall.service &>/dev/null +systemctl stop heimdall +sleep 1 +msg_ok "Stopped ${APP}" + +msg_info "Backing up Data" +if [ -d "/opt/Heimdall-2.4.6" ]; then + cp -R /opt/Heimdall-2.4.6/database database-backup + cp -R /opt/Heimdall-2.4.6/public public-backup +elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then + cp -R /opt/Heimdall-2.4.7b/database database-backup + cp -R /opt/Heimdall-2.4.7b/public public-backup +elif [[ -d "/opt/Heimdall-2.4.8" ]]; then + cp -R /opt/Heimdall-2.4.8/database database-backup + cp -R /opt/Heimdall-2.4.8/public public-backup +else + cp -R /opt/Heimdall/database database-backup + cp -R /opt/Heimdall/public public-backup +fi +sleep 1 +msg_ok "Backed up Data" + +RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +msg_info "Updating Heimdall Dashboard to ${RELEASE}" +curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null +tar xvzf ${RELEASE}.tar.gz &>/dev/null +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +if [ ! -d "/opt/Heimdall" ]; then + mv Heimdall-${VER} /opt/Heimdall +else + cp -R Heimdall-${VER}/* /opt/Heimdall +fi + +service_path="/etc/systemd/system/heimdall.service" +echo "[Unit] +Description=Heimdall +After=network.target +[Service] +Restart=always +RestartSec=5 +Type=simple +User=root +WorkingDirectory=/opt/Heimdall +ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 +TimeoutStopSec=30 +[Install] +WantedBy=multi-user.target" >$service_path +msg_ok "Updated Heimdall Dashboard to ${RELEASE}" + +msg_info "Restoring Data" +cp -R database-backup/* /opt/Heimdall/database +cp -R public-backup/* /opt/Heimdall/public +sleep 1 +msg_ok "Restored Data" + +msg_info "Cleanup" +if [ -d "/opt/Heimdall-2.4.6" ]; then + rm -rf /opt/Heimdall-2.4.6 + rm -rf /opt/v2.4.6.tar.gz +elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then + rm -rf /opt/Heimdall-2.4.7b + rm -rf /opt/v2.4.7b.tar.gz +elif [[ -d "/opt/Heimdall-2.4.8" ]]; then + rm -rf /opt/Heimdall-2.4.8 + rm -rf /opt/v2.4.8.tar.gz +fi + +rm -rf ${RELEASE}.tar.gz +rm -rf Heimdall-${VER} +rm -rf public-backup +rm -rf database-backup +rm -rf Heimdall +sleep 1 +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl enable --now heimdall.service &>/dev/null +sleep 2 +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7990${CL} \n" diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh deleted file mode 100644 index cbb5aea1..00000000 --- a/ct/homeassistant-core-v5.sh +++ /dev/null @@ -1,586 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ _ _ _ ___ - /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___v5_ __ ___ - / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ -/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ -\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| - -EOF -} -header_info -echo -e "Loading..." -APP="Home Assistant-Core" -var_disk="8" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') -BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "default" | awk '{print substr($2, 2, length($2)-3) }') -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - PY=$(ls /srv/homeassistant/lib/) - IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Update Core" ON \ - "2" "Install HACS" OFF \ - "3" "Install FileBrowser" OFF \ - "4" "Install/Update AppDaemon" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then - if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then - clear - header_info - echo -e "${GN}Updating to Version ${BETA}${CL}" - BR="--pre " - else - clear - header_info - echo -e "${GN}Updating to Version ${STABLE}${CL}" - BR="" - fi - if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi - -msg_info "Stopping Home Assistant" -systemctl stop homeassistant -msg_ok "Stopped Home Assistant" - -msg_info "Updating Home Assistant" -source /srv/homeassistant/bin/activate -pip install ${BR}--upgrade homeassistant &>/dev/null -msg_ok "Updated Home Assistant" - -msg_info "Starting Home Assistant" -systemctl start homeassistant -sleep 2 -msg_ok "Started Home Assistant" -msg_ok "Update Successful" -echo -e "\n Go to http://${IP}:8123 \n" -exit -fi -if [ "$UPD" == "2" ]; then -msg_info "Installing Home Assistant Comunity Store (HACS)" -apt update &>/dev/null -apt install unzip &>/dev/null -cd .homeassistant -bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null -msg_ok "Installed Home Assistant Comunity Store (HACS)" -echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" -exit -fi -if [ "$UPD" == "3" ]; then -msg_info "Installing FileBrowser" -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null -filebrowser config init -a '0.0.0.0' &>/dev/null -filebrowser config set -a '0.0.0.0' &>/dev/null -filebrowser users add admin changeme --perm.admin &>/dev/null -msg_ok "Installed FileBrowser" - -msg_info "Creating Service" -service_path="/etc/systemd/system/filebrowser.service" -echo "[Unit] -Description=Filebrowser -After=network-online.target -[Service] -User=root -WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant -[Install] -WantedBy=default.target" >$service_path - -systemctl enable --now filebrowser.service &>/dev/null -msg_ok "Created Service" - -msg_ok "Completed Successfully!\n" -echo -e "FileBrowser should be reachable by going to the following URL. - ${BL}http://$IP:8080${CL} admin|changeme\n" -exit -fi -if [ "$UPD" == "4" ]; then - clear - header_info - if [[ ! -d /srv/appdaemon ]]; then - msg_info "Installing AppDaemon" - mkdir /srv/appdaemon - cd /srv/appdaemon - python3 -m venv . - source bin/activate - pip install appdaemon &>/dev/null - mkdir -p /root/.homeassistant/appdaemon/apps - cat > /root/.homeassistant/appdaemon/appdaemon.yaml << EOF -# Sample appdaemon.yml file -# For configuration, please visit: https://appdaemon.readthedocs.io/en/latest/CONFIGURE.html -appdaemon: - time_zone: CET - latitude: 51.725 - longitude: 14.3434 - elevation: 0 - plugins: - HASS: - type: hass - ha_url: - token: -http: - url: http://127.0.0.1:5050 -admin: -api: -EOF - msg_ok "Installed AppDaemon" - - msg_info "Creating Service" - cat > /etc/systemd/system/appdaemon.service << EOF -[Unit] -Description=AppDaemon -After=homeassistant.service -Requires=homeassistant.service -[Service] -Type=simple -WorkingDirectory=/root/.homeassistant/appdaemon -ExecStart=/srv/appdaemon/bin/appdaemon -c "/root/.homeassistant/appdaemon" -RestartForceExitStatus=100 -[Install] -WantedBy=multi-user.target -EOF - systemctl enable --now appdaemon &>/dev/null - msg_ok "Created Service" - - msg_ok "Completed Successfully!\n" - echo -e "AppDaemon should be reachable by going to the following URL. - ${BL}http://$IP:5050${CL}\n" - exit - else - msg_info "Upgrading AppDaemon" - msg_info "Stopping AppDaemon" - systemctl stop appdaemon - msg_ok "Stopped AppDaemon" - - msg_info "Updating AppDaemon" - source /srv/appdaemon/bin/activate - pip install --upgrade appdaemon &>/dev/null - msg_ok "Updated AppDaemon" - - msg_info "Starting AppDaemon" - systemctl start appdaemon - sleep 2 - msg_ok "Started AppDaemon" - msg_ok "Update Successful" - echo -e "\n Go to http://${IP}:5050 \n" - exit - fi -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /srv/homeassistant ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL}" diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh new file mode 100644 index 00000000..68cbf783 --- /dev/null +++ b/ct/homeassistant-core.sh @@ -0,0 +1,216 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + _ _ _ _ ___ + /\ /\___ _ __ ___ ___ /_\ ___ ___(_)___| |_ __ _ _ __ | |_ / __\___ _ __ ___ + / /_/ / _ \| '_ ` _ \ / _ \ //_\\/ __/ __| / __| __/ _` | '_ \| __| / / / _ \| '__/ _ \ +/ __ / (_) | | | | | | __/ / _ \__ \__ \ \__ \ || (_| | | | | |_ / /__| (_) | | | __/ +\/ /_/ \___/|_| |_| |_|\___| \_/ \_/___/___/_|___/\__\__,_|_| |_|\__| \____/\___/|_| \___| + +EOF +} +header_info +echo -e "Loading..." +APP="Home Assistant-Core" +var_disk="8" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + if [[ ! -d /srv/homeassistant ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + PY=$(ls /srv/homeassistant/lib/) + IP=$(hostname -I | awk '{print $1}') + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + "1" "Update Core" ON \ + "2" "Install HACS" OFF \ + "3" "Install FileBrowser" OFF \ + "4" "Install/Update AppDaemon" OFF \ + 3>&1 1>&2 2>&3) + header_info + if [ "$UPD" == "1" ]; then + if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then + clear + header_info + echo -e "${GN}Updating to Version ${BETA}${CL}" + BR="--pre " + else + clear + header_info + echo -e "${GN}Updating to Version ${STABLE}${CL}" + BR="" + fi + if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi + + msg_info "Stopping Home Assistant" + systemctl stop homeassistant + msg_ok "Stopped Home Assistant" + + msg_info "Updating Home Assistant" + source /srv/homeassistant/bin/activate + pip install ${BR}--upgrade homeassistant &>/dev/null + msg_ok "Updated Home Assistant" + + msg_info "Starting Home Assistant" + systemctl start homeassistant + sleep 2 + msg_ok "Started Home Assistant" + msg_ok "Update Successful" + echo -e "\n Go to http://${IP}:8123 \n" + exit + fi + if [ "$UPD" == "2" ]; then + msg_info "Installing Home Assistant Comunity Store (HACS)" + apt update &>/dev/null + apt install unzip &>/dev/null + cd .homeassistant + bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + msg_ok "Installed Home Assistant Comunity Store (HACS)" + echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" + exit + fi + if [ "$UPD" == "3" ]; then + msg_info "Installing FileBrowser" + curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser users add admin changeme --perm.admin &>/dev/null + msg_ok "Installed FileBrowser" + + msg_info "Creating Service" + service_path="/etc/systemd/system/filebrowser.service" + echo "[Unit] +Description=Filebrowser +After=network-online.target +[Service] +User=root +WorkingDirectory=/root/ +ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant +[Install] +WantedBy=default.target" >$service_path + + systemctl enable --now filebrowser.service &>/dev/null + msg_ok "Created Service" + + msg_ok "Completed Successfully!\n" + echo -e "FileBrowser should be reachable by going to the following URL. + ${BL}http://$IP:8080${CL} admin|changeme\n" + exit + fi + if [ "$UPD" == "4" ]; then + clear + header_info + if [[ ! -d /srv/appdaemon ]]; then + msg_info "Installing AppDaemon" + mkdir /srv/appdaemon + cd /srv/appdaemon + python3 -m venv . + source bin/activate + pip install appdaemon &>/dev/null + mkdir -p /root/.homeassistant/appdaemon/apps + cat >/root/.homeassistant/appdaemon/appdaemon.yaml < + token: +http: + url: http://127.0.0.1:5050 +admin: +api: +EOF + msg_ok "Installed AppDaemon" + + msg_info "Creating Service" + cat >/etc/systemd/system/appdaemon.service </dev/null + msg_ok "Created Service" + + msg_ok "Completed Successfully!\n" + echo -e "AppDaemon should be reachable by going to the following URL. + ${BL}http://$IP:5050${CL}\n" + exit + else + msg_info "Upgrading AppDaemon" + msg_info "Stopping AppDaemon" + systemctl stop appdaemon + msg_ok "Stopped AppDaemon" + + msg_info "Updating AppDaemon" + source /srv/appdaemon/bin/activate + pip install --upgrade appdaemon &>/dev/null + msg_ok "Updated AppDaemon" + + msg_info "Starting AppDaemon" + systemctl start appdaemon + sleep 2 + msg_ok "Started AppDaemon" + msg_ok "Update Successful" + echo -e "\n Go to http://${IP}:5050 \n" + exit + fi + fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL}" diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh deleted file mode 100644 index 391f8080..00000000 --- a/ct/homeassistant-v5.sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ ___ _ __ __ - / / / /___v5____ ___ ___ / | __________(_)____/ /_____ _____ / /_ - / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ - -EOF -} -header_info -echo -e "Loading..." -APP="Home Assistant" -var_disk="16" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" -else - FUSE="no" -fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Update ALL Containers" ON \ - "2" "Remove ALL Unused Images" OFF \ - "3" "Install HACS" OFF \ - "4" "Install FileBrowser" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating All Containers" -CONTAINER_LIST="${1:-$(docker ps -q)}" -for container in ${CONTAINER_LIST}; do - CONTAINER_IMAGE="$(docker inspect --format "{{.Config.Image}}" --type container ${container})" - RUNNING_IMAGE="$(docker inspect --format "{{.Image}}" --type container "${container}")" - docker pull "${CONTAINER_IMAGE}" - LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" - if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then - echo "Updating ${container} image ${CONTAINER_IMAGE}" - DOCKER_COMMAND="$(runlike "${container}")" - docker rm --force "${container}" - eval ${DOCKER_COMMAND} - fi -done -msg_ok "Updated All Containers" -exit -fi -if [ "$UPD" == "2" ]; then -msg_info "Removing ALL Unused Images" -docker image prune -af -msg_ok "Removed ALL Unused Images" -exit -fi -if [ "$UPD" == "3" ]; then -msg_info "Installing Home Assistant Comunity Store (HACS)" -apt update &>/dev/null -apt install unzip &>/dev/null -cd /var/lib/docker/volumes/hass_config/_data -bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null -msg_ok "Installed Home Assistant Comunity Store (HACS)" -echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" -exit -fi -if [ "$UPD" == "4" ]; then -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing FileBrowser" -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null -filebrowser config init -a '0.0.0.0' &>/dev/null -filebrowser config set -a '0.0.0.0' &>/dev/null -filebrowser users add admin changeme --perm.admin &>/dev/null -msg_ok "Installed FileBrowser" - -msg_info "Creating Service" -service_path="/etc/systemd/system/filebrowser.service" -echo "[Unit] -Description=Filebrowser -After=network-online.target -[Service] -User=root -WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r / -[Install] -WantedBy=default.target" >$service_path - -systemctl enable --now filebrowser.service &>/dev/null -msg_ok "Created Service" - -msg_ok "Completed Successfully!\n" -echo -e "FileBrowser should be reachable by going to the following URL. - ${BL}http://$IP:8080${CL} admin|changeme\n" -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/docker/volumes/hass_config/_data - ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export ST=$FUSE -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} -Portainer should be reachable by going to the following URL. - ${BL}http://${IP}:9000${CL}\n" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh new file mode 100644 index 00000000..1bb58440 --- /dev/null +++ b/ct/homeassistant.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ __ ___ _ __ __ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="Home Assistant" +var_disk="16" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + if [[ ! -d /var/lib/docker/volumes/hass_config/_data ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + "1" "Update ALL Containers" ON \ + "2" "Remove ALL Unused Images" OFF \ + "3" "Install HACS" OFF \ + "4" "Install FileBrowser" OFF \ + 3>&1 1>&2 2>&3) + header_info + if [ "$UPD" == "1" ]; then + msg_info "Updating All Containers" + CONTAINER_LIST="${1:-$(docker ps -q)}" + for container in ${CONTAINER_LIST}; do + CONTAINER_IMAGE="$(docker inspect --format "{{.Config.Image}}" --type container ${container})" + RUNNING_IMAGE="$(docker inspect --format "{{.Image}}" --type container "${container}")" + docker pull "${CONTAINER_IMAGE}" + LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" + if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then + echo "Updating ${container} image ${CONTAINER_IMAGE}" + DOCKER_COMMAND="$(runlike "${container}")" + docker rm --force "${container}" + eval ${DOCKER_COMMAND} + fi + done + msg_ok "Updated All Containers" + exit + fi + if [ "$UPD" == "2" ]; then + msg_info "Removing ALL Unused Images" + docker image prune -af + msg_ok "Removed ALL Unused Images" + exit + fi + if [ "$UPD" == "3" ]; then + msg_info "Installing Home Assistant Comunity Store (HACS)" + apt update &>/dev/null + apt install unzip &>/dev/null + cd /var/lib/docker/volumes/hass_config/_data + bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + msg_ok "Installed Home Assistant Comunity Store (HACS)" + echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" + exit + fi + if [ "$UPD" == "4" ]; then + IP=$(hostname -I | awk '{print $1}') + msg_info "Installing FileBrowser" + curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser users add admin changeme --perm.admin &>/dev/null + msg_ok "Installed FileBrowser" + + msg_info "Creating Service" + service_path="/etc/systemd/system/filebrowser.service" + echo "[Unit] +Description=Filebrowser +After=network-online.target +[Service] +User=root +WorkingDirectory=/root/ +ExecStart=/usr/local/bin/filebrowser -r / +[Install] +WantedBy=default.target" >$service_path + + systemctl enable --now filebrowser.service &>/dev/null + msg_ok "Created Service" + + msg_ok "Completed Successfully!\n" + echo -e "FileBrowser should be reachable by going to the following URL. + ${BL}http://$IP:8080${CL} admin|changeme\n" + exit + fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL} +Portainer should be reachable by going to the following URL. + ${BL}http://${IP}:9000${CL}\n" diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh deleted file mode 100644 index 955813c7..00000000 --- a/ct/homebridge-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ______ __ _____________ ____ ________ ____________ - / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ - / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ - / __ / /_/ / / / / /___/ /_/ / _, _// // /_/ / /_/ / /___ -/_/ /_/\____/_/v5/_/_____/_____/_/ |_/___/_____/\____/_____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Homebridge" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homebridge.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/homebridge.sh b/ct/homebridge.sh new file mode 100644 index 00000000..ebc25192 --- /dev/null +++ b/ct/homebridge.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ______ __ _____________ ____ ________ ____________ + / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ + / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ + / __ / /_/ / / / / /___/ /_/ / _, _// // /_/ / /_/ / /___ +/_/ /_/\____/_/ /_/_____/_____/_/ |_/___/_____/\____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Homebridge" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8581${CL} \n" diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh deleted file mode 100644 index cc799cb4..00000000 --- a/ct/homepage-v5.sh +++ /dev/null @@ -1,433 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ - / / / /___ ____ ___ ___ ____ ____ _____ ____ - / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ - / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ -/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ - /_/ v5 /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Homepage" -var_disk="3" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP}" -if ! command -v pnpm >/dev/null 2>&1; then - npm install -g pnpm &>/dev/null -fi -cd /opt/homepage -systemctl stop homepage -git pull --force &>/dev/null -pnpm install &>/dev/null -pnpm build &>/dev/null -systemctl start homepage -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homepage.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/homepage.sh b/ct/homepage.sh new file mode 100644 index 00000000..90538100 --- /dev/null +++ b/ct/homepage.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ + / / / /___ ____ ___ ___ ____ ____ _____ ____ + / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ + / __ / /_/ / / / / / / __/ /_/ / /_/ / /_/ / __/ +/_/ /_/\____/_/ /_/ /_/\___/ .___/\__,_/\__, /\___/ + /_/ /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Homepage" +var_disk="3" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +if ! command -v pnpm >/dev/null 2>&1; then + npm install -g pnpm &>/dev/null +fi +cd /opt/homepage +systemctl stop homepage +git pull --force &>/dev/null +pnpm install &>/dev/null +pnpm build &>/dev/null +systemctl start homepage +msg_ok "Update Successfull" +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}:3000${CL} \n" diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh deleted file mode 100644 index c99f3a70..00000000 --- a/ct/homer-v5.sh +++ /dev/null @@ -1,450 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ - / / / /___ ____ ___v5___ _____ - / /_/ / __ \/ __ `__ \/ _ \/ ___/ - / __ / /_/ / / / / / / __/ / -/_/ /_/\____/_/ /_/ /_/\___/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Homer" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping ${APP}" -systemctl stop homer -msg_ok "Stopped ${APP}" - -msg_info "Backing up config.yml" -cd ~ -cp -R /opt/homer/assets/config.yml config.yml -msg_ok "Backed up config.yml" - -msg_info "Updating ${APP}" -rm -rf /opt/homer/* -cd /opt/homer -wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip -unzip homer.zip &>/dev/null -msg_ok "Updated ${APP}" -msg_info "Restoring conf.yml" -cd ~ -cp -R config.yml /opt/homer/assets -msg_ok "Restored conf.yml" - -msg_info "Cleaning" -rm -rf config.yml /opt/homer/homer.zip -msg_ok "Cleaned" - -msg_info "Starting ${APP}" -systemctl start homer -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/homer ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8010${CL} \n" diff --git a/ct/homer.sh b/ct/homer.sh new file mode 100644 index 00000000..13d2b64b --- /dev/null +++ b/ct/homer.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ + / / / /___ ____ ___ ___ _____ + / /_/ / __ \/ __ `__ \/ _ \/ ___/ + / __ / /_/ / / / / / / __/ / +/_/ /_/\____/_/ /_/ /_/\___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Homer" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/homer ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP}" +systemctl stop homer +msg_ok "Stopped ${APP}" + +msg_info "Backing up config.yml" +cd ~ +cp -R /opt/homer/assets/config.yml config.yml +msg_ok "Backed up config.yml" + +msg_info "Updating ${APP}" +rm -rf /opt/homer/* +cd /opt/homer +wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip +unzip homer.zip &>/dev/null +msg_ok "Updated ${APP}" +msg_info "Restoring conf.yml" +cd ~ +cp -R config.yml /opt/homer/assets +msg_ok "Restored conf.yml" + +msg_info "Cleaning" +rm -rf config.yml /opt/homer/homer.zip +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl start homer +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8010${CL} \n" diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh deleted file mode 100644 index 13e1168c..00000000 --- a/ct/hyperion-v5.sh +++ /dev/null @@ -1,441 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - __ __ _ - / / / /_ ______v5___ _____(_)___ ____ - / /_/ / / / / __ \/ _ \/ ___/ / __ \/ __ \ - / __ / /_/ / /_/ / __/ / / / /_/ / / / / -/_/ /_/\__, / .___/\___/_/ /_/\____/_/ /_/ - /____/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Hyperion" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get install -y hyperion &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8090${CL} \n" diff --git a/ct/hyperion.sh b/ct/hyperion.sh new file mode 100644 index 00000000..64b0fa33 --- /dev/null +++ b/ct/hyperion.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ _ + / / / /_ ______ ___ _____(_)___ ____ + / /_/ / / / / __ \/ _ \/ ___/ / __ \/ __ \ + / __ / /_/ / /_/ / __/ / / / /_/ / / / / +/_/ /_/\__, / .___/\___/_/ /_/\____/_/ /_/ + /____/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Hyperion" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get install -y hyperion &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL} \n" diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh deleted file mode 100644 index 3f1e42ed..00000000 --- a/ct/influxdb-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ ______ ____ ____ - / _/_v5 / __/ /_ ___ __/ __ \/ __ ) - / // __ \/ /_/ / / / / |/_/ / / / __ | - _/ // / / / __/ / /_/ /> &1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/influxdb.sh b/ct/influxdb.sh new file mode 100644 index 00000000..44b3eddb --- /dev/null +++ b/ct/influxdb.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ______ ____ ____ + / _/___ / __/ /_ ___ __/ __ \/ __ ) + / // __ \/ /_/ / / / / |/_/ / / / __ | + _/ // / / / __/ / /_/ /> /dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh deleted file mode 100644 index 7e74a9f4..00000000 --- a/ct/iobroker-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ ____ __ - (_)___ / __ )_________ / /_____ _____ - / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ - / / /_/ / /_/ / / / /_/ / ,< / __/ / -/_/\____/_____/_/ v5\____/_/|_|\___/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="ioBroker" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/iobroker ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/iobroker.sh b/ct/iobroker.sh new file mode 100644 index 00000000..31b5a552 --- /dev/null +++ b/ct/iobroker.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ ____ __ + (_)___ / __ )_________ / /_____ _____ + / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ + / / /_/ / /_/ / / / /_/ / ,< / __/ / +/_/\____/_____/_/ \____/_/|_|\___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="ioBroker" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/iobroker ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8081${CL} \n" diff --git a/ct/jackett-v5.sh b/ct/jackett-v5.sh deleted file mode 100644 index 72a6a925..00000000 --- a/ct/jackett-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - __ __ __ __ - / /___ ______/ /_____v5/ /_/ /_ - __ / / __ `/ ___/ //_/ _ \/ __/ __/ -/ /_/ / /_/ / /__/ ,< / __/ /_/ /_ -\____/\__,_/\___/_/|_|\___/\__/\__/ - -EOF -} -header_info -echo -e "Loading..." -APP="Jackett" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/jackett.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9117${CL}\n" diff --git a/ct/jackett.sh b/ct/jackett.sh new file mode 100644 index 00000000..ec991c7d --- /dev/null +++ b/ct/jackett.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ __ + / /___ ______/ /_____ / /_/ /_ + __ / / __ `/ ___/ //_/ _ \/ __/ __/ +/ /_/ / /_/ / /__/ ,< / __/ /_/ /_ +\____/\__,_/\___/_/|_|\___/\__/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="Jackett" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9117${CL}\n" diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh deleted file mode 100644 index b043cf38..00000000 --- a/ct/jellyfin-v5.sh +++ /dev/null @@ -1,450 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ____ _____ - / /__ / / /_v5__/ __(_)___ - __ / / _ \/ / / / / / /_/ / __ \ -/ /_/ / __/ / / /_/ / __/ / / / / -\____/\___/_/_/\__, /_/ /_/_/ /_/ - /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Jellyfin" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit-script -fi -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /usr/lib/jellyfin ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh new file mode 100644 index 00000000..c4bdef50 --- /dev/null +++ b/ct/jellyfin.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ____ _____ + / /__ / / /_ __/ __(_)___ + __ / / _ \/ / / / / / /_/ / __ \ +/ /_/ / __/ / / /_/ / __/ / / / / +\____/\___/_/_/\__, /_/ /_/_/ /_/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Jellyfin" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /usr/lib/jellyfin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8096${CL}\n" diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh deleted file mode 100644 index cdf959f6..00000000 --- a/ct/k0s-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ____ __ __ __ __ - / /__/ __ \_____ / //_/_ __/ /_ ___v5_________ ___ / /____ _____ - / //_/ / / / ___/ / ,< / / / / __ \/ _ \/ ___/ __ \/ _ \/ __/ _ \/ ___/ - / ,< / /_/ (__ ) / /| / /_/ / /_/ / __/ / / / / / __/ /_/ __(__ ) -/_/|_|\____/____/ /_/ |_\__,_/_.___/\___/_/ /_/ /_/\___/\__/\___/____/ - -EOF -} -header_info -echo -e "Loading..." -APP="k0s" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/k0s/k0s.yaml ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/k0s.sh b/ct/k0s.sh new file mode 100644 index 00000000..710dd461 --- /dev/null +++ b/ct/k0s.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ____ __ __ __ __ + / /__/ __ \_____ / //_/_ __/ /_ ___ _________ ___ / /____ _____ + / //_/ / / / ___/ / ,< / / / / __ \/ _ \/ ___/ __ \/ _ \/ __/ _ \/ ___/ + / ,< / /_/ (__ ) / /| / /_/ / /_/ / __/ / / / / / __/ /_/ __(__ ) +/_/|_|\____/____/ /_/ |_\__,_/_.___/\___/_/ /_/ /_/\___/\__/\___/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="k0s" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/k0s/k0s.yaml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh deleted file mode 100644 index 32c7b540..00000000 --- a/ct/kavita-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ _ __ - / //_/___ __ v5__(_) /_____ _ - / ,< / __ `/ | / / / __/ __ `/ - / /| / /_/ /| |/ / / /_/ /_/ / -/_/ |_\__,_/ |___/_/\__/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Kavita" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Kavita ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/kavita.sh b/ct/kavita.sh new file mode 100644 index 00000000..b80d4728 --- /dev/null +++ b/ct/kavita.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ _ __ + / //_/___ __ __(_) /_____ _ + / ,< / __ `/ | / / / __/ __ `/ + / /| / /_/ /| |/ / / /_/ /_/ / +/_/ |_\__,_/ |___/_/\__/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Kavita" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh deleted file mode 100644 index 7c2d8149..00000000 --- a/ct/keycloak-v5.sh +++ /dev/null @@ -1,428 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ __ __ - / //_/__v5__ _______/ /___ ____ _/ /__ - / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ - / /| / __/ /_/ / /__/ / /_/ / /_/ / ,< -/_/ |_\___/\__, /\___/_/\____/\__,_/_/|_| - /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Keycloak" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/keycloak.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/keycloak.sh b/ct/keycloak.sh new file mode 100644 index 00000000..98ae1938 --- /dev/null +++ b/ct/keycloak.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ __ + / //_/__ __ _______/ /___ ____ _/ /__ + / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ + / /| / __/ /_/ / /__/ / /_/ / /_/ / ,< +/_/ |_\___/\__, /\___/_/\____/\__,_/_/|_| + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Keycloak" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/keycloak.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh deleted file mode 100644 index 2fa8eab1..00000000 --- a/ct/lidarr-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ _ __ - / / (_)___/ /___v5__________ - / / / / __ / __ `/ ___/ ___/ - / /___/ / /_/ / /_/ / / / / -/_____/_/\__,_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Lidarr" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/lidarr/ ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8686${CL} \n" diff --git a/ct/lidarr.sh b/ct/lidarr.sh new file mode 100644 index 00000000..c8cf9b26 --- /dev/null +++ b/ct/lidarr.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ _ __ + / / (_)___/ /___ __________ + / / / / __ / __ `/ ___/ ___/ + / /___/ / /_/ / /_/ / / / / +/_____/_/\__,_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Lidarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var/lib/lidarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8686${CL} \n" diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh deleted file mode 100644 index 87f20b9a..00000000 --- a/ct/magicmirror-v5.sh +++ /dev/null @@ -1,429 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ___ _ __ ____ - / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ - / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ - / / / / /_/ / /_/ / / /__/ / / / / / / / / /_/ / / -/_/ /_/\__,_/\__, /_/\___/_/ /_/_/_/ /_/ \____/_/ - /____/ v5 - -EOF -} -header_info -echo -e "Loading..." -APP="MagicMirror" -var_disk="3" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -cd /opt/magicmirror -git pull &>/dev/null -npm install --only=prod --omit=dev &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/magicmirror ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh new file mode 100644 index 00000000..408e1107 --- /dev/null +++ b/ct/magicmirror.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ _ __ ____ + / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ + / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ + / / / / /_/ / /_/ / / /__/ / / / / / / / / /_/ / / +/_/ /_/\__,_/\__, /_/\___/_/ /_/_/_/ /_/ \____/_/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="MagicMirror" +var_disk="3" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/magicmirror ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +cd /opt/magicmirror +git pull &>/dev/null +npm install --only=prod --omit=dev &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh deleted file mode 100644 index 2bee684d..00000000 --- a/ct/mariadb-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ___ _ ____ ____ - / |/ /___ ______(_)___ _/ __ \/ __ ) - / /|_/ / __ / ___/ / __ / / / / __ | - / / / / /_/ / / / / /_/ / /_/ / /_/ / -/_/ /_/\__,_/_/v5/_/\__,_/_____/_____/ - -EOF -} -header_info -echo -e "Loading..." -APP="MariaDB" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/mariadb.sh b/ct/mariadb.sh new file mode 100644 index 00000000..04b0ba93 --- /dev/null +++ b/ct/mariadb.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ _ ____ ____ + / |/ /___ ______(_)___ _/ __ \/ __ ) + / /|_/ / __ / ___/ / __ / / / / __ | + / / / / /_/ / / / / /_/ / /_/ / /_/ / +/_/ /_/\__,_/_/ /_/\__,_/_____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="MariaDB" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh deleted file mode 100644 index 0899b146..00000000 --- a/ct/meshcentral-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ___ __ ______ __ __ - / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / - / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / - / / / / __(__ ) / / / /___/ __/ / / / /_/ / / /_/ / / -/_/ /_/\___/____/_/ /_/\____/\___/_/ /_/\__/_/ v5\__,_/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="MeshCentral" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/meshcentral ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh new file mode 100644 index 00000000..7d544d0b --- /dev/null +++ b/ct/meshcentral.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ __ ______ __ __ + / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / + / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / + / / / / __(__ ) / / / /___/ __/ / / / /_/ / / /_/ / / +/_/ /_/\___/____/_/ /_/\____/\___/_/ /_/\__/_/ \__,_/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="MeshCentral" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/meshcentral ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh deleted file mode 100644 index 245f2439..00000000 --- a/ct/motioneye-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ___ __ _ - / |/ /___ / /_(_)___ ____v5___ __ _____ - / /|_/ / __ \/ __/ / __ \/ __ \/ _ \/ / / / _ \ - / / / / /_/ / /_/ / /_/ / / / / __/ /_/ / __/ -/_/ /_/\____/\__/_/\____/_/ /_/\___/\__, /\___/ - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Motioneye" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -pip install motioneye --upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/motioneye.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/motioneye.sh b/ct/motioneye.sh new file mode 100644 index 00000000..6dc03205 --- /dev/null +++ b/ct/motioneye.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ __ _ + / |/ /___ / /_(_)___ ____ ___ __ _____ + / /|_/ / __ \/ __/ / __ \/ __ \/ _ \/ / / / _ \ + / / / / /_/ / /_/ / /_/ / / / / __/ /_/ / __/ +/_/ /_/\____/\__/_/\____/_/ /_/\___/\__, /\___/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Motioneye" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/motioneye.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +pip install motioneye --upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8765${CL} \n" diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh deleted file mode 100644 index 46cfed5f..00000000 --- a/ct/mqtt-v5.sh +++ /dev/null @@ -1,424 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - __ ___ ____ _ ____________ - / |/ /___v5_____/ __ \__ __(_)_ __/_ __/___ - / /|_/ / __ \/ ___/ / / / / / / / / / / / / __ \ - / / / / /_/ (__ ) /_/ / /_/ / / / / / / / /_/ / -/_/ /_/\____/____/\___\_\__,_/_/ /_/ /_/ \____/ - -EOF -} -header_info -echo -e "Loading..." -APP="MQTT" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/mqtt.sh b/ct/mqtt.sh new file mode 100644 index 00000000..d0ccf349 --- /dev/null +++ b/ct/mqtt.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ ____ _ ____________ + / |/ /___ _____/ __ \__ __(_)_ __/_ __/___ + / /|_/ / __ \/ ___/ / / / / / / / / / / / / __ \ + / / / / /_/ (__ ) /_/ / /_/ / / / / / / / /_/ / +/_/ /_/\____/____/\___\_\__,_/_/ /_/ /_/ \____/ + +EOF +} +header_info +echo -e "Loading..." +APP="MQTT" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh deleted file mode 100644 index 13184630..00000000 --- a/ct/n8n-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ___ - / _ \ - _ __ | (_) |_v5_ - | _ \ > _ <| _ \ - | | | | (_) | | | | - |_| |_|\___/|_| |_| - -EOF -} -header_info -echo -e "Loading..." -APP="n8n" -var_disk="3" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -npm update -g n8n &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/n8n.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/n8n.sh b/ct/n8n.sh new file mode 100644 index 00000000..944d0fe3 --- /dev/null +++ b/ct/n8n.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ + / _ \ + _ __ | (_) |____ + | _ \ > _ <| _ \ + | | | | (_) | | | | + |_| |_|\___/|_| |_| + +EOF +} +header_info +echo -e "Loading..." +APP="n8n" +var_disk="3" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +npm update -g n8n &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5678${CL} \n" diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh deleted file mode 100644 index c5d4eeb2..00000000 --- a/ct/navidrome-v5.sh +++ /dev/null @@ -1,437 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ __ _ __ - / | / /___ __ v5__(_)___/ /________ ____ ___ ___ - / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ - / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ -/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ - -EOF -} -header_info -echo -e "Loading..." -APP="Navidrome" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Stopping ${APP}" -systemctl stop navidrome.service -msg_ok "Stopped Navidrome" - -msg_info "Updating to v${RELEASE}" -wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null -tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null -msg_ok "Updated ${APP}" -rm Navidrome.tar.gz - -msg_info "${GN} Starting ${APP}" -systemctl start navidrome.service -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/navidrome ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:4533${CL} \n" diff --git a/ct/navidrome.sh b/ct/navidrome.sh new file mode 100644 index 00000000..2aef956b --- /dev/null +++ b/ct/navidrome.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ _ __ + / | / /___ __ __(_)___/ /________ ____ ___ ___ + / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ + / /| / /_/ /| |/ / / /_/ / / / /_/ / / / / / / __/ +/_/ |_/\__,_/ |___/_/\__,_/_/ \____/_/ /_/ /_/\___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Navidrome" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/navidrome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Stopping ${APP}" +systemctl stop navidrome.service +msg_ok "Stopped Navidrome" + +msg_info "Updating to v${RELEASE}" +wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null +msg_ok "Updated ${APP}" +rm Navidrome.tar.gz + +msg_info "${GN} Starting ${APP}" +systemctl start navidrome.service +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:4533${CL} \n" diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh deleted file mode 100644 index 79ad1cff..00000000 --- a/ct/nextcloudpi-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ __ __ ________ ______ _ - / | / /__ _ __/ /_/ ____/ /___ __v5______/ / __ \(_) - / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / - / /| / __/> &1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}https://${IP}/${CL} \n" diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh new file mode 100644 index 00000000..6f887d8c --- /dev/null +++ b/ct/nextcloudpi.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ ________ ______ _ + / | / /__ _ __/ /_/ ____/ /___ __ ______/ / __ \(_) + / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / + / /| / __/> /dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}https://${IP}/${CL} \n" diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh deleted file mode 100644 index a12eb9dd..00000000 --- a/ct/nginxproxymanager-v5.sh +++ /dev/null @@ -1,535 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ __ _ ____ __ ___ - / | / /___ _(_)___ _ __ / __ \_________v5_ ____ __ / |/ /___ _____ ____ _____ ____ _____ - / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ - / /| / /_/ / / / / /> < / ____/ / / /_/ /> &1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') -msg_info "Stopping Services" -systemctl stop openresty -systemctl stop npm -msg_ok "Stopped Services" - -msg_info "Cleaning Old Files" - rm -rf /app \ - /var/www/html \ - /etc/nginx \ - /var/log/nginx \ - /var/lib/nginx \ - /var/cache/nginx &>/dev/null -msg_ok "Cleaned Old Files" - -msg_info "Downloading NPM v${RELEASE}" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null -cd nginx-proxy-manager-${RELEASE} -msg_ok "Downloaded NPM v${RELEASE}" - -msg_info "Setting up Enviroment" -ln -sf /usr/bin/python3 /usr/bin/python -ln -sf /usr/bin/certbot /opt/certbot/bin/certbot -ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx -ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+${RELEASE}+g" backend/package.json -sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json -sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf -NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") -for NGINX_CONF in $NGINX_CONFS; do - sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" -done -mkdir -p /var/www/html /etc/nginx/logs -cp -r docker/rootfs/var/www/html/* /var/www/html/ -cp -r docker/rootfs/etc/nginx/* /etc/nginx/ -cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini -cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager -ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf -rm -f /etc/nginx/conf.d/dev.conf -mkdir -p /tmp/nginx/body \ - /run/nginx \ - /data/nginx \ - /data/custom_ssl \ - /data/logs \ - /data/access \ - /data/nginx/default_host \ - /data/nginx/default_www \ - /data/nginx/proxy_host \ - /data/nginx/redirection_host \ - /data/nginx/stream \ - /data/nginx/dead_host \ - /data/nginx/temp \ - /var/lib/nginx/cache/public \ - /var/lib/nginx/cache/private \ - /var/cache/nginx/proxy_temp -chmod -R 777 /var/cache/nginx -chown root /tmp/nginx -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf -if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null -fi -mkdir -p /app/global /app/frontend/images -cp -r backend/* /app -cp -r global/* /app/global -msg_ok "Setup Enviroment" - -msg_info "Building Frontend" -cd ./frontend -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -yarn build &>/dev/null -cp -r dist/* /app/frontend -cp -r app-images/* /app/frontend/images -msg_ok "Built Frontend" - - -msg_info "Initializing Backend" -rm -rf /app/config/default.json &>/dev/null -if [ ! -f /app/config/production.json ]; then - cat <<'EOF' >/app/config/production.json -{ - "database": { - "engine": "knex-native", - "knex": { - "client": "sqlite3", - "connection": { - "filename": "/data/database.sqlite" - } - } - } -} -EOF -fi -cd /app -export NODE_ENV=development -yarn install --network-timeout=30000 &>/dev/null -msg_ok "Initialized Backend" - -msg_info "Starting Services" -systemctl enable npm &>/dev/null -systemctl start openresty -systemctl start npm -msg_ok "Started Services" - -msg_info "Cleaning up" -rm -rf ~/nginx-proxy-manager-* -msg_ok "Cleaned" - -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /lib/systemd/system/npm.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh new file mode 100644 index 00000000..215e8e24 --- /dev/null +++ b/ct/nginxproxymanager.sh @@ -0,0 +1,180 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + _ __ _ ____ __ ___ + / | / /___ _(_)___ _ __ / __ \_________ __ ____ __ / |/ /___ _____ ____ _____ ____ _____ + / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ + / /| / /_/ / / / / /> < / ____/ / / /_/ /> /dev/null + msg_ok "Cleaned Old Files" + + msg_info "Downloading NPM v${RELEASE}" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null + cd nginx-proxy-manager-${RELEASE} + msg_ok "Downloaded NPM v${RELEASE}" + + msg_info "Setting up Enviroment" + ln -sf /usr/bin/python3 /usr/bin/python + ln -sf /usr/bin/certbot /opt/certbot/bin/certbot + ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx + ln -sf /usr/local/openresty/nginx/ /etc/nginx + sed -i "s+0.0.0+${RELEASE}+g" backend/package.json + sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json + sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf + NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") + for NGINX_CONF in $NGINX_CONFS; do + sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" + done + mkdir -p /var/www/html /etc/nginx/logs + cp -r docker/rootfs/var/www/html/* /var/www/html/ + cp -r docker/rootfs/etc/nginx/* /etc/nginx/ + cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini + cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager + ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf + rm -f /etc/nginx/conf.d/dev.conf + mkdir -p /tmp/nginx/body \ + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp + chmod -R 777 /var/cache/nginx + chown root /tmp/nginx + echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf + if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then + echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null + fi + mkdir -p /app/global /app/frontend/images + cp -r backend/* /app + cp -r global/* /app/global + msg_ok "Setup Enviroment" + + msg_info "Building Frontend" + cd ./frontend + export NODE_ENV=development + yarn install --network-timeout=30000 &>/dev/null + yarn build &>/dev/null + cp -r dist/* /app/frontend + cp -r app-images/* /app/frontend/images + msg_ok "Built Frontend" + + msg_info "Initializing Backend" + rm -rf /app/config/default.json &>/dev/null + if [ ! -f /app/config/production.json ]; then + cat <<'EOF' >/app/config/production.json +{ + "database": { + "engine": "knex-native", + "knex": { + "client": "sqlite3", + "connection": { + "filename": "/data/database.sqlite" + } + } + } +} +EOF + fi + cd /app + export NODE_ENV=development + yarn install --network-timeout=30000 &>/dev/null + msg_ok "Initialized Backend" + + msg_info "Starting Services" + systemctl enable npm &>/dev/null + systemctl start openresty + systemctl start npm + msg_ok "Started Services" + + msg_info "Cleaning up" + rm -rf ~/nginx-proxy-manager-* + msg_ok "Cleaned" + + msg_ok "Update Successfull" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:81${CL} \n" diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh deleted file mode 100644 index 50b929cb..00000000 --- a/ct/nocodb-v5.sh +++ /dev/null @@ -1,429 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ __ ____ ____ - / | / /___ ____v5___ / __ \/ __ ) - / |/ / __ \/ ___/ __ \/ / / / __ | - / /| / /_/ / /__/ /_/ / /_/ / /_/ / -/_/ |_/\____/\___/\____/_____/_____/ - -EOF -} -header_info -echo -e "Loading..." -APP="NocoDB" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP}" -cd /opt/nocodb -npm uninstall -s --save nocodb &>/dev/null -npm install -s --save nocodb &>/dev/null -systemctl restart nocodb.service -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/nocodb.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080/dashboard${CL} \n" diff --git a/ct/nocodb.sh b/ct/nocodb.sh new file mode 100644 index 00000000..50677ceb --- /dev/null +++ b/ct/nocodb.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ ____ ____ + / | / /___ ____ ___ / __ \/ __ ) + / |/ / __ \/ ___/ __ \/ / / / __ | + / /| / /_/ / /__/ /_/ / /_/ / /_/ / +/_/ |_/\____/\___/\____/_____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="NocoDB" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +cd /opt/nocodb +npm uninstall -s --save nocodb &>/dev/null +npm install -s --save nocodb &>/dev/null +systemctl restart nocodb.service +msg_ok "Updated ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080/dashboard${CL} \n" diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh deleted file mode 100644 index e0a5fbf4..00000000 --- a/ct/node-red-v5.sh +++ /dev/null @@ -1,462 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ __ __ ____ __ - / | / /___ ____/ /__ v5 / __ \___ ____/ / - / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / - / /| / /_/ / /_/ / __/ / _, _/ __/ /_/ / -/_/ |_/\____/\__,_/\___/ /_/ |_|\___/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Node-Red" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP}" ON \ - "2" "Install Themes" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Stopping ${APP}" -systemctl stop nodered -msg_ok "Stopped ${APP}" - -msg_info "Updating ${APP}" -npm install -g --unsafe-perm node-red &>/dev/null -msg_ok "Updated ${APP}" - -msg_info "Starting ${APP}" -systemctl start nodered -msg_ok "Started ${APP}" -msg_ok "Update Successful" -exit -fi -if [ "$UPD" == "2" ]; then -THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ - "dark" "" OFF \ - "dracula" "" OFF \ - "midnight-red" "" ON \ - "oled" "" OFF \ - "solarized-dark" "" OFF \ - "solarized-light" "" OFF \ - 3>&1 1>&2 2>&3) -header_info -msg_info "Installing ${THEME} Theme" -cd /root/.node-red -sed -i 's|//theme: "",|theme: "",|g' /root/.node-red/settings.js -npm install @node-red-contrib-themes/${THEME} &>/dev/null -sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js -msg_ok "Installed ${THEME} Theme" - -msg_info "Restarting ${APP}" -systemctl restart nodered -msg_ok "Restarted ${APP}" -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/.node-red ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/node-red.sh b/ct/node-red.sh new file mode 100644 index 00000000..b625d323 --- /dev/null +++ b/ct/node-red.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ ____ __ + / | / /___ ____/ /__ / __ \___ ____/ / + / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / + / /| / /_/ / /_/ / __/ / _, _/ __/ /_/ / +/_/ |_/\____/\__,_/\___/ /_/ |_|\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Node-Red" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP}" ON \ + "2" "Install Themes" OFF \ + 3>&1 1>&2 2>&3) +header_info +if [ "$UPD" == "1" ]; then +msg_info "Stopping ${APP}" +systemctl stop nodered +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +npm install -g --unsafe-perm node-red &>/dev/null +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start nodered +msg_ok "Started ${APP}" +msg_ok "Update Successful" +exit +fi +if [ "$UPD" == "2" ]; then +THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ + "dark" "" OFF \ + "dracula" "" OFF \ + "midnight-red" "" ON \ + "oled" "" OFF \ + "solarized-dark" "" OFF \ + "solarized-light" "" OFF \ + 3>&1 1>&2 2>&3) +header_info +msg_info "Installing ${THEME} Theme" +cd /root/.node-red +sed -i 's|//theme: "",|theme: "",|g' /root/.node-red/settings.js +npm install @node-red-contrib-themes/${THEME} &>/dev/null +sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js +msg_ok "Installed ${THEME} Theme" + +msg_info "Restarting ${APP}" +systemctl restart nodered +msg_ok "Restarted ${APP}" +exit +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:1880${CL} \n" diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh deleted file mode 100644 index c9b9defc..00000000 --- a/ct/omada-v5.sh +++ /dev/null @@ -1,439 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____ ___v5____ _____/ /___ _ - / / / / __ __ \/ __ / __ / __ / -/ /_/ / / / / / / /_/ / /_/ / /_/ / -\____/_/ /_/ /_/\__,_/\__,_/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Omada" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit-script -fi - -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/tplink ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/omada.sh b/ct/omada.sh new file mode 100644 index 00000000..40eea690 --- /dev/null +++ b/ct/omada.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \____ ___ ____ _____/ /___ _ + / / / / __ __ \/ __ / __ / __ / +/ /_/ / / / / / / /_/ / /_/ / /_/ / +\____/_/ /_/ /_/\__,_/\__,_/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Omada" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:8043${CL} \n" diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh deleted file mode 100644 index 692f323b..00000000 --- a/ct/omv-v5.sh +++ /dev/null @@ -1,438 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ ___ ___ _ __ ____ - / __ \____v5___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ - / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ -/ /_/ / /_/ / __/ / / / / / / __/ /_/ / / /_/ /| |/ / /_/ / /_/ / / /_ -\____/ .___/\___/_/ /_/_/ /_/\___/\__,_/_/\__,_/ |___/\__,_/\__,_/_/\__/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="OMV" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file -EOF -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}${CL} \n" diff --git a/ct/omv.sh b/ct/omv.sh new file mode 100644 index 00000000..f370db72 --- /dev/null +++ b/ct/omv.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ ___ ___ _ __ ____ + / __ \____ ___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ + / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ +/ /_/ / /_/ / __/ / / / / / / __/ /_/ / / /_/ /| |/ / /_/ / /_/ / / /_ +\____/ .___/\___/_/ /_/_/ /_/\___/\__,_/_/\__,_/ |___/\__,_/\__,_/_/\__/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="OMV" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh deleted file mode 100644 index 45150c44..00000000 --- a/ct/openhab-v5.sh +++ /dev/null @@ -1,428 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ _____ ____ - ____v5____ ___ ____ / / / / | / __ ) - / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | -/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / -\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="openHAB" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/openhab.sh b/ct/openhab.sh new file mode 100644 index 00000000..6e3357a6 --- /dev/null +++ b/ct/openhab.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ _____ ____ + ____ ____ ___ ____ / / / / | / __ ) + / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | +/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / +\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="openHAB" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh deleted file mode 100644 index 88b62649..00000000 --- a/ct/paperless-ngx-v5.sh +++ /dev/null @@ -1,495 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____ _____ ___ _____/ /__v5__________ ____ ____ __ __ - / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ - / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < -/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| - /_/ /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Paperless-ngx" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -SER=/etc/systemd/system/paperless-task-queue.service - -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update Paperless-ngx to $RELEASE" ON \ - "2" "Paperless-ngx Credentials" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Stopping Paperless-ngx" -systemctl stop paperless-consumer paperless-webserver paperless-scheduler - if [ -f "$SER" ]; then - systemctl stop paperless-task-queue.service - fi -sleep 1 -msg_ok "Stopped Paperless-ngx" - -msg_info "Updating to ${RELEASE}" - if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null - wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null - tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null - cp -r /opt/paperless/paperless.conf paperless-ngx/ - cp -r paperless-ngx/* /opt/paperless/ - cd /opt/paperless - sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt - pip install -r requirements.txt &>/dev/null - cd /opt/paperless/src - /usr/bin/python3 manage.py migrate &>/dev/null - if [ -f "$SER" ]; then - msg_ok "paperless-task-queue.service Exists." - else -cat </etc/systemd/system/paperless-task-queue.service -[Unit] -Description=Paperless Celery Workers -Requires=redis.service -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless worker --loglevel INFO -[Install] -WantedBy=multi-user.target -EOF -systemctl enable paperless-task-queue &>/dev/null -msg_ok "paperless-task-queue.service Created." - fi -cat </etc/systemd/system/paperless-scheduler.service -[Unit] -Description=Paperless Celery beat -Requires=redis.service -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless beat --loglevel INFO -[Install] -WantedBy=multi-user.target -EOF -msg_ok "Updated to ${RELEASE}" - -msg_info "Cleaning up" -cd ~ -rm paperless-ngx-$RELEASE.tar.xz -rm -rf paperless-ngx -msg_ok "Cleaned" - -msg_info "Starting Paperless-ngx" -systemctl daemon-reload -systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service -sleep 1 -msg_ok "Started Paperless-ngx" -msg_ok "Updated Successfully!\n" -exit -fi -if [ "$UPD" == "2" ]; then -cat paperless.creds -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/paperless ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh new file mode 100644 index 00000000..dadc2f51 --- /dev/null +++ b/ct/paperless-ngx.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + + ____ __ + / __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __ + / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ + / ____/ /_/ / /_/ / __/ / / / __(__ |__ )___/ / / / /_/ /> < +/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_| + /_/ /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Paperless-ngx" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + if [[ ! -d /opt/paperless ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + SER=/etc/systemd/system/paperless-task-queue.service + + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update Paperless-ngx to $RELEASE" ON \ + "2" "Paperless-ngx Credentials" OFF \ + 3>&1 1>&2 2>&3) + header_info + if [ "$UPD" == "1" ]; then + msg_info "Stopping Paperless-ngx" + systemctl stop paperless-consumer paperless-webserver paperless-scheduler + if [ -f "$SER" ]; then + systemctl stop paperless-task-queue.service + fi + sleep 1 + msg_ok "Stopped Paperless-ngx" + + msg_info "Updating to ${RELEASE}" + if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }' | wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null + wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null + tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null + cp -r /opt/paperless/paperless.conf paperless-ngx/ + cp -r paperless-ngx/* /opt/paperless/ + cd /opt/paperless + sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt + pip install -r requirements.txt &>/dev/null + cd /opt/paperless/src + /usr/bin/python3 manage.py migrate &>/dev/null + if [ -f "$SER" ]; then + msg_ok "paperless-task-queue.service Exists." + else + cat </etc/systemd/system/paperless-task-queue.service +[Unit] +Description=Paperless Celery Workers +Requires=redis.service +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless worker --loglevel INFO +[Install] +WantedBy=multi-user.target +EOF + systemctl enable paperless-task-queue &>/dev/null + msg_ok "paperless-task-queue.service Created." + fi + cat </etc/systemd/system/paperless-scheduler.service +[Unit] +Description=Paperless Celery beat +Requires=redis.service +[Service] +WorkingDirectory=/opt/paperless/src +ExecStart=celery --app paperless beat --loglevel INFO +[Install] +WantedBy=multi-user.target +EOF + msg_ok "Updated to ${RELEASE}" + + msg_info "Cleaning up" + cd ~ + rm paperless-ngx-$RELEASE.tar.xz + rm -rf paperless-ngx + msg_ok "Cleaned" + + msg_info "Starting Paperless-ngx" + systemctl daemon-reload + systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service + sleep 1 + msg_ok "Started Paperless-ngx" + msg_ok "Updated Successfully!\n" + exit + fi + if [ "$UPD" == "2" ]; then + cat paperless.creds + exit + fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh deleted file mode 100644 index f128744e..00000000 --- a/ct/photoprism-v5.sh +++ /dev/null @@ -1,452 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ ______ __________ ____ ____ _________ __ ___ - / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / - / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / - / ____/ __ / /_/ / / / / /_/ / ____/ _, _// / v5_/ / / / / -/_/ /_/ /_/\____/ /_/ \____/_/ /_/ |_/___//____/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="PhotoPrism" -var_disk="8" -var_cpu="4" -var_ram="4096" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" -msg_info "Stopping PhotoPrism" -sudo systemctl stop photoprism -msg_ok "Stopped PhotoPrism" - -msg_info "Cloning PhotoPrism" -git clone https://github.com/photoprism/photoprism.git &>/dev/null -cd photoprism -git checkout release &>/dev/null -msg_ok "Cloned PhotoPrism" - -msg_info "Building PhotoPrism" -sudo make all &>/dev/null -sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null -sudo rm -rf /opt/photoprism/assets -sudo cp -r assets/ /opt/photoprism/ &>/dev/null -msg_ok "Built PhotoPrism" - -msg_info "Cleaning" -cd ~ -rm -rf photoprism -msg_ok "Cleaned" - -msg_info "Starting PhotoPrism" -sudo systemctl start photoprism -msg_ok "Started PhotoPrism" -msg_ok "Update Successful" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/photoprism ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -msg_ok "Set Container to Normal Resources" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/photoprism.sh b/ct/photoprism.sh new file mode 100644 index 00000000..1e789870 --- /dev/null +++ b/ct/photoprism.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + + ____ __ ______ __________ ____ ____ _________ __ ___ + / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / + / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / + / ____/ __ / /_/ / / / / /_/ / ____/ _, _// / ___/ / / / / +/_/ /_/ /_/\____/ /_/ \____/_/ /_/ |_/___//____/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="PhotoPrism" +var_disk="8" +var_cpu="4" +var_ram="4096" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + header_info + if [[ ! -d /opt/photoprism ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n" + msg_info "Stopping PhotoPrism" + sudo systemctl stop photoprism + msg_ok "Stopped PhotoPrism" + + msg_info "Cloning PhotoPrism" + git clone https://github.com/photoprism/photoprism.git &>/dev/null + cd photoprism + git checkout release &>/dev/null + msg_ok "Cloned PhotoPrism" + + msg_info "Building PhotoPrism" + sudo make all &>/dev/null + sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null + sudo rm -rf /opt/photoprism/assets + sudo cp -r assets/ /opt/photoprism/ &>/dev/null + msg_ok "Built PhotoPrism" + + msg_info "Cleaning" + cd ~ + rm -rf photoprism + msg_ok "Cleaned" + + msg_info "Starting PhotoPrism" + sudo systemctl start photoprism + msg_ok "Started PhotoPrism" + msg_ok "Update Successful" + exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:2342${CL} \n" diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh deleted file mode 100644 index f4e541af..00000000 --- a/ct/pihole-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ ____ __ ______ __ ______ - / __ \/ _/ / / / / __ \/ / / ____/ - / /_/ // /___/ /_/ / / / / / / __/ - / ____// /___/ __ / /_/ / /v5_/ /___ -/_/ /___/ /_/ /_/\____/_____/_____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Pihole" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pihole ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/pihole.sh b/ct/pihole.sh new file mode 100644 index 00000000..b5de9177 --- /dev/null +++ b/ct/pihole.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ ____ __ ______ __ ______ + / __ \/ _/ / / / / __ \/ / / ____/ + / /_/ // /___/ /_/ / / / / / / __/ + / ____// /___/ __ / /_/ / /___/ /___ +/_/ /___/ /_/ /_/\____/_____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Pihole" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/admin${CL} \n" diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh deleted file mode 100644 index a1d4b466..00000000 --- a/ct/plex-v5.sh +++ /dev/null @@ -1,460 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ __ ___ ___ _____ - / __ \/ /__ _ __ / |/ /__v5____/ (_)___ _ / ___/___ ______ _____ _____ - / /_/ / / _ \| |/_/ / /|_/ / _ \/ __ / / __ `/ \__ \/ _ \/ ___/ | / / _ \/ ___/ - / ____/ / __/> < / / / / __/ /_/ / / /_/ / ___/ / __/ / | |/ / __/ / -/_/ /_/\___/_/|_| /_/ /_/\___/\__,_/_/\__,_/ /____/\___/_/ |___/\___/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Plex" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="20.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit-script -fi -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ - "1" "Update LXC" ON \ - "2" "Run plexupdate" OFF \ - 3>&1 1>&2 2>&3) - -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -fi -if [ "$UPD" == "2" ]; then -bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)" -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:32400/web${CL}\n" diff --git a/ct/plex.sh b/ct/plex.sh new file mode 100644 index 00000000..a944d8b6 --- /dev/null +++ b/ct/plex.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ __ ___ ___ _____ + / __ \/ /__ _ __ / |/ /__ ____/ (_)___ _ / ___/___ ______ _____ _____ + / /_/ / / _ \| |/_/ / /|_/ / _ \/ __ / / __ `/ \__ \/ _ \/ ___/ | / / _ \/ ___/ + / ____/ / __/> < / / / / __/ /_/ / / /_/ / ___/ / __/ / | |/ / __/ / +/_/ /_/\___/_/|_| /_/ /_/\___/\__,_/_/\__,_/ /____/\___/_/ |___/\___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Plex" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="20.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ + "1" "Update LXC" ON \ + "2" "Run plexupdate" OFF \ + 3>&1 1>&2 2>&3) + +header_info +if [ "$UPD" == "1" ]; then +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +fi +if [ "$UPD" == "2" ]; then +bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)" +exit +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:32400/web${CL}\n" diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh deleted file mode 100644 index daba5aec..00000000 --- a/ct/podman-homeassistant-v5.sh +++ /dev/null @@ -1,497 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____ ____/ /___ ___ ____ _____ - / /_/ / __ \/ __ / __ __ \/ __ / __ \ - / ____/ /_/ / /_/ / / / / / / /_/ / / / / - __ __ /_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/__ __ - / / / /___ ____ ___ ___ v5 / | __________(_)____/ /_____ _____ / /_ - / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ - -EOF -} -header_info -echo -e "Loading..." -APP="Podman-Home Assistant" -var_disk="16" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Update Podman" ON \ - "2" "Install HACS" OFF \ - "3" "Install FileBrowser" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -fi -if [ "$UPD" == "2" ]; then -msg_info "Installing Home Assistant Comunity Store (HACS)" -apt update &>/dev/null -apt install unzip &>/dev/null -cd /var/lib/containers/storage/volumes/hass_config/_data -bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null -msg_ok "Installed Home Assistant Comunity Store (HACS)" -echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" -exit -fi -if [ "$UPD" == "3" ]; then -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing FileBrowser" -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null -filebrowser config init -a '0.0.0.0' &>/dev/null -filebrowser config set -a '0.0.0.0' &>/dev/null -filebrowser users add admin changeme --perm.admin &>/dev/null -msg_ok "Installed FileBrowser" - -msg_info "Creating Service" -service_path="/etc/systemd/system/filebrowser.service" -echo "[Unit] -Description=Filebrowser -After=network-online.target -[Service] -User=root -WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r / -[Install] -WantedBy=default.target" >$service_path - -systemctl enable --now filebrowser.service &>/dev/null -msg_ok "Created Service" - -msg_ok "Completed Successfully!\n" -echo -e "FileBrowser should be reachable by going to the following URL. - ${BL}http://$IP:8080${CL} admin|changeme\n" -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homeassistant.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -else - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -fi -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8123${CL} \n" diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh new file mode 100644 index 00000000..14947e9d --- /dev/null +++ b/ct/podman-homeassistant.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ + / __ \____ ____/ /___ ___ ____ _____ + / /_/ / __ \/ __ / __ __ \/ __ / __ \ + / ____/ /_/ / /_/ / / / / / / /_/ / / / / + __ __ /_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/__ __ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ __ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ / __ \/ __/ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="Podman-Home Assistant" +var_disk="16" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + "1" "Update Podman" ON \ + "2" "Install HACS" OFF \ + "3" "Install FileBrowser" OFF \ + 3>&1 1>&2 2>&3) +header_info +if [ "$UPD" == "1" ]; then +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +fi +if [ "$UPD" == "2" ]; then +msg_info "Installing Home Assistant Comunity Store (HACS)" +apt update &>/dev/null +apt install unzip &>/dev/null +cd /var/lib/containers/storage/volumes/hass_config/_data +bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null +msg_ok "Installed Home Assistant Comunity Store (HACS)" +echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" +exit +fi +if [ "$UPD" == "3" ]; then +IP=$(hostname -I | awk '{print $1}') +msg_info "Installing FileBrowser" +curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null +filebrowser config init -a '0.0.0.0' &>/dev/null +filebrowser config set -a '0.0.0.0' &>/dev/null +filebrowser users add admin changeme --perm.admin &>/dev/null +msg_ok "Installed FileBrowser" + +msg_info "Creating Service" +service_path="/etc/systemd/system/filebrowser.service" +echo "[Unit] +Description=Filebrowser +After=network-online.target +[Service] +User=root +WorkingDirectory=/root/ +ExecStart=/usr/local/bin/filebrowser -r / +[Install] +WantedBy=default.target" >$service_path + +systemctl enable --now filebrowser.service &>/dev/null +msg_ok "Created Service" + +msg_ok "Completed Successfully!\n" +echo -e "FileBrowser should be reachable by going to the following URL. + ${BL}http://$IP:8080${CL} admin|changeme\n" +exit +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8123${CL} \n" diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh deleted file mode 100644 index 582e0831..00000000 --- a/ct/podman-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____v5____/ /___ ___ ____ _____ - / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ - / ____/ /_/ / /_/ / / / / / / /_/ / / / / -/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Podman" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/containers/registries.conf ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/podman.sh b/ct/podman.sh new file mode 100644 index 00000000..ef57de78 --- /dev/null +++ b/ct/podman.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ + / __ \____ ____/ /___ ___ ____ _____ + / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ + / ____/ /_/ / /_/ / / / / / / /_/ / / / / +/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Podman" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/containers/registries.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh deleted file mode 100644 index 47a66cf8..00000000 --- a/ct/postgresql-v5.sh +++ /dev/null @@ -1,425 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ _____ ____ __ - / __ \____ _____/ /_____ _________ / ___// __ \ / / - / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / - / ____/ /_/ (__ ) /_/ /_/ / / / __/__/ / /_/ / / /___ -/_/ \____/____/\__/\__, /_/v5 \___/____/\___\_\/_____/ - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="PostgreSQL" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/postgresql.sh b/ct/postgresql.sh new file mode 100644 index 00000000..1275649a --- /dev/null +++ b/ct/postgresql.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ _____ ____ __ + / __ \____ _____/ /_____ _________ / ___// __ \ / / + / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / + / ____/ /_/ (__ ) /_/ /_/ / / / __/__/ / /_/ / / /___ +/_/ \____/____/\__/\__, /_/ \___/____/\___\_\/_____/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="PostgreSQL" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh deleted file mode 100644 index 34856e1a..00000000 --- a/ct/prometheus-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ __ - / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ - / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ - / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ ) -/_/ v5/_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Prometheus" -var_disk="4" -var_cpu="1" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/prometheus.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/prometheus.sh b/ct/prometheus.sh new file mode 100644 index 00000000..c1514477 --- /dev/null +++ b/ct/prometheus.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ __ + / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ + / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ + / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ ) +/_/ /_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Prometheus" +var_disk="4" +var_cpu="1" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/prometheus.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9090${CL} \n" diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh deleted file mode 100644 index 758bf5a3..00000000 --- a/ct/prowlarr-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \_________ _ __/ /___v5__________ - / /_/ / ___/ __ \ | /| / / / __ `/ ___/ ___/ - / ____/ / / /_/ / |/ |/ / / /_/ / / / / -/_/ /_/ \____/|__/|__/_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Prowlarr" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/prowlarr/ ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9696${CL} \n" diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh new file mode 100644 index 00000000..a61d6144 --- /dev/null +++ b/ct/prowlarr.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ + / __ \_________ _ __/ /___ __________ + / /_/ / ___/ __ \ | /| / / / __ `/ ___/ ___/ + / ____/ / / /_/ / |/ |/ / / /_/ / / / / +/_/ /_/ \____/|__/|__/_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Prowlarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var/lib/prowlarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9696${CL} \n" diff --git a/ct/qbittorrent-v5.sh b/ct/qbittorrent-v5.sh deleted file mode 100644 index b52a8f49..00000000 --- a/ct/qbittorrent-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ____ _ __ __ __ - ____ _/ __ )(_) /_/ /_____ _____________v5____ / /_ - / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ -/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_ -\__, /_____/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="qBittorrent" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8090${CL}\n" diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh new file mode 100644 index 00000000..d5e20ddf --- /dev/null +++ b/ct/qbittorrent.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _ __ __ __ + ____ _/ __ )(_) /_/ /_____ _____________ ____ / /_ + / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ +/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_ +\__, /_____/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="qBittorrent" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL}\n" diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh deleted file mode 100644 index e9eb9667..00000000 --- a/ct/radarr-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \____ _____/ /___v5__________ - / /_/ / __ `/ __ / __ `/ ___/ ___/ - / _, _/ /_/ / /_/ / /_/ / / / / -/_/ |_|\__,_/\__,_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Radarr" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/radarr/ ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:7878${CL} \n" diff --git a/ct/radarr.sh b/ct/radarr.sh new file mode 100644 index 00000000..0664fc5d --- /dev/null +++ b/ct/radarr.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ + / __ \____ _____/ /___ __________ + / /_/ / __ `/ __ / __ `/ ___/ ___/ + / _, _/ /_/ / /_/ / /_/ / / / / +/_/ |_|\__,_/\__,_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Radarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var/lib/radarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7878${CL} \n" diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh deleted file mode 100644 index 4d555119..00000000 --- a/ct/readarr-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ - / __ \___ ____ _____/ /___v5__________ - / /_/ / _ \/ __ `/ __ / __ `/ ___/ ___/ - / _, _/ __/ /_/ / /_/ / /_/ / / / / -/_/ |_|\___/\__,_/\__,_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Readarr" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/readarr/ ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8787${CL} \n" diff --git a/ct/readarr.sh b/ct/readarr.sh new file mode 100644 index 00000000..3ac5ee57 --- /dev/null +++ b/ct/readarr.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ + / __ \___ ____ _____/ /___ __________ + / /_/ / _ \/ __ `/ __ / __ `/ ___/ ___/ + / _, _/ __/ /_/ / /_/ / /_/ / / / / +/_/ |_|\___/\__,_/\__,_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Readarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var/lib/readarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8787${CL} \n" diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh deleted file mode 100644 index e13fcb60..00000000 --- a/ct/rockylinux-v5.sh +++ /dev/null @@ -1,400 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ____ __ __ _ - / __ \____ _____/ /____ __ / / (_)___v5__ ___ __ - / /_/ / __ \/ ___/ //_/ / / / / / / / __ \/ / / / |/_/ - / _, _/ /_/ / /__/ ,< / /_/ / / /___/ / / / / /_/ /> < -/_/ |_|\____/\___/_/|_|\__, / /_____/_/_/ /_/\__,_/_/|_| - /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Rocky Linux" -var_disk="1" -var_cpu="1" -var_ram="512" -var_os="rockylinux" -var_version="9" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}archlinux${CL}" - PW="-password rockylinux" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { - CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - fi - PW1=$(whiptail --inputbox "Set Root Password (needed for root ssh access)" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $PW1 ]; then - PW1="rockylinux" PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - fi - fi - CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_ID ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi - fi - CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CT_NAME ]; then - HN="$NSAPP" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then - HN=$(echo ${CT_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - fi - DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $DISK_SIZE ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}" - advanced_settings - fi - fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi - fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi - fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi - fi - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi - fi - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $GATE1 ]; then - GATE1="Default" GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - fi - fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - echo -e "${DGN}Disable IPv6: ${BGN}Yes${CL}" - DISABLEIP6="yes" - else - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - fi - fi - SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $SD ]; then - SD="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - else - SX=$SD - SD="-searchdomain=$SD" - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - fi - fi - NS=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $NS ]; then - NS="" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" - else - NX=$NS - NS="-nameserver=$NS" - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - fi - fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $MAC1 ]; then - MAC1="Default" MAC="" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}" - SSH="yes" - else - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - echo -e "${DGN}Enable Verbose Mode: ${BGN}Yes${CL}" - VERB="yes" - else - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -dnf -y update -dnf -y upgrade -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pacman.d ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh new file mode 100644 index 00000000..eb955c9d --- /dev/null +++ b/ct/rockylinux.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ __ __ _ + / __ \____ _____/ /____ __ / / (_)___ __ ___ __ + / /_/ / __ \/ ___/ //_/ / / / / / / / __ \/ / / / |/_/ + / _, _/ /_/ / /__/ ,< / /_/ / / /___/ / / / / /_/ /> < +/_/ |_|\____/\___/_/|_|\__, / /_____/_/_/ /_/\__,_/_/|_| + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Rocky Linux" +var_disk="1" +var_cpu="1" +var_ram="512" +var_os="rockylinux" +var_version="9" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="-password rockylinux" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /etc/pacman.d ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +dnf -y update +dnf -y upgrade +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/rstptoweb-v5.sh b/ct/rstptoweb-v5.sh deleted file mode 100644 index 803d52c9..00000000 --- a/ct/rstptoweb-v5.sh +++ /dev/null @@ -1,420 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ____ _______________ __ _ ____________ - / __ \/ ___/_ __/ __ \/ /_____| | v5 / / ____/ __ ) - / /_/ /\__ \ / / / /_/ / __/ __ \ | /| / / __/ / __ | - / _, _/___/ // / / ____/ /_/ /_/ / |/ |/ / /___/ /_/ / -/_/ |_|/____//_/ /_/ \__/\____/|__/|__/_____/_____/ - -EOF -} -header_info -echo -e "Loading..." -APP="RSTPtoWEB" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:8083 ${CL} \n" diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh new file mode 100644 index 00000000..b3e9dfb5 --- /dev/null +++ b/ct/rstptoweb.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _______________ __ _ ____________ + / __ \/ ___/_ __/ __ \/ /_____| | / / ____/ __ ) + / /_/ /\__ \ / / / /_/ / __/ __ \ | /| / / __/ / __ | + / _, _/___/ // / / ____/ /_/ /_/ / |/ |/ / /___/ /_/ / +/_/ |_|/____//_/ /_/ \__/\____/|__/|__/_____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="RSTPtoWEB" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +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}:8083 ${CL} \n" diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh deleted file mode 100644 index 0f3aab85..00000000 --- a/ct/sabnzbd-v5.sh +++ /dev/null @@ -1,432 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ ___ ____ __ __ - / ___// | / __ )____v5____ / /_ ____/ / - \__ \/ /| | / __ / __ \/_ / / __ \/ __ / - ___/ / ___ |/ /_/ / / / / / /_/ /_/ / /_/ / -/____/_/ |_/_____/_/ /_/ /___/_.___/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="SABnzbd" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP" -systemctl stop sabnzbd.service -RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null -\cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null -rm -rf SABnzbd-${RELEASE} -cd /opt/sabnzbd -python3 -m pip install -r requirements.txt &>/dev/null -systemctl start sabnzbd.service -msg_ok "Updated $APP" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/sabnzbd ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP}. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:7777${CL} \n" diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh new file mode 100644 index 00000000..2f1a8c1b --- /dev/null +++ b/ct/sabnzbd.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _____ ___ ____ __ __ + / ___// | / __ )____ ____ / /_ ____/ / + \__ \/ /| | / __ / __ \/_ / / __ \/ __ / + ___/ / ___ |/ /_/ / / / / / /_/ /_/ / /_/ / +/____/_/ |_/_____/_/ /_/ /___/_.___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="SABnzbd" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/sabnzbd ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop sabnzbd.service +RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null +\cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null +rm -rf SABnzbd-${RELEASE} +cd /opt/sabnzbd +python3 -m pip install -r requirements.txt &>/dev/null +systemctl start sabnzbd.service +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7777${CL} \n" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh deleted file mode 100644 index 25867b90..00000000 --- a/ct/scrypted-v5.sh +++ /dev/null @@ -1,442 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ __ __ - / ___/____________v5______ / /____ ____/ / - \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / - ___/ / /__/ / / /_/ / /_/ / /_/ __/ /_/ / -/____/\___/_/ \__, / .___/\__/\___/\__,_/ - /____/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Scrypted" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/scrypted.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}https://${IP}:10443${CL} \n" diff --git a/ct/scrypted.sh b/ct/scrypted.sh new file mode 100644 index 00000000..c10a33be --- /dev/null +++ b/ct/scrypted.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _____ __ __ + / ___/____________ ______ / /____ ____/ / + \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / + ___/ / /__/ / / /_/ / /_/ / /_/ __/ /_/ / +/____/\___/_/ \__, / .___/\__/\___/\__,_/ + /____/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Scrypted" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/scrypted.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}:10443${CL} \n" diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh deleted file mode 100644 index c2c2a019..00000000 --- a/ct/shinobi-v5.sh +++ /dev/null @@ -1,441 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ __ _ __ _ - / ___// /_ (_)___v5____ / /_ (_) - \__ \/ __ \/ / __ \/ __ \/ __ \/ / - ___/ / / / / / / / / /_/ / /_/ / / -/____/_/ /_/_/_/ /_/\____/_.___/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Shinobi" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="ubuntu" -var_version="22.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit-script -fi - -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating Shinobi LXC" -cd /opt/Shinobi -sh UPDATE.sh -pm2 flush -pm2 restart camera -pm2 restart cron -msg_ok "Updated Shinobi LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Shinobi ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. - ${BL}http://${IP}:8080/super${CL} \n" diff --git a/ct/shinobi.sh b/ct/shinobi.sh new file mode 100644 index 00000000..23020d04 --- /dev/null +++ b/ct/shinobi.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _____ __ _ __ _ + / ___// /_ (_)___ ____ / /_ (_) + \__ \/ __ \/ / __ \/ __ \/ __ \/ / + ___/ / / / / / / / / /_/ / /_/ / / +/____/_/ /_/_/_/ /_/\____/_.___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Shinobi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="22.04" +var_version="20.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/Shinobi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating Shinobi LXC" +cd /opt/Shinobi +sh UPDATE.sh +pm2 flush +pm2 restart camera +pm2 restart cron +msg_ok "Updated Shinobi LXC" +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}:8080/super${CL} \n" diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh deleted file mode 100644 index 6018fcc2..00000000 --- a/ct/sonarr-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ - / ___/____ ____ ____v5__________ - \__ \/ __ \/ __ \/ __ `/ ___/ ___/ - ___/ / /_/ / / / / /_/ / / / / -/____/\____/_/ /_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Sonarr" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8989${CL} \n" diff --git a/ct/sonarr.sh b/ct/sonarr.sh new file mode 100644 index 00000000..e8152274 --- /dev/null +++ b/ct/sonarr.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _____ + / ___/____ ____ ____ __________ + \__ \/ __ \/ __ \/ __ `/ ___/ ___/ + ___/ / /_/ / / / / /_/ / / / / +/____/\____/_/ /_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Sonarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8989${CL} \n" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh deleted file mode 100644 index 0f88a88d..00000000 --- a/ct/syncthing-v5.sh +++ /dev/null @@ -1,428 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ __ __ _ - / ___/__ ______v5_____/ /_/ /_ (_)___ ____ _ - \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ - ___/ / /_/ / / / / /__/ /_/ / / / / / / / /_/ / -/____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / - /____/ /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Syncthing" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8384 ${CL} \n" diff --git a/ct/syncthing.sh b/ct/syncthing.sh new file mode 100644 index 00000000..e26dbd56 --- /dev/null +++ b/ct/syncthing.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _____ __ __ _ + / ___/__ ______ _____/ /_/ /_ (_)___ ____ _ + \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ + ___/ / /_/ / / / / /__/ /_/ / / / / / / / /_/ / +/____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / + /____/ /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Syncthing" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8384 ${CL} \n" diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh deleted file mode 100644 index 4a879ece..00000000 --- a/ct/tdarr-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ __ - /_ __/___/ /___v5__________ - / / / __ / __ `/ ___/ ___/ - / / / /_/ / /_/ / / / / -/_/ \__,_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Tdarr" -var_disk="4" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/tdarr ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8265${CL} \n" diff --git a/ct/tdarr.sh b/ct/tdarr.sh new file mode 100644 index 00000000..ba2f9149 --- /dev/null +++ b/ct/tdarr.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ______ __ + /_ __/___/ /___ __________ + / / / __ / __ `/ ___/ ___/ + / / / /_/ / /_/ / / / / +/_/ \__,_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Tdarr" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/tdarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8265${CL} \n" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh deleted file mode 100644 index 44b424f3..00000000 --- a/ct/technitiumdns-v5.sh +++ /dev/null @@ -1,436 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ __ _ __ _ ____ _ _______ - /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ v5 / __ \/ | / / ___/ - / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ - / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / -/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Technitium DNS" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -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 - rm packages-microsoft-prod.deb -fi -wget -q https://download.technitium.com/dns/DnsServerPortable.tar.gz -tar -zxf DnsServerPortable.tar.gz -C /etc/dns/ &>/dev/null -rm -rf DnsServerPortable.tar.gz -systemctl restart dns.service -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/dns ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh new file mode 100644 index 00000000..fbe2c925 --- /dev/null +++ b/ct/technitiumdns.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ______ __ _ __ _ ____ _ _______ + /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ / __ \/ | / / ___/ + / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ + / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ / +/_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Technitium DNS" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +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 + rm packages-microsoft-prod.deb +fi +wget -q https://download.technitium.com/dns/DnsServerPortable.tar.gz +tar -zxf DnsServerPortable.tar.gz -C /etc/dns/ &>/dev/null +rm -rf DnsServerPortable.tar.gz +systemctl restart dns.service +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5380${CL} \n" diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh deleted file mode 100644 index 5fb1e37d..00000000 --- a/ct/transmission-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ _ _ - /_ __/________ _____v5_________ ___ (_)_________(_)___ ____ - / / / ___/ __ `/ __ \/ ___/ __ `__ \/ / ___/ ___/ / __ \/ __ \ - / / / / / /_/ / / / (__ ) / / / / / (__ |__ ) / /_/ / / / / -/_/ /_/ \__,_/_/ /_/____/_/ /_/ /_/_/____/____/_/\____/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Transmission" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/transmission-daemon/settings.json ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:9091/transmission${CL} \n" diff --git a/ct/transmission.sh b/ct/transmission.sh new file mode 100644 index 00000000..86d45292 --- /dev/null +++ b/ct/transmission.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ______ _ _ + /_ __/________ _____ _________ ___ (_)_________(_)___ ____ + / / / ___/ __ `/ __ \/ ___/ __ `__ \/ / ___/ ___/ / __ \/ __ \ + / / / / / /_/ / / / (__ ) / / / / / (__ |__ ) / /_/ / / / / +/_/ /_/ \__,_/_/ /_/____/_/ /_/ /_/_/____/____/_/\____/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Transmission" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/transmission-daemon/settings.json ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9091/transmission${CL} \n" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh deleted file mode 100644 index 3c447d88..00000000 --- a/ct/trilium-v5.sh +++ /dev/null @@ -1,446 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - ______ _ ___ - /_ __/_v5_(_) (_)_ ______ ___ - / / / ___/ / / / / / / __ `__ \ - / / / / / / / / /_/ / / / / / / -/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Trilium" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Stopping ${APP}" -systemctl stop trilium.service -sleep 1 -msg_ok "Stopped ${APP}" - -msg_info "Updating to v${RELEASE}" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null -cp -r trilium-linux-x64-server/* /opt/trilium/ -msg_ok "Updated to v${RELEASE}" - -msg_info "Cleaning up" -rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server -msg_ok "Cleaned" - -msg_info "Starting ${APP}" -systemctl start trilium.service -sleep 1 -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/trilium ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/trilium.sh b/ct/trilium.sh new file mode 100644 index 00000000..dd2b2578 --- /dev/null +++ b/ct/trilium.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ______ _ ___ + /_ __/____(_) (_)_ ______ ___ + / / / ___/ / / / / / / __ `__ \ + / / / / / / / / /_/ / / / / / / +/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Trilium" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Stopping ${APP}" +systemctl stop trilium.service +sleep 1 +msg_ok "Stopped ${APP}" + +msg_info "Updating to v${RELEASE}" +wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null +cp -r trilium-linux-x64-server/* /opt/trilium/ +msg_ok "Updated to v${RELEASE}" + +msg_info "Cleaning up" +rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl start trilium.service +sleep 1 +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh deleted file mode 100644 index 79bcc700..00000000 --- a/ct/ubuntu-v5.sh +++ /dev/null @@ -1,431 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ ____ __ - / / / / /_v5__ ______ / /___ __ - / / / / __ \/ / / / __ \/ __/ / / / -/ /_/ / /_/ / /_/ / / / / /_/ /_/ / -\____/_.___/\__,_/_/ /_/\__/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Ubuntu" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="ubuntu" -var_version="22.04" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" OFF \ - "22.04" "Jammy" ON \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" -else - exit-script -fi - -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh new file mode 100644 index 00000000..9fce57ed --- /dev/null +++ b/ct/ubuntu.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + __ ____ __ + / / / / /_ __ ______ / /___ __ + / / / / __ \/ / / / __ \/ __/ / / / +/ /_/ / /_/ / /_/ / / / / /_/ /_/ / +\____/_.___/\__,_/_/ /_/\__/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Ubuntu" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="ubuntu" +var_version="22.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh deleted file mode 100644 index ee339e2b..00000000 --- a/ct/umbrel-v5.sh +++ /dev/null @@ -1,452 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ __ __ - / / / /___ ___v5/ /_ ________ / / - / / / / __ `__ \/ __ \/ ___/ _ \/ / -/ /_/ / / / / / / /_/ / / / __/ / -\____/_/ /_/ /_/_.___/_/ \___/_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Umbrel" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - FUSE="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" -else - FUSE="no" -fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/umbrel ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$FUSE" == "yes" ]; then -FEATURES="fuse=1,keyctl=1,nesting=1" -else -FEATURES="keyctl=1,nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export ST=$FUSE -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -LXC_CONFIG=/etc/pve/lxc/${CTID}.conf -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF -if [ "$CT_TYPE" == "0" ]; then -cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL (reboot is required before app installs). - ${BL}http://${IP} ${CL} \n" diff --git a/ct/umbrel.sh b/ct/umbrel.sh new file mode 100644 index 00000000..796693ce --- /dev/null +++ b/ct/umbrel.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docker.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + __ __ __ __ + / / / /___ ___ / /_ ________ / / + / / / / __ `__ \/ __ \/ ___/ _ \/ / +/ /_/ / / / / / / /_/ / / / __/ / +\____/_/ /_/ /_/_.___/_/ \___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Umbrel" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + FUSE="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL (reboot is required before apps install). + ${BL}http://${IP} ${CL} \n" diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh deleted file mode 100644 index 571c30fb..00000000 --- a/ct/unifi-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ _ _____ - / / / /_v5 (_) __(_) - / / / / __ \/ / /_/ / -/ /_/ / / / / / __/ / -\____/_/ /_/_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Unifi" -var_disk="8" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP}" -wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh -bash unifi-update.sh -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /usr/lib/unifi ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/unifi.sh b/ct/unifi.sh new file mode 100644 index 00000000..c5993242 --- /dev/null +++ b/ct/unifi.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + __ __ _ _____ + / / / /__ (_) __(_) + / / / / __ \/ / /_/ / +/ /_/ / / / / / __/ / +\____/_/ /_/_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Unifi" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh +bash unifi-update.sh +msg_ok "Updated ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP}${CL} should be reachable by going to the following URL. + ${BL}https://${IP}:8443${CL} \n" diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh deleted file mode 100644 index 09623497..00000000 --- a/ct/uptimekuma-v5.sh +++ /dev/null @@ -1,444 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - __ __ __ _ __ __ - / / / /___ / /_(_)___ ___ ___ v5 / //_/_ ______ ___ ____ _ - / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / -/ /_/ / /_/ / /_/ / / / / / / __/ / /| / /_/ / / / / / / /_/ / -\____/ .___/\__/_/_/ /_/ /_/\___/ /_/ |_\__,_/_/ /_/ /_/\__,_/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Uptime Kuma" -var_disk="4" -var_cpu="1" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -msg_info "Stopping ${APP}" -sudo systemctl stop uptime-kuma &>/dev/null -msg_ok "Stopped ${APP}" - -cd /opt/uptime-kuma - -msg_info "Pulling ${APP} ${LATEST}" -git fetch --all &>/dev/null -git checkout $LATEST --force &>/dev/null -msg_ok "Pulled ${APP} ${LATEST}" - -msg_info "Updating ${APP} to ${LATEST}" -npm install --production &>/dev/null -npm run download-dist &>/dev/null -msg_ok "Updated ${APP}" - -msg_info "Starting ${APP}" -sudo systemctl start uptime-kuma &>/dev/null -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/uptime-kuma ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3001${CL} \n" diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh new file mode 100644 index 00000000..86644bf9 --- /dev/null +++ b/ct/uptimekuma.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + __ __ __ _ __ __ + / / / /___ / /_(_)___ ___ ___ / //_/_ ______ ___ ____ _ + / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / +/ /_/ / /_/ / /_/ / / / / / / __/ / /| / /_/ / / / / / / /_/ / +\____/ .___/\__/_/_/ /_/ /_/\___/ /_/ |_\__,_/_/ /_/ /_/\__,_/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Uptime Kuma" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/uptime-kuma ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +msg_info "Stopping ${APP}" +sudo systemctl stop uptime-kuma &>/dev/null +msg_ok "Stopped ${APP}" + +cd /opt/uptime-kuma + +msg_info "Pulling ${APP} ${LATEST}" +git fetch --all &>/dev/null +git checkout $LATEST --force &>/dev/null +msg_ok "Pulled ${APP} ${LATEST}" + +msg_info "Updating ${APP} to ${LATEST}" +npm install --production &>/dev/null +npm run download-dist &>/dev/null +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +sudo systemctl start uptime-kuma &>/dev/null +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3001${CL} \n" diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh deleted file mode 100644 index 88de3398..00000000 --- a/ct/vaultwarden-v5.sh +++ /dev/null @@ -1,498 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ __ ____ _ __ __ -| | / /___ ___v5__/ / /| | / /___ __________/ /__ ____ -| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ -| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / -|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Vaultwarden" -var_disk="6" -var_cpu="4" -var_ram="4096" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') -WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ - "1" "VaultWarden $VAULT" ON \ - "2" "Web-Vault $WVRELEASE" OFF \ - "3" "Show Admin Token" OFF \ - 3>&1 1>&2 2>&3) - -header_info -if [ "$UPD" == "1" ]; then -echo -e "\n ⚠️ Ensure you set 4vCPU & 4096MiB RAM minimum!!! \n" -msg_info "Stopping Vaultwarden" -systemctl stop vaultwarden.service -msg_ok "Stopped Vaultwarden" - -msg_info "Updating VaultWarden to $VAULT (Patience)" -cd ~ && rm -rf vaultwarden -git clone https://github.com/dani-garcia/vaultwarden &>/dev/null -cd vaultwarden -cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null -DIR=/usr/bin/vaultwarden - if [ -d "$DIR" ]; then - cp target/release/vaultwarden /usr/bin/ - else - cp target/release/vaultwarden /opt/vaultwarden/bin/ - fi -msg_ok "Updated VaultWarden" - -msg_info "Cleaning up" -cd ~ && rm -rf vaultwarden -msg_ok "Cleaned" - -msg_info "Starting Vaultwarden" -systemctl start vaultwarden.service -msg_ok "Started Vaultwarden" - -msg_ok "$VAULT Update Successful" -echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" -exit; -fi -if [ "$UPD" == "2" ]; then -msg_info "Stopping Vaultwarden" -systemctl stop vaultwarden.service -msg_ok "Stopped Vaultwarden" - -msg_info "Updating Web-Vault to $WVRELEASE" -curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WVRELEASE/bw_web_$WVRELEASE.tar.gz &>/dev/null -tar -zxf bw_web_$WVRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null -msg_ok "Updated Web-Vault" - -msg_info "Cleaning up" -rm bw_web_$WVRELEASE.tar.gz -msg_ok "Cleaned" - -msg_info "Starting Vaultwarden" -systemctl start vaultwarden.service -msg_ok "Started Vaultwarden" -msg_ok "$WVRELEASE Update Successful" -exit; -fi -if [ "$UPD" == "3" ]; then -DIR=/usr/bin/vaultwarden - if [ -d "$DIR" ]; then - cat /etc/vaultwarden.env | grep "ADMIN_TOKEN" - else - cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" - fi -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 512 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh new file mode 100644 index 00000000..3a9aed9a --- /dev/null +++ b/ct/vaultwarden.sh @@ -0,0 +1,145 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + + _ __ ____ _ __ __ +| | / /___ ___ __/ / /| | / /___ __________/ /__ ____ +| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ +| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / / +|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Vaultwarden" +var_disk="6" +var_cpu="4" +var_ram="4096" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ + "1" "VaultWarden $VAULT" ON \ + "2" "Web-Vault $WVRELEASE" OFF \ + "3" "Show Admin Token" OFF \ + 3>&1 1>&2 2>&3) + + header_info + if [ "$UPD" == "1" ]; then + echo -e "\n ⚠️ Ensure you set 4vCPU & 4096MiB RAM minimum!!! \n" + msg_info "Stopping Vaultwarden" + systemctl stop vaultwarden.service + msg_ok "Stopped Vaultwarden" + + msg_info "Updating VaultWarden to $VAULT (Patience)" + cd ~ && rm -rf vaultwarden + git clone https://github.com/dani-garcia/vaultwarden &>/dev/null + cd vaultwarden + cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null + DIR=/usr/bin/vaultwarden + if [ -d "$DIR" ]; then + cp target/release/vaultwarden /usr/bin/ + else + cp target/release/vaultwarden /opt/vaultwarden/bin/ + fi + msg_ok "Updated VaultWarden" + + msg_info "Cleaning up" + cd ~ && rm -rf vaultwarden + msg_ok "Cleaned" + + msg_info "Starting Vaultwarden" + systemctl start vaultwarden.service + msg_ok "Started Vaultwarden" + + msg_ok "$VAULT Update Successful" + echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" + exit + fi + if [ "$UPD" == "2" ]; then + msg_info "Stopping Vaultwarden" + systemctl stop vaultwarden.service + msg_ok "Stopped Vaultwarden" + + msg_info "Updating Web-Vault to $WVRELEASE" + curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WVRELEASE/bw_web_$WVRELEASE.tar.gz &>/dev/null + tar -zxf bw_web_$WVRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null + msg_ok "Updated Web-Vault" + + msg_info "Cleaning up" + rm bw_web_$WVRELEASE.tar.gz + msg_ok "Cleaned" + + msg_info "Starting Vaultwarden" + systemctl start vaultwarden.service + msg_ok "Started Vaultwarden" + msg_ok "$WVRELEASE Update Successful" + exit + fi + if [ "$UPD" == "3" ]; then + DIR=/usr/bin/vaultwarden + if [ -d "$DIR" ]; then + cat /etc/vaultwarden.env | grep "ADMIN_TOKEN" + else + cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" + fi + exit + fi +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 512 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh deleted file mode 100644 index 21b45677..00000000 --- a/ct/whisparr-v5.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ ____ _ -| | / / /_ (_)________ ____v5__________ -| | /| / / __ \/ / ___/ __ \/ __ `/ ___/ ___/ -| |/ |/ / / / / (__ ) /_/ / /_/ / / / / -|__/|__/_/ /_/_/____/ .___/\__,_/_/ /_/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Whisparr" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/whisparr ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:6969${CL} \n" diff --git a/ct/whisparr.sh b/ct/whisparr.sh new file mode 100644 index 00000000..7c3adbe4 --- /dev/null +++ b/ct/whisparr.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _ ____ _ +| | / / /_ (_)________ ____ __________ +| | /| / / __ \/ / ___/ __ \/ __ `/ ___/ ___/ +| |/ |/ / / / / (__ ) /_/ / /_/ / / / / +|__/|__/_/ /_/_/____/ .___/\__,_/_/ /_/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Whisparr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var/lib/whisparr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6969${CL} \n" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh deleted file mode 100644 index ec26eadb..00000000 --- a/ct/whoogle-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ ____ ______ ____ ________ ______ -| | v5 / / / / / __ \/ __ \/ ____/ / / ____/ -| | /| / / /_/ / / / / / / / / __/ / / __/ -| |/ |/ / __ / /_/ / /_/ / /_/ / /___/ /___ -|__/|__/_/ /_/\____/\____/\____/_____/_____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Whoogle" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -pip3 install whoogle-search --upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /usr/local/bin/whoogle-search ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/whoogle.sh b/ct/whoogle.sh new file mode 100644 index 00000000..e1bf927c --- /dev/null +++ b/ct/whoogle.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _ ____ ______ ____ ________ ______ +| | / / / / / __ \/ __ \/ ____/ / / ____/ +| | /| / / /_/ / / / / / / / / __/ / / __/ +| |/ |/ / __ / /_/ / /_/ / /_/ / /___/ /___ +|__/|__/_/ /_/\____/\____/\____/_____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Whoogle" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /usr/local/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +pip3 install whoogle-search --upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh deleted file mode 100644 index 3848eb4c..00000000 --- a/ct/wikijs-v5.sh +++ /dev/null @@ -1,449 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ ___ __ _ _ -| | v5 / (_) /__(_) (_)____ -| | /| / / / //_/ / / / ___/ -| |/ |/ / / ,< / / / (__ ) -|__/|__/_/_/|_/_(_)_/ /____/ - /___/ - -EOF -} -header_info -echo -e "Loading..." -APP="Wikijs" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Stopping ${APP}" -systemctl stop wikijs -msg_ok "Stopped ${APP}" - -msg_info "Backing up Data" -mkdir -p data-backup -cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup -msg_ok "Backed up Data" - -msg_info "Updating ${APP}" -rm -rf /opt/wikijs/* -cd /opt/wikijs -wget -q https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz -tar xzf wiki-js.tar.gz -msg_ok "Updated ${APP}" - -msg_info "Restoring Data" -cp -R ~/data-backup/* /opt/wikijs -rm -rf ~/data-backup -npm rebuild sqlite3 &>/dev/null -msg_ok "Restored Data" - -msg_info "Starting ${APP}" -systemctl start wikijs -msg_ok "Started ${APP}" -msg_ok "Update Successfull" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/wikijs ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/wikijs.sh b/ct/wikijs.sh new file mode 100644 index 00000000..377eeba0 --- /dev/null +++ b/ct/wikijs.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _ ___ __ _ _ +| | / (_) /__(_) (_)____ +| | /| / / / //_/ / / / ___/ +| |/ |/ / / ,< / / / (__ ) +|__/|__/_/_/|_/_(_)_/ /____/ + /___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Wikijs" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/wikijs ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP}" +systemctl stop wikijs +msg_ok "Stopped ${APP}" + +msg_info "Backing up Data" +mkdir -p data-backup +cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup +msg_ok "Backed up Data" + +msg_info "Updating ${APP}" +rm -rf /opt/wikijs/* +cd /opt/wikijs +wget -q https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz +tar xzf wiki-js.tar.gz +msg_ok "Updated ${APP}" + +msg_info "Restoring Data" +cp -R ~/data-backup/* /opt/wikijs +rm -rf ~/data-backup +npm rebuild sqlite3 &>/dev/null +msg_ok "Restored Data" + +msg_info "Starting ${APP}" +systemctl start wikijs +msg_ok "Started ${APP}" +msg_ok "Update Successfull" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh deleted file mode 100644 index 8fce1701..00000000 --- a/ct/wireguard-v5.sh +++ /dev/null @@ -1,479 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _ ___ ______ __ -| | / (_)_______ / ____/_ ______ __________/ / -| | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ / -| |/ |/ / / / / __/ /_/ / /_/ / /_/ / / / /_/ / -|__/|__/_/_/ v5\___/\____/\__,_/\__,_/_/ \__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Wireguard" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP} LXC" ON \ - "2" "Install WGDashboard" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit -fi -if [ "$UPD" == "2" ]; then - if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then - msg_error "Existing WGDashboard Installation Found!"; - exit - fi -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing Python3-pip" -apt-get install -y python3-pip &>/dev/null -pip install flask &>/dev/null -pip install ifcfg &>/dev/null -pip install flask_qrcode &>/dev/null -pip install icmplib &>/dev/null -msg_ok "Installed Python3-pip" - -msg_info "Installing WGDashboard" -WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null -cd /etc/wgdashboard/src -sudo chmod u+x wgd.sh -sudo ./wgd.sh install &>/dev/null -sudo chmod -R 755 /etc/wireguard -msg_ok "Installed WGDashboard" - -msg_info "Creating Service" -service_path="/etc/systemd/system/wg-dashboard.service" -echo "[Unit] -After=systemd-networkd.service - -[Service] -WorkingDirectory=/etc/wgdashboard/src -ExecStart=/usr/bin/python3 /etc/wgdashboard/src/dashboard.py -Restart=always - - -[Install] -WantedBy=default.target" >$service_path -chmod 664 /etc/systemd/system/wg-dashboard.service -systemctl daemon-reload -systemctl enable wg-dashboard.service &>/dev/null -systemctl start wg-dashboard.service &>/dev/null -msg_ok "Created Service" -echo -e "WGDashboard should be reachable by going to the following URL. - ${BL}http://${IP}:10086${CL} admin|admin \n" -exit -fi -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pivpn/wireguard ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/wireguard.sh b/ct/wireguard.sh new file mode 100644 index 00000000..cfd017be --- /dev/null +++ b/ct/wireguard.sh @@ -0,0 +1,123 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + _ ___ ______ __ +| | / (_)_______ / ____/_ ______ __________/ / +| | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ / +| |/ |/ / / / / __/ /_/ / /_/ / /_/ / / / /_/ / +|__/|__/_/_/ \___/\____/\__,_/\__,_/_/ \__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Wireguard" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP} LXC" ON \ + "2" "Install WGDashboard" OFF \ + 3>&1 1>&2 2>&3) +header_info +if [ "$UPD" == "1" ]; then +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +msg_ok "Update Successfull" +exit +fi +if [ "$UPD" == "2" ]; then + if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then + msg_error "Existing WGDashboard Installation Found!"; + exit + fi +IP=$(hostname -I | awk '{print $1}') +msg_info "Installing Python3-pip" +apt-get install -y python3-pip &>/dev/null +pip install flask &>/dev/null +pip install ifcfg &>/dev/null +pip install flask_qrcode &>/dev/null +pip install icmplib &>/dev/null +msg_ok "Installed Python3-pip" + +msg_info "Installing WGDashboard" +WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') + +git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null +cd /etc/wgdashboard/src +sudo chmod u+x wgd.sh +sudo ./wgd.sh install &>/dev/null +sudo chmod -R 755 /etc/wireguard +msg_ok "Installed WGDashboard" + +msg_info "Creating Service" +service_path="/etc/systemd/system/wg-dashboard.service" +echo "[Unit] +After=systemd-networkd.service + +[Service] +WorkingDirectory=/etc/wgdashboard/src +ExecStart=/usr/bin/python3 /etc/wgdashboard/src/dashboard.py +Restart=always + + +[Install] +WantedBy=default.target" >$service_path +chmod 664 /etc/systemd/system/wg-dashboard.service +systemctl daemon-reload +systemctl enable wg-dashboard.service &>/dev/null +systemctl start wg-dashboard.service &>/dev/null +msg_ok "Created Service" +echo -e "WGDashboard should be reachable by going to the following URL. + ${BL}http://${IP}:10086${CL} admin|admin \n" +exit +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh deleted file mode 100644 index 6d324d78..00000000 --- a/ct/yunohost-v5.sh +++ /dev/null @@ -1,426 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - -__ __ __ __ __ -\ \/ /_ ______v5____ / / / /___ _____/ /_ - \ / / / / __ \/ __ \/ /_/ / __ \/ ___/ __/ - / / /_/ / / / / /_/ / __ / /_/ (__ ) /_ -/_/\__,_/_/ /_/\____/_/ /_/\____/____/\__/ - -EOF -} -header_info -echo -e "Loading..." -APP="YunoHost" -var_disk="20" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}/ ${CL}" diff --git a/ct/yunohost.sh b/ct/yunohost.sh new file mode 100644 index 00000000..931ad446 --- /dev/null +++ b/ct/yunohost.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + +__ __ __ __ __ +\ \/ /_ ______ ____ / / / /___ _____/ /_ + \ / / / / __ \/ __ \/ /_/ / __ \/ ___/ __/ + / / /_/ / / / / /_/ / __ / /_/ (__ ) /_ +/_/\__,_/_/ /_/\____/_/ /_/\____/____/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="YunoHost" +var_disk="20" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/ ${CL}" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh deleted file mode 100644 index f16cc025..00000000 --- a/ct/zigbee2mqtt-v5.sh +++ /dev/null @@ -1,486 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ _ __ ___ __ _______ ____________ -/__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ - / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / - / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / -/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ - v5 /____/ 🐝 - -EOF -} -header_info -echo -e "Loading..." -APP="Zigbee2MQTT" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -cd /opt/zigbee2mqtt - -stop_zigbee2mqtt() { - if which systemctl 2> /dev/null > /dev/null; then - echo "Shutting down Zigbee2MQTT..." - sudo systemctl stop zigbee2mqtt - else - echo "Skipped stopping Zigbee2MQTT, no systemctl found" - fi -} - -start_zigbee2mqtt() { - if which systemctl 2> /dev/null > /dev/null; then - echo "Starting Zigbee2MQTT..." - sudo systemctl start zigbee2mqtt - else - echo "Skipped starting Zigbee2MQTT, no systemctl found" - fi -} - -set -e - -if [ -d data-backup ]; then - echo "ERROR: Backup directory exists. May be previous restoring was failed?" - echo "1. Save 'data-backup' and 'data' dirs to safe location to make possibility to restore config later." - echo "2. Manually delete 'data-backup' dir and try again." - exit 1 -fi - -stop_zigbee2mqtt - -echo "Generating a backup of the configuration..." -cp -R data data-backup || { echo "Failed to create backup."; exit 1; } - -echo "Initiating update" -if ! git pull; then - echo "Update failed, temporarily storing changes and trying again." - git stash && git pull || (echo "Update failed even after storing changes. Aborting."; exit 1) -fi - -echo "Acquiring necessary components..." -npm ci || { echo "Failed to install necessary components."; exit 1; } - -echo "Restoring configuration..." -cp -R data-backup/* data || { echo "Failed to restore configuration."; exit 1; } - -rm -rf data-backup || { echo "Failed to remove backup directory."; exit 1; } - -start_zigbee2mqtt - -echo "Done!" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/zigbee2mqtt ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh new file mode 100644 index 00000000..2030a5dd --- /dev/null +++ b/ct/zigbee2mqtt.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + + _____ _ __ ___ __ _______ ____________ +/__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ + / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / + / /__/ / /_/ / /_/ / __/ __/ __// / / / /_/ / / / / / +/____/_/\__, /_.___/\___/\___/____/_/ /_/\___\_\/_/ /_/ + /____/ 🐝 + +EOF +} +header_info +echo -e "Loading..." +APP="Zigbee2MQTT" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + header_info + if [[ ! -d /opt/zigbee2mqtt ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + cd /opt/zigbee2mqtt + + stop_zigbee2mqtt() { + if which systemctl 2>/dev/null >/dev/null; then + echo "Shutting down Zigbee2MQTT..." + sudo systemctl stop zigbee2mqtt + else + echo "Skipped stopping Zigbee2MQTT, no systemctl found" + fi + } + + start_zigbee2mqtt() { + if which systemctl 2>/dev/null >/dev/null; then + echo "Starting Zigbee2MQTT..." + sudo systemctl start zigbee2mqtt + else + echo "Skipped starting Zigbee2MQTT, no systemctl found" + fi + } + + set -e + + if [ -d data-backup ]; then + echo "ERROR: Backup directory exists. May be previous restoring was failed?" + echo "1. Save 'data-backup' and 'data' dirs to safe location to make possibility to restore config later." + echo "2. Manually delete 'data-backup' dir and try again." + exit 1 + fi + + stop_zigbee2mqtt + + echo "Generating a backup of the configuration..." + cp -R data data-backup || { + echo "Failed to create backup." + exit 1 + } + + echo "Initiating update" + if ! git pull; then + echo "Update failed, temporarily storing changes and trying again." + git stash && git pull || ( + echo "Update failed even after storing changes. Aborting." + exit 1 + ) + fi + + echo "Acquiring necessary components..." + npm ci || { + echo "Failed to install necessary components." + exit 1 + } + + echo "Restoring configuration..." + cp -R data-backup/* data || { + echo "Failed to restore configuration." + exit 1 + } + + rm -rf data-backup || { + echo "Failed to remove backup directory." + exit 1 + } + + start_zigbee2mqtt + + echo "Done!" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh deleted file mode 100644 index c4f360a6..00000000 --- a/ct/zwave-js-ui-v5.sh +++ /dev/null @@ -1,455 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - - _____ _______ __ ______ -/__ /_ ______ __v5 _____ / / ___/ / / / / _/ - / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / - / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / -/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ - -EOF -} -header_info -echo -e "Loading..." -APP="Zwave-JS-UI" -var_disk="4" -var_cpu="2" -var_ram="1024" -var_os="debian" -var_version="11" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}" - CT_TYPE="0" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - PW="" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" OFF \ - "0" "Privileged" ON \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -msg_info "Stopping Z-wave JS UI" -systemctl stop zwave-js-ui.service -msg_ok "Stopped Z-wave JS UI" - -msg_info "Updating Z-wave JS UI" -wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null -\cp -R zwave-js-ui-linux /opt/zwave-js-ui -msg_ok "Updated Z-wave JS UI" - -msg_info "Starting Z-wave JS UI" -systemctl enable --now zwave-js-ui.service -msg_ok "Started Z-wave JS UI" - -msg_info "Cleanup" -rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store -msg_ok "Cleaned" -msg_ok "Updated Successfully!\n" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/zwave-js-ui ]]; then - msg_error "No ${APP} Installation Found!" - exit -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -lxc-attach -n $CTID -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8091${CL} \n" diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh new file mode 100644 index 00000000..7dc9ec31 --- /dev/null +++ b/ct/zwave-js-ui.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + + _____ _______ __ ______ +/__ /_ ______ __ _____ / / ___/ / / / / _/ + / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / + / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / +/____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Zwave-JS-UI" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + header_info + if [[ ! -d /opt/zwave-js-ui ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + msg_info "Stopping Z-wave JS UI" + systemctl stop zwave-js-ui.service + msg_ok "Stopped Z-wave JS UI" + + msg_info "Updating Z-wave JS UI" + wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null + unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null + \cp -R zwave-js-ui-linux /opt/zwave-js-ui + msg_ok "Updated Z-wave JS UI" + + msg_info "Starting Z-wave JS UI" + systemctl enable --now zwave-js-ui.service + msg_ok "Started Z-wave JS UI" + + msg_info "Cleanup" + rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store + msg_ok "Cleaned" + msg_ok "Updated Successfully!\n" + exit +} + +start +build_container +description + +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8091${CL} \n" diff --git a/install/adguard-install.sh b/install/adguard-install.sh new file mode 100644 index 00000000..fb490e06 --- /dev/null +++ b/install/adguard-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing AdGuard Home" +systemctl stop systemd-resolved +echo "DNSStubListener=no" >>/etc/systemd/resolved.conf +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf +wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh +$STD bash install.sh +rm install.sh +msg_ok "Installed AdGuard Home" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/adguard-v5-install.sh b/install/adguard-v5-install.sh deleted file mode 100644 index 4f8ae86e..00000000 --- a/install/adguard-v5-install.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing AdGuard Home" -systemctl stop systemd-resolved -echo "DNSStubListener=no" >>/etc/systemd/resolved.conf -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh -$STD bash install.sh -rm install.sh -msg_ok "Installed AdGuard Home" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh new file mode 100644 index 00000000..4dd81790 --- /dev/null +++ b/install/alpine-adguard-install.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add nano +$STD apk add mc +$STD apk add openssh +msg_ok "Installed Dependencies" + +msg_info "Installing Alpine-AdGuard" +VER=$(curl --silent -qI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); +$STD wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" +$STD tar -xvf AdGuardHome_linux_amd64.tar.gz >/dev/null 2>&1 +$STD mv AdGuardHome /opt +$STD rm AdGuardHome_linux_amd64.tar.gz +$STD chmod +x /opt/AdGuardHome/AdGuardHome +$STD /opt/AdGuardHome/AdGuardHome -s install +$STD /opt/AdGuardHome/AdGuardHome -s start +$STD msg_ok "Installed Alpine-AdGuard" + +motd_ssh diff --git a/install/alpine-adguard-v5-install.sh b/install/alpine-adguard-v5-install.sh deleted file mode 100644 index a5c73b3f..00000000 --- a/install/alpine-adguard-v5-install.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then -$STD sysctl net.ipv6.conf.all.disable_ipv6=1 -$STD sysctl net.ipv6.conf.default.disable_ipv6=1 -echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -$STD sysctl -p /etc/sysctl.d/99-sysctl.conf -fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -i=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -while [ $i -gt 0 ]; do - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - i=$((i-1)) -done - -if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community -EOF -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi - -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apk update -$STD apk upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apk add wget -$STD apk add bash -$STD apk add curl -$STD apk add nano -$STD apk add mc -$STD apk add openssh -msg_ok "Installed Dependencies" - -msg_info "Installing $APPLICATION" -VER=$(curl --silent -qI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); -$STD wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" -$STD tar -xvf AdGuardHome_linux_amd64.tar.gz >/dev/null 2>&1 -$STD mv AdGuardHome /opt -$STD rm AdGuardHome_linux_amd64.tar.gz -$STD chmod +x /opt/AdGuardHome/AdGuardHome -$STD /opt/AdGuardHome/AdGuardHome -s install -$STD /opt/AdGuardHome/AdGuardHome -s start -$STD msg_ok "Installed $APPLICATION" - -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -if [[ "${SSH_ROOT}" == "yes" ]]; then - $STD rc-update add sshd - $STD /etc/init.d/sshd start -fi diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh new file mode 100644 index 00000000..ac7dce79 --- /dev/null +++ b/install/alpine-docker-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing Docker" +$STD apk add docker +$STD rc-service docker start +$STD rc-update add docker default +msg_ok "Installed Docker" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") + +read -r -p "Would you like to add Portainer? " prompt +if echo "$prompt" | grep -Eq "^(y|yes)$"; then + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + docker volume create portainer_data >/dev/null + $STD docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +fi + +read -r -p "Would you like to add Docker Compose? " prompt +if echo "$prompt" | grep -Eq "^(y|yes)$"; then + msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} + mkdir -p $DOCKER_CONFIG/cli-plugins + curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose + msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" +fi + +motd_ssh diff --git a/install/alpine-docker-v5-install.sh b/install/alpine-docker-v5-install.sh deleted file mode 100644 index 8a36fa0e..00000000 --- a/install/alpine-docker-v5-install.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then -$STD sysctl net.ipv6.conf.all.disable_ipv6=1 -$STD sysctl net.ipv6.conf.default.disable_ipv6=1 -echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -$STD sysctl -p /etc/sysctl.d/99-sysctl.conf -fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -i=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -while [ $i -gt 0 ]; do - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - i=$((i-1)) -done - -if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community -https://dl-cdn.alpinelinux.org/alpine/edge/testing -EOF -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi - -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apk update -$STD apk upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apk add bash -$STD apk add curl -$STD apk add openssl -$STD apk add openssh -$STD apk add nano -$STD apk add mc -msg_ok "Installed Dependencies" - -msg_info "Installing $APPLICATION" -$STD apk add docker -$STD rc-service docker start -$STD rc-update add docker default -msg_ok "Installed $APPLICATION" - -get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 -} -PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") -DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") - -read -r -p "Would you like to add Portainer? " prompt -if echo "$prompt" | grep -Eq "^(y|yes)$"; then - msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" - docker volume create portainer_data >/dev/null - $STD docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest - msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" -fi - -read -r -p "Would you like to add Docker Compose? " prompt -if echo "$prompt" | grep -Eq "^(y|yes)$"; then - msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" - DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} - mkdir -p $DOCKER_CONFIG/cli-plugins - curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose - chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose - msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" -fi - -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -if [[ "${SSH_ROOT}" == "yes" ]]; then - $STD rc-update add sshd - $STD /etc/init.d/sshd start -fi diff --git a/install/alpine-grafana-install.sh b/install/alpine-grafana-install.sh new file mode 100644 index 00000000..86f1e97d --- /dev/null +++ b/install/alpine-grafana-install.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing Grafana" +$STD apk add grafana +$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana +$STD rc-service grafana start +$STD rc-update add grafana default +msg_ok "Installed Grafana" + +motd_ssh diff --git a/install/alpine-grafana-v5-install.sh b/install/alpine-grafana-v5-install.sh deleted file mode 100644 index efd75bef..00000000 --- a/install/alpine-grafana-v5-install.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then -$STD sysctl net.ipv6.conf.all.disable_ipv6=1 -$STD sysctl net.ipv6.conf.default.disable_ipv6=1 -echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -$STD sysctl -p /etc/sysctl.d/99-sysctl.conf -fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -i=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -while [ $i -gt 0 ]; do - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - i=$((i-1)) -done - -if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community -EOF -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi - -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apk update -$STD apk upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apk add bash -$STD apk add curl -$STD apk add openssh -$STD apk add nano -$STD apk add mc -msg_ok "Installed Dependencies" - -msg_info "Installing $APPLICATION" -$STD apk add grafana -$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana -$STD rc-service grafana start -$STD rc-update add grafana default -msg_ok "Installed $APPLICATION" - -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -if [[ "${SSH_ROOT}" == "yes" ]]; then - $STD rc-update add sshd - $STD /etc/init.d/sshd start -fi diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh new file mode 100644 index 00000000..952922e7 --- /dev/null +++ b/install/alpine-vaultwarden-install.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing Alpine-Vaultwarden" +$STD apk add vaultwarden +cat </etc/conf.d/vaultwarden +export DATA_FOLDER=/var/lib/vaultwarden +export WEB_VAULT_FOLDER=/var/lib/vaultwarden/web-vault +export WEB_VAULT_ENABLED=true +export ADMIN_TOKEN=$(openssl rand -base64 48) +export ROCKET_ADDRESS=0.0.0.0 +EOF +$STD rc-service vaultwarden start +$STD rc-update add vaultwarden default +msg_ok "Installed Alpine-Vaultwarden" + +motd_ssh diff --git a/install/alpine-vaultwarden-v5-install.sh b/install/alpine-vaultwarden-v5-install.sh deleted file mode 100644 index 02edeb1a..00000000 --- a/install/alpine-vaultwarden-v5-install.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then -$STD sysctl net.ipv6.conf.all.disable_ipv6=1 -$STD sysctl net.ipv6.conf.default.disable_ipv6=1 -echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -$STD sysctl -p /etc/sysctl.d/99-sysctl.conf -fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -i=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -while [ $i -gt 0 ]; do - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - i=$((i-1)) -done - -if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/edge/main -https://dl-cdn.alpinelinux.org/alpine/edge/community -https://dl-cdn.alpinelinux.org/alpine/edge/testing -EOF -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi - -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apk update -$STD apk upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apk add bash -$STD apk add curl -$STD apk add openssl -$STD apk add openssh -$STD apk add nano -$STD apk add mc -msg_ok "Installed Dependencies" - -msg_info "Installing $APPLICATION" -$STD apk add vaultwarden -cat </etc/conf.d/vaultwarden -export DATA_FOLDER=/var/lib/vaultwarden -export WEB_VAULT_FOLDER=/var/lib/vaultwarden/web-vault -export WEB_VAULT_ENABLED=true -export ADMIN_TOKEN=$(openssl rand -base64 48) -export ROCKET_ADDRESS=0.0.0.0 -EOF -$STD rc-service vaultwarden start -$STD rc-update add vaultwarden default -msg_ok "Installed $APPLICATION" - -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -if [[ "${SSH_ROOT}" == "yes" ]]; then - $STD rc-update add sshd - $STD /etc/init.d/sshd start -fi diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh new file mode 100644 index 00000000..f3698db9 --- /dev/null +++ b/install/alpine-zigbee2mqtt-install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing Alpine-Zigbee2MQTT" +$STD apk add zigbee2mqtt +msg_ok "Installed Alpine-Zigbee2MQTT" + +motd_ssh diff --git a/install/alpine-zigbee2mqtt-v5-install.sh b/install/alpine-zigbee2mqtt-v5-install.sh deleted file mode 100644 index 26c35768..00000000 --- a/install/alpine-zigbee2mqtt-v5-install.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then -$STD sysctl net.ipv6.conf.all.disable_ipv6=1 -$STD sysctl net.ipv6.conf.default.disable_ipv6=1 -echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf -$STD sysctl -p /etc/sysctl.d/99-sysctl.conf -fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -i=$RETRY_NUM -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -while [ $i -gt 0 ]; do - if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY - i=$((i-1)) -done - -if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community -https://dl-cdn.alpinelinux.org/alpine/edge/testing -EOF -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if echo "$prompt" | grep -Ei "^(y|yes)$" > /dev/null; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi - -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apk update -$STD apk upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apk add bash -$STD apk add curl -$STD apk add openssl -$STD apk add openssh -$STD apk add nano -$STD apk add mc -msg_ok "Installed Dependencies" - -msg_info "Installing $APPLICATION" -$STD apk add zigbee2mqtt -msg_ok "Installed $APPLICATION" - -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -if [[ "${SSH_ROOT}" == "yes" ]]; then - $STD rc-update add sshd - $STD /etc/init.d/sshd start -fi diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh new file mode 100644 index 00000000..5586918e --- /dev/null +++ b/install/audiobookshelf-install.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y gnupg +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing audiobookshelf" +$STD apt-key add <(curl -s --compressed "https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg") +sh -c 'echo "deb https://advplyr.github.io/audiobookshelf-ppa ./" > /etc/apt/sources.list.d/audiobookshelf.list' +$STD apt-get update +$STD apt install audiobookshelf +msg_ok "Installed audiobookshelf" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/audiobookshelf-v5-install.sh b/install/audiobookshelf-v5-install.sh deleted file mode 100644 index f32761b2..00000000 --- a/install/audiobookshelf-v5-install.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y gnupg -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing audiobookshelf" -$STD apt-key add <(curl -s --compressed "https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg") -sh -c 'echo "deb https://advplyr.github.io/audiobookshelf-ppa ./" > /etc/apt/sources.list.d/audiobookshelf.list' -$STD apt-get update -$STD apt install audiobookshelf -msg_ok "Installed audiobookshelf" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh new file mode 100644 index 00000000..dbf1cea3 --- /dev/null +++ b/install/autobrr-install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Autobrr" +wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) +tar -C /usr/local/bin -xzf autobrr*.tar.gz +rm -rf autobrr*.tar.gz +mkdir -p /root/.config/autobrr +cat <>/root/.config/autobrr/config.toml +# https://autobrr.com/configuration/autobrr +host = "0.0.0.0" +port = 7474 +logLevel = "DEBUG" +sessionSecret = "$(openssl rand -base64 24)" +EOF +msg_ok "Installed Autobrr" + +msg_info "Creating Service" +service_path="/etc/systemd/system/autobrr.service" +echo "[Unit] +Description=autobrr service +After=syslog.target network-online.target +[Service] +Type=simple +User=root +Group=root +ExecStart=/usr/local/bin/autobrr --config=/root/.config/autobrr/ +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q autobrr.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/autobrr-v5-install.sh b/install/autobrr-v5-install.sh deleted file mode 100644 index 61a9c8c2..00000000 --- a/install/autobrr-v5-install.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Autobrr" -wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) -tar -C /usr/local/bin -xzf autobrr*.tar.gz -rm -rf autobrr*.tar.gz -mkdir -p /root/.config/autobrr -cat <>/root/.config/autobrr/config.toml -# https://autobrr.com/configuration/autobrr -host = "0.0.0.0" -port = 7474 -logLevel = "DEBUG" -sessionSecret = "$(openssl rand -base64 24)" -EOF -msg_ok "Installed Autobrr" - -msg_info "Creating Service" -service_path="/etc/systemd/system/autobrr.service" -echo "[Unit] -Description=autobrr service -After=syslog.target network-online.target -[Service] -Type=simple -User=root -Group=root -ExecStart=/usr/local/bin/autobrr --config=/root/.config/autobrr/ -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q autobrr.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/blocky-v5-install.sh b/install/blocky-install.sh similarity index 79% rename from install/blocky-v5-install.sh rename to install/blocky-install.sh index aa1722b0..e4656a13 100644 --- a/install/blocky-v5-install.sh +++ b/install/blocky-install.sh @@ -5,85 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os msg_info "Installing Dependencies" $STD apt-get install -y curl @@ -353,23 +281,8 @@ EOF $STD systemctl enable --now blocky msg_ok "Created Service" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/casaos-install.sh b/install/casaos-install.sh new file mode 100644 index 00000000..cf4ee609 --- /dev/null +++ b/install/casaos-install.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing CasaOS (Patience)" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD bash <(curl -fsSL https://get.casaos.io) +msg_ok "Installed CasaOS" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/casaos-v5-install.sh b/install/casaos-v5-install.sh deleted file mode 100644 index 22f05ba7..00000000 --- a/install/casaos-v5-install.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y unzip -msg_ok "Installed Dependencies" - -msg_info "Installing CasaOS (Patience)" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi -$STD bash <(curl -fsSL https://get.casaos.io) -msg_ok "Installed CasaOS" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh new file mode 100644 index 00000000..fc9832c7 --- /dev/null +++ b/install/changedetection-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y pip +msg_ok "Installed Dependencies" + +msg_info "Installing Change Detection" +mkdir /opt/changedetection +$STD pip3 install changedetection.io +$STD python3 -m pip install dnspython==2.2.1 +msg_ok "Installed Change Detection" + +msg_info "Creating Service" +cat </etc/systemd/system/changedetection.service +[Unit] +Description=Change Detection +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/opt/changedetection +ExecStart=changedetection.io -d /opt/changedetection -p 5000 +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now changedetection +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/changedetection-v5-install.sh b/install/changedetection-v5-install.sh deleted file mode 100644 index 433ee0f9..00000000 --- a/install/changedetection-v5-install.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y pip -msg_ok "Installed Dependencies" - -msg_info "Installing Change Detection" -mkdir /opt/changedetection -$STD pip3 install changedetection.io -$STD python3 -m pip install dnspython==2.2.1 -msg_ok "Installed Change Detection" - -msg_info "Creating Service" -cat </etc/systemd/system/changedetection.service -[Unit] -Description=Change Detection -After=network-online.target -[Service] -Type=simple -WorkingDirectory=/opt/changedetection -ExecStart=changedetection.io -d /opt/changedetection -p 5000 -[Install] -WantedBy=multi-user.target -EOF -$STD systemctl enable --now changedetection -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh new file mode 100644 index 00000000..1060a494 --- /dev/null +++ b/install/cronicle-install.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Cronicle Primary Server" +LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +IP=$(hostname -I | awk '{print $1}') +mkdir -p /opt/cronicle +cd /opt/cronicle +$STD tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 +$STD npm install +$STD node bin/build.js dist +sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json +if [[ $SERV == "y" ]]; then $STD /opt/cronicle/bin/control.sh setup; fi +$STD /opt/cronicle/bin/control.sh start +$STD cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled +chmod 775 /etc/init.d/cronicled +$STD update-rc.d cronicled defaults +msg_ok "Installed Cronicle Primary Server" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/cronicle-v5-install.sh b/install/cronicle-v5-install.sh deleted file mode 100644 index d9addbf6..00000000 --- a/install/cronicle-v5-install.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Cronicle Primary Server" -LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -IP=$(hostname -I | awk '{print $1}') -mkdir -p /opt/cronicle -cd /opt/cronicle -$STD tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 -$STD npm install -$STD node bin/build.js dist -sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json -if [[ $SERV == "y" ]]; then $STD /opt/cronicle/bin/control.sh setup; fi -$STD /opt/cronicle/bin/control.sh start -$STD cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled -chmod 775 /etc/init.d/cronicled -$STD update-rc.d cronicled defaults -msg_ok "Installed Cronicle Primary Server" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh new file mode 100644 index 00000000..dead1801 --- /dev/null +++ b/install/daemonsync-install.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y g++-multilib +msg_ok "Installed Dependencies" + +msg_info "Installing Daemon Sync Server" +wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb +$STD dpkg -i daemonsync_2.2.0.0059_amd64.deb +msg_ok "Installed Daemon Sync Server" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf daemonsync_2.2.0.0059_amd64.deb +$STD apt-get autoremove >/dev/null +$STD apt-get autoclean >/dev/null +msg_ok "Cleaned" diff --git a/install/daemonsync-v5-install.sh b/install/daemonsync-v5-install.sh deleted file mode 100644 index abe4dec6..00000000 --- a/install/daemonsync-v5-install.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y g++-multilib -msg_ok "Installed Dependencies" - -msg_info "Installing Daemon Sync Server" -wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb -$STD dpkg -i daemonsync_2.2.0.0059_amd64.deb -msg_ok "Installed Daemon Sync Server" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf daemonsync_2.2.0.0059_amd64.deb -$STD apt-get autoremove >/dev/null -$STD apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/dashy-install.sh b/install/dashy-install.sh new file mode 100644 index 00000000..089fcdde --- /dev/null +++ b/install/dashy-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs git make g++ gcc +msg_ok "Installed Node.js" + +msg_info "Installing Yarn" +$STD npm install --global yarn +msg_ok "Installed Yarn" + +msg_info "Installing Dashy (Patience)" +$STD git clone https://github.com/Lissy93/dashy.git +cd /dashy +$STD yarn +export NODE_OPTIONS=--max-old-space-size=1000 +$STD yarn build +msg_ok "Installed Dashy" + +msg_info "Creating Service" +cat </etc/systemd/system/dashy.service +[Unit] +Description=dashy + +[Service] +Type=simple +WorkingDirectory=/dashy +ExecStart=/usr/bin/yarn start +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable dashy +systemctl start dashy +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/dashy-v5-install.sh b/install/dashy-v5-install.sh deleted file mode 100644 index 1bd8e71d..00000000 --- a/install/dashy-v5-install.sh +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs git make g++ gcc -msg_ok "Installed Node.js" - -msg_info "Installing Yarn" -$STD npm install --global yarn -msg_ok "Installed Yarn" - -msg_info "Installing Dashy (Patience)" -$STD git clone https://github.com/Lissy93/dashy.git -cd /dashy -$STD yarn -export NODE_OPTIONS=--max-old-space-size=1000 -$STD yarn build -msg_ok "Installed Dashy" - -msg_info "Creating Service" -cat </etc/systemd/system/dashy.service -[Unit] -Description=dashy - -[Service] -Type=simple -WorkingDirectory=/dashy -ExecStart=/usr/bin/yarn start -[Install] -WantedBy=multi-user.target -EOF -$STD systemctl enable dashy -systemctl start dashy -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/debian-install.sh b/install/debian-install.sh new file mode 100644 index 00000000..0e4905fb --- /dev/null +++ b/install/debian-install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/debian-v5-install.sh b/install/debian-v5-install.sh deleted file mode 100644 index ef9e1a6f..00000000 --- a/install/debian-v5-install.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/deconz-install.sh b/install/deconz-install.sh new file mode 100644 index 00000000..068cf5f3 --- /dev/null +++ b/install/deconz-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting Phoscon Repository" +$STD apt-key add <(curl -fsSL http://phoscon.de/apt/deconz.pub.key) +sh -c "echo 'deb [arch=amd64] http://phoscon.de/apt/deconz $(lsb_release -cs) main' > /etc/apt/sources.list.d/deconz.list" +msg_ok "Setup Phoscon Repository" + +msg_info "Installing deConz" +$STD apt-get update +$STD apt-get install -y deconz +msg_ok "Installed deConz" + +msg_info "Creating Service" +service_path="/lib/systemd/system/deconz.service" +echo "[Unit] +Description=deCONZ: ZigBee gateway -- REST API +Wants=deconz-init.service deconz-update.service +StartLimitIntervalSec=0 + +[Service] +User=root +ExecStart=/usr/bin/deCONZ -platform minimal --http-port=80 +Restart=on-failure +RestartSec=30 +AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now deconz +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/deconz-v5-install.sh b/install/deconz-v5-install.sh deleted file mode 100644 index ad060379..00000000 --- a/install/deconz-v5-install.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting Phoscon Repository" -$STD apt-key add <(curl -fsSL http://phoscon.de/apt/deconz.pub.key) -sh -c "echo 'deb [arch=amd64] http://phoscon.de/apt/deconz $(lsb_release -cs) main' > /etc/apt/sources.list.d/deconz.list" -msg_ok "Setup Phoscon Repository" - -msg_info "Installing deConz" -$STD apt-get update -$STD apt-get install -y deconz -msg_ok "Installed deConz" - -msg_info "Creating Service" -service_path="/lib/systemd/system/deconz.service" -echo "[Unit] -Description=deCONZ: ZigBee gateway -- REST API -Wants=deconz-init.service deconz-update.service -StartLimitIntervalSec=0 - -[Service] -User=root -ExecStart=/usr/bin/deCONZ -platform minimal --http-port=80 -Restart=on-failure -RestartSec=30 -AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME - -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now deconz -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/deluge-install.sh b/install/deluge-install.sh new file mode 100644 index 00000000..1a55fb27 --- /dev/null +++ b/install/deluge-install.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Python3-pip" +$STD apt-get install -y python3-pip +msg_ok "Installed Python3-pip" + +msg_info "Installing Deluge" +$STD pip install deluge[all] +$STD pip install lbry-libtorrent +msg_ok "Installed Deluge" + +msg_info "Creating Service" +service_path="/etc/systemd/system/deluged.service" +echo "[Unit] +Description=Deluge Bittorrent Client Daemon +Documentation=man:deluged +After=network-online.target + +[Service] +Type=simple +UMask=007 +ExecStart=/usr/local/bin/deluged -d +Restart=on-failure +TimeoutStopSec=300 + +[Install] +WantedBy=multi-user.target" >$service_path + +service_path="/etc/systemd/system/deluge-web.service" +echo "[Unit] +Description=Deluge Bittorrent Client Web Interface +Documentation=man:deluge-web +After=deluged.service +Wants=deluged.service + +[Service] +Type=simple +UMask=027 +ExecStart=/usr/local/bin/deluge-web -d +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q deluged.service +systemctl enable --now -q deluge-web.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/deluge-v5-install.sh b/install/deluge-v5-install.sh deleted file mode 100644 index dbc85972..00000000 --- a/install/deluge-v5-install.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" - -msg_info "Installing Deluge" -$STD pip install deluge[all] -$STD pip install lbry-libtorrent -msg_ok "Installed Deluge" - -msg_info "Creating Service" -service_path="/etc/systemd/system/deluged.service" -echo "[Unit] -Description=Deluge Bittorrent Client Daemon -Documentation=man:deluged -After=network-online.target - -[Service] -Type=simple -UMask=007 -ExecStart=/usr/local/bin/deluged -d -Restart=on-failure -TimeoutStopSec=300 - -[Install] -WantedBy=multi-user.target" >$service_path - -service_path="/etc/systemd/system/deluge-web.service" -echo "[Unit] -Description=Deluge Bittorrent Client Web Interface -Documentation=man:deluge-web -After=deluged.service -Wants=deluged.service - -[Service] -Type=simple -UMask=027 -ExecStart=/usr/local/bin/deluge-web -d -Restart=on-failure - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q deluged.service -systemctl enable --now -q deluge-web.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/devuan-install.sh b/install/devuan-install.sh new file mode 100644 index 00000000..eb2b237b --- /dev/null +++ b/install/devuan-install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/devuan-v5-install.sh b/install/devuan-v5-install.sh deleted file mode 100644 index a8ca650d..00000000 --- a/install/devuan-v5-install.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/docker-install.sh b/install/docker-install.sh new file mode 100644 index 00000000..c2a33444 --- /dev/null +++ b/install/docker-install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") + +msg_info "Installing Docker $DOCKER_LATEST_VERSION" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD sh <(curl -sSL https://get.docker.com) +msg_ok "Installed Docker $DOCKER_LATEST_VERSION" + +read -r -p "Would you like to add Portainer? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + docker volume create portainer_data >/dev/null + $STD docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +fi + +read -r -p "Would you like to add Docker Compose? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} + mkdir -p $DOCKER_CONFIG/cli-plugins + curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose + msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" +fi + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/docker-v5-install.sh b/install/docker-v5-install.sh deleted file mode 100644 index 83339fb5..00000000 --- a/install/docker-v5-install.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 -} - -DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") -PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") -DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") - -msg_info "Installing Docker $DOCKER_LATEST_VERSION" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi -$STD sh <(curl -sSL https://get.docker.com) -msg_ok "Installed Docker $DOCKER_LATEST_VERSION" - -read -r -p "Would you like to add Portainer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" - docker volume create portainer_data >/dev/null - $STD docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest - msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" -fi - -read -r -p "Would you like to add Docker Compose? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" - DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} - mkdir -p $DOCKER_CONFIG/cli-plugins - curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose - chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose - msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" -fi - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/emby-install.sh b/install/emby-install.sh new file mode 100644 index 00000000..668222f7 --- /dev/null +++ b/install/emby-install.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd + else + $STD apt-get install -y intel-opencl-icd + fi + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" +fi + +LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + +msg_info "Installing Emby" +wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb +$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb +msg_ok "Installed Emby" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm emby-server-deb_${LATEST}_amd64.deb +msg_ok "Cleaned" diff --git a/install/emby-v5-install.sh b/install/emby-v5-install.sh deleted file mode 100644 index 0a41c2c5..00000000 --- a/install/emby-v5-install.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd - else - $STD apt-get install -y intel-opencl-icd - fi - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* - msg_ok "Set Up Hardware Acceleration" -fi - -LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) - -msg_info "Installing Emby" -wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb -$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb -msg_ok "Installed Emby" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -rm emby-server-deb_${LATEST}_amd64.deb -msg_ok "Cleaned" diff --git a/install/emqx-install.sh b/install/emqx-install.sh new file mode 100644 index 00000000..74b3c2d3 --- /dev/null +++ b/install/emqx-install.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing EMQX" +$STD bash <(curl -fsSL https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh) +$STD apt-get install -y emqx +$STD systemctl enable --now emqx +msg_ok "Installed EMQX" + +motd_ssh +root + +msg_info "Cleaning up" +apt-get autoremove >/dev/null +apt-get autoclean >/dev/null +msg_ok "Cleaned" diff --git a/install/emqx-v5-install.sh b/install/emqx-v5-install.sh deleted file mode 100644 index 853a3cdb..00000000 --- a/install/emqx-v5-install.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing EMQX" -$STD bash <(curl -fsSL https://packagecloud.io/install/repositories/emqx/emqx/script.deb.sh) -$STD apt-get install -y emqx -$STD systemctl enable --now emqx -msg_ok "Installed EMQX" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -apt-get autoremove >/dev/null -apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/esphome-install.sh b/install/esphome-install.sh new file mode 100644 index 00000000..fe8e8e46 --- /dev/null +++ b/install/esphome-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing Python3-pip" +$STD apt-get install -y python3-pip +msg_ok "Installed Python3-pip" + +msg_info "Installing ESPHome" +$STD pip3 install esphome +msg_ok "Installed ESPHome" + +msg_info "Installing ESPHome Dashboard" +$STD pip3 install tornado esptool + +service_path="/etc/systemd/system/esphomeDashboard.service" +echo "[Unit] +Description=ESPHome Dashboard +After=network.target +[Service] +ExecStart=/usr/local/bin/esphome /root/config/ dashboard +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable esphomeDashboard.service +systemctl start esphomeDashboard +msg_ok "Installed ESPHome Dashboard" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/esphome-v5-install.sh b/install/esphome-v5-install.sh deleted file mode 100644 index 7bd8b99f..00000000 --- a/install/esphome-v5-install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" - -msg_info "Installing ESPHome" -$STD pip3 install esphome -msg_ok "Installed ESPHome" - -msg_info "Installing ESPHome Dashboard" -$STD pip3 install tornado esptool - -service_path="/etc/systemd/system/esphomeDashboard.service" -echo "[Unit] -Description=ESPHome Dashboard -After=network.target -[Service] -ExecStart=/usr/local/bin/esphome /root/config/ dashboard -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable esphomeDashboard.service -systemctl start esphomeDashboard -msg_ok "Installed ESPHome Dashboard" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh new file mode 100644 index 00000000..75211aeb --- /dev/null +++ b/install/go2rtc-install.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing go2rtc" +mkdir -p /opt/go2rtc +cd /opt/go2rtc +wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 +chmod +x go2rtc_linux_amd64 +msg_ok "Installed go2rtc" + +msg_info "Creating Service" +service_path="/etc/systemd/system/go2rtc.service" +echo "[Unit] +Description=go2rtc service +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/opt/go2rtc/go2rtc_linux_amd64 + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable -q --now go2rtc +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/go2rtc-v5-install.sh b/install/go2rtc-v5-install.sh deleted file mode 100644 index 57577695..00000000 --- a/install/go2rtc-v5-install.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing go2rtc" -mkdir -p /opt/go2rtc -cd /opt/go2rtc -wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 -chmod +x go2rtc_linux_amd64 -msg_ok "Installed go2rtc" - -msg_info "Creating Service" -service_path="/etc/systemd/system/go2rtc.service" -echo "[Unit] -Description=go2rtc service -After=network.target - -[Service] -Type=simple -User=root -ExecStart=/opt/go2rtc/go2rtc_linux_amd64 - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable -q --now go2rtc -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/grafana-install.sh b/install/grafana-install.sh new file mode 100644 index 00000000..718cc230 --- /dev/null +++ b/install/grafana-install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +$STD apt-get install -y apt-transport-https +$STD apt-get install -y software-properties-common +msg_ok "Installed Dependencies" + +msg_info "Setting up Grafana Repository" +wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key +sh -c 'echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" > /etc/apt/sources.list.d/grafana.list' +msg_ok "Set up Grafana Repository" + +msg_info "Installing Grafana" +$STD apt-get update +$STD apt-get install -y grafana +msg_ok "Installed Grafana" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/grafana-v5-install.sh b/install/grafana-v5-install.sh deleted file mode 100644 index 9b327c23..00000000 --- a/install/grafana-v5-install.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -$STD apt-get install -y apt-transport-https -$STD apt-get install -y software-properties-common -msg_ok "Installed Dependencies" - -msg_info "Setting up Grafana Repository" -wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key -sh -c 'echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" > /etc/apt/sources.list.d/grafana.list' -msg_ok "Set up Grafana Repository" - -msg_info "Installing Grafana" -$STD apt-get update -$STD apt-get install -y grafana -msg_ok "Installed Grafana" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi -systemctl start grafana-server -$STD systemctl enable grafana-server.service - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/grocy-install.sh b/install/grocy-install.sh new file mode 100644 index 00000000..b51cfbcc --- /dev/null +++ b/install/grocy-install.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apache2 +$STD apt-get install -y unzip +$STD apt-get install -y apt-transport-https +$STD apt-get install -y lsb-release +msg_ok "Installed Dependencies" + +msg_info "Installing PHP 8.1" +curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg +sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +$STD apt-get update +$STD apt-get install -y php8.1 +$STD apt-get install -y libapache2-mod-php8.1 +$STD apt-get install -y php8.1-sqlite3 +$STD apt-get install -y php8.1-gd +$STD apt-get install -y php8.1-intl +$STD apt-get install -y php8.1-mbstring +msg_ok "Installed PHP 8.1" + +msg_info "Installing grocy" +wget -q https://releases.grocy.info/latest +$STD unzip latest -d /var/www/html +chown -R www-data:www-data /var/www/html +cp /var/www/html/config-dist.php /var/www/html/data/config.php +chmod +x /var/www/html/update.sh + +cat </etc/apache2/sites-available/grocy.conf + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html/public + ErrorLog /var/log/apache2/error.log + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + +EOF + +$STD a2dissite 000-default.conf +$STD a2ensite grocy.conf +$STD a2enmod rewrite +systemctl reload apache2 +msg_ok "Installed grocy" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/latest +msg_ok "Cleaned" diff --git a/install/grocy-v5-install.sh b/install/grocy-v5-install.sh deleted file mode 100644 index f5bf1469..00000000 --- a/install/grocy-v5-install.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y apache2 -$STD apt-get install -y unzip -$STD apt-get install -y apt-transport-https -$STD apt-get install -y lsb-release -msg_ok "Installed Dependencies" - -msg_info "Installing PHP 8.1" -curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg -sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' -$STD apt-get update -$STD apt-get install -y php8.1 -$STD apt-get install -y libapache2-mod-php8.1 -$STD apt-get install -y php8.1-sqlite3 -$STD apt-get install -y php8.1-gd -$STD apt-get install -y php8.1-intl -$STD apt-get install -y php8.1-mbstring -msg_ok "Installed PHP 8.1" - -msg_info "Installing grocy" -wget -q https://releases.grocy.info/latest -$STD unzip latest -d /var/www/html -chown -R www-data:www-data /var/www/html -cp /var/www/html/config-dist.php /var/www/html/data/config.php -chmod +x /var/www/html/update.sh - -cat </etc/apache2/sites-available/grocy.conf - - ServerAdmin webmaster@localhost - DocumentRoot /var/www/html/public - ErrorLog /var/log/apache2/error.log - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - allow from all - - -EOF - -$STD a2dissite 000-default.conf -$STD a2ensite grocy.conf -$STD a2enmod rewrite -systemctl reload apache2 -msg_ok "Installed grocy" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -rm -rf /root/latest -msg_ok "Cleaned" diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh new file mode 100644 index 00000000..8e83e9ef --- /dev/null +++ b/install/heimdalldashboard-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing PHP" +$STD apt-get install -y php +$STD apt-get install -y php-sqlite3 +$STD apt-get install -y php-zip +msg_ok "Installed PHP" + +RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +msg_info "Installing Heimdall Dashboard ${RELEASE}" +$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" +$STD tar xvzf ${RELEASE}.tar.gz +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') +rm -rf ${RELEASE}.tar.gz +mv Heimdall-${VER} /opt/Heimdall +msg_ok "Installed Heimdall Dashboard ${RELEASE}" + +msg_info "Creating Service" +service_path="/etc/systemd/system/heimdall.service" +echo "[Unit] +Description=Heimdall +After=network.target + +[Service] +Restart=always +RestartSec=5 +Type=simple +User=root +WorkingDirectory=/opt/Heimdall +ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 +TimeoutStopSec=30 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD sudo systemctl enable --now heimdall.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/heimdalldashboard-v5-install.sh b/install/heimdalldashboard-v5-install.sh deleted file mode 100644 index 4fcc9888..00000000 --- a/install/heimdalldashboard-v5-install.sh +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing PHP" -$STD apt-get install -y php -$STD apt-get install -y php-sqlite3 -$STD apt-get install -y php-zip -msg_ok "Installed PHP" - -RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -msg_info "Installing Heimdall Dashboard ${RELEASE}" -$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -$STD tar xvzf ${RELEASE}.tar.gz -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') -rm -rf ${RELEASE}.tar.gz -mv Heimdall-${VER} /opt/Heimdall -msg_ok "Installed Heimdall Dashboard ${RELEASE}" - -msg_info "Creating Service" -service_path="/etc/systemd/system/heimdall.service" -echo "[Unit] -Description=Heimdall -After=network.target - -[Service] -Restart=always -RestartSec=5 -Type=simple -User=root -WorkingDirectory=/opt/Heimdall -ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 -TimeoutStopSec=30 - -[Install] -WantedBy=multi-user.target" >$service_path -$STD sudo systemctl enable --now heimdall.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh new file mode 100644 index 00000000..d7b64ad1 --- /dev/null +++ b/install/homeassistant-core-install.sh @@ -0,0 +1,107 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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 \ + make \ + build-essential \ + libjpeg-dev \ + libpcap-dev \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + libreadline-dev \ + libsqlite3-dev \ + libmariadb-dev-compat \ + autoconf \ + git \ + curl \ + sudo \ + mc \ + llvm \ + libncursesw5-dev \ + xz-utils \ + tzdata \ + bluez \ + tk-dev \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ + libopenjp2-7 \ + libtiff5 \ + libturbojpeg0-dev \ + liblzma-dev +msg_ok "Installed Dependencies" + +msg_info "Installing Linux D-Bus Message Broker" +cat <>/etc/apt/sources.list +deb http://deb.debian.org/debian bullseye-backports main contrib non-free +deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free +EOF +$STD apt-get update +$STD apt-get -t bullseye-backports install -y dbus-broker +$STD systemctl enable --now dbus-broker.service +msg_ok "Installed Linux D-Bus Message Broker" + +msg_info "Installing pyenv" +$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv +set +e +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc +msg_ok "Installed pyenv" +. ~/.bashrc +set -e +msg_info "Installing Python 3.11.1" +$STD pyenv install 3.11.1 +pyenv global 3.11.1 +msg_ok "Installed Python 3.11.1" + +msg_info "Installing Home Assistant-Core" +mkdir /srv/homeassistant +cd /srv/homeassistant +python3 -m venv . +source bin/activate +$STD pip install --upgrade pip +$STD python3 -m pip install wheel +$STD pip install mysqlclient +$STD pip install psycopg2-binary +$STD pip install homeassistant +mkdir -p /root/.homeassistant +msg_ok "Installed Home Assistant-Core" + +msg_info "Creating Service" +cat </etc/systemd/system/homeassistant.service +[Unit] +Description=Home Assistant +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/root/.homeassistant +ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" +RestartForceExitStatus=100 +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now homeassistant +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/homeassistant-core-v5-install.sh b/install/homeassistant-core-v5-install.sh deleted file mode 100644 index 71f3186d..00000000 --- a/install/homeassistant-core-v5-install.sh +++ /dev/null @@ -1,195 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y \ - make \ - build-essential \ - libjpeg-dev \ - libpcap-dev \ - libssl-dev \ - zlib1g-dev \ - libbz2-dev \ - libreadline-dev \ - libsqlite3-dev \ - libmariadb-dev-compat \ - autoconf \ - git \ - curl \ - sudo \ - mc \ - llvm \ - libncursesw5-dev \ - xz-utils \ - tzdata \ - bluez \ - tk-dev \ - libxml2-dev \ - libxmlsec1-dev \ - libffi-dev \ - libopenjp2-7 \ - libtiff5 \ - libturbojpeg0-dev \ - liblzma-dev -msg_ok "Installed Dependencies" - -msg_info "Installing Linux D-Bus Message Broker" -cat <>/etc/apt/sources.list -deb http://deb.debian.org/debian bullseye-backports main contrib non-free -deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free -EOF -$STD apt-get update -$STD apt-get -t bullseye-backports install -y dbus-broker -$STD systemctl enable --now dbus-broker.service -msg_ok "Installed Linux D-Bus Message Broker" - -msg_info "Installing pyenv" -$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv -set +e -echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc -msg_ok "Installed pyenv" -. ~/.bashrc -set -e -msg_info "Installing Python 3.11.1" -$STD pyenv install 3.11.1 -pyenv global 3.11.1 -msg_ok "Installed Python 3.11.1" - -msg_info "Installing Home Assistant-Core" -mkdir /srv/homeassistant -cd /srv/homeassistant -python3 -m venv . -source bin/activate -$STD pip install --upgrade pip -$STD python3 -m pip install wheel -$STD pip install mysqlclient -$STD pip install psycopg2-binary -$STD pip install homeassistant -mkdir -p /root/.homeassistant -msg_ok "Installed Home Assistant-Core" - -msg_info "Creating Service" -cat </etc/systemd/system/homeassistant.service -[Unit] -Description=Home Assistant -After=network-online.target -[Service] -Type=simple -WorkingDirectory=/root/.homeassistant -ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" -RestartForceExitStatus=100 -[Install] -WantedBy=multi-user.target -EOF -$STD systemctl enable --now homeassistant -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh new file mode 100644 index 00000000..ab92e64a --- /dev/null +++ b/install/homeassistant-install.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing runlike" +$STD apt-get install -y python3-pip +$STD pip3 install runlike +msg_ok "Installed runlike" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core") +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") + +msg_info "Installing Docker $DOCKER_LATEST_VERSION" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD sh <(curl -sSL https://get.docker.com) +msg_ok "Installed Docker $DOCKER_LATEST_VERSION" + +msg_info "Pulling Portainer $PORTAINER_LATEST_VERSION Image" +$STD docker pull portainer/portainer-ce:latest +msg_ok "Pulled Portainer $PORTAINER_LATEST_VERSION Image" + +msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" +$STD docker volume create portainer_data +$STD docker run -d \ + -p 8000:8000 \ + -p 9000:9000 \ + --name=portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest +msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" + +msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image" +$STD docker pull homeassistant/home-assistant:stable +msg_ok "Pulled Home Assistant $CORE_LATEST_VERSION Image" + +msg_info "Installing Home Assistant $CORE_LATEST_VERSION" +$STD docker volume create hass_config +$STD docker run -d \ + --name homeassistant \ + --privileged \ + --restart unless-stopped \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /dev:/dev \ + -v hass_config:/config \ + -v /etc/localtime:/etc/localtime:ro \ + --net=host \ + homeassistant/home-assistant:stable + mkdir /root/hass_config +msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/homeassistant-v5-install.sh b/install/homeassistant-v5-install.sh deleted file mode 100644 index 12a5efbc..00000000 --- a/install/homeassistant-v5-install.sh +++ /dev/null @@ -1,180 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing runlike" -$STD apt-get install -y python3-pip -$STD pip3 install runlike -msg_ok "Installed runlike" - -get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 -} - -DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") -CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core") -PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") - -msg_info "Installing Docker $DOCKER_LATEST_VERSION" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi -$STD sh <(curl -sSL https://get.docker.com) -msg_ok "Installed Docker $DOCKER_LATEST_VERSION" - -msg_info "Pulling Portainer $PORTAINER_LATEST_VERSION Image" -$STD docker pull portainer/portainer-ce:latest -msg_ok "Pulled Portainer $PORTAINER_LATEST_VERSION Image" - -msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" -$STD docker volume create portainer_data -$STD docker run -d \ - -p 8000:8000 \ - -p 9000:9000 \ - --name=portainer \ - --restart=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v portainer_data:/data \ - portainer/portainer-ce:latest -msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" - -msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image" -$STD docker pull homeassistant/home-assistant:stable -msg_ok "Pulled Home Assistant $CORE_LATEST_VERSION Image" - -msg_info "Installing Home Assistant $CORE_LATEST_VERSION" -$STD docker volume create hass_config -$STD docker run -d \ - --name homeassistant \ - --privileged \ - --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - --net=host \ - homeassistant/home-assistant:stable - mkdir /root/hass_config -msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh new file mode 100644 index 00000000..5c12bbfe --- /dev/null +++ b/install/homebridge-install.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs gcc g++ make python net-tools +msg_ok "Installed Node.js" + +msg_info "Installing Homebridge" +$STD npm install -g --unsafe-perm homebridge homebridge-config-ui-x +msg_info "Installed Homebridge" + +msg_info "Creating Service" +$STD hb-service install --user homebridge +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/homebridge-v5-install.sh b/install/homebridge-v5-install.sh deleted file mode 100644 index ac0fec01..00000000 --- a/install/homebridge-v5-install.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs gcc g++ make python net-tools -msg_ok "Installed Node.js" - -msg_info "Installing Homebridge" -$STD npm install -g --unsafe-perm homebridge homebridge-config-ui-x -msg_info "Installed Homebridge" - -msg_info "Creating Service" -$STD hb-service install --user homebridge -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/homepage-install.sh b/install/homepage-install.sh new file mode 100644 index 00000000..4ebc685e --- /dev/null +++ b/install/homepage-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Installed Node.js" + +msg_info "Installing Homepage (Patience)" +$STD git clone https://github.com/benphelps/homepage.git /opt/homepage +cd /opt/homepage +mkdir -p config +cp /opt/homepage/src/skeleton/* /opt/homepage/config +$STD pnpm install +$STD pnpm build +msg_ok "Installed Homepage" + +msg_info "Creating Service" +service_path="/etc/systemd/system/homepage.service" +echo "[Unit] +Description=Homepage +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +WorkingDirectory=/opt/homepage/ +ExecStart=pnpm start +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now homepage +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/homepage-v5-install.sh b/install/homepage-v5-install.sh deleted file mode 100644 index ca0fe0c4..00000000 --- a/install/homepage-v5-install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -$STD npm install -g pnpm -msg_ok "Installed Node.js" - -msg_info "Installing Homepage (Patience)" -$STD git clone https://github.com/benphelps/homepage.git /opt/homepage -cd /opt/homepage -mkdir -p config -cp /opt/homepage/src/skeleton/* /opt/homepage/config -$STD pnpm install -$STD pnpm build -msg_ok "Installed Homepage" - -msg_info "Creating Service" -service_path="/etc/systemd/system/homepage.service" -echo "[Unit] -Description=Homepage -After=network.target -StartLimitIntervalSec=0 -[Service] -Type=simple -Restart=always -RestartSec=1 -User=root -WorkingDirectory=/opt/homepage/ -ExecStart=pnpm start -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now homepage -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/homer-install.sh b/install/homer-install.sh new file mode 100644 index 00000000..197af604 --- /dev/null +++ b/install/homer-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +$STD apt-get install -y pip +msg_ok "Installed Dependencies" + +msg_info "Installing Homer" +mkdir -p /opt/homer +cd /opt/homer +wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip +$STD unzip homer.zip +rm -rf homer.zip +cp assets/config.yml.dist assets/config.yml +msg_ok "Installed Homer" + +msg_info "Creating Service" +cat </etc/systemd/system/homer.service +[Unit] +Description=Homer Dashboard +After=network-online.target +[Service] +Type=simple +WorkingDirectory=/opt/homer +ExecStart=python3 -m http.server 8010 +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now homer +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/homer-v5-install.sh b/install/homer-v5-install.sh deleted file mode 100644 index 539c4aed..00000000 --- a/install/homer-v5-install.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y unzip -$STD apt-get install -y pip -msg_ok "Installed Dependencies" - -msg_info "Installing Homer" -mkdir -p /opt/homer -cd /opt/homer -wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip -$STD unzip homer.zip -rm -rf homer.zip -cp assets/config.yml.dist assets/config.yml -msg_ok "Installed Homer" - -msg_info "Creating Service" -cat </etc/systemd/system/homer.service -[Unit] -Description=Homer Dashboard -After=network-online.target -[Service] -Type=simple -WorkingDirectory=/opt/homer -ExecStart=python3 -m http.server 8010 -[Install] -WantedBy=multi-user.target -EOF -$STD systemctl enable --now homer -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh new file mode 100644 index 00000000..f8a3df3c --- /dev/null +++ b/install/hyperion-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y lsb-release +$STD apt-get install -y gpg +$STD apt-get install -y apt-transport-https +msg_ok "Installed Dependencies" + +msg_info "Installing Hyperion" +wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg +sh -c 'echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/hyperion.list' +$STD apt-get update +$STD apt-get install -y hyperion +$STD systemctl enable --now hyperion@root.service +msg_ok "Installed Hyperion" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove >/dev/null +$STD apt-get autoclean >/dev/null +msg_ok "Cleaned" diff --git a/install/hyperion-v5-install.sh b/install/hyperion-v5-install.sh deleted file mode 100644 index 4e2668f2..00000000 --- a/install/hyperion-v5-install.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y lsb-release -$STD apt-get install -y gpg -$STD apt-get install -y apt-transport-https -msg_ok "Installed Dependencies" - -msg_info "Installing Hyperion" -wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg -sh -c 'echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/hyperion.list' -$STD apt-get update -$STD apt-get install -y hyperion -$STD systemctl enable --now hyperion@root.service -msg_ok "Installed Hyperion" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove >/dev/null -$STD apt-get autoclean >/dev/null -msg_ok "Cleaned" diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh new file mode 100644 index 00000000..1c501b0b --- /dev/null +++ b/install/influxdb-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y lsb-base +$STD apt-get install -y lsb-release +$STD apt-get install -y gnupg2 +msg_ok "Installed Dependencies" + +msg_info "Setting up InfluxDB Repository" +wget -q https://repos.influxdata.com/influxdata-archive_compat.key +cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null +sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' +msg_ok "Set up InfluxDB Repository" + +read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt +if [[ $prompt == "2" ]]; then + INFLUX="2" +else + INFLUX="1" +fi + +msg_info "Installing InfluxDB" +$STD apt-get update +if [[ $INFLUX == "2" ]]; then + $STD apt-get install -y influxdb2 +else + $STD apt-get install -y influxdb +fi +$STD systemctl enable --now influxdb +msg_ok "Installed InfluxDB" + +read -r -p "Would you like to add Telegraf? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Telegraf" + $STD apt-get install -y telegraf + msg_ok "Installed Telegraf" +fi + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/influxdb-v5-install.sh b/install/influxdb-v5-install.sh deleted file mode 100644 index 31fe8ece..00000000 --- a/install/influxdb-v5-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y lsb-base -$STD apt-get install -y lsb-release -$STD apt-get install -y gnupg2 -msg_ok "Installed Dependencies" - -msg_info "Setting up InfluxDB Repository" -wget -q https://repos.influxdata.com/influxdata-archive_compat.key -cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null -sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' -msg_ok "Set up InfluxDB Repository" - -read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt -if [[ $prompt == "2" ]]; then - INFLUX="2" -else - INFLUX="1" -fi - -msg_info "Installing InfluxDB" -$STD apt-get update -if [[ $INFLUX == "2" ]]; then - $STD apt-get install -y influxdb2 -else - $STD apt-get install -y influxdb -fi -$STD systemctl enable --now influxdb -msg_ok "Installed InfluxDB" - -read -r -p "Would you like to add Telegraf? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Telegraf" - $STD apt-get install -y telegraf - msg_ok "Installed Telegraf" -fi - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh new file mode 100644 index 00000000..5146abea --- /dev/null +++ b/install/iobroker-install.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing ioBroker (Patience)" +$STD bash <(curl -fsSL https://iobroker.net/install.sh) +msg_ok "Installed ioBroker" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/iobroker-v5-install.sh b/install/iobroker-v5-install.sh deleted file mode 100644 index 7c8152b3..00000000 --- a/install/iobroker-v5-install.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing ioBroker (Patience)" -$STD bash <(curl -fsSL https://iobroker.net/install.sh) -msg_ok "Installed ioBroker" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/jackett-install.sh b/install/jackett-install.sh new file mode 100644 index 00000000..b4982d3c --- /dev/null +++ b/install/jackett-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Jackett" +RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz +tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt +rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz +msg_ok "Installed Jackett" + +msg_info "Creating Service" +cat </etc/systemd/system/jackett.service +[Unit] +Description=Jackett Daemon +After=network.target +[Service] +SyslogIdentifier=jackett +Restart=always +RestartSec=5 +Type=simple +WorkingDirectory=/opt/Jackett +ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh +TimeoutStopSec=30 +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now jackett.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/jackett-v5-install.sh b/install/jackett-v5-install.sh deleted file mode 100644 index 7baee1b1..00000000 --- a/install/jackett-v5-install.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Jackett" -RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) -wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz -tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt -rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz -msg_ok "Installed Jackett" - -msg_info "Creating Service" -cat </etc/systemd/system/jackett.service -[Unit] -Description=Jackett Daemon -After=network.target -[Service] -SyslogIdentifier=jackett -Restart=always -RestartSec=5 -Type=simple -WorkingDirectory=/opt/Jackett -ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh -TimeoutStopSec=30 -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now jackett.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh new file mode 100644 index 00000000..e0ac97b4 --- /dev/null +++ b/install/jellyfin-install.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apt-transport-https +$STD apt-get install -y software-properties-common +msg_ok "Installed Dependencies" + +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd + else + $STD apt-get install -y intel-opencl-icd + fi + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" +fi + +msg_info "Setting Up Jellyfin Repository" +$STD add-apt-repository universe -y +$STD apt-key add <(curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key) +sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" > /etc/apt/sources.list.d/jellyfin.list' +msg_ok "Set Up Jellyfin Repository" + +msg_info "Installing Jellyfin" +$STD apt-get update +$STD apt install jellyfin-server -y +$STD apt install jellyfin-ffmpeg5 -y +msg_ok "Installed Jellyfin" + +msg_info "Creating Service" +cat <<'EOF' >/lib/systemd/system/jellyfin.service +[Unit] +Description = Jellyfin Media Server +After = network.target +[Service] +Type = simple +EnvironmentFile = /etc/default/jellyfin +User = root +ExecStart = /usr/bin/jellyfin +Restart = on-failure +TimeoutSec = 15 +[Install] +WantedBy = multi-user.target +EOF +ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/jellyfin-v5-install.sh b/install/jellyfin-v5-install.sh deleted file mode 100644 index 821bfe0e..00000000 --- a/install/jellyfin-v5-install.sh +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y apt-transport-https -$STD apt-get install -y software-properties-common -msg_ok "Installed Dependencies" - -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd - else - $STD apt-get install -y intel-opencl-icd - fi - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* - msg_ok "Set Up Hardware Acceleration" -fi - -msg_info "Setting Up Jellyfin Repository" -$STD add-apt-repository universe -y -$STD apt-key add <(curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key) -sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" > /etc/apt/sources.list.d/jellyfin.list' -msg_ok "Set Up Jellyfin Repository" - -msg_info "Installing Jellyfin" -$STD apt-get update -$STD apt install jellyfin-server -y -$STD apt install jellyfin-ffmpeg5 -y -msg_ok "Installed Jellyfin" - -msg_info "Creating Service" -cat <<'EOF' >/lib/systemd/system/jellyfin.service -[Unit] -Description = Jellyfin Media Server -After = network.target -[Service] -Type = simple -EnvironmentFile = /etc/default/jellyfin -User = root -ExecStart = /usr/bin/jellyfin -Restart = on-failure -TimeoutSec = 15 -[Install] -WantedBy = multi-user.target -EOF -ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/k0s-install.sh b/install/k0s-install.sh new file mode 100644 index 00000000..7e772932 --- /dev/null +++ b/install/k0s-install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing k0s Kubernetes" +$STD bash <(curl -sSLf https://get.k0s.sh) +$STD k0s install controller --single +$STD k0s start +mkdir -p /etc/k0s +k0s config create > /etc/k0s/k0s.yaml +msg_ok "Installed k0s Kubernetes" + +read -r -p "Would you like to add Helm Package Manager? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +msg_info "Installing Helm" +$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) +msg_ok "Installed Helm" +fi +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/k0s-v5-install.sh b/install/k0s-v5-install.sh deleted file mode 100644 index c5bb38f5..00000000 --- a/install/k0s-v5-install.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Installing k0s Kubernetes" -$STD bash <(curl -sSLf https://get.k0s.sh) -$STD k0s install controller --single -$STD k0s start -mkdir -p /etc/k0s -k0s config create > /etc/k0s/k0s.yaml -msg_ok "Installed k0s Kubernetes" - -read -r -p "Would you like to add Helm Package Manager? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Installing Helm" -$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) -msg_ok "Installed Helm" -fi -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/kavita-install.sh b/install/kavita-install.sh new file mode 100644 index 00000000..72e353d9 --- /dev/null +++ b/install/kavita-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Kavita" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) && +msg_ok "Installed Kavita" + +msg_info "Creating Service" +service_path="/etc/systemd/system/kavita.service" +echo "[Unit] +Description=Kavita Server +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/Kavita +ExecStart=/opt/Kavita/Kavita +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +chmod +x /opt/Kavita/* && chown root /opt/Kavita/* +systemctl enable --now -q kavita.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/kavita-v5-install.sh b/install/kavita-v5-install.sh deleted file mode 100644 index fb3d3af2..00000000 --- a/install/kavita-v5-install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" - - -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Kavita" -cd /opt -RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) && -msg_ok "Installed Kavita" - -msg_info "Creating Service" -service_path="/etc/systemd/system/kavita.service" -echo "[Unit] -Description=Kavita Server -After=network.target - -[Service] -Type=simple -WorkingDirectory=/opt/Kavita -ExecStart=/opt/Kavita/Kavita -TimeoutStopSec=20 -KillMode=process -Restart=on-failure - -[Install] -WantedBy=multi-user.target" >$service_path -chmod +x /opt/Kavita/* && chown root /opt/Kavita/* -systemctl enable --now -q kavita.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh new file mode 100644 index 00000000..0dcf8c8f --- /dev/null +++ b/install/keycloak-install.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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 curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y openjdk-11-jdk +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) }') +msg_info "Installing Keycloak v$RELEASE" +cd /opt +wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz +$STD tar -xvf keycloak-$RELEASE.tar.gz +mv keycloak-$RELEASE keycloak +msg_ok "Installed Keycloak" + +msg_info "Creating Service" +service_path="/etc/systemd/system/keycloak.service" +echo "[Unit] +Description=Keycloak +After=network-online.target +[Service] +User=root +WorkingDirectory=/opt/keycloak +ExecStart=/opt/keycloak/bin/kc.sh start-dev +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now keycloak.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/keycloak-v5-install.sh b/install/keycloak-v5-install.sh deleted file mode 100644 index 65fc382c..00000000 --- a/install/keycloak-v5-install.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -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 -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) }') -msg_info "Installing Keycloak v$RELEASE" -cd /opt -wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz -$STD tar -xvf keycloak-$RELEASE.tar.gz -mv keycloak-$RELEASE keycloak -msg_ok "Installed Keycloak" - -msg_info "Creating Service" -service_path="/etc/systemd/system/keycloak.service" -echo "[Unit] -Description=Keycloak -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/keycloak -ExecStart=/opt/keycloak/bin/kc.sh start-dev -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now keycloak.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh new file mode 100644 index 00000000..a7ec14d2 --- /dev/null +++ b/install/lidarr-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y sqlite3 +$STD apt-get install -y libchromaprint-tools +$STD apt-get install -y mediainfo +msg_ok "Installed Dependencies" + +msg_info "Installing Lidarr" +mkdir -p /var/lib/lidarr/ +chmod 775 /var/lib/lidarr/ +$STD wget --content-disposition 'https://lidarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Lidarr.master.*.tar.gz +mv Lidarr /opt +chmod 775 /opt/Lidarr +msg_ok "Installed Lidarr" + +msg_info "Creating Service" +cat </etc/systemd/system/lidarr.service +[Unit] +Description=Lidarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Lidarr/Lidarr -nobrowser -data=/var/lib/lidarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q lidarr +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Lidarr.master.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/lidarr-v5-install.sh b/install/lidarr-v5-install.sh deleted file mode 100644 index 35354173..00000000 --- a/install/lidarr-v5-install.sh +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y sqlite3 -$STD apt-get install -y libchromaprint-tools -$STD apt-get install -y mediainfo -msg_ok "Installed Dependencies" - -msg_info "Installing Lidarr" -mkdir -p /var/lib/lidarr/ -chmod 775 /var/lib/lidarr/ -$STD wget --content-disposition 'https://lidarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' -$STD tar -xvzf Lidarr.master.*.tar.gz -mv Lidarr /opt -chmod 775 /opt/Lidarr -msg_ok "Installed Lidarr" - -msg_info "Creating Service" -cat </etc/systemd/system/lidarr.service -[Unit] -Description=Lidarr Daemon -After=syslog.target network.target -[Service] -UMask=0002 -Type=simple -ExecStart=/opt/Lidarr/Lidarr -nobrowser -data=/var/lib/lidarr/ -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -[Install] -WantedBy=multi-user.target -EOF -systemctl -q daemon-reload -systemctl enable --now -q lidarr -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Lidarr.master.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/magicmirror-v5-install.sh b/install/magicmirror-install.sh similarity index 61% rename from install/magicmirror-v5-install.sh rename to install/magicmirror-install.sh index 3cfc369d..249f46a6 100644 --- a/install/magicmirror-v5-install.sh +++ b/install/magicmirror-install.sh @@ -5,86 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os msg_info "Installing Dependencies" $STD apt-get install -y curl @@ -220,23 +147,8 @@ WantedBy=multi-user.target" >$service_path $STD systemctl enable --now magicmirror msg_ok "Created Service" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh new file mode 100644 index 00000000..a3326a35 --- /dev/null +++ b/install/mariadb-install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing MariaDB" +$STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup) +$STD apt-get update +$STD apt-get install -y mariadb-server +msg_ok "Installed MariaDB" + +read -r -p "Would you like to add Adminer? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Adminer" + $STD apt install -y adminer + $STD a2enconf adminer + systemctl reload apache2 + msg_ok "Installed Adminer" +fi + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/mariadb-v5-install.sh b/install/mariadb-v5-install.sh deleted file mode 100644 index 63b2899e..00000000 --- a/install/mariadb-v5-install.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing MariaDB" -$STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup) -$STD apt-get update -$STD apt-get install -y mariadb-server -msg_ok "Installed MariaDB" - -read -r -p "Would you like to add Adminer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Adminer" - $STD apt install -y adminer - $STD a2enconf adminer - systemctl reload apache2 - msg_ok "Installed Adminer" -fi - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh new file mode 100644 index 00000000..3defc5eb --- /dev/null +++ b/install/meshcentral-install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing MeshCentral" +mkdir /opt/meshcentral +cd /opt/meshcentral +$STD npm install meshcentral +$STD node node_modules/meshcentral --install +msg_ok "Installed MeshCentral" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/meshcentral-v5-install.sh b/install/meshcentral-v5-install.sh deleted file mode 100644 index f0b22abb..00000000 --- a/install/meshcentral-v5-install.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing MeshCentral" -mkdir /opt/meshcentral -cd /opt/meshcentral -$STD npm install meshcentral -$STD node node_modules/meshcentral --install -msg_ok "Installed MeshCentral" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh new file mode 100644 index 00000000..69489209 --- /dev/null +++ b/install/motioneye-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y cifs-utils +msg_ok "Installed Dependencies" + +msg_info "Installing Motion" +$STD apt-get install -y motion +systemctl stop motion +$STD systemctl disable motion +msg_ok "Installed Motion" + +msg_info "Installing FFmpeg" +$STD apt-get install -y ffmpeg v4l-utils +msg_ok "Installed FFmpeg" + +msg_info "Installing Python" +$STD apt-get update +$STD apt-get install -y python2 +curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py +$STD python2 get-pip.py +$STD apt-get install -y libffi-dev libzbar-dev libzbar0 +$STD apt-get install -y python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev +msg_ok "Installed Python" + +msg_info "Installing MotionEye" +$STD apt-get update +$STD pip install motioneye +mkdir -p /etc/motioneye +cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf +mkdir -p /var/lib/motioneye +msg_ok "Installed MotionEye" + +msg_info "Creating Service" +cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service +$STD systemctl enable motioneye +systemctl start motioneye +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/motioneye-v5-install.sh b/install/motioneye-v5-install.sh deleted file mode 100644 index 14ea8991..00000000 --- a/install/motioneye-v5-install.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y cifs-utils -msg_ok "Installed Dependencies" - -msg_info "Installing Motion" -$STD apt-get install -y motion -systemctl stop motion -$STD systemctl disable motion -msg_ok "Installed Motion" - -msg_info "Installing FFmpeg" -$STD apt-get install -y ffmpeg v4l-utils -msg_ok "Installed FFmpeg" - -msg_info "Installing Python" -$STD apt-get update -$STD apt-get install -y python2 -curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py -$STD python2 get-pip.py -$STD apt-get install -y libffi-dev libzbar-dev libzbar0 -$STD apt-get install -y python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -msg_ok "Installed Python" - -msg_info "Installing MotionEye" -$STD apt-get update -$STD pip install motioneye -mkdir -p /etc/motioneye -cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf -mkdir -p /var/lib/motioneye -msg_ok "Installed MotionEye" - -msg_info "Creating Service" -cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service -$STD systemctl enable motioneye -systemctl start motioneye -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh new file mode 100644 index 00000000..135abf56 --- /dev/null +++ b/install/mqtt-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing Mosquitto MQTT Broker" +$STD wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key +$STD apt-key add mosquitto-repo.gpg.key +cd /etc/apt/sources.list.d/ +$STD wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list +$STD apt-get update +$STD apt-get -y install mosquitto +$STD apt-get -y install mosquitto-clients +msg_ok "Installed Mosquitto MQTT Broker" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/mqtt-v5-install.sh b/install/mqtt-v5-install.sh deleted file mode 100644 index 3f13f8a4..00000000 --- a/install/mqtt-v5-install.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Installing Mosquitto MQTT Broker" -$STD wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key -$STD apt-key add mosquitto-repo.gpg.key -cd /etc/apt/sources.list.d/ -$STD wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list -$STD apt-get update -$STD apt-get -y install mosquitto -$STD apt-get -y install mosquitto-clients -msg_ok "Installed Mosquitto MQTT Broker" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/n8n-install.sh b/install/n8n-install.sh new file mode 100644 index 00000000..7e735a09 --- /dev/null +++ b/install/n8n-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing n8n (Patience)" +$STD npm install --global n8n +msg_ok "Installed n8n" + +msg_info "Creating Service" +cat </etc/systemd/system/n8n.service +[Unit] +Description=n8n + +[Service] +Type=simple +ExecStart=n8n start +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now n8n +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/n8n-v5-install.sh b/install/n8n-v5-install.sh deleted file mode 100644 index 76a45c05..00000000 --- a/install/n8n-v5-install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing n8n (Patience)" -$STD npm install --global n8n -msg_ok "Installed n8n" - -msg_info "Creating Service" -cat </etc/systemd/system/n8n.service -[Unit] -Description=n8n - -[Service] -Type=simple -ExecStart=n8n start -[Install] -WantedBy=multi-user.target -EOF -$STD systemctl enable --now n8n -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh new file mode 100644 index 00000000..67f255a2 --- /dev/null +++ b/install/navidrome-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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 curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y ffmpeg +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Installing Navidrome" +install -d -o root -g root /opt/navidrome +install -d -o root -g root /var/lib/navidrome +$STD wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz +$STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ +chown -R root:root /opt/navidrome +mkdir -p /music +cat </var/lib/navidrome/navidrome.toml +MusicFolder = '/music' +EOF +msg_ok "Installed Navidrome" + +msg_info "Creating Service" +service_path="/etc/systemd/system/navidrome.service" + +echo "[Unit] +Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic +After=remote-fs.target network.target +AssertPathExists=/var/lib/navidrome + +[Service] +User=root +Group=root +Type=simple +ExecStart=/opt/navidrome/navidrome --configfile '/var/lib/navidrome/navidrome.toml' +WorkingDirectory=/var/lib/navidrome +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +DevicePolicy=closed +NoNewPrivileges=yes +PrivateTmp=yes +PrivateUsers=yes +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap +ReadWritePaths=/var/lib/navidrome +ProtectSystem=full + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl daemon-reload +$STD systemctl enable --now navidrome.service + +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/Navidrome.tar.gz +msg_ok "Cleaned" diff --git a/install/navidrome-v5-install.sh b/install/navidrome-v5-install.sh deleted file mode 100644 index 67a38067..00000000 --- a/install/navidrome-v5-install.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -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 ffmpeg -msg_ok "Installed Dependencies" - -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Installing Navidrome" -install -d -o root -g root /opt/navidrome -install -d -o root -g root /var/lib/navidrome -$STD wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz -$STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ -chown -R root:root /opt/navidrome -mkdir -p /music -cat </var/lib/navidrome/navidrome.toml -MusicFolder = '/music' -EOF -msg_ok "Installed Navidrome" - -msg_info "Creating Service" -service_path="/etc/systemd/system/navidrome.service" - -echo "[Unit] -Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic -After=remote-fs.target network.target -AssertPathExists=/var/lib/navidrome - -[Service] -User=root -Group=root -Type=simple -ExecStart=/opt/navidrome/navidrome --configfile '/var/lib/navidrome/navidrome.toml' -WorkingDirectory=/var/lib/navidrome -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -DevicePolicy=closed -NoNewPrivileges=yes -PrivateTmp=yes -PrivateUsers=yes -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 -RestrictNamespaces=yes -RestrictRealtime=yes -SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap -ReadWritePaths=/var/lib/navidrome -ProtectSystem=full - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl daemon-reload -$STD systemctl enable --now navidrome.service - -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -rm -rf /root/Navidrome.tar.gz -msg_ok "Cleaned" diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh new file mode 100644 index 00000000..0e73cb55 --- /dev/null +++ b/install/nextcloudpi-install.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing NextCloudPi (Patience)" +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) +sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php +sed -i '{s|root:/usr/sbin/nologin|root:/bin/bash|g}' /etc/passwd +service apache2 restart +msg_ok "Installed NextCloudPi" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/nextcloudpi-v5-install.sh b/install/nextcloudpi-v5-install.sh deleted file mode 100644 index 6ccada06..00000000 --- a/install/nextcloudpi-v5-install.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing NextCloudPi (Patience)" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) -sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php -sed -i '{s|root:/usr/sbin/nologin|root:/bin/bash|g}' /etc/passwd -service apache2 restart -msg_ok "Installed NextCloudPi" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/nginxproxymanager-v5-install.sh b/install/nginxproxymanager-install.sh similarity index 62% rename from install/nginxproxymanager-v5-install.sh rename to install/nginxproxymanager-install.sh index d66e0adf..b2baa37f 100644 --- a/install/nginxproxymanager-v5-install.sh +++ b/install/nginxproxymanager-install.sh @@ -5,86 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os msg_info "Installing Dependencies" $STD apt-get update @@ -250,23 +177,8 @@ WantedBy=multi-user.target EOF msg_ok "Created Service" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Starting Services" $STD systemctl enable --now openresty diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh new file mode 100644 index 00000000..63bf1ca6 --- /dev/null +++ b/install/nocodb-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD sudo apt-get install -y nodejs git make g++ gcc +msg_ok "Installed Node.js" + +msg_info "Installing NocoDB" +$STD git clone https://github.com/nocodb/nocodb-seed +mv nocodb-seed /opt/nocodb +cd /opt/nocodb +$STD npm install +msg_ok "Installed NocoDB" + +msg_info "Creating Service" +service_path="/etc/systemd/system/nocodb.service" +echo "[Unit] +Description=nocodb + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/nocodb +ExecStart=/usr/bin/npm start + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now nocodb.service &>/dev/null +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/nocodb-v5-install.sh b/install/nocodb-v5-install.sh deleted file mode 100644 index fb618460..00000000 --- a/install/nocodb-v5-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD sudo apt-get install -y nodejs git make g++ gcc -msg_ok "Installed Node.js" - -msg_info "Installing NocoDB" -$STD git clone https://github.com/nocodb/nocodb-seed -mv nocodb-seed /opt/nocodb -cd /opt/nocodb -$STD npm install -msg_ok "Installed NocoDB" - -msg_info "Creating Service" -service_path="/etc/systemd/system/nocodb.service" -echo "[Unit] -Description=nocodb - -[Service] -Type=simple -Restart=always -User=root -WorkingDirectory=/opt/nocodb -ExecStart=/usr/bin/npm start - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now nocodb.service &>/dev/null -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/node-red-install.sh b/install/node-red-install.sh new file mode 100644 index 00000000..fd2760f4 --- /dev/null +++ b/install/node-red-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Node-Red" +$STD npm install -g --unsafe-perm node-red +msg_ok "Installed Node-Red" + +msg_info "Creating Service" +service_path="/etc/systemd/system/nodered.service" +echo "[Unit] +Description=Node-RED +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/node-red --max-old-space-size=128 -v +Restart=on-failure +KillSignal=SIGINT + +SyslogIdentifier=node-red +StandardOutput=syslog + +WorkingDirectory=/root/ +User=root +Group=root + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now nodered.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/node-red-v5-install.sh b/install/node-red-v5-install.sh deleted file mode 100644 index e20934ef..00000000 --- a/install/node-red-v5-install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Node-Red" -$STD npm install -g --unsafe-perm node-red -msg_ok "Installed Node-Red" - -msg_info "Creating Service" -service_path="/etc/systemd/system/nodered.service" -echo "[Unit] -Description=Node-RED -After=syslog.target network.target - -[Service] -ExecStart=/usr/bin/node-red --max-old-space-size=128 -v -Restart=on-failure -KillSignal=SIGINT - -SyslogIdentifier=node-red -StandardOutput=syslog - -WorkingDirectory=/root/ -User=root -Group=root - -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now nodered.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/omada-install.sh b/install/omada-install.sh new file mode 100644 index 00000000..0bc5fe85 --- /dev/null +++ b/install/omada-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +$STD apt-get install -y openjdk-8-jre-headless +$STD apt-get install -y jsvc +wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb +$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb +msg_ok "Installed Dependencies" + +msg_info "Installing Omada Controller v5.9.31" +wget -qL https://static.tp-link.com/upload/software/2023/202303/20230321/Omada_SDN_Controller_v5.9.31_Linux_x64.deb +$STD dpkg -i Omada_SDN_Controller_v5.9.31_Linux_x64.deb +msg_ok "Installed Omada Controller" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Omada_SDN_Controller_v5.9.9_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/omada-v5-install.sh b/install/omada-v5-install.sh deleted file mode 100644 index 6e79e690..00000000 --- a/install/omada-v5-install.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -$STD apt-get install -y openjdk-8-jre-headless -$STD apt-get install -y jsvc -wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb -$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb -msg_ok "Installed Dependencies" - -msg_info "Installing Omada Controller v5.9.9" -wget -qL https://static.tp-link.com/upload/software/2023/202302/20230227/Omada_SDN_Controller_v5.9.9_Linux_x64.deb -$STD dpkg -i Omada_SDN_Controller_v5.9.9_Linux_x64.deb -msg_ok "Installed Omada Controller" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_v5.9.9_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/omv-install.sh b/install/omv-install.sh new file mode 100644 index 00000000..fbc2f03b --- /dev/null +++ b/install/omv-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing OpenMediaVault (Patience)" +wget -q -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key +$STD apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null + +cat <>/etc/apt/sources.list.d/openmediavault.list +deb https://packages.openmediavault.org/public shaitan main +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main +## Uncomment the following line to add software from the proposed repository. +# deb https://packages.openmediavault.org/public shaitan-proposed main +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main +## This software is not part of OpenMediaVault, but is offered by third-party +## developers as a service to OpenMediaVault users. +# deb https://packages.openmediavault.org/public shaitan partner +# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner +EOF +$STD apt-get update +$STD apt-get -y install openmediavault-keyring +$STD apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends install openmediavault +omv-confdbadm populate +msg_ok "Installed OpenMediaVault" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/omv-v5-install.sh b/install/omv-v5-install.sh deleted file mode 100644 index 6f0e8a1e..00000000 --- a/install/omv-v5-install.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -export DEBIAN_FRONTEND=noninteractive -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Installing OpenMediaVault (Patience)" -wget -q -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key -$STD apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null - -cat <>/etc/apt/sources.list.d/openmediavault.list -deb https://packages.openmediavault.org/public shaitan main -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main -## Uncomment the following line to add software from the proposed repository. -# deb https://packages.openmediavault.org/public shaitan-proposed main -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main -## This software is not part of OpenMediaVault, but is offered by third-party -## developers as a service to OpenMediaVault users. -# deb https://packages.openmediavault.org/public shaitan partner -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner -EOF -$STD apt-get update -$STD apt-get -y install openmediavault-keyring -$STD apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends install openmediavault -omv-confdbadm populate -msg_ok "Installed OpenMediaVault" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/openhab-install.sh b/install/openhab-install.sh new file mode 100644 index 00000000..43d5454b --- /dev/null +++ b/install/openhab-install.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +$STD apt-get install -y apt-transport-https +msg_ok "Installed Dependencies" + +msg_info "Installing Azul Zulu" +$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 +wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb +$STD apt-get install ./zulu-repo_1.0.0-3_all.deb +$STD apt-get update +$STD apt-get -y install zulu11-jdk +msg_ok "Installed Azul Zulu" + +msg_info "Installing openHAB" +curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg +mv openhab.gpg /usr/share/keyrings +chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg +sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list' +$STD apt update +$STD apt-get -y install openhab +systemctl daemon-reload +$STD systemctl enable --now openhab.service +msg_ok "Installed openHAB" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/openhab-v5-install.sh b/install/openhab-v5-install.sh deleted file mode 100644 index 1899ae34..00000000 --- a/install/openhab-v5-install.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -$STD apt-get install -y apt-transport-https -msg_ok "Installed Dependencies" - -msg_info "Installing Azul Zulu" -$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 -wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb -$STD apt-get install ./zulu-repo_1.0.0-3_all.deb -$STD apt-get update -$STD apt-get -y install zulu11-jdk -msg_ok "Installed Azul Zulu" - -msg_info "Installing openHAB" -curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg -mv openhab.gpg /usr/share/keyrings -chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg -sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list' -$STD apt update -$STD apt-get -y install openhab -systemctl daemon-reload -$STD systemctl enable --now openhab.service -msg_ok "Installed openHAB" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/paperless-ngx-v5-install.sh b/install/paperless-ngx-install.sh similarity index 64% rename from install/paperless-ngx-v5-install.sh rename to install/paperless-ngx-install.sh index 5efaa813..8d31b183 100644 --- a/install/paperless-ngx-v5-install.sh +++ b/install/paperless-ngx-install.sh @@ -5,86 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os msg_info "Installing Python3" $STD apt-get install -y --no-install-recommends \ @@ -263,26 +190,10 @@ sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /et systemctl daemon-reload $STD systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service - msg_ok "Created Services" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/photoprism-v5-install.sh b/install/photoprism-install.sh similarity index 53% rename from install/photoprism-v5-install.sh rename to install/photoprism-install.sh index ac39c48d..92c00afb 100644 --- a/install/photoprism-v5-install.sh +++ b/install/photoprism-install.sh @@ -5,86 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +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 curl @@ -191,23 +118,8 @@ ExecStop=/opt/photoprism/bin/photoprism down WantedBy=multi-user.target" >$service_path msg_ok "Created Service" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/pihole-install.sh b/install/pihole-install.sh new file mode 100644 index 00000000..8cf049f7 --- /dev/null +++ b/install/pihole-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y ufw +$STD apt-get install -y ntp +msg_ok "Installed Dependencies" + +msg_info "Installing Pi-hole" +systemctl stop systemd-resolved +echo "DNSStubListener=no" >>/etc/systemd/resolved.conf +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf +mkdir -p /etc/pihole/ +cat </etc/pihole/setupVars.conf +PIHOLE_INTERFACE=eth0 +PIHOLE_DNS_1=8.8.8.8 +PIHOLE_DNS_2=8.8.4.4 +QUERY_LOGGING=true +INSTALL_WEB_SERVER=true +INSTALL_WEB_INTERFACE=true +LIGHTTPD_ENABLED=true +CACHE_SIZE=10000 +DNS_FQDN_REQUIRED=true +DNS_BOGUS_PRIV=true +DNSMASQ_LISTENING=local +WEBPASSWORD=$(openssl rand -base64 48) +BLOCKING_ENABLED=true +EOF + +$STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended +msg_ok "Installed Pi-hole" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/pihole-v5-install.sh b/install/pihole-v5-install.sh deleted file mode 100644 index 63df2f5b..00000000 --- a/install/pihole-v5-install.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -export DEBIAN_FRONTEND=noninteractive -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y ufw -$STD apt-get install -y ntp -msg_ok "Installed Dependencies" - -msg_info "Installing Pi-hole" -systemctl stop systemd-resolved -echo "DNSStubListener=no" >>/etc/systemd/resolved.conf -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -mkdir -p /etc/pihole/ -cat </etc/pihole/setupVars.conf -PIHOLE_INTERFACE=eth0 -PIHOLE_DNS_1=8.8.8.8 -PIHOLE_DNS_2=8.8.4.4 -QUERY_LOGGING=true -INSTALL_WEB_SERVER=true -INSTALL_WEB_INTERFACE=true -LIGHTTPD_ENABLED=true -CACHE_SIZE=10000 -DNS_FQDN_REQUIRED=true -DNS_BOGUS_PRIV=true -DNSMASQ_LISTENING=local -WEBPASSWORD=$(openssl rand -base64 48) -BLOCKING_ENABLED=true -EOF - -$STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended -msg_ok "Installed Pi-hole" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/plex-install.sh b/install/plex-install.sh new file mode 100644 index 00000000..01744201 --- /dev/null +++ b/install/plex-install.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd + else + $STD apt-get install -y intel-opencl-icd + fi + /bin/chgrp video /dev/dri + /bin/chmod 755 /dev/dri + /bin/chmod 660 /dev/dri/* + msg_ok "Set Up Hardware Acceleration" +fi + +msg_info "Setting Up Plex Media Server Repository" +$STD apt-key add <(curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key) +sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list' +msg_ok "Set Up Plex Media Server Repository" + +msg_info "Installing Plex Media Server" +$STD apt-get update +$STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver +msg_ok "Installed Plex Media Server" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/plex-v5-install.sh b/install/plex-v5-install.sh deleted file mode 100644 index f866c55e..00000000 --- a/install/plex-v5-install.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd - else - $STD apt-get install -y intel-opencl-icd - fi - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* - msg_ok "Set Up Hardware Acceleration" -fi - -msg_info "Setting Up Plex Media Server Repository" -$STD apt-key add <(curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key) -sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list' -msg_ok "Set Up Plex Media Server Repository" - -msg_info "Installing Plex Media Server" -$STD apt-get update -$STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver -msg_ok "Installed Plex Media Server" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh new file mode 100644 index 00000000..70351f5e --- /dev/null +++ b/install/podman-homeassistant-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Podman" +$STD apt-get -y install podman +$STD systemctl enable --now podman.socket +msg_ok "Installed Podman" + +msg_info "Pulling Home Assistant Image" +$STD podman pull docker.io/homeassistant/home-assistant:stable +msg_ok "Pulled Home Assistant Image" + +msg_info "Installing Home Assistant" +$STD podman volume create hass_config +$STD podman run -d \ + --name homeassistant \ + --restart unless-stopped \ + -v /dev:/dev \ + -v hass_config:/config \ + -v /etc/localtime:/etc/localtime:ro \ + -v /etc/timezone:/etc/timezone:ro \ + --net=host \ + homeassistant/home-assistant:stable +podman generate systemd \ + --new --name homeassistant \ + >/etc/systemd/system/homeassistant.service +$STD systemctl enable --now homeassistant +msg_ok "Installed Home Assistant" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/podman-homeassistant-v5-install.sh b/install/podman-homeassistant-v5-install.sh deleted file mode 100644 index 4b594c70..00000000 --- a/install/podman-homeassistant-v5-install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Podman" -$STD apt-get -y install podman -$STD systemctl enable --now podman.socket -msg_ok "Installed Podman" - -msg_info "Pulling Home Assistant Image" -$STD podman pull docker.io/homeassistant/home-assistant:stable -msg_ok "Pulled Home Assistant Image" - -msg_info "Installing Home Assistant" -$STD podman volume create hass_config -$STD podman run -d \ - --name homeassistant \ - --restart unless-stopped \ - -v /dev:/dev \ - -v hass_config:/config \ - -v /etc/localtime:/etc/localtime:ro \ - -v /etc/timezone:/etc/timezone:ro \ - --net=host \ - homeassistant/home-assistant:stable -podman generate systemd \ - --new --name homeassistant \ - >/etc/systemd/system/homeassistant.service -$STD systemctl enable --now homeassistant -msg_ok "Installed Home Assistant" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/podman-install.sh b/install/podman-install.sh new file mode 100644 index 00000000..8c248463 --- /dev/null +++ b/install/podman-install.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Podman" +$STD apt-get -y install podman +$STD systemctl enable --now podman.socket +echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf +msg_ok "Installed Podman" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/podman-v5-install.sh b/install/podman-v5-install.sh deleted file mode 100644 index 3e2aa3e8..00000000 --- a/install/podman-v5-install.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Podman" -$STD apt-get -y install podman -$STD systemctl enable --now podman.socket -echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf -msg_ok "Installed Podman" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/postgresql-v5-install.sh b/install/postgresql-install.sh similarity index 60% rename from install/postgresql-v5-install.sh rename to install/postgresql-install.sh index 7a003eb5..53fb2a25 100644 --- a/install/postgresql-v5-install.sh +++ b/install/postgresql-install.sh @@ -5,89 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -LANG=$(grep -v '^#' /etc/locale.gen | grep -o '^[^ ]*') -update-locale LANG=$LANG -echo "export LANG=$LANG" >> ~/.bashrc -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os msg_info "Installing Dependencies" $STD apt-get install -y curl @@ -217,23 +141,8 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_ok "Installed Adminer" fi -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh new file mode 100644 index 00000000..4d3d77a2 --- /dev/null +++ b/install/prometheus-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Prometheus" +RELEASE=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +mkdir -p /etc/prometheus +mkdir -p /var/lib/prometheus +$STD wget https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-amd64.tar.gz +$STD tar -xvf prometheus-${RELEASE}.linux-amd64.tar.gz +cd prometheus-${RELEASE}.linux-amd64 +mv prometheus promtool /usr/local/bin/ +mv consoles/ console_libraries/ /etc/prometheus/ +mv prometheus.yml /etc/prometheus/prometheus.yml +msg_ok "Installed Prometheus" + +msg_info "Creating Service" +service_path="/etc/systemd/system/prometheus.service" +echo "[Unit] +Description=Prometheus +Wants=network-online.target +After=network-online.target + +[Service] +User=root +Restart=always +Type=simple +ExecStart=/usr/local/bin/prometheus \ + --config.file=/etc/prometheus/prometheus.yml \ + --storage.tsdb.path=/var/lib/prometheus/ \ + --web.console.templates=/etc/prometheus/consoles \ + --web.console.libraries=/etc/prometheus/console_libraries \ + --web.listen-address=0.0.0.0:9090 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD sudo systemctl enable --now prometheus +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/prometheus-${RELEASE}.linux-amd64 /root/prometheus-${RELEASE}.linux-amd64.tar.gz +msg_ok "Cleaned" diff --git a/install/prometheus-v5-install.sh b/install/prometheus-v5-install.sh deleted file mode 100644 index 7d561256..00000000 --- a/install/prometheus-v5-install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Prometheus" -RELEASE=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -mkdir -p /etc/prometheus -mkdir -p /var/lib/prometheus -$STD wget https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-amd64.tar.gz -$STD tar -xvf prometheus-${RELEASE}.linux-amd64.tar.gz -cd prometheus-${RELEASE}.linux-amd64 -mv prometheus promtool /usr/local/bin/ -mv consoles/ console_libraries/ /etc/prometheus/ -mv prometheus.yml /etc/prometheus/prometheus.yml -msg_ok "Installed Prometheus" - -msg_info "Creating Service" -service_path="/etc/systemd/system/prometheus.service" -echo "[Unit] -Description=Prometheus -Wants=network-online.target -After=network-online.target - -[Service] -User=root -Restart=always -Type=simple -ExecStart=/usr/local/bin/prometheus \ - --config.file=/etc/prometheus/prometheus.yml \ - --storage.tsdb.path=/var/lib/prometheus/ \ - --web.console.templates=/etc/prometheus/consoles \ - --web.console.libraries=/etc/prometheus/console_libraries \ - --web.listen-address=0.0.0.0:9090 - -[Install] -WantedBy=multi-user.target" >$service_path -$STD sudo systemctl enable --now prometheus -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -rm -rf /root/prometheus-${RELEASE}.linux-amd64 /root/prometheus-${RELEASE}.linux-amd64.tar.gz -msg_ok "Cleaned" diff --git a/install/prowlarr-install.sh b/install/prowlarr-install.sh new file mode 100644 index 00000000..638d93c1 --- /dev/null +++ b/install/prowlarr-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Prowlarr" +mkdir -p /var/lib/prowlarr/ +chmod 775 /var/lib/prowlarr/ +$STD wget --content-disposition 'https://prowlarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Prowlarr.master.*.tar.gz +mv Prowlarr /opt +chmod 775 /opt/Prowlarr +msg_ok "Installed Prowlarr" + +msg_info "Creating Service" +cat </etc/systemd/system/prowlarr.service +[Unit] +Description=Prowlarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Prowlarr/Prowlarr -nobrowser -data=/var/lib/prowlarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q prowlarr +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Prowlarr.master.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/prowlarr-v5-install.sh b/install/prowlarr-v5-install.sh deleted file mode 100644 index 565541ac..00000000 --- a/install/prowlarr-v5-install.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y sqlite3 -msg_ok "Installed Dependencies" - -msg_info "Installing Prowlarr" -mkdir -p /var/lib/prowlarr/ -chmod 775 /var/lib/prowlarr/ -$STD wget --content-disposition 'https://prowlarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' -$STD tar -xvzf Prowlarr.master.*.tar.gz -mv Prowlarr /opt -chmod 775 /opt/Prowlarr -msg_ok "Installed Prowlarr" - -msg_info "Creating Service" -cat </etc/systemd/system/prowlarr.service -[Unit] -Description=Prowlarr Daemon -After=syslog.target network.target -[Service] -UMask=0002 -Type=simple -ExecStart=/opt/Prowlarr/Prowlarr -nobrowser -data=/var/lib/prowlarr/ -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -[Install] -WantedBy=multi-user.target -EOF -systemctl -q daemon-reload -systemctl enable --now -q prowlarr -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Prowlarr.master.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh new file mode 100644 index 00000000..6995f6bb --- /dev/null +++ b/install/qbittorrent-install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing qbittorrent-nox" +$STD apt-get install -y qbittorrent-nox +msg_ok "qbittorrent-nox" + +msg_info "Creating Service" +cat </etc/systemd/system/qbittorrent-nox.service +[Unit] +Description=qBittorrent client +After=network.target +[Service] +ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090 +Restart=always +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now qbittorrent-nox +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/qbittorrent-v5-install.sh b/install/qbittorrent-v5-install.sh deleted file mode 100644 index 8ced8627..00000000 --- a/install/qbittorrent-v5-install.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing qbittorrent-nox" -$STD apt-get install -y qbittorrent-nox -msg_ok "qbittorrent-nox" - -msg_info "Creating Service" -cat </etc/systemd/system/qbittorrent-nox.service -[Unit] -Description=qBittorrent client -After=network.target -[Service] -ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090 -Restart=always -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now qbittorrent-nox -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/radarr-install.sh b/install/radarr-install.sh new file mode 100644 index 00000000..4c736895 --- /dev/null +++ b/install/radarr-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Radarr" +mkdir -p /var/lib/radarr/ +chmod 775 /var/lib/radarr/ +$STD wget --content-disposition 'https://radarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Radarr.master.*.tar.gz +mv Radarr /opt +chmod 775 /opt/Radarr +msg_ok "Installed Radarr" + +msg_info "Creating Service" +cat </etc/systemd/system/radarr.service +[Unit] +Description=Radarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Radarr/Radarr -nobrowser -data=/var/lib/radarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q radarr +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Radarr.master.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/radarr-v5-install.sh b/install/radarr-v5-install.sh deleted file mode 100644 index 655bf395..00000000 --- a/install/radarr-v5-install.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y sqlite3 -msg_ok "Installed Dependencies" - -msg_info "Installing Radarr" -mkdir -p /var/lib/radarr/ -chmod 775 /var/lib/radarr/ -$STD wget --content-disposition 'https://radarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64' -$STD tar -xvzf Radarr.master.*.tar.gz -mv Radarr /opt -chmod 775 /opt/Radarr -msg_ok "Installed Radarr" - -msg_info "Creating Service" -cat </etc/systemd/system/radarr.service -[Unit] -Description=Radarr Daemon -After=syslog.target network.target -[Service] -UMask=0002 -Type=simple -ExecStart=/opt/Radarr/Radarr -nobrowser -data=/var/lib/radarr/ -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -[Install] -WantedBy=multi-user.target -EOF -systemctl -q daemon-reload -systemctl enable --now -q radarr -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Radarr.master.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/readarr-install.sh b/install/readarr-install.sh new file mode 100644 index 00000000..9452caa3 --- /dev/null +++ b/install/readarr-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Readarr" +mkdir -p /var/lib/readarr/ +chmod 775 /var/lib/readarr/ +$STD wget --content-disposition 'https://readarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Readarr.develop.*.tar.gz +mv Readarr /opt +chmod 775 /opt/Readarr +msg_ok "Installed Readarr" + +msg_info "Creating Service" +cat </etc/systemd/system/readarr.service +[Unit] +Description=Readarr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Readarr/Readarr -nobrowser -data=/var/lib/readarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q readarr +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Readarr.develop.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/readarr-v5-install.sh b/install/readarr-v5-install.sh deleted file mode 100644 index f2388649..00000000 --- a/install/readarr-v5-install.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y sqlite3 -msg_ok "Installed Dependencies" - -msg_info "Installing Readarr" -mkdir -p /var/lib/readarr/ -chmod 775 /var/lib/readarr/ -$STD wget --content-disposition 'https://readarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=x64' -$STD tar -xvzf Readarr.develop.*.tar.gz -mv Readarr /opt -chmod 775 /opt/Readarr -msg_ok "Installed Readarr" - -msg_info "Creating Service" -cat </etc/systemd/system/readarr.service -[Unit] -Description=Readarr Daemon -After=syslog.target network.target -[Service] -UMask=0002 -Type=simple -ExecStart=/opt/Readarr/Readarr -nobrowser -data=/var/lib/readarr/ -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -[Install] -WantedBy=multi-user.target -EOF -systemctl -q daemon-reload -systemctl enable --now -q readarr -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Readarr.develop.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/rstptoweb-install.sh b/install/rstptoweb-install.sh new file mode 100644 index 00000000..76c3792d --- /dev/null +++ b/install/rstptoweb-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y git +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Golang" +$STD wget https://golang.org/dl/go1.20.1.linux-amd64.tar.gz +$STD tar -xzf go1.20.1.linux-amd64.tar.gz -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +rm -rf go1.20.1.linux-amd64.tar.gz +msg_ok "Installed Golang" + +msg_info "Installing RSTPtoWEB" +$STD git clone https://github.com/deepch/RTSPtoWeb /opt/rtsptoweb +cat <>/opt/rtsptoweb/start +#!/bin/bash +cd /opt/rtsptoweb && GO111MODULE=on go run *.go +EOF +chmod +x /opt/rtsptoweb/start +msg_ok "Installed RSTPtoWEB" + +msg_info "Creating Service" +service_path="/etc/systemd/system/rtsptoweb.service" +echo "[Unit] +Description=RTSP to Web Streaming Service +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/opt/rtsptoweb/start + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable -q --now rtsptoweb +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/rstptoweb-v5-install.sh b/install/rstptoweb-v5-install.sh deleted file mode 100644 index f1c28169..00000000 --- a/install/rstptoweb-v5-install.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y git -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Golang" -$STD wget https://golang.org/dl/go1.20.1.linux-amd64.tar.gz -$STD tar -xzf go1.20.1.linux-amd64.tar.gz -C /usr/local -$STD ln -s /usr/local/go/bin/go /usr/local/bin/go -rm -rf go1.20.1.linux-amd64.tar.gz -msg_ok "Installed Golang" - -msg_info "Installing RSTPtoWEB" -$STD git clone https://github.com/deepch/RTSPtoWeb /opt/rtsptoweb -cat <>/opt/rtsptoweb/start -#!/bin/bash -cd /opt/rtsptoweb && GO111MODULE=on go run *.go -EOF -chmod +x /opt/rtsptoweb/start -msg_ok "Installed RSTPtoWEB" - -msg_info "Creating Service" -service_path="/etc/systemd/system/rtsptoweb.service" -echo "[Unit] -Description=RTSP to Web Streaming Service -After=network.target - -[Service] -Type=simple -User=root -ExecStart=/opt/rtsptoweb/start - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable -q --now rtsptoweb -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh new file mode 100644 index 00000000..b779e31d --- /dev/null +++ b/install/sabnzbd-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +$STD apt-get install -y par2 +$STD apt-get install -y p7zip-full +wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.0.3-1+deb11u1_amd64.deb +$STD dpkg -i unrar_6.0.3-1+deb11u1_amd64.deb +rm unrar_6.0.3-1+deb11u1_amd64.deb +msg_ok "Installed Dependencies" + +msg_info "Installing Python3-pip" +$STD apt-get install -y python3-setuptools +$STD apt-get install -y python3-pip +msg_ok "Installed Python3-pip" + +msg_info "Installing SABnzbd" +RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +$STD tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) +mv SABnzbd-${RELEASE} /opt/sabnzbd +cd /opt/sabnzbd +$STD python3 -m pip install -r requirements.txt +msg_ok "Installed SABnzbd" + +msg_info "Creating Service" +service_path="/etc/systemd/system/sabnzbd.service" +echo "[Unit] +Description=SABnzbd +After=network.target +[Service] +WorkingDirectory=/opt/sabnzbd +ExecStart=python3 SABnzbd.py -s 0.0.0.0:7777 +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q sabnzbd.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/sabnzbd-v5-install.sh b/install/sabnzbd-v5-install.sh deleted file mode 100644 index 9d9cb825..00000000 --- a/install/sabnzbd-v5-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y unzip -$STD apt-get install -y par2 -$STD apt-get install -y p7zip-full -wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.0.3-1+deb11u1_amd64.deb -$STD dpkg -i unrar_6.0.3-1+deb11u1_amd64.deb -rm unrar_6.0.3-1+deb11u1_amd64.deb -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-setuptools -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" - -msg_info "Installing SABnzbd" -RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -$STD tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) -mv SABnzbd-${RELEASE} /opt/sabnzbd -cd /opt/sabnzbd -$STD python3 -m pip install -r requirements.txt -msg_ok "Installed SABnzbd" - -msg_info "Creating Service" -service_path="/etc/systemd/system/sabnzbd.service" -echo "[Unit] -Description=SABnzbd -After=network.target -[Service] -WorkingDirectory=/opt/sabnzbd -ExecStart=python3 SABnzbd.py -s 0.0.0.0:7777 -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q sabnzbd.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh new file mode 100644 index 00000000..5294e95b --- /dev/null +++ b/install/scrypted-install.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get -y install software-properties-common apt-utils +$STD apt-get -y update +$STD apt-get -y upgrade +$STD apt-get -y install \ + build-essential \ + gcc \ + gir1.2-gtk-3.0 \ + libcairo2-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libjpeg-dev \ + libgif-dev \ + libopenjp2-7 \ + libpango1.0-dev \ + librsvg2-dev \ + pkg-config \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing GStreamer" +$STD apt-get -y install \ + gstreamer1.0-tools \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer-plugins-bad1.0-dev \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-libav \ + gstreamer1.0-alsa +msg_ok "Installed GStreamer" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Python3" +$STD apt-get -y install \ + python3 \ + python3-dev \ + python3-gi \ + python3-gst-1.0 \ + python3-matplotlib \ + python3-numpy \ + python3-opencv \ + python3-pil \ + python3-pip \ + python3-setuptools \ + python3-skimage \ + python3-wheel +$STD python3 -m pip install --upgrade pip +$STD python3 -m pip install aiofiles debugpy typing_extensions typing +msg_ok "Installed Python3" + +read -r -p "Would you like to add Coral Edge TPU support? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +msg_info "Adding Coral Edge TPU Support" +$STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) +sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list' +$STD apt-get -y update +$STD apt-get -y install libedgetpu1-std +msg_ok "Coral Edge TPU Support Added" +fi + +msg_info "Installing Scrypted" +$STD sudo -u root npx -y scrypted@latest install-server +msg_info "Installed Scrypted" + +msg_info "Creating Service" +service_path="/etc/systemd/system/scrypted.service" +echo "[Unit] +Description=Scrypted service +After=network.target + +[Service] +User=root +Group=root +Type=simple +ExecStart=/usr/bin/npx -y scrypted serve +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now scrypted.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/scrypted-v5-install.sh b/install/scrypted-v5-install.sh deleted file mode 100644 index 60b1e6e9..00000000 --- a/install/scrypted-v5-install.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get -y install software-properties-common apt-utils -$STD apt-get -y update -$STD apt-get -y upgrade -$STD apt-get -y install \ - build-essential \ - gcc \ - gir1.2-gtk-3.0 \ - libcairo2-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libjpeg-dev \ - libgif-dev \ - libopenjp2-7 \ - libpango1.0-dev \ - librsvg2-dev \ - pkg-config \ - curl \ - sudo \ - mc -msg_ok "Installed Dependencies" - -msg_info "Installing GStreamer" -$STD apt-get -y install \ - gstreamer1.0-tools \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgstreamer-plugins-bad1.0-dev \ - gstreamer1.0-plugins-base \ - gstreamer1.0-plugins-good \ - gstreamer1.0-plugins-bad \ - gstreamer1.0-plugins-ugly \ - gstreamer1.0-libav \ - gstreamer1.0-alsa -msg_ok "Installed GStreamer" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Python3" -$STD apt-get -y install \ - python3 \ - python3-dev \ - python3-gi \ - python3-gst-1.0 \ - python3-matplotlib \ - python3-numpy \ - python3-opencv \ - python3-pil \ - python3-pip \ - python3-setuptools \ - python3-skimage \ - python3-wheel -$STD python3 -m pip install --upgrade pip -$STD python3 -m pip install aiofiles debugpy typing_extensions typing -msg_ok "Installed Python3" - -read -r -p "Would you like to add Coral Edge TPU support? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Adding Coral Edge TPU Support" -$STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) -sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list' -$STD apt-get -y update -$STD apt-get -y install libedgetpu1-std -msg_ok "Coral Edge TPU Support Added" -fi - -msg_info "Installing Scrypted" -$STD sudo -u root npx -y scrypted@latest install-server -msg_info "Installed Scrypted" - -msg_info "Creating Service" -service_path="/etc/systemd/system/scrypted.service" -echo "[Unit] -Description=Scrypted service -After=network.target - -[Service] -User=root -Group=root -Type=simple -ExecStart=/usr/bin/npx -y scrypted serve -Restart=on-failure -RestartSec=3 - -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now scrypted.service -msg_ok "Created Service" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh new file mode 100644 index 00000000..d6682ba3 --- /dev/null +++ b/install/shinobi-install.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1) +if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then + apt install sudo wget -y + sudo apt install -y software-properties-common + sudo add-apt-repository universe -y + apt update -y + apt update --fix-missing -y +fi + +msg_info "Installing Dependencies" +$STD apt-get install -y curl sudo git mc +$STD apt-get install -y make zip net-tools +$STD apt-get install -y gcc g++ cmake +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing FFMPEG" +$STD apt-get install -y ffmpeg +msg_ok "Installed FFMPEG" + +msg_info "Clonning Shinobi" +cd /opt +$STD git clone https://gitlab.com/Shinobi-Systems/Shinobi.git -b master Shinobi +cd Shinobi +gitVersionNumber=$(git rev-parse HEAD) +theDateRightNow=$(date) +touch version.json +chmod 777 version.json +echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json +msg_ok "Cloned Shinobi" + +msg_info "Installing Database" +sqlpass="" +echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections +echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections +$STD apt-get install -y mariadb-server +service mysql start +sqluser="root" +mysql -e "source sql/user.sql" || true +mysql -e "source sql/framework.sql" || true +msg_ok "Installed Database" +cp conf.sample.json conf.json +cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') +sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json +cp super.sample.json super.json + +msg_info "Installing Shinobi" +$STD npm i npm -g +$STD npm install --unsafe-perm +$STD npm install pm2@latest -g +chmod -R 755 . +touch INSTALL/installed.txt +ln -s /opt/Shinobi/INSTALL/shinobi /usr/bin/shinobi +node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null +$STD pm2 start camera.js +$STD pm2 start cron.js +$STD pm2 startup +$STD pm2 save +$STD pm2 list +msg_ok "Installed Shinobi" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/shinobi-v5-install.sh b/install/shinobi-v5-install.sh deleted file mode 100644 index 755148af..00000000 --- a/install/shinobi-v5-install.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update --fix-missing -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1) -if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then - apt install sudo wget -y - sudo apt install -y software-properties-common - sudo add-apt-repository universe -y - apt update -y - apt update --fix-missing -y -fi - -msg_info "Installing Dependencies" -$STD apt-get install -y curl sudo git mc -$STD apt-get install -y make zip net-tools -$STD apt-get install -y gcc g++ cmake -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing FFMPEG" -$STD apt-get install -y ffmpeg -msg_ok "Installed FFMPEG" - -msg_info "Clonning Shinobi" -cd /opt -$STD git clone https://gitlab.com/Shinobi-Systems/Shinobi.git -b master Shinobi -cd Shinobi -gitVersionNumber=$(git rev-parse HEAD) -theDateRightNow=$(date) -touch version.json -chmod 777 version.json -echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json -msg_ok "Cloned Shinobi" - -msg_info "Installing Database" -sqlpass="" -echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections -echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections -$STD apt-get install -y mariadb-server -service mysql start -sqluser="root" -mysql -e "source sql/user.sql" || true -mysql -e "source sql/framework.sql" || true -msg_ok "Installed Database" -cp conf.sample.json conf.json -cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') -sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json -cp super.sample.json super.json - -msg_info "Installing Shinobi" -$STD npm i npm -g -$STD npm install --unsafe-perm -$STD npm install pm2@latest -g -chmod -R 755 . -touch INSTALL/installed.txt -ln -s /opt/Shinobi/INSTALL/shinobi /usr/bin/shinobi -node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null -$STD pm2 start camera.js -$STD pm2 start cron.js -$STD pm2 startup -$STD pm2 save -$STD pm2 list -msg_ok "Installed Shinobi" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh new file mode 100644 index 00000000..52961b31 --- /dev/null +++ b/install/sonarr-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +$STD apt-get install -y ca-certificates +msg_ok "Installed Dependencies" + +msg_info "Installing Sonarr" +$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 +sh -c 'echo "deb https://apt.sonarr.tv/debian buster-develop main" > /etc/apt/sources.list.d/sonarr.list' +$STD apt-get update +$STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr +msg_ok "Installed Sonarr" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/sonarr-v5-install.sh b/install/sonarr-v5-install.sh deleted file mode 100644 index 9ca338dc..00000000 --- a/install/sonarr-v5-install.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -export DEBIAN_FRONTEND=noninteractive -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -$STD apt-get install -y ca-certificates -msg_ok "Installed Dependencies" - -msg_info "Installing Sonarr" -$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 -sh -c 'echo "deb https://apt.sonarr.tv/debian buster-develop main" > /etc/apt/sources.list.d/sonarr.list' -$STD apt-get update -$STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr -msg_ok "Installed Sonarr" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh new file mode 100644 index 00000000..14cd1b99 --- /dev/null +++ b/install/syncthing-install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing Syncthing" +curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg +sh -c 'echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list' +$STD apt-get update +$STD apt-get install -y syncthing +$STD systemctl enable syncthing@root.service +systemctl start syncthing@root.service +sleep 5 +sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml +systemctl restart syncthing@root.service +msg_ok "Installed Syncthing" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/syncthing-v5-install.sh b/install/syncthing-v5-install.sh deleted file mode 100644 index 315a88da..00000000 --- a/install/syncthing-v5-install.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Installing Syncthing" -curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg -sh -c 'echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list' -$STD apt-get update -$STD apt-get install -y syncthing -$STD systemctl enable syncthing@root.service -systemctl start syncthing@root.service -sleep 5 -sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml -systemctl restart syncthing@root.service -msg_ok "Installed Syncthing" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh new file mode 100644 index 00000000..34e4ce6a --- /dev/null +++ b/install/tdarr-install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing Tdarr" +mkdir -p /opt/tdarr +cd /opt/tdarr +wget -q https://f000.backblazeb2.com/file/tdarrs/versions/2.00.15/linux_x64/Tdarr_Updater.zip +$STD unzip Tdarr_Updater.zip +chmod +x Tdarr_Updater +$STD ./Tdarr_Updater +msg_ok "Installed Tdarr" + +msg_info "Creating Service" +service_path="/etc/systemd/system/tdarr-server.service" +echo "[Unit] +Description=Tdarr Server Daemon +After=network.target +# Enable if using ZFS, edit and enable if other FS mounting is required to access directory +#Requires=zfs-mount.service + +[Service] +User=root +Group=root + +Type=simple +WorkingDirectory=/opt/tdarr/Tdarr_Server +ExecStartPre=/opt/tdarr/Tdarr_Updater +ExecStart=/opt/tdarr/Tdarr_Server/Tdarr_Server +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path + +service_path="/etc/systemd/system/tdarr-node.service" +echo "[Unit] +Description=Tdarr Node Daemon +After=network.target +Requires=tdarr-server.service + +[Service] +User=root +Group=root + +Type=simple +WorkingDirectory=/opt/tdarr/Tdarr_Node +ExecStart=/opt/tdarr/Tdarr_Node/Tdarr_Node +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q tdarr-server.service +systemctl enable --now -q tdarr-node.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Tdarr_Updater.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/tdarr-v5-install.sh b/install/tdarr-v5-install.sh deleted file mode 100644 index 705a53ce..00000000 --- a/install/tdarr-v5-install.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y unzip -msg_ok "Installed Dependencies" - -msg_info "Installing Tdarr" -mkdir -p /opt/tdarr -cd /opt/tdarr -wget -q https://f000.backblazeb2.com/file/tdarrs/versions/2.00.15/linux_x64/Tdarr_Updater.zip -$STD unzip Tdarr_Updater.zip -chmod +x Tdarr_Updater -$STD ./Tdarr_Updater -msg_ok "Installed Tdarr" - -msg_info "Creating Service" -service_path="/etc/systemd/system/tdarr-server.service" -echo "[Unit] -Description=Tdarr Server Daemon -After=network.target -# Enable if using ZFS, edit and enable if other FS mounting is required to access directory -#Requires=zfs-mount.service - -[Service] -User=root -Group=root - -Type=simple -WorkingDirectory=/opt/tdarr/Tdarr_Server -ExecStartPre=/opt/tdarr/Tdarr_Updater -ExecStart=/opt/tdarr/Tdarr_Server/Tdarr_Server -TimeoutStopSec=20 -KillMode=process -Restart=on-failure - -[Install] -WantedBy=multi-user.target" >$service_path - -service_path="/etc/systemd/system/tdarr-node.service" -echo "[Unit] -Description=Tdarr Node Daemon -After=network.target -Requires=tdarr-server.service - -[Service] -User=root -Group=root - -Type=simple -WorkingDirectory=/opt/tdarr/Tdarr_Node -ExecStart=/opt/tdarr/Tdarr_Node/Tdarr_Node -TimeoutStopSec=20 -KillMode=process -Restart=on-failure - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q tdarr-server.service -systemctl enable --now -q tdarr-node.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Tdarr_Updater.zip -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh new file mode 100644 index 00000000..a795fa37 --- /dev/null +++ b/install/technitiumdns-install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing ASP.NET Core Runtime" +wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +$STD dpkg -i packages-microsoft-prod.deb +rm -rf packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y aspnetcore-runtime-7.0 +msg_ok "Installed ASP.NET Core Runtime" + +msg_info "Installing Technitium DNS" +systemctl stop systemd-resolved +echo "DNSStubListener=no" >>/etc/systemd/resolved.conf +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf +$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) +msg_ok "Installed Technitium DNS" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/technitiumdns-v5-install.sh b/install/technitiumdns-v5-install.sh deleted file mode 100644 index 8570aebc..00000000 --- a/install/technitiumdns-v5-install.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing ASP.NET Core Runtime" -wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -$STD dpkg -i packages-microsoft-prod.deb -rm -rf packages-microsoft-prod.deb -$STD apt-get update -$STD apt-get install -y aspnetcore-runtime-7.0 -msg_ok "Installed ASP.NET Core Runtime" - -msg_info "Installing Technitium DNS" -systemctl stop systemd-resolved -echo "DNSStubListener=no" >>/etc/systemd/resolved.conf -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) -msg_ok "Installed Technitium DNS" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/transmission-install.sh b/install/transmission-install.sh new file mode 100644 index 00000000..1c7c6f0c --- /dev/null +++ b/install/transmission-install.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + + +msg_info "Installing Transmission" +$STD apt-get install -y transmission-daemon +systemctl stop transmission-daemon +sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rpc-host-whitelist-enabled": true,/"rpc-host-whitelist-enabled": false,/g}' /etc/transmission-daemon/settings.json +systemctl start transmission-daemon +msg_ok "Installed Transmission" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/transmission-v5-install.sh b/install/transmission-v5-install.sh deleted file mode 100644 index c2e22764..00000000 --- a/install/transmission-v5-install.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - - -msg_info "Installing Transmission" -$STD apt-get install -y transmission-daemon -systemctl stop transmission-daemon -sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rpc-host-whitelist-enabled": true,/"rpc-host-whitelist-enabled": false,/g}' /etc/transmission-daemon/settings.json -systemctl start transmission-daemon -msg_ok "Installed Transmission" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/trilium-install.sh b/install/trilium-install.sh new file mode 100644 index 00000000..02ab6d0f --- /dev/null +++ b/install/trilium-install.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Installing Trilium" +wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +$STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz +mv trilium-linux-x64-server /opt/trilium +msg_ok "Installed Trilium" + +msg_info "Creating Service" +service_path="/etc/systemd/system/trilium.service" + +echo "[Unit] +Description=Trilium Daemon +After=syslog.target network.target + +[Service] +User=root +Type=simple +ExecStart=/opt/trilium/trilium.sh +WorkingDirectory=/opt/trilium/ +TimeoutStopSec=20 +Restart=always + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q trilium +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz +msg_ok "Cleaned" diff --git a/install/trilium-v5-install.sh b/install/trilium-v5-install.sh deleted file mode 100644 index 05a61efa..00000000 --- a/install/trilium-v5-install.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Installing Trilium" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -$STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz -mv trilium-linux-x64-server /opt/trilium -msg_ok "Installed Trilium" - -msg_info "Creating Service" -service_path="/etc/systemd/system/trilium.service" - -echo "[Unit] -Description=Trilium Daemon -After=syslog.target network.target - -[Service] -User=root -Type=simple -ExecStart=/opt/trilium/trilium.sh -WorkingDirectory=/opt/trilium/ -TimeoutStopSec=20 -Restart=always - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q trilium -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz -msg_ok "Cleaned" diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh new file mode 100644 index 00000000..eb2b237b --- /dev/null +++ b/install/ubuntu-install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/ubuntu-v5-install.sh b/install/ubuntu-v5-install.sh deleted file mode 100644 index 9f1409ff..00000000 --- a/install/ubuntu-v5-install.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh new file mode 100644 index 00000000..4ec349db --- /dev/null +++ b/install/umbrel-install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Umbrel (Patience)" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then +VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /usr/local/bin +curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 +chmod 755 /usr/local/bin/fuse-overlayfs +cd ~ +echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +else +echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json +fi +$STD bash <(curl -fsSL https://umbrel.sh) +systemctl daemon-reload +$STD systemctl enable --now umbrel-startup.service +msg_ok "Installed Umbrel" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/umbrel-v5-install.sh b/install/umbrel-v5-install.sh deleted file mode 100644 index 8846aa68..00000000 --- a/install/umbrel-v5-install.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Umbrel (Patience)" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi -$STD bash <(curl -fsSL https://umbrel.sh) -systemctl daemon-reload -$STD systemctl enable --now umbrel-startup.service -msg_ok "Installed Umbrel" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/unifi-install.sh b/install/unifi-install.sh new file mode 100644 index 00000000..530fcd0d --- /dev/null +++ b/install/unifi-install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +read -r -p "Local Controller? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + LOCAL="--local-controller" +else + LOCAL="" +fi + +msg_info "Installing UniFi Network Application (Patience)" +wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh +$STD bash unifi-latest.sh --skip --add-repository $LOCAL +msg_ok "Installed UniFi Network Application" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/unifi-v5-install.sh b/install/unifi-v5-install.sh deleted file mode 100644 index 1eaa6cf3..00000000 --- a/install/unifi-v5-install.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -#https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776 -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -read -r -p "Local Controller? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - LOCAL="--local-controller" -else - LOCAL="" -fi - -msg_info "Installing UniFi Network Application (Patience)" -wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh -$STD bash unifi-latest.sh --skip --add-repository $LOCAL -msg_ok "Installed UniFi Network Application" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh new file mode 100644 index 00000000..d5af2231 --- /dev/null +++ b/install/uptimekuma-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD sudo apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Uptime Kuma" +$STD git clone https://github.com/louislam/uptime-kuma.git +mv uptime-kuma /opt/uptime-kuma +cd /opt/uptime-kuma +$STD npm run setup +msg_ok "Installed Uptime Kuma" + +msg_info "Creating Service" +service_path="/etc/systemd/system/uptime-kuma.service" +echo "[Unit] +Description=uptime-kuma + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/uptime-kuma +ExecStart=/usr/bin/npm start + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now uptime-kuma.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/uptimekuma-v5-install.sh b/install/uptimekuma-v5-install.sh deleted file mode 100644 index d9c8284b..00000000 --- a/install/uptimekuma-v5-install.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD sudo apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Uptime Kuma" -$STD git clone https://github.com/louislam/uptime-kuma.git -mv uptime-kuma /opt/uptime-kuma -cd /opt/uptime-kuma -$STD npm run setup -msg_ok "Installed Uptime Kuma" - -msg_info "Creating Service" -service_path="/etc/systemd/system/uptime-kuma.service" -echo "[Unit] -Description=uptime-kuma - -[Service] -Type=simple -Restart=always -User=root -WorkingDirectory=/opt/uptime-kuma -ExecStart=/usr/bin/npm start - -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now uptime-kuma.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/vaultwarden-v5-install.sh b/install/vaultwarden-install.sh similarity index 50% rename from install/vaultwarden-v5-install.sh rename to install/vaultwarden-install.sh index c1d63e1f..dd079560 100644 --- a/install/vaultwarden-v5-install.sh +++ b/install/vaultwarden-install.sh @@ -5,86 +5,13 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os msg_info "Installing Dependencies" $STD apt-get update @@ -182,23 +109,8 @@ systemctl daemon-reload $STD systemctl enable --now vaultwarden.service msg_ok "Created Service" -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi +motd_ssh +root msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh new file mode 100644 index 00000000..64b757f5 --- /dev/null +++ b/install/whisparr-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Whisparr" +mkdir -p /var/lib/whisparr/ +chmod 775 /var/lib/whisparr/ +$STD wget --content-disposition 'https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64' +$STD tar -xvzf Whisparr.develop.*.tar.gz +mv Whisparr /opt +chmod 775 /opt/Whisparr +msg_ok "Installed Whisparr" + +msg_info "Creating Service" +cat </etc/systemd/system/whisparr.service +[Unit] +Description=whisparr Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/opt/Whisparr/Whisparr -nobrowser -data=/var/lib/whisparr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl -q daemon-reload +systemctl enable --now -q whisparr +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf Whisparr.develop.*.tar.gz +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/whisparr-v5-install.sh b/install/whisparr-v5-install.sh deleted file mode 100644 index 82d4dce7..00000000 --- a/install/whisparr-v5-install.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y sqlite3 -msg_ok "Installed Dependencies" - -msg_info "Installing Whisparr" -mkdir -p /var/lib/whisparr/ -chmod 775 /var/lib/whisparr/ -$STD wget --content-disposition 'https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64' -$STD tar -xvzf Whisparr.develop.*.tar.gz -mv Whisparr /opt -chmod 775 /opt/Whisparr -msg_ok "Installed Whisparr" - -msg_info "Creating Service" -cat </etc/systemd/system/whisparr.service -[Unit] -Description=whisparr Daemon -After=syslog.target network.target -[Service] -UMask=0002 -Type=simple -ExecStart=/opt/Whisparr/Whisparr -nobrowser -data=/var/lib/whisparr/ -TimeoutStopSec=20 -KillMode=process -Restart=on-failure -[Install] -WantedBy=multi-user.target -EOF -systemctl -q daemon-reload -systemctl enable --now -q whisparr -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm -rf Whisparr.develop.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh new file mode 100644 index 00000000..943c59ad --- /dev/null +++ b/install/whoogle-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Python3-pip" +$STD apt-get install -y python3-pip +msg_ok "Installed Python3-pip" + +msg_info "Installing Whoogle" +$STD pip install brotli +$STD pip install whoogle-search + +service_path="/etc/systemd/system/whoogle.service" +echo "[Unit] +Description=Whoogle-Search +After=network.target +[Service] +ExecStart=/usr/local/bin/whoogle-search --host 0.0.0.0 +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path + +$STD systemctl enable --now whoogle.service +msg_ok "Installed Whoogle" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/whoogle-v5-install.sh b/install/whoogle-v5-install.sh deleted file mode 100644 index 816a32df..00000000 --- a/install/whoogle-v5-install.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" - -msg_info "Installing Whoogle" -$STD pip install brotli -$STD pip install whoogle-search - -service_path="/etc/systemd/system/whoogle.service" -echo "[Unit] -Description=Whoogle-Search -After=network.target -[Service] -ExecStart=/usr/local/bin/whoogle-search --host 0.0.0.0 -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path - -$STD systemctl enable --now whoogle.service -msg_ok "Installed Whoogle" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh new file mode 100644 index 00000000..4bea8690 --- /dev/null +++ b/install/wikijs-install.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Wiki.js" +mkdir -p /opt/wikijs +cd /opt/wikijs +$STD wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz +tar xzf wiki-js.tar.gz +rm wiki-js.tar.gz + +cat </opt/wikijs/config.yml +bindIP: 0.0.0.0 +port: 3000 +db: + type: sqlite + storage: /opt/wikijs/db.sqlite +logLevel: info +logFormat: default +dataPath: /opt/wikijs/data +bodyParserLimit: 5mb +EOF +$STD npm rebuild sqlite3 +msg_ok "Installed Wiki.js" + +msg_info "Creating Service" +service_path="/etc/systemd/system/wikijs.service" + +echo "[Unit] +Description=Wiki.js +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/node server +Restart=always +User=root +Environment=NODE_ENV=production +WorkingDirectory=/opt/wikijs + +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable --now wikijs +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/wikijs-v5-install.sh b/install/wikijs-v5-install.sh deleted file mode 100644 index 71a6e946..00000000 --- a/install/wikijs-v5-install.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Wiki.js" -mkdir -p /opt/wikijs -cd /opt/wikijs -$STD wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz -tar xzf wiki-js.tar.gz -rm wiki-js.tar.gz - -cat </opt/wikijs/config.yml -bindIP: 0.0.0.0 -port: 3000 -db: - type: sqlite - storage: /opt/wikijs/db.sqlite -logLevel: info -logFormat: default -dataPath: /opt/wikijs/data -bodyParserLimit: 5mb -EOF -$STD npm rebuild sqlite3 -msg_ok "Installed Wiki.js" - -msg_info "Creating Service" -service_path="/etc/systemd/system/wikijs.service" - -echo "[Unit] -Description=Wiki.js -After=network.target - -[Service] -Type=simple -ExecStart=/usr/bin/node server -Restart=always -User=root -Environment=NODE_ENV=production -WorkingDirectory=/opt/wikijs - -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now wikijs -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh new file mode 100644 index 00000000..f63333c9 --- /dev/null +++ b/install/wireguard-install.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gunicorn +msg_ok "Installed Dependencies" + +msg_info "Installing WireGuard (using pivpn.io)" +OPTIONS_PATH='/options.conf' +cat >$OPTIONS_PATH <<'EOF' +IPv4dev=eth0 +install_user=root +VPN=wireguard +pivpnNET=10.6.0.0 +subnetClass=24 +ALLOWED_IPS="0.0.0.0/0, ::0/0" +pivpnMTU=1420 +pivpnPORT=51820 +pivpnDNS1=1.1.1.1 +pivpnDNS2=8.8.8.8 +pivpnHOST= +pivpnPERSISTENTKEEPALIVE=25 +UNATTUPG=1 +EOF +$STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf +msg_ok "Installed WireGuard" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/wireguard-v5-install.sh b/install/wireguard-v5-install.sh deleted file mode 100644 index 4d1b3127..00000000 --- a/install/wireguard-v5-install.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -OPTIONS_PATH='/options.conf' -cat >$OPTIONS_PATH <<'EOF' -IPv4dev=eth0 -install_user=root -VPN=wireguard -pivpnNET=10.6.0.0 -subnetClass=24 -ALLOWED_IPS="0.0.0.0/0, ::0/0" -pivpnMTU=1420 -pivpnPORT=51820 -pivpnDNS1=1.1.1.1 -pivpnDNS2=8.8.8.8 -pivpnHOST= -pivpnPERSISTENTKEEPALIVE=25 -UNATTUPG=1 -EOF - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gunicorn -msg_ok "Installed Dependencies" - -msg_info "Installing WireGuard (using pivpn.io)" -$STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf -msg_ok "Installed WireGuard" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh new file mode 100644 index 00000000..48e7bbd6 --- /dev/null +++ b/install/yunohost-install.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg +$STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' +$STD apt-get install -y apt-transport-https +$STD apt-get install -y lsb-release +$STD apt-get install -y ca-certificates +msg_ok "Installed Dependencies" + +msg_info "Installing YunoHost (Patience)" +wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg +$STD bash <(curl -fsSL https://install.yunohost.org) -a +msg_ok "Installed YunoHost" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/yunohost-v5-install.sh b/install/yunohost-v5-install.sh deleted file mode 100644 index b8366bf0..00000000 --- a/install/yunohost-v5-install.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS" -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gnupg -$STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' -$STD apt-get install -y apt-transport-https -$STD apt-get install -y lsb-release -$STD apt-get install -y ca-certificates -msg_ok "Installed Dependencies" - -msg_info "Installing YunoHost (Patience)" -wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg -$STD bash <(curl -fsSL https://install.yunohost.org) -a -msg_ok "Installed YunoHost" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh new file mode 100644 index 00000000..ca4e2905 --- /dev/null +++ b/install/zigbee2mqtt-install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Setting up Zigbee2MQTT Repository" +$STD git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt +msg_ok "Set up Zigbee2MQTT Repository" + +read -r -p "Switch to Edge/dev branch? (y/N) " prompt +if [[ $prompt == "y" ]]; then + DEV="y" +else + DEV="n" +fi + +msg_info "Installing Zigbee2MQTT" +cd /opt/zigbee2mqtt +if [[ $DEV == "y" ]]; then +$STD git checkout dev +fi +$STD npm ci +msg_ok "Installed Zigbee2MQTT" + +msg_info "Creating Service" +service_path="/etc/systemd/system/zigbee2mqtt.service" +echo "[Unit] +Description=zigbee2mqtt +After=network.target +[Service] +Environment=NODE_ENV=production +ExecStart=/usr/bin/npm start +WorkingDirectory=/opt/zigbee2mqtt +StandardOutput=inherit +StandardError=inherit +Restart=always +User=root +[Install] +WantedBy=multi-user.target" >$service_path +$STD systemctl enable zigbee2mqtt.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/zigbee2mqtt-v5-install.sh b/install/zigbee2mqtt-v5-install.sh deleted file mode 100644 index ae1ec650..00000000 --- a/install/zigbee2mqtt-v5-install.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Setting up Zigbee2MQTT Repository" -$STD git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt -msg_ok "Set up Zigbee2MQTT Repository" - -read -r -p "Switch to Edge/dev branch? (y/N) " prompt -if [[ $prompt == "y" ]]; then - DEV="y" -else - DEV="n" -fi - -msg_info "Installing Zigbee2MQTT" -cd /opt/zigbee2mqtt -if [[ $DEV == "y" ]]; then -$STD git checkout dev -fi -$STD npm ci -msg_ok "Installed Zigbee2MQTT" - -msg_info "Creating Service" -service_path="/etc/systemd/system/zigbee2mqtt.service" -echo "[Unit] -Description=zigbee2mqtt -After=network.target -[Service] -Environment=NODE_ENV=production -ExecStart=/usr/bin/npm start -WorkingDirectory=/opt/zigbee2mqtt -StandardOutput=inherit -StandardError=inherit -Restart=always -User=root -[Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable zigbee2mqtt.service -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh new file mode 100644 index 00000000..67862f1f --- /dev/null +++ b/install/zwave-js-ui-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing Z-Wave JS UI" +mkdir /opt/zwave-js-ui +cd /opt/zwave-js-ui +RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +$STD wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip +$STD unzip zwave-js-ui-${RELEASE}-linux.zip +msg_ok "Installed Z-Wave JS UI" + +msg_info "Creating Service" +service_path="/etc/systemd/system/zwave-js-ui.service" +echo "[Unit] +Description=zwave-js-ui +Wants=network-online.target +After=network-online.target +[Service] +User=root +WorkingDirectory=/opt/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux +[Install] +WantedBy=multi-user.target" >$service_path +systemctl start zwave-js-ui +$STD systemctl enable zwave-js-ui +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm zwave-js-ui-${RELEASE}-linux.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/zwave-js-ui-v5-install.sh b/install/zwave-js-ui-v5-install.sh deleted file mode 100644 index 41cfb081..00000000 --- a/install/zwave-js-ui-v5-install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi -silent() { "$@" > /dev/null 2>&1; } -if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -RETRY_NUM=10 -RETRY_EVERY=3 -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -BFR="\\r\\033[K" -HOLD="-" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -msg_info "Setting up Container OS " -sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen -locale-gen >/dev/null -echo $tz > /etc/timezone -ln -sf /usr/share/zoneinfo/$tz /etc/localtime -for ((i=RETRY_NUM; i>0; i--)); do - if [ "$(hostname -I)" != "" ]; then - break - fi - echo 1>&2 -en "${CROSS}${RD} No Network! " - sleep $RETRY_EVERY -done -if [ "$(hostname -I)" = "" ]; then - echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" - echo -e " 🖧 Check Network Settings" - exit 1 -fi -msg_ok "Set up Container OS" -msg_ok "Network Connected: ${BL}$(hostname -I)" - -set +e -trap - ERR -if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi -fi -RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') -if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi -set -e -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR - -msg_info "Updating Container OS" -$STD apt-get update -$STD apt-get -y upgrade -msg_ok "Updated Container OS" - -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y unzip -msg_ok "Installed Dependencies" - -msg_info "Installing Z-Wave JS UI" -mkdir /opt/zwave-js-ui -cd /opt/zwave-js-ui -RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -$STD wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip -$STD unzip zwave-js-ui-${RELEASE}-linux.zip -msg_ok "Installed Z-Wave JS UI" - -msg_info "Creating Service" -service_path="/etc/systemd/system/zwave-js-ui.service" -echo "[Unit] -Description=zwave-js-ui -Wants=network-online.target -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux -[Install] -WantedBy=multi-user.target" >$service_path -systemctl start zwave-js-ui -$STD systemctl enable zwave-js-ui -msg_ok "Created Service" - -echo "export TERM='xterm-256color'" >>/root/.bashrc -echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" > /etc/motd -chmod -x /etc/update-motd.d/* -if ! getent shadow root | grep -q "^root:[^\!*]"; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM -EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" -fi -if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi - -msg_info "Cleaning up" -rm zwave-js-ui-${RELEASE}-linux.zip -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/misc/alpine-install.func b/misc/alpine-install.func new file mode 100644 index 00000000..f2f74a08 --- /dev/null +++ b/misc/alpine-install.func @@ -0,0 +1,116 @@ +color() { + YW=$(echo "\033[33m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") + RETRY_NUM=10 + RETRY_EVERY=3 + i=$RETRY_NUM + CM="${GN}✓${CL}" + CROSS="${RD}✗${CL}" + BFR="\\r\\033[K" + HOLD="-" +} + +verb_ip6() { + if [ "$VERBOSE" = "yes" ]; then + set -x + STD="" + else STD="silent"; fi + silent() { "$@" >/dev/null 2>&1; } + if [ "$DISABLEIPV6" == "yes" ]; then + echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD sysctl -p + fi +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +setting_up_container() { + msg_info "Setting up Container OS" + while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + i=$((i - 1)) + done + + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 + fi + cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/edge/main +https://dl-cdn.alpinelinux.org/alpine/edge/community +https://dl-cdn.alpinelinux.org/alpine/edge/testing +EOF + msg_ok "Set up Container OS" + msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" +} + +network_check() { + set +e + trap - ERR + if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if echo "$prompt" | grep -Eq "^(y|yes)$"; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi + fi + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi + set -e + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +update_os() { + msg_info "Updating Container OS" + $STD apk update + $STD apk upgrade + msg_ok "Updated Container OS" +} + +motd_ssh() { + echo "export TERM='xterm-256color'" >>/root/.bashrc + echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd + if [[ "${SSH_ROOT}" == "yes" ]]; then + $STD rc-update add sshd + $STD /etc/init.d/sshd start + fi +} diff --git a/misc/alpine.func b/misc/alpine.func new file mode 100644 index 00000000..b784217c --- /dev/null +++ b/misc/alpine.func @@ -0,0 +1,400 @@ +variables() { + NSAPP=$(echo ${APP,,} | tr -d ' ') + var_install="${NSAPP}-install" + INTEGER='^[0-9]+([.][0-9]+)?$' +} + +color() { + YW=$(echo "\033[33m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") + CM="${GN}✓${CL}" + CROSS="${RD}✗${CL}" + BFR="\\r\\033[K" + HOLD="-" +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +pve_check() { + if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +echo_default() { + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +advanced_settings() { + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + else + exit-script + fi + + if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + exit-script + fi + + if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi + else + exit + fi + + if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit-script + fi + + if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi + else + exit-script + fi + + if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit-script + fi + + if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + else + exit-script + fi + + if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + else + exit-script + fi + + if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +install_script() { + arch_check + pve_check + timezone=$(cat /etc/timezone) + NEXTID=$(pvesh get /cluster/nextid) + header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +start() { + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script + fi + + if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + set +e + update_script + fi +} + +build_container() { + if [ "$VERB" == "yes" ]; then set -x; fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" + export tz="$timezone" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export CTID=$CT_ID" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW + " + bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + if [ "$CT_TYPE" == "0" ]; then + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + lxc-attach -n "$CTID" -- bash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit + +} + +description() { + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + pct set "$CTID" -description "# ${APP} LXC + ### https://tteck.github.io/Proxmox/ + " +} diff --git a/misc/debian.func b/misc/debian.func new file mode 100644 index 00000000..fff5e559 --- /dev/null +++ b/misc/debian.func @@ -0,0 +1,403 @@ +variables() { + NSAPP=$(echo ${APP,,} | tr -d ' ') + var_install="${NSAPP}-install" + timezone=$(cat /etc/timezone) + INTEGER='^[0-9]+([.][0-9]+)?$' +} + +color() { + YW=$(echo "\033[33m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") + CM="${GN}✓${CL}" + CROSS="${RD}✗${CL}" + BFR="\\r\\033[K" + HOLD="-" +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +pve_check() { + if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +echo_default() { + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +advanced_settings() { + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + else + exit-script + fi + + if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + exit-script + fi + + if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi + else + exit + fi + + if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit-script + fi + + if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi + else + exit-script + fi + + if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit-script + fi + + if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + else + exit-script + fi + + if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + else + exit-script + fi + + if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +install_script() { + arch_check + pve_check + NEXTID=$(pvesh get /cluster/nextid) + header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +start() { + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script + fi + + if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script + fi +} + +build_container() { + if [ "$VERB" == "yes" ]; then set -x; fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" + export tz="$timezone" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export CTID="$CT_ID" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW + " + bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 + else + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF + fi + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit + +} + +description() { + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + pct set "$CTID" -description "# ${APP} LXC + ### https://tteck.github.io/Proxmox/ + " +} diff --git a/misc/docker.func b/misc/docker.func new file mode 100644 index 00000000..702f598e --- /dev/null +++ b/misc/docker.func @@ -0,0 +1,409 @@ +variables() { + NSAPP=$(echo ${APP,,} | tr -d ' ') + var_install="${NSAPP}-install" + timezone=$(cat /etc/timezone) + INTEGER='^[0-9]+([.][0-9]+)?$' +} + +color() { + YW=$(echo "\033[33m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") + CM="${GN}✓${CL}" + CROSS="${RD}✗${CL}" + BFR="\\r\\033[K" + HOLD="-" +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +pve_check() { + if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +echo_default() { + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +advanced_settings() { + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + else + exit-script + fi + + if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + exit-script + fi + + if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi + else + exit + fi + + if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit-script + fi + + if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi + else + exit-script + fi + + if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit-script + fi + + if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + else + exit-script + fi + + if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + else + exit-script + fi + + if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" + else + FUSE="no" + fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +install_script() { + arch_check + pve_check + NEXTID=$(pvesh get /cluster/nextid) + header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +start() { + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script + fi + + if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script + fi +} + +build_container() { + if [ "$VERB" == "yes" ]; then set -x; fi + if [ "$FUSE" == "yes" ]; then + FEATURES="fuse=1,keyctl=1,nesting=1" + else + FEATURES="keyctl=1,nesting=1" + fi + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" + export tz="$timezone" + export ST="$FUSE" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export CTID="$CT_ID" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW + " + bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +EOF + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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 + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit + +} + +description() { + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + pct set "$CTID" -description "# ${APP} LXC + ### https://tteck.github.io/Proxmox/ + " +} diff --git a/misc/install.func b/misc/install.func new file mode 100644 index 00000000..a2fa99e0 --- /dev/null +++ b/misc/install.func @@ -0,0 +1,133 @@ +color() { + YW=$(echo "\033[33m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") + RETRY_NUM=10 + RETRY_EVERY=3 + CM="${GN}✓${CL}" + CROSS="${RD}✗${CL}" + BFR="\\r\\033[K" + HOLD="-" +} + +verb_ip6() { + if [ "$VERBOSE" = "yes" ]; then + set -x + STD="" + else STD="silent"; fi + silent() { "$@" >/dev/null 2>&1; } + if [ "$DISABLEIPV6" == "yes" ]; then + echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf + $STD sysctl -p + fi +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +setting_up_container() { + msg_info "Setting up Container OS" + sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen + locale-gen >/dev/null + echo $tz >/etc/timezone + ln -sf /usr/share/zoneinfo/$tz /etc/localtime + for ((i = RETRY_NUM; i > 0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "${CROSS}${RD} No Network! " + sleep $RETRY_EVERY + done + if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" + echo -e " 🖧 Check Network Settings" + exit 1 + fi + msg_ok "Set up Container OS" + msg_ok "Network Connected: ${BL}$(hostname -I)" +} + +network_check() { + set +e + trap - ERR + if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then msg_ok "Internet Connected"; else + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi + fi + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi + set -e + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +update_os() { + msg_info "Updating Container OS" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated Container OS" +} + +motd_ssh() { + echo "export TERM='xterm-256color'" >>/root/.bashrc + echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd + chmod -x /etc/update-motd.d/* + if [[ "${SSH_ROOT}" == "yes" ]]; then + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd + fi +} + +customize() { + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE + [Service] + ExecStart= + ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM +EOF + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" +} + +root() { + if ! getent shadow root | grep -q "^root:[^\!*]"; then + customize + fi +} diff --git a/misc/ubuntu.func b/misc/ubuntu.func new file mode 100644 index 00000000..04695499 --- /dev/null +++ b/misc/ubuntu.func @@ -0,0 +1,428 @@ +variables() { + NSAPP=$(echo ${APP,,} | tr -d ' ') + var_install="${NSAPP}-install" + timezone=$(cat /etc/timezone) + INTEGER='^[0-9]+([.][0-9]+)?$' +} + +color() { + YW=$(echo "\033[33m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") + CM="${GN}✓${CL}" + CROSS="${RD}✗${CL}" + BFR="\\r\\033[K" + HOLD="-" +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +pve_check() { + if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +echo_default() { + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" +} + +exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +advanced_settings() { + if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" + else + exit-script + fi + + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + else + exit-script + fi + + if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + exit-script + fi + + if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi + else + exit + fi + + if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" + else + HN=$(echo ${CT_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit-script + fi + + if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi + else + exit-script + fi + + if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi + echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" + + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + exit-script + fi + + if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" + else + exit-script + fi + + if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" + else + exit-script + fi + + if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + exit-script + fi + + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi + echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" + + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +install_script() { + arch_check + pve_check + NEXTID=$(pvesh get /cluster/nextid) + header_info + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +start() { + if command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + install_script + fi + + if ! command -v pveversion >/dev/null 2>&1; then + if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + clear + echo -e "⚠ User exited script \n" + exit + fi + update_script + fi +} + +build_container() { + if [ "$VERB" == "yes" ]; then set -x; fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" + fi + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" + export tz="$timezone" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export CTID="$CT_ID" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW + " + bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" ]]; then + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +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" ]]; then + cat <>$LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file +EOF + fi + fi + + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit + +} + +description() { + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + pct set "$CTID" -description "# ${APP} LXC + ### https://tteck.github.io/Proxmox/ + " +} diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm-v5.sh index e89c1951..5160d8be 100644 --- a/vm/haos-vm-v5.sh +++ b/vm/haos-vm-v5.sh @@ -6,10 +6,10 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ ___ _ __ __ ____ _____ - / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____v5/ /_ / __ \/ ___/ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / /_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ @@ -20,18 +20,18 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) -VERSIONS=( stable beta dev ) +VERSIONS=(stable beta dev) for version in "${VERSIONS[@]}"; do eval "$version=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/$version.json | grep "ova" | cut -d '"' -f 4)" done -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -HA=`echo "\033[1;34m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -67,25 +67,25 @@ else fi function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" - echo -e "Exiting..." - sleep 2 - exit -fi + if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi } function ARCH_CHECK() { if [ "$(dpkg --print-architecture)" != "amd64" ]; then @@ -122,121 +122,138 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ -"$stable" "Stable " ON \ -"$beta" "Beta " OFF \ -"$dev" "Dev " OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi -while true; do - VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ + "$stable" "Stable " ON \ + "$beta" "Beta " OFF \ + "$dev" "Dev " OFF \ + 3>&1 1>&2 2>&3) exitstatus=$? - if [ -z "$VMID" ]; then - VMID="$NEXTID" - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break - else - if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then - echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" - sleep 2 - continue + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi + while true; do + VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z "$VMID" ]; then + VMID="$NEXTID" + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break fi - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break - fi -done + done -MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ -"i440fx" "Machine i440fx" ON \ -"q35" "Machine q35" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $MACH = q35 ]; then - echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT="" - MACHINE=" -machine q35" + MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" else - echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT=",efitype=4m" - MACHINE="" -fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $MAC1 ]; then MAC="$GEN_MAC"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"; -else - if [ $exitstatus = 0 ]; then MAC="$MAC1"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"; fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" fi -fi -if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $VM_NAME ]; then + HN="haos${BRANCH}" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="4096" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" -else + else echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function START_SCRIPT() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } ARCH_CHECK PVE_CHECK @@ -251,29 +268,29 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi -STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content images | awk 'NR>1') VALID=$(pvesm status -content images | awk 'NR>1') if [ -z "$VALID" ]; then -msg_error "Unable to detect a valid storage location." + msg_error "Unable to detect a valid storage location." exit -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the HAOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "Which storage pool you would like to use for the HAOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image" -if [ "$BRANCH" == "$dev" ]; then -URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +if [ "$BRANCH" == "$dev" ]; then + URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz else -URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz + URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz fi sleep 2 msg_ok "${CL}${BL}${URL}${CL}" @@ -285,19 +302,19 @@ msg_info "Extracting KVM Disk Image" unxz $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in - nfs|dir) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_IMPORT="-format raw" - THIN="" - ;; - btrfs) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_IMPORT="-format raw" - FORMAT=",efitype=4m" - THIN="" - ;; +nfs | dir) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; esac for i in {0,1}; do disk="DISK$i" @@ -319,8 +336,8 @@ qm set $VMID \ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then -msg_info "Starting Home Assistant OS VM" -qm start $VMID -msg_ok "Started Home Assistant OS VM" + msg_info "Starting Home Assistant OS VM" + qm start $VMID + msg_ok "Started Home Assistant OS VM" fi msg_ok "Completed Successfully!\n" diff --git a/vm/mikrotik-routeros-v5.sh b/vm/mikrotik-routeros.sh similarity index 51% rename from vm/mikrotik-routeros-v5.sh rename to vm/mikrotik-routeros.sh index 7e0bcdda..62930234 100644 --- a/vm/mikrotik-routeros-v5.sh +++ b/vm/mikrotik-routeros.sh @@ -6,9 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -cat <<"EOF" + cat <<"EOF" __ ____ __ __ _ __ ____ __ ____ _____ - / |/ (_) /___________ / /_(_) /__ / __ \____v5__ __/ /____ _____/ __ \/ ___/ + / |/ (_) /___________ / /_(_) /__ / __ \____ __ __/ /____ _____/ __ \/ ___/ / /|_/ / / //_/ ___/ __ \/ __/ / //_/ / /_/ / __ \/ / / / __/ _ \/ ___/ / / /\__ \ / / / / / < / / / /_/ / /_/ / < / _ _/ /_/ / /_/ / /_/ __/ / / /_/ /___/ / /_/ /_/_/_/|_/_/ \____/\__/_/_/|_| /_/ |_|\____/\__,_/\__/\___/_/ \____//____/ @@ -20,14 +20,14 @@ header_info echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -HA=`echo "\033[1;34m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -62,144 +62,145 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" - echo "Exiting..." - sleep 3 - exit +if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit fi if (whiptail --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function default_settings() { - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros${CL}" - HN=mikrotik-routeros - echo -e "${DGN}Allocated Cores: ${BGN}1${CL}" - CORE_COUNT="1" - echo -e "${DGN}Allocated RAM: ${BGN}1024${CL}" - RAM_SIZE="1024" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" - START_VM="no" - echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros${CL}" + HN=mikrotik-routeros + echo -e "${DGN}Allocated Cores: ${BGN}1${CL}" + CORE_COUNT="1" + echo -e "${DGN}Allocated RAM: ${BGN}1024${CL}" + RAM_SIZE="1024" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}" } function advanced_settings() { -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" -else + else exit -fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + fi + VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' ') echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else + else exit -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" -else + else exit -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" -else + else exit -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" -else + else exit -fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then + fi + MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then MAC="$MAC1" echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" -else - exit -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + exit fi -fi -if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}" START_VM="yes" -else + else echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}no${CL}" START_VM="no" -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then echo -e "${RD}Creating Mikrotik RouterOS VM using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function start_script() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } start_script msg_info "Validating Storage" @@ -212,21 +213,21 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi -STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content images | awk 'NR>1') VALID=$(pvesm status -content images | awk 'NR>1') if [ -z "$VALID" ]; then - echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" - echo -e "Exiting..." - exit -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then + echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" + echo -e "Exiting..." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." @@ -245,17 +246,17 @@ msg_info "Extracting Mikrotik RouterOS Disk Image" gunzip -f -S .zip $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in - nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DISK_IMPORT="-format qcow2" - ;; - btrfs) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_FORMAT="subvol" - DISK_IMPORT="-format raw" - ;; +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_FORMAT="subvol" + DISK_IMPORT="-format raw" + ;; esac for i in {0,1}; do disk="DISK$i" @@ -277,8 +278,8 @@ qm set $VMID \ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Mikrotik RouterOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then -msg_info "Starting Mikrotik RouterOS VM" -qm start $VMID -msg_ok "Started Mikrotik RouterOS VM" + msg_info "Starting Mikrotik RouterOS VM" + qm start $VMID + msg_ok "Started Mikrotik RouterOS VM" fi msg_ok "Completed Successfully!\n" diff --git a/vm/pimox-haos-vm-v5.sh b/vm/pimox-haos-vm.sh similarity index 50% rename from vm/pimox-haos-vm-v5.sh rename to vm/pimox-haos-vm.sh index c116c84a..ca69e858 100644 --- a/vm/pimox-haos-vm-v5.sh +++ b/vm/pimox-haos-vm.sh @@ -6,13 +6,13 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -cat <<"EOF" + cat <<"EOF" ____ _ __ ___ / __ \(_) |/ /___ _ __ / /_/ / / /|_/ / __ \| |/_/ / ____/ / / / / /_/ /> < __ __ /_/_ /_/_/ /_/\____/_/|_| __ ____ _____ - / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____v5/ /_ / __ \/ ___/ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / /_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ @@ -28,14 +28,14 @@ NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') -YW=`echo "\033[33m"` -BL=`echo "\033[36m"` -HA=`echo "\033[1;34m"` -RD=`echo "\033[01;31m"` -BGN=`echo "\033[4;92m"` -GN=`echo "\033[1;92m"` -DGN=`echo "\033[32m"` -CL=`echo "\033[m"` +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" @@ -72,20 +72,20 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if (whiptail --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then - echo "User selected Yes" + echo "User selected Yes" else - clear - echo -e "⚠ User exited script \n" - exit + clear + echo -e "⚠ User exited script \n" + exit fi function PVE_CHECK() { -if [ `pveversion | grep "pve-manager/7.2\|7.3" | wc -l` -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: =>7.2" - echo "Exiting..." - sleep 2 - exit -fi + if [ $(pveversion | grep "pve-manager/7.2\|7.3" | wc -l) -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: =>7.2" + echo "Exiting..." + sleep 2 + exit + fi } function ARCH_CHECK() { ARCH=$(dpkg --print-architecture) @@ -97,142 +97,160 @@ function ARCH_CHECK() { fi } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function default_settings() { - echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" - BRANCH=${STABLE} - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" - VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" - HN=haos${STABLE} - echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" - CORE_COUNT="2" - echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" - RAM_SIZE="4096" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" - MAC=$GEN_MAC - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" + echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" + BRANCH=${STABLE} + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}" + HN=haos${STABLE} + echo -e "${DGN}Allocated Cores: ${BGN}2${CL}" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}4096${CL}" + RAM_SIZE="4096" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ -"$STABLE" "Stable" ON \ -"$BETA" "Beta" OFF \ -"$DEV" "Dev" OFF \ -3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi -VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $VMID ]; then VMID="$NEXTID"; echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"; + BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ + "$STABLE" "Stable" ON \ + "$BETA" "Beta" OFF \ + "$DEV" "Dev" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi + VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $VMID ]; then + VMID="$NEXTID" + echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}" else - if echo "$USEDID" | egrep -q "$VMID" - then + if echo "$USEDID" | egrep -q "$VMID"; then echo -e "\n🚨 ${RD}ID $VMID is already in use${CL} \n" echo -e "Exiting Script \n" - sleep 2; + sleep 2 exit - else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi; + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi fi -fi -VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $VM_NAME ]; then HN="haos${BRANCH}"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; -else - if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi; -fi -CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $CORE_COUNT ]; then CORE_COUNT="2"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi; -fi -RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $RAM_SIZE ]; then RAM_SIZE="4096"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi; -fi -BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; -else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi; -fi -MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ -z $MAC1 ]; then MAC="$GEN_MAC"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"; -else - if [ $exitstatus = 0 ]; then MAC="$MAC1"; echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"; fi -fi -VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $VLAN1 ]; then VLAN1="Default" VLAN=""; - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi -fi -MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) -exitstatus=$? -if [ $exitstatus = 0 ]; then - if [ -z $MTU1 ]; then - MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi -fi -if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $VM_NAME ]; then + HN="haos${BRANCH}" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $RAM_SIZE ]; then + RAM_SIZE="4096" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" -else + else echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" -fi -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function START_SCRIPT() { -if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - clear - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } ARCH_CHECK PVE_CHECK @@ -246,19 +264,19 @@ while read -r line; do if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" ) + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content images | awk 'NR>1') -if [ $((${#STORAGE_MENU[@]}/3)) -eq 0 ]; then +if [ $((${#STORAGE_MENU[@]} / 3)) -eq 0 ]; then echo -e "'Disk image' needs to be selected for at least one storage location." die "Unable to detect valid storage location." -elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the HAOS VM?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "Which storage pool you would like to use for the HAOS VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." @@ -275,10 +293,11 @@ msg_info "Extracting Disk Image" unxz $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in - nfs|dir) - DISK_EXT=".qcow2" - DISK_REF="$VMID/" - DISK_IMPORT="-format qcow2" +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; esac for i in {0,1}; do disk="DISK$i" @@ -301,8 +320,8 @@ qm set $VMID -description "# PiMox HAOS [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then -msg_info "Starting Home Assistant OS VM" -qm start $VMID -msg_ok "Started Home Assistant OS VM" + msg_info "Starting Home Assistant OS VM" + qm start $VMID + msg_ok "Started Home Assistant OS VM" fi msg_ok "Completed Successfully!\n" From 5c51a02e72a84e7fdad78de51f2f2c70e7461f03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Mar 2023 20:56:42 -0400 Subject: [PATCH 1257/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6bf0a220..907c02ea 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,15 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-22 + +### Changed + +- **The latest iteration of the scripts** + - Going forward, versioning will no longer be utilized in order to avoid breaking web-links in blogs and YouTube videos. + - The scripts have been made more legible as the repetitive code has been moved to function files, making it simpler to share among the scripts and hopefully easier to maintain. This also makes it simpler to contribute to the project. + - When a container is created with privileged mode enabled, the USB passthrough feature is automatically activated. + ## 2023-03-18 ### Changed From dfe60d333f4281eb561b798522df2507d6bdbfd6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Mar 2023 21:43:08 -0400 Subject: [PATCH 1258/3335] tweak --- misc/debian.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/debian.func b/misc/debian.func index fff5e559..de4979d3 100644 --- a/misc/debian.func +++ b/misc/debian.func @@ -369,6 +369,7 @@ build_container() { $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then cat <>$LXC_CONFIG From 7d893af4e880845fa2db997090a5cf9918559073 Mon Sep 17 00:00:00 2001 From: Jimi Ford Date: Wed, 22 Mar 2023 20:14:35 -0600 Subject: [PATCH 1259/3335] fix EOF whitespace issue (#1223) --- misc/debian.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/debian.func b/misc/debian.func index de4979d3..38a2d271 100644 --- a/misc/debian.func +++ b/misc/debian.func @@ -387,7 +387,7 @@ EOF cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: -EOF +EOF fi msg_info "Starting LXC Container" pct start "$CTID" From 33cc2d9c992133edd402a128031e0b2774338fd5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Mar 2023 22:24:31 -0400 Subject: [PATCH 1260/3335] Update alpine.func fix open bracket --- misc/alpine.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/alpine.func b/misc/alpine.func index b784217c..5e58cfd9 100644 --- a/misc/alpine.func +++ b/misc/alpine.func @@ -353,7 +353,7 @@ build_container() { export APPLICATION="$APP" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" - export CTID=$CT_ID" + export CTID="$CT_ID" export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" From baa9bb9e2ea7ea1d198488d182c5e14c5b9945f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 00:09:04 -0400 Subject: [PATCH 1261/3335] code refactoring --- ct/adguard.sh | 2 +- ct/audiobookshelf.sh | 2 +- ct/autobrr.sh | 2 +- ct/blocky.sh | 2 +- ct/changedetection.sh | 2 +- ct/cronicle.sh | 2 +- ct/daemonsync.sh | 2 +- ct/dashy.sh | 2 +- ct/debian.sh | 2 +- ct/deconz.sh | 2 +- ct/deluge.sh | 2 +- ct/devuan.sh | 2 +- ct/emby.sh | 2 +- ct/emqx.sh | 2 +- ct/esphome.sh | 2 +- ct/go2rtc.sh | 2 +- ct/grafana.sh | 2 +- ct/grocy.sh | 2 +- ct/heimdalldashboard.sh | 2 +- ct/homeassistant-core.sh | 2 +- ct/homeassistant.sh | 2 +- ct/homebridge.sh | 2 +- ct/homepage.sh | 2 +- ct/homer.sh | 2 +- ct/hyperion.sh | 2 +- ct/influxdb.sh | 2 +- ct/iobroker.sh | 2 +- ct/jackett.sh | 2 +- ct/jellyfin.sh | 2 +- ct/k0s.sh | 2 +- ct/kavita.sh | 2 +- ct/keycloak.sh | 2 +- ct/lidarr.sh | 2 +- ct/magicmirror.sh | 2 +- ct/mariadb.sh | 2 +- ct/meshcentral.sh | 2 +- ct/motioneye.sh | 2 +- ct/mqtt.sh | 2 +- ct/n8n.sh | 2 +- ct/navidrome.sh | 2 +- ct/nextcloudpi.sh | 2 +- ct/nginxproxymanager.sh | 2 +- ct/nocodb.sh | 2 +- ct/node-red.sh | 2 +- ct/omada.sh | 2 +- ct/omv.sh | 2 +- ct/openhab.sh | 2 +- ct/paperless-ngx.sh | 2 +- ct/photoprism.sh | 2 +- ct/pihole.sh | 2 +- ct/plex.sh | 2 +- ct/podman-homeassistant.sh | 2 +- ct/podman.sh | 2 +- ct/postgresql.sh | 2 +- ct/prometheus.sh | 2 +- ct/prowlarr.sh | 2 +- ct/qbittorrent.sh | 2 +- ct/radarr.sh | 2 +- ct/readarr.sh | 2 +- ct/rockylinux.sh | 2 +- ct/rstptoweb.sh | 2 +- ct/sabnzbd.sh | 2 +- ct/scrypted.sh | 2 +- ct/shinobi.sh | 2 +- ct/sonarr.sh | 2 +- ct/syncthing.sh | 2 +- ct/tdarr.sh | 2 +- ct/technitiumdns.sh | 2 +- ct/transmission.sh | 2 +- ct/trilium.sh | 2 +- ct/ubuntu.sh | 2 +- ct/unifi.sh | 2 +- ct/uptimekuma.sh | 2 +- ct/vaultwarden.sh | 2 +- ct/whisparr.sh | 2 +- ct/whoogle.sh | 2 +- ct/wikijs.sh | 2 +- ct/wireguard.sh | 2 +- ct/yunohost.sh | 2 +- ct/zigbee2mqtt.sh | 2 +- ct/zwave-js-ui.sh | 2 +- misc/{debian.func => build.func} | 43 ++++++++++++++++++++++++++------ 82 files changed, 117 insertions(+), 88 deletions(-) rename misc/{debian.func => build.func} (90%) diff --git a/ct/adguard.sh b/ct/adguard.sh index 682fc877..e8c65085 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 7e1de964..558dbc44 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 7571c138..3261b560 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/blocky.sh b/ct/blocky.sh index cfa21ed8..08e769e8 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 3f94891c..c8da20ae 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 85019ee5..da4f1550 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 5b0a2ee6..d13e5b40 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/dashy.sh b/ct/dashy.sh index 63338364..5c76cf70 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/debian.sh b/ct/debian.sh index 3ece2f2a..b67a0a26 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/deconz.sh b/ct/deconz.sh index d43073f8..6195bd10 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/deluge.sh b/ct/deluge.sh index da8ce1eb..0b3ce6c4 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/devuan.sh b/ct/devuan.sh index 6c51b605..db48bf4e 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/emby.sh b/ct/emby.sh index dd296190..2e617cfb 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/emqx.sh b/ct/emqx.sh index 69afa53d..7c0ffcd9 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/esphome.sh b/ct/esphome.sh index 1c25bd4f..cd6e56d2 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index ebd1fade..58b82f5c 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/grafana.sh b/ct/grafana.sh index f908c465..3de34626 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/grocy.sh b/ct/grocy.sh index bf7a05b8..dd30c554 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 3a631eeb..aad87f46 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 68cbf783..261089a6 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 1bb58440..590a9bf6 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/homebridge.sh b/ct/homebridge.sh index ebc25192..22039d22 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/homepage.sh b/ct/homepage.sh index 90538100..e8041087 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/homer.sh b/ct/homer.sh index 13d2b64b..217b2800 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 64b0fa33..92535765 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 44b3eddb..f6c078cf 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 31b5a552..841f135e 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/jackett.sh b/ct/jackett.sh index ec991c7d..f895f4d7 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index c4bdef50..d11b8212 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/k0s.sh b/ct/k0s.sh index 710dd461..75b5648a 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/kavita.sh b/ct/kavita.sh index b80d4728..8410daa7 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 98ae1938..4488dd1a 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/lidarr.sh b/ct/lidarr.sh index c8cf9b26..6bc88997 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 408e1107..c57121c2 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 04b0ba93..d6894ed9 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 7d544d0b..2739b517 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 6dc03205..4a106f03 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/mqtt.sh b/ct/mqtt.sh index d0ccf349..0dde1c0e 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/n8n.sh b/ct/n8n.sh index 944d0fe3..d4862ef1 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 2aef956b..c9e53584 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 6f887d8c..a1718208 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 215e8e24..99b95e30 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 50677ceb..4b7636f6 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/node-red.sh b/ct/node-red.sh index b625d323..3dba9183 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/omada.sh b/ct/omada.sh index 40eea690..104183df 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/omv.sh b/ct/omv.sh index f370db72..532df042 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/openhab.sh b/ct/openhab.sh index 6e3357a6..21a77dc7 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index dadc2f51..d2a9b9d1 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 1e789870..d40335e3 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/pihole.sh b/ct/pihole.sh index b5de9177..7efeb280 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/plex.sh b/ct/plex.sh index a944d8b6..17a8ecea 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 14947e9d..0f0182e2 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/podman.sh b/ct/podman.sh index ef57de78..dd25f057 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 1275649a..754ced8b 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/prometheus.sh b/ct/prometheus.sh index c1514477..4bc71930 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index a61d6144..b0dffde3 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index d5e20ddf..83cc8526 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/radarr.sh b/ct/radarr.sh index 0664fc5d..9ddd1b45 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/readarr.sh b/ct/readarr.sh index 3ac5ee57..deca401d 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index eb955c9d..d9c97165 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh index b3e9dfb5..1c1bb453 100644 --- a/ct/rstptoweb.sh +++ b/ct/rstptoweb.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 2f1a8c1b..195e7955 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/scrypted.sh b/ct/scrypted.sh index c10a33be..45de42d4 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 23020d04..dd27cd59 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/sonarr.sh b/ct/sonarr.sh index e8152274..c6bceefa 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/syncthing.sh b/ct/syncthing.sh index e26dbd56..d7bf2724 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/tdarr.sh b/ct/tdarr.sh index ba2f9149..cb1e415a 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index fbe2c925..7233ca55 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/transmission.sh b/ct/transmission.sh index 86d45292..8b4c06a0 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/trilium.sh b/ct/trilium.sh index dd2b2578..4ed13fca 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 9fce57ed..81501e20 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ubuntu.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/unifi.sh b/ct/unifi.sh index c5993242..19cb57e2 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 86644bf9..467f927c 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 3a9aed9a..28d7150c 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 7c3adbe4..4ae3b249 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/whoogle.sh b/ct/whoogle.sh index e1bf927c..488babeb 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 377eeba0..96a2e4dd 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/wireguard.sh b/ct/wireguard.sh index cfd017be..02bef523 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 931ad446..1d202995 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 2030a5dd..243b7d7b 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 7dc9ec31..bfecfad7 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/debian.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/misc/debian.func b/misc/build.func similarity index 90% rename from misc/debian.func rename to misc/build.func index 38a2d271..3f594990 100644 --- a/misc/debian.func +++ b/misc/build.func @@ -67,6 +67,9 @@ arch_check() { } echo_default() { + if [ "$var_os" == "ubuntu" ]; then + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + fi echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -95,6 +98,19 @@ exit-script() { } advanced_settings() { + if [ "$var_os" == "ubuntu" ]; then + if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ + "18.04" "Bionic" OFF \ + "20.04" "Focal" ON \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" + else + exit-script + fi + fi + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ @@ -346,7 +362,7 @@ build_container() { fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/install.func)" export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" @@ -368,11 +384,12 @@ build_container() { -unprivileged $CT_TYPE $PW " - bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit + bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG + if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" ]]; then + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm @@ -383,16 +400,28 @@ 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 - else - cat <>$LXC_CONFIG + fi + fi + + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" ]]; then + cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF + fi fi + msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/install/$var_install.sh)" || exit } @@ -401,4 +430,4 @@ description() { pct set "$CTID" -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " -} +} \ No newline at end of file From 36f610127b679ae8ecdb6aec2fb4ed60650b4e3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 00:17:04 -0400 Subject: [PATCH 1262/3335] Delete ubuntu.func --- misc/ubuntu.func | 428 ----------------------------------------------- 1 file changed, 428 deletions(-) delete mode 100644 misc/ubuntu.func diff --git a/misc/ubuntu.func b/misc/ubuntu.func deleted file mode 100644 index 04695499..00000000 --- a/misc/ubuntu.func +++ /dev/null @@ -1,428 +0,0 @@ -variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') - var_install="${NSAPP}-install" - timezone=$(cat /etc/timezone) - INTEGER='^[0-9]+([.][0-9]+)?$' -} - -color() { - YW=$(echo "\033[33m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") - CL=$(echo "\033[m") - CM="${GN}✓${CL}" - CROSS="${RD}✗${CL}" - BFR="\\r\\033[K" - HOLD="-" -} - -catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -} - -error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -pve_check() { - if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -echo_default() { - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -advanced_settings() { - if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" - else - exit-script - fi - - if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - else - exit-script - fi - - if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - exit-script - fi - - if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi - else - exit - fi - - if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - exit-script - fi - - if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi - else - exit-script - fi - - if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit-script - fi - - if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi - else - exit-script - fi - - if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi - else - exit-script - fi - - if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi - else - exit-script - fi - - if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - exit-script - fi - - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" - else - DISABLEIP6="no" - fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - - if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - exit-script - fi - - if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - else - exit-script - fi - - if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - else - exit-script - fi - - if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - else - exit-script - fi - - if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - exit-script - fi - - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" - else - SSH="no" - fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" - else - VERB="no" - fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -install_script() { - arch_check - pve_check - NEXTID=$(pvesh get /cluster/nextid) - header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -start() { - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script - fi - - if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script - fi -} - -build_container() { - if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" - export tz="$timezone" - export DISABLEIPV6="$DISABLEIP6" - export APPLICATION="$APP" - export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" - export CTID="$CT_ID" - export PCT_OSTYPE="$var_os" - export PCT_OSVERSION="$var_version" - export PCT_DISK_SIZE="$DISK_SIZE" - export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW - " - bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" ]]; then - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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" ]]; then - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file -EOF - fi - fi - - msg_info "Starting LXC Container" - pct start "$CTID" - msg_ok "Started LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit - -} - -description() { - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "# ${APP} LXC - ### https://tteck.github.io/Proxmox/ - " -} From d3b7ccc33324d57b98034b17e80f87fecebdb6a4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 00:28:47 -0400 Subject: [PATCH 1263/3335] Update pull_request_template.md --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ad7ef3fc..4bf88433 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -# All Pull Requests should be made to the `pull-requests` branch +## I wanted to make you aware that I am meticulous when it comes to merging code into the main branch, so please don't take it personally if I reject your request. ## Description From 3d6eea583187a4c9c2ccb095c2b12df4360252cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 04:22:01 -0400 Subject: [PATCH 1264/3335] indent --- misc/build.func | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index 3f594990..b5516b47 100644 --- a/misc/build.func +++ b/misc/build.func @@ -68,7 +68,7 @@ arch_check() { echo_default() { if [ "$var_os" == "ubuntu" ]; then - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" + echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" fi echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" @@ -106,8 +106,8 @@ advanced_settings() { "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3); then echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" - else - exit-script + else + exit-script fi fi @@ -385,7 +385,7 @@ build_container() { $PW " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/ct/create_lxc.sh)" || exit - + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" ]]; then @@ -430,4 +430,4 @@ description() { pct set "$CTID" -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " -} \ No newline at end of file +} From ddc8c69e952e531fe55de628d671484b752c626f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 04:41:35 -0400 Subject: [PATCH 1265/3335] Update build.func fix --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index b5516b47..75bb5243 100644 --- a/misc/build.func +++ b/misc/build.func @@ -421,7 +421,7 @@ EOF msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/install/$var_install.sh)" || exit + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit } From 98e88174ce5bbb24b7088ac93c28331357121d6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 04:50:06 -0400 Subject: [PATCH 1266/3335] Update build.func --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 75bb5243..977d4706 100644 --- a/misc/build.func +++ b/misc/build.func @@ -362,7 +362,7 @@ build_container() { fi TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" @@ -384,7 +384,7 @@ build_container() { -unprivileged $CT_TYPE $PW " - bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/ct/create_lxc.sh)" || exit + bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then From 8cdff0aca5009f62bce7e5cb7c68baa4d5d3679e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 05:14:02 -0400 Subject: [PATCH 1267/3335] fix core update --- ct/homeassistant-core.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 261089a6..a8429ed7 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -68,12 +68,12 @@ function update_script() { if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then clear header_info - echo -e "${GN}Updating to Version ${BETA}${CL}" + echo -e "${GN}Updating to Beta Version${CL}" BR="--pre " else clear header_info - echo -e "${GN}Updating to Version ${STABLE}${CL}" + echo -e "${GN}Updating to Srable Version${CL}" BR="" fi if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi @@ -125,7 +125,7 @@ ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant [Install] WantedBy=default.target" >$service_path - systemctl enable --now filebrowser.service &>/dev/null + systemctl enable --now -q filebrowser.service msg_ok "Created Service" msg_ok "Completed Successfully!\n" From dab04f23a307f426995feb699f233d79d1a0a320 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Thu, 23 Mar 2023 10:20:36 +0100 Subject: [PATCH 1268/3335] Consistency to all other Alpine Menus (#1230) that was the only script with the "Exit-Script" for the Alpine ones. Now it is consistent --- ct/alpine-grafana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 4dd13bda..c1811d10 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -55,7 +55,7 @@ function update_script() { LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) while true; do CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" --cancel-button Exit-Script 11 58 3 \ + whiptail --title "SUPPORT" --menu "Select option" 11 58 3 \ "1" "Check for Grafana Updates" \ "2" "Allow 0.0.0.0 for listening" \ "3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3 From 8500e495b00117651449896f6289fc8aec8c4b21 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 07:07:49 -0400 Subject: [PATCH 1269/3335] add Docker LXCs to build.func & tweaks --- ct/casaos.sh | 2 +- ct/docker.sh | 2 +- ct/homeassistant.sh | 1 + ct/paperless-ngx.sh | 1 - ct/photoprism.sh | 1 - ct/pihole.sh | 1 - ct/plex.sh | 1 - ct/podman-homeassistant.sh | 1 - ct/podman.sh | 1 - ct/postgresql.sh | 1 - ct/prometheus.sh | 1 - ct/prowlarr.sh | 1 - ct/radarr.sh | 1 - ct/readarr.sh | 1 - ct/rockylinux.sh | 1 - ct/sabnzbd.sh | 1 - ct/scrypted.sh | 1 - ct/shinobi.sh | 1 - ct/sonarr.sh | 1 - ct/syncthing.sh | 1 - ct/tdarr.sh | 1 - ct/technitiumdns.sh | 1 - ct/transmission.sh | 1 - ct/trilium.sh | 1 - ct/ubuntu.sh | 1 - ct/umbrel.sh | 3 +-- ct/unifi.sh | 1 - ct/uptimekuma.sh | 1 - ct/vaultwarden.sh | 1 - ct/whisparr.sh | 1 - ct/whoogle.sh | 1 - ct/wikijs.sh | 1 - ct/wireguard.sh | 1 - ct/yunohost.sh | 1 - ct/zigbee2mqtt.sh | 1 - ct/zwave-js-ui.sh | 1 - misc/build.func | 34 ++++++++++++++++++++++++++++++---- 37 files changed, 34 insertions(+), 40 deletions(-) diff --git a/ct/casaos.sh b/ct/casaos.sh index e7bcf8e2..c98a025d 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docker.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/docker.sh b/ct/docker.sh index 37ca3808..1805787c 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docker.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 590a9bf6..ac667247 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -46,6 +46,7 @@ function default_settings() { MAC="" VLAN="" SSH="no" + FUSE="no" VERB="no" echo_default } diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index d2a9b9d1..09d46d45 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ / __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __ / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/___/ __ \/ __ `/ |/_/ diff --git a/ct/photoprism.sh b/ct/photoprism.sh index d40335e3..231f7d1e 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ ______ __________ ____ ____ _________ __ ___ / __ \/ / / / __ \/_ __/ __ \/ __ \/ __ \/ _/ ___// |/ / / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ / diff --git a/ct/pihole.sh b/ct/pihole.sh index 7efeb280..07e786ea 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ ____ __ ______ __ ______ / __ \/ _/ / / / / __ \/ / / ____/ / /_/ // /___/ /_/ / / / / / / __/ diff --git a/ct/plex.sh b/ct/plex.sh index 17a8ecea..48d12505 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ __ ___ ___ _____ / __ \/ /__ _ __ / |/ /__ ____/ (_)___ _ / ___/___ ______ _____ _____ / /_/ / / _ \| |/_/ / /|_/ / _ \/ __ / / __ `/ \__ \/ _ \/ ___/ | / / _ \/ ___/ diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 0f0182e2..be35917e 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ / __ \____ ____/ /___ ___ ____ _____ / /_/ / __ \/ __ / __ __ \/ __ / __ \ diff --git a/ct/podman.sh b/ct/podman.sh index dd25f057..b4297c51 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ / __ \____ ____/ /___ ___ ____ _____ / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 754ced8b..f0b606a1 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ _____ ____ __ / __ \____ _____/ /_____ _________ / ___// __ \ / / / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 4bc71930..16f17758 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ __ / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index b0dffde3..2c323541 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ / __ \_________ _ __/ /___ __________ / /_/ / ___/ __ \ | /| / / / __ `/ ___/ ___/ diff --git a/ct/radarr.sh b/ct/radarr.sh index 9ddd1b45..a379e8ac 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ / __ \____ _____/ /___ __________ / /_/ / __ `/ __ / __ `/ ___/ ___/ diff --git a/ct/readarr.sh b/ct/readarr.sh index deca401d..bea527d0 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ / __ \___ ____ _____/ /___ __________ / /_/ / _ \/ __ `/ __ / __ `/ ___/ ___/ diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index d9c97165..edc69291 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ __ __ _ / __ \____ _____/ /____ __ / / (_)___ __ ___ __ / /_/ / __ \/ ___/ //_/ / / / / / / / __ \/ / / / |/_/ diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 195e7955..ea75032d 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ ___ ____ __ __ / ___// | / __ )____ ____ / /_ ____/ / \__ \/ /| | / __ / __ \/_ / / __ \/ __ / diff --git a/ct/scrypted.sh b/ct/scrypted.sh index 45de42d4..d307d78c 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ __ __ / ___/____________ ______ / /____ ____/ / \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / diff --git a/ct/shinobi.sh b/ct/shinobi.sh index dd27cd59..bc5572e6 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ __ _ __ _ / ___// /_ (_)___ ____ / /_ (_) \__ \/ __ \/ / __ \/ __ \/ __ \/ / diff --git a/ct/sonarr.sh b/ct/sonarr.sh index c6bceefa..ac6f2399 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ / ___/____ ____ ____ __________ \__ \/ __ \/ __ \/ __ `/ ___/ ___/ diff --git a/ct/syncthing.sh b/ct/syncthing.sh index d7bf2724..292cf4db 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ __ __ _ / ___/__ ______ _____/ /_/ /_ (_)___ ____ _ \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ diff --git a/ct/tdarr.sh b/ct/tdarr.sh index cb1e415a..994ae3db 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ __ /_ __/___/ /___ __________ / / / __ / __ `/ ___/ ___/ diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index 7233ca55..f947cd07 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ __ _ __ _ ____ _ _______ /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ / __ \/ | / / ___/ / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ diff --git a/ct/transmission.sh b/ct/transmission.sh index 8b4c06a0..94e654d6 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ _ _ /_ __/________ _____ _________ ___ (_)_________(_)___ ____ / / / ___/ __ `/ __ \/ ___/ __ `__ \/ / ___/ ___/ / __ \/ __ \ diff --git a/ct/trilium.sh b/ct/trilium.sh index 4ed13fca..3e15c458 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ _ ___ /_ __/____(_) (_)_ ______ ___ / / / ___/ / / / / / / __ `__ \ diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 81501e20..bc2f0cc6 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - __ ____ __ / / / / /_ __ ______ / /___ __ / / / / __ \/ / / / __ \/ __/ / / / diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 796693ce..46ed1aa2 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docker.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/docke function header_info { clear cat <<"EOF" - __ __ __ __ / / / /___ ___ / /_ ________ / / / / / / __ `__ \/ __ \/ ___/ _ \/ / diff --git a/ct/unifi.sh b/ct/unifi.sh index 19cb57e2..542f1f87 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - __ __ _ _____ / / / /__ (_) __(_) / / / / __ \/ / /_/ / diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 467f927c..4f64ecc3 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - __ __ __ _ __ __ / / / /___ / /_(_)___ ___ ___ / //_/_ ______ ___ ____ _ / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 28d7150c..8f887956 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _ __ ____ _ __ __ | | / /___ ___ __/ / /| | / /___ __________/ /__ ____ | | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \ diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 4ae3b249..c616282a 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _ ____ _ | | / / /_ (_)________ ____ __________ | | /| / / __ \/ / ___/ __ \/ __ `/ ___/ ___/ diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 488babeb..e93b19d7 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _ ____ ______ ____ ________ ______ | | / / / / / __ \/ __ \/ ____/ / / ____/ | | /| / / /_/ / / / / / / / / __/ / / __/ diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 96a2e4dd..e1ac9863 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _ ___ __ _ _ | | / (_) /__(_) (_)____ | | /| / / / //_/ / / / ___/ diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 02bef523..553de4e5 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _ ___ ______ __ | | / (_)_______ / ____/_ ______ __________/ / | | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ / diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 1d202995..22198999 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - __ __ __ __ __ \ \/ /_ ______ ____ / / / /___ _____/ /_ \ / / / / __ \/ __ \/ /_/ / __ \/ ___/ __/ diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 243b7d7b..c1c59ff0 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ _ __ ___ __ _______ ____________ /__ / (_)___ _/ /_ ___ ___ |__ \ / |/ / __ \/_ __/_ __/ / / / / __ / __ \/ _ \/ _ \__/ // /|_/ / / / / / / / / diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index bfecfad7..ed8c0d64 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -8,7 +8,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ _______ __ ______ /__ /_ ______ __ _____ / / ___/ / / / / _/ / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / diff --git a/misc/build.func b/misc/build.func index 977d4706..24336f62 100644 --- a/misc/build.func +++ b/misc/build.func @@ -87,6 +87,9 @@ echo_default() { echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" + fi echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -300,6 +303,15 @@ advanced_settings() { fi echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" + else + FUSE="no" + fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else @@ -355,15 +367,29 @@ start() { build_container() { if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" + + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + if [ "$FUSE" == "yes" ]; then + FEATURES="fuse=1,keyctl=1,nesting=1" + else + FEATURES="keyctl=1,nesting=1" + fi fi + if [[ "$APP" != "Docker" && "$APP" != "Umbrel" && "$APP" != "CasaOS" && "$APP" != "Home Assistant"]]; then + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" + fi + fi + TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" export tz="$timezone" + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + export ST="$FUSE" + fi export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" export VERBOSE="$VERB" From 3d6b65895a30050d7b42880c16d9a259865238ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 07:18:14 -0400 Subject: [PATCH 1270/3335] Update build.func revert --- misc/build.func | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/misc/build.func b/misc/build.func index 24336f62..977d4706 100644 --- a/misc/build.func +++ b/misc/build.func @@ -87,9 +87,6 @@ echo_default() { echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - fi echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -303,15 +300,6 @@ advanced_settings() { fi echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" - else - FUSE="no" - fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else @@ -367,29 +355,15 @@ start() { build_container() { if [ "$VERB" == "yes" ]; then set -x; fi - - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - if [ "$FUSE" == "yes" ]; then - FEATURES="fuse=1,keyctl=1,nesting=1" - else - FEATURES="keyctl=1,nesting=1" - fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="nesting=1,keyctl=1" + else + FEATURES="nesting=1" fi - if [[ "$APP" != "Docker" && "$APP" != "Umbrel" && "$APP" != "CasaOS" && "$APP" != "Home Assistant"]]; then - if [ "$CT_TYPE" == "1" ]; then - FEATURES="keyctl=1,nesting=1" - else - FEATURES="nesting=1" - fi - fi - TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" export tz="$timezone" - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - export ST="$FUSE" - fi export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" export VERBOSE="$VERB" From 3d6e1a27707b92c1ee61de4bd3d675ded08cd577 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 07:33:03 -0400 Subject: [PATCH 1271/3335] Update build.func update --- misc/build.func | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 977d4706..79e87246 100644 --- a/misc/build.func +++ b/misc/build.func @@ -87,6 +87,9 @@ echo_default() { echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" + fi echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -300,6 +303,15 @@ advanced_settings() { fi echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + FUSE="yes" + else + FUSE="no" + fi + echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" + fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else @@ -355,15 +367,29 @@ start() { build_container() { if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" + + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + if [ "$FUSE" == "yes" ]; then + FEATURES="fuse=1,keyctl=1,nesting=1" + else + FEATURES="keyctl=1,nesting=1" + fi fi + if [[ "$APP" != "Docker" && "$APP" != "Umbrel" && "$APP" != "CasaOS" && "$APP" != "Home Assistant" ]]; then + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" + fi + fi + TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" export tz="$timezone" + if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then + export ST="$FUSE" + fi export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" export VERBOSE="$VERB" From ac82a25d4c4951283b5027f5c87abd88a15bab99 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 10:19:26 -0400 Subject: [PATCH 1272/3335] fix update --- ct/alpine-docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 21bd2144..8545582a 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -51,6 +51,7 @@ function default_settings() { echo_default } +function update_script() { while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ @@ -69,6 +70,7 @@ while true; do ;; esac done +} start build_container From bb30640180d222365346ea7086c022b353fcab35 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 10:35:48 -0400 Subject: [PATCH 1273/3335] Update alpine-docker.sh indent update --- ct/alpine-docker.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 8545582a..c01b79e0 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -52,24 +52,24 @@ function default_settings() { } function update_script() { -while true; do - CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ - "1" "Check for Docker Updates" 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - clear - exit-script - fi - header_info - case $CHOICE in - 1) - apk update && apk upgrade - exit - ;; - esac -done + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + "1" "Check for Docker Updates" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + esac + done } start From b4ced6ced633dd4b69cdc0b683bf5031a9d9d016 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 11:03:53 -0400 Subject: [PATCH 1274/3335] Delete docker.func --- misc/docker.func | 409 ----------------------------------------------- 1 file changed, 409 deletions(-) delete mode 100644 misc/docker.func diff --git a/misc/docker.func b/misc/docker.func deleted file mode 100644 index 702f598e..00000000 --- a/misc/docker.func +++ /dev/null @@ -1,409 +0,0 @@ -variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') - var_install="${NSAPP}-install" - timezone=$(cat /etc/timezone) - INTEGER='^[0-9]+([.][0-9]+)?$' -} - -color() { - YW=$(echo "\033[33m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") - CL=$(echo "\033[m") - CM="${GN}✓${CL}" - CROSS="${RD}✗${CL}" - BFR="\\r\\033[K" - HOLD="-" -} - -catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -} - -error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -pve_check() { - if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -echo_default() { - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -advanced_settings() { - if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - else - exit-script - fi - - if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - exit-script - fi - - if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi - else - exit - fi - - if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - exit-script - fi - - if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi - else - exit-script - fi - - if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit-script - fi - - if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi - else - exit-script - fi - - if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi - else - exit-script - fi - - if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi - else - exit-script - fi - - if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - exit-script - fi - - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" - else - DISABLEIP6="no" - fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - - if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - exit-script - fi - - if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - else - exit-script - fi - - if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - else - exit-script - fi - - if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - else - exit-script - fi - - if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - exit-script - fi - - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" - else - SSH="no" - fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" - else - FUSE="no" - fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" - else - VERB="no" - fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -install_script() { - arch_check - pve_check - NEXTID=$(pvesh get /cluster/nextid) - header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -start() { - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script - fi - - if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script - fi -} - -build_container() { - if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$FUSE" == "yes" ]; then - FEATURES="fuse=1,keyctl=1,nesting=1" - else - FEATURES="keyctl=1,nesting=1" - fi - TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" - export tz="$timezone" - export ST="$FUSE" - export DISABLEIPV6="$DISABLEIP6" - export APPLICATION="$APP" - export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" - export CTID="$CT_ID" - export PCT_OSTYPE="$var_os" - export PCT_OSVERSION="$var_version" - export PCT_DISK_SIZE="$DISK_SIZE" - export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW - " - bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -EOF - if [ "$CT_TYPE" == "0" ]; then - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 - msg_info "Starting LXC Container" - pct start "$CTID" - msg_ok "Started LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit - -} - -description() { - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "# ${APP} LXC - ### https://tteck.github.io/Proxmox/ - " -} From 190cdf58589aae71dc8b299c88789d2033450eed Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 12:31:19 -0400 Subject: [PATCH 1275/3335] Update build.func move variable --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 79e87246..a4e63753 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1,7 +1,6 @@ variables() { NSAPP=$(echo ${APP,,} | tr -d ' ') var_install="${NSAPP}-install" - timezone=$(cat /etc/timezone) INTEGER='^[0-9]+([.][0-9]+)?$' } @@ -333,6 +332,7 @@ install_script() { arch_check pve_check NEXTID=$(pvesh get /cluster/nextid) + timezone=$(cat /etc/timezone) header_info if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info From 2c6c2a7dfe08cb8e887dd2f43bdc1df78cb62172 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 12:32:10 -0400 Subject: [PATCH 1276/3335] Update alpine-adguard.sh use build.func --- ct/alpine-adguard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 4604fbcb..39e27995 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT From 21a842eacd92247f32d16488e46229a8f31996dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 12:41:01 -0400 Subject: [PATCH 1277/3335] add alpine to build.func --- misc/build.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/build.func b/misc/build.func index a4e63753..02631526 100644 --- a/misc/build.func +++ b/misc/build.func @@ -447,6 +447,9 @@ EOF msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" + if [ "$var_os" == "alpine" ]; then + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + fi lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit } From 3c74788eb5211efad50556d2d918c3e6487529fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 12:51:53 -0400 Subject: [PATCH 1278/3335] set alpine FUNCTIONS_FILE_PATH in build.func --- misc/build.func | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/build.func b/misc/build.func index 02631526..88375fa3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -385,7 +385,11 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null + if [ "$var_os" == "alpine" ]; then + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" + else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" + fi export tz="$timezone" if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then export ST="$FUSE" From 8e3731de0cca69e428a5acce23d3385ff9202483 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 12:56:13 -0400 Subject: [PATCH 1279/3335] use build.func --- ct/alpine-vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 0f6c9930..d51d7ad9 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT From a73ae028184ea249c04943b93a3bd24cdc77d94d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 13:02:16 -0400 Subject: [PATCH 1280/3335] switch alpine to build.func --- ct/alpine-docker.sh | 2 +- ct/alpine-grafana.sh | 2 +- ct/alpine-zigbee2mqtt.sh | 2 +- ct/alpine.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index c01b79e0..9d8ee785 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index c1811d10..ea7fd804 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 28bcaf3b..cd44e350 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT diff --git a/ct/alpine.sh b/ct/alpine.sh index 19074a97..a3348a9f 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT From b5ac68a22b25498180bcfe1441585bc3a1416044 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 13:38:15 -0400 Subject: [PATCH 1281/3335] Delete alpine.func --- misc/alpine.func | 400 ----------------------------------------------- 1 file changed, 400 deletions(-) delete mode 100644 misc/alpine.func diff --git a/misc/alpine.func b/misc/alpine.func deleted file mode 100644 index 5e58cfd9..00000000 --- a/misc/alpine.func +++ /dev/null @@ -1,400 +0,0 @@ -variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') - var_install="${NSAPP}-install" - INTEGER='^[0-9]+([.][0-9]+)?$' -} - -color() { - YW=$(echo "\033[33m") - BL=$(echo "\033[36m") - RD=$(echo "\033[01;31m") - BGN=$(echo "\033[4;92m") - GN=$(echo "\033[1;92m") - DGN=$(echo "\033[32m") - CL=$(echo "\033[m") - CM="${GN}✓${CL}" - CROSS="${RD}✗${CL}" - BFR="\\r\\033[K" - HOLD="-" -} - -catch_errors() { - set -Eeuo pipefail - trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -} - -error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -pve_check() { - if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -echo_default() { - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - echo -e "${DGN}Using Root Password: ${BGN}alpine${CL}" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -advanced_settings() { - if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - else - exit-script - fi - - if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - exit-script - fi - - if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi - else - exit - fi - - if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - exit-script - fi - - if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi - else - exit-script - fi - - if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit-script - fi - - if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi - else - exit-script - fi - - if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi - else - exit-script - fi - - if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi - else - exit-script - fi - - if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - exit-script - fi - - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" - else - DISABLEIP6="no" - fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - - if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - exit-script - fi - - if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" - else - exit-script - fi - - if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" - else - exit-script - fi - - if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - else - exit-script - fi - - if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - exit-script - fi - - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" - else - SSH="no" - fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" - else - VERB="no" - fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" - else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -install_script() { - arch_check - pve_check - timezone=$(cat /etc/timezone) - NEXTID=$(pvesh get /cluster/nextid) - header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -start() { - if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script - fi - - if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - set +e - update_script - fi -} - -build_container() { - if [ "$VERB" == "yes" ]; then set -x; fi - if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" - else - FEATURES="nesting=1" - fi - TEMP_DIR=$(mktemp -d) - pushd $TEMP_DIR >/dev/null - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" - export tz="$timezone" - export DISABLEIPV6="$DISABLEIP6" - export APPLICATION="$APP" - export VERBOSE="$VERB" - export SSH_ROOT="${SSH}" - export CTID="$CT_ID" - export PCT_OSTYPE="$var_os" - export PCT_OSVERSION="$var_version" - export PCT_DISK_SIZE="$DISK_SIZE" - export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW - " - bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit - if [ "$CT_TYPE" == "0" ]; then - LXC_CONFIG=/etc/pve/lxc/${CTID}.conf - cat <>$LXC_CONFIG -lxc.cgroup2.devices.allow: a -lxc.cap.drop: -lxc.cgroup2.devices.allow: c 188:* rwm -lxc.cgroup2.devices.allow: c 189:* rwm -lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir -lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file -lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file -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 - msg_info "Starting LXC Container" - pct start "$CTID" - msg_ok "Started LXC Container" - pct exec "$CTID" -- ash -c "apk add bash >/dev/null" - lxc-attach -n "$CTID" -- bash -c "$(wget -qO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit - -} - -description() { - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "# ${APP} LXC - ### https://tteck.github.io/Proxmox/ - " -} From 46ba32c586416f0616754308b7056b71bb988994 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 14:12:48 -0400 Subject: [PATCH 1282/3335] Rename haos-vm-v5.sh to haos-vm.sh --- vm/{haos-vm-v5.sh => haos-vm.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename vm/{haos-vm-v5.sh => haos-vm.sh} (100%) diff --git a/vm/haos-vm-v5.sh b/vm/haos-vm.sh similarity index 100% rename from vm/haos-vm-v5.sh rename to vm/haos-vm.sh From 7987b8697eca156c1cf64abb17fc20ca70b7f806 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 17:08:07 -0400 Subject: [PATCH 1283/3335] Update cronicle.sh remove unexpected token --- ct/cronicle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index da4f1550..9621c991 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -62,7 +62,7 @@ msg_info "Updating ${APP}" /opt/cronicle/bin/control.sh upgrade &>/dev/null msg_ok "Updated ${APP}" exit -fi + if [ "$UPD" == "2" ]; then LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) IP=$(hostname -I | awk '{print $1}') From adf460d5447b809ccddbaf787a13af034b5f6b5f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 17:13:37 -0400 Subject: [PATCH 1284/3335] Update cronicle.sh --- ct/cronicle.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 9621c991..53702989 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -57,12 +57,13 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb "2" "Install ${APP} Worker" OFF \ 3>&1 1>&2 2>&3) +if [ "$UPD" == "1" ]; then header_info msg_info "Updating ${APP}" /opt/cronicle/bin/control.sh upgrade &>/dev/null msg_ok "Updated ${APP}" exit - +fi if [ "$UPD" == "2" ]; then LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) IP=$(hostname -I | awk '{print $1}') From 3abd2a9698a7cb3eb9d183d0eab1aed250bf9252 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Mar 2023 18:18:53 -0400 Subject: [PATCH 1285/3335] Update omv-install.sh fix unattended install --- install/omv-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/omv-install.sh b/install/omv-install.sh index fbc2f03b..be058e99 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -36,8 +36,8 @@ deb https://packages.openmediavault.org/public shaitan main # deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner EOF $STD apt-get update -$STD apt-get -y install openmediavault-keyring -$STD apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends install openmediavault +apt-get -y install openmediavault-keyring &>/dev/null +DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy openmediavault &>/dev/null omv-confdbadm populate msg_ok "Installed OpenMediaVault" From a8675fea6dbf0904d8b883ee95f37a31dcaeb64c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 05:40:31 -0400 Subject: [PATCH 1286/3335] Update sonarr-install.sh fix unattended install --- install/sonarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 52961b31..db1a7bf4 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -25,7 +25,7 @@ msg_info "Installing Sonarr" $STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 sh -c 'echo "deb https://apt.sonarr.tv/debian buster-develop main" > /etc/apt/sources.list.d/sonarr.list' $STD apt-get update -$STD apt-get -o Dpkg::Options::="--force-confold" install -y sonarr +DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null msg_ok "Installed Sonarr" motd_ssh From 851b8458e37be3451603430462ea230ff1a5e1d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 08:07:49 -0400 Subject: [PATCH 1287/3335] Update alpine-vaultwarden.sh tweak --- ct/alpine-vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index d51d7ad9..937e7ac7 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -55,7 +55,7 @@ function update_script() { while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ - "1" "Update VaultWarden" \ + "1" "Update Vaultwarden" \ "2" "Show Admin Token" 3>&2 2>&1 1>&3 ) exit_status=$? From 2b5ff5bb0ed9e238e17dd292f285f1ebada6056b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:23:11 -0400 Subject: [PATCH 1288/3335] Update alpine-adguard.sh add `newt` check --- ct/alpine-adguard.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 39e27995..7b2b79cb 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -52,6 +52,9 @@ function default_settings() { } function update_script() { + if ! apk -e info newt >/dev/null 2>&1; then + apk add newt + fi while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ From 2facedfe71d1ac4655a2f4019f6675d578339a3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:23:58 -0400 Subject: [PATCH 1289/3335] Update alpine-docker.sh add `newt` check --- ct/alpine-docker.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 9d8ee785..ad195e50 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -52,6 +52,9 @@ function default_settings() { } function update_script() { + if ! apk -e info newt >/dev/null 2>&1; then + apk add newt + fi while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ From 0e49af62dff4eb881077e5eea8bc71f6f89a01ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:24:30 -0400 Subject: [PATCH 1290/3335] Update alpine-grafana.sh add `newt` check --- ct/alpine-grafana.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index ea7fd804..170845b7 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -52,6 +52,9 @@ function default_settings() { } function update_script() { + if ! apk -e info newt >/dev/null 2>&1; then + apk add newt + fi LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) while true; do CHOICE=$( From b1abfa9ac6d76b741377fbe7ecbdd093eb0c11dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:26:04 -0400 Subject: [PATCH 1291/3335] Update alpine-vaultwarden.sh add `newt` check --- ct/alpine-vaultwarden.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 937e7ac7..0eddef93 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -52,6 +52,9 @@ function default_settings() { } function update_script() { + if ! apk -e info newt >/dev/null 2>&1; then + apk add -q newt + fi while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ From b10106aa2a8428d9a4a3a271efcfbe2ccc02982b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:27:20 -0400 Subject: [PATCH 1292/3335] Update alpine-zigbee2mqtt.sh add `newt` check --- ct/alpine-zigbee2mqtt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index cd44e350..51ec6030 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -52,6 +52,9 @@ function default_settings() { } function update_script() { + if ! apk -e info newt >/dev/null 2>&1; then + apk add -q newt + fi while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ From d9445a3d642930c9a3ba1d9fd5561468d7d0864c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:27:57 -0400 Subject: [PATCH 1293/3335] Update alpine-adguard.sh -q --- ct/alpine-adguard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 7b2b79cb..f36ca7c4 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -53,7 +53,7 @@ function default_settings() { function update_script() { if ! apk -e info newt >/dev/null 2>&1; then - apk add newt + apk add -q newt fi while true; do CHOICE=$( From 29ff02c742ebffc9c126fc17bb8316acb53e5ec7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:28:19 -0400 Subject: [PATCH 1294/3335] Update alpine-docker.sh -q --- ct/alpine-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index ad195e50..87c04d1c 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -53,7 +53,7 @@ function default_settings() { function update_script() { if ! apk -e info newt >/dev/null 2>&1; then - apk add newt + apk add -q newt fi while true; do CHOICE=$( From e589e28fa410fc952b08d58357e831eb872116f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:28:39 -0400 Subject: [PATCH 1295/3335] Update alpine-grafana.sh -q --- ct/alpine-grafana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 170845b7..dd5283ab 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -53,7 +53,7 @@ function default_settings() { function update_script() { if ! apk -e info newt >/dev/null 2>&1; then - apk add newt + apk add -q newt fi LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) while true; do From 35f5b8413d31bec7b09eeb334d0cbfd9481ae2d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Mar 2023 13:34:25 -0400 Subject: [PATCH 1296/3335] Update homeassistant-core.sh spelling --- ct/homeassistant-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index a8429ed7..858433c2 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -73,7 +73,7 @@ function update_script() { else clear header_info - echo -e "${GN}Updating to Srable Version${CL}" + echo -e "${GN}Updating to Stable Version${CL}" BR="" fi if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi From 6829e1121d505227866ac0a82a1c9293543b2257 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 06:12:45 -0400 Subject: [PATCH 1297/3335] default, no root password for alpine-* install --- ct/alpine-adguard.sh | 2 +- ct/alpine-docker.sh | 2 +- ct/alpine-grafana.sh | 2 +- ct/alpine-vaultwarden.sh | 2 +- ct/alpine-zigbee2mqtt.sh | 2 +- install/alpine-adguard-install.sh | 1 + install/alpine-docker-install.sh | 1 + install/alpine-grafana-install.sh | 1 + install/alpine-vaultwarden-install.sh | 1 + install/alpine-zigbee2mqtt-install.sh | 1 + misc/alpine-install.func | 12 ++++++++++++ 11 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index f36ca7c4..248aa7f2 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -31,7 +31,7 @@ catch_errors function default_settings() { CT_TYPE="1" - PW="-password alpine" + PW="" CT_ID=$NEXTID HN=$NSAPP DISK_SIZE="$var_disk" diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 87c04d1c..a7b08ba6 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -31,7 +31,7 @@ catch_errors function default_settings() { CT_TYPE="1" - PW="-password alpine" + PW="" CT_ID=$NEXTID HN=$NSAPP DISK_SIZE="$var_disk" diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index dd5283ab..7cb26ae6 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -31,7 +31,7 @@ catch_errors function default_settings() { CT_TYPE="1" - PW="-password alpine" + PW="" CT_ID=$NEXTID HN=$NSAPP DISK_SIZE="$var_disk" diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 0eddef93..45ea5390 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -31,7 +31,7 @@ catch_errors function default_settings() { CT_TYPE="1" - PW="-password alpine" + PW="" CT_ID=$NEXTID HN=$NSAPP DISK_SIZE="$var_disk" diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 51ec6030..55df4544 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -31,7 +31,7 @@ catch_errors function default_settings() { CT_TYPE="1" - PW="-password alpine" + PW="" CT_ID=$NEXTID HN=$NSAPP DISK_SIZE="$var_disk" diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh index 4dd81790..aa9b09ae 100644 --- a/install/alpine-adguard-install.sh +++ b/install/alpine-adguard-install.sh @@ -33,3 +33,4 @@ $STD /opt/AdGuardHome/AdGuardHome -s start $STD msg_ok "Installed Alpine-AdGuard" motd_ssh +root \ No newline at end of file diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index ac7dce79..4ed450e5 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -59,3 +59,4 @@ if echo "$prompt" | grep -Eq "^(y|yes)$"; then fi motd_ssh +root \ No newline at end of file diff --git a/install/alpine-grafana-install.sh b/install/alpine-grafana-install.sh index 86f1e97d..d20a7aca 100644 --- a/install/alpine-grafana-install.sh +++ b/install/alpine-grafana-install.sh @@ -29,3 +29,4 @@ $STD rc-update add grafana default msg_ok "Installed Grafana" motd_ssh +root \ No newline at end of file diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 952922e7..6c6f90a5 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -36,3 +36,4 @@ $STD rc-update add vaultwarden default msg_ok "Installed Alpine-Vaultwarden" motd_ssh +root \ No newline at end of file diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index f3698db9..4abf334e 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -26,3 +26,4 @@ $STD apk add zigbee2mqtt msg_ok "Installed Alpine-Zigbee2MQTT" motd_ssh +root \ No newline at end of file diff --git a/misc/alpine-install.func b/misc/alpine-install.func index f2f74a08..af32878f 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -114,3 +114,15 @@ motd_ssh() { $STD /etc/init.d/sshd start fi } + +customize() { + msg_info "Customizing Container" + bash -c "/etc/init.d/syslog stop;rc-update del syslog boot;passwd -d root" >/dev/null 2>&1 + msg_ok "Customized Container" +} + +root() { + if ! getent shadow root | grep -q '^root:[^:]*:\?\$'; then + customize + fi +} \ No newline at end of file From 2e581463806c8c9d563baec048dea1d3e55bb889 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 06:23:17 -0400 Subject: [PATCH 1298/3335] Update build.func rest 5 sec after start container if alpine --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 88375fa3..50ba9e1a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -452,6 +452,7 @@ EOF pct start "$CTID" msg_ok "Started LXC Container" if [ "$var_os" == "alpine" ]; then + sleep 5 pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit From bdc8d02f064f84a8348a962380e7904bb3701e65 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 06:28:42 -0400 Subject: [PATCH 1299/3335] Update alpine-adguard-install.sh tweak --- install/alpine-adguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh index aa9b09ae..33df28ab 100644 --- a/install/alpine-adguard-install.sh +++ b/install/alpine-adguard-install.sh @@ -30,7 +30,7 @@ $STD rm AdGuardHome_linux_amd64.tar.gz $STD chmod +x /opt/AdGuardHome/AdGuardHome $STD /opt/AdGuardHome/AdGuardHome -s install $STD /opt/AdGuardHome/AdGuardHome -s start -$STD msg_ok "Installed Alpine-AdGuard" +msg_ok "Installed Alpine-AdGuard" motd_ssh -root \ No newline at end of file +root From 8e6f6dc28270ca700b9e6fc045b909dd9835e0b0 Mon Sep 17 00:00:00 2001 From: glerak Date: Sat, 25 Mar 2023 12:38:42 +0100 Subject: [PATCH 1300/3335] Update podman-homeassistant.sh (#1251) --- ct/podman-homeassistant.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index be35917e..d916cc95 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -55,7 +55,7 @@ function default_settings() { } function update_script() { - [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update Podman" ON \ "2" "Install HACS" OFF \ From 1f32020d5c791bcbf2650af6bcbf807be7a4a657 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 08:22:24 -0400 Subject: [PATCH 1301/3335] Update alpine-install.func tweak --- misc/alpine-install.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index af32878f..f85d8d83 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -117,7 +117,7 @@ motd_ssh() { customize() { msg_info "Customizing Container" - bash -c "/etc/init.d/syslog stop;rc-update del syslog boot;passwd -d root" >/dev/null 2>&1 + bash -c "passwd -d root" >/dev/null 2>&1 msg_ok "Customized Container" } @@ -125,4 +125,4 @@ root() { if ! getent shadow root | grep -q '^root:[^:]*:\?\$'; then customize fi -} \ No newline at end of file +} From fb08167a832ba1f5f2cac748b3d83e78270b497c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 09:06:32 -0400 Subject: [PATCH 1302/3335] Create alpine-esphome.sh --- ct/alpine-esphome.sh | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 ct/alpine-esphome.sh diff --git a/ct/alpine-esphome.sh b/ct/alpine-esphome.sh new file mode 100644 index 00000000..7d39590a --- /dev/null +++ b/ct/alpine-esphome.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ___________ ____ __ __ + / ____/ ___// __ \/ / / /___ ____ ___ ___ + / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ + / /___ ___/ / ____/ __ / /_/ / / / / / / __/ +/_____//____/_/ /_/ /_/\____/_/ /_/ /_/\___/ + Alpine + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-ESPHome" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="alpine" +var_version="3.17" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + if [[ ! -f /usr/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + "1" "Check for ESPHome Updates" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + esphome stop + pip3 install esphome --upgrade + esphome start + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6052${CL} \n" From a7a1c1717ce6c2e3a0a463fbff3c89fce5007af8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 09:08:07 -0400 Subject: [PATCH 1303/3335] Create alpine-esphome-install.sh --- install/alpine-esphome-install.sh | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 install/alpine-esphome-install.sh diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh new file mode 100644 index 00000000..857243a2 --- /dev/null +++ b/install/alpine-esphome-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +$STD apk add git +msg_ok "Installed Dependencies" + +msg_info "Installing Alpine-ESPHome" +$STD apk add py3-pip +$STD pip3 install esphome +$STD pip3 install tornado esptool +cat </etc/init.d/esphome +#!/sbin/openrc-run + +name="esphome" +description="ESPHome Service" +command="/usr/bin/esphome /root/config/ dashboard" +pidfile="/run/$RC_SVCNAME/pid" + +depend() { + need net +} + +start_pre() { + checkpath --directory --mode 0755 /run/$RC_SVCNAME +} + +start() { + ebegin "Starting $description" + start-stop-daemon --start --quiet --exec $command + eend $? +} + +stop() { + ebegin "Stopping $description" + start-stop-daemon --stop --quiet --exec $command + eend $? +} +EOF + +chmod 755 /etc/init.d/esphome +/etc/init.d/esphome start +rc-update add esphome default +msg_ok "Installed Alpine-ESPHome" + +motd_ssh +root From 38307912f8069f790f800c1c8046670782a58a5a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 09:15:22 -0400 Subject: [PATCH 1304/3335] Update alpine-esphome-install.sh --- install/alpine-esphome-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index 857243a2..15fde305 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -31,6 +31,7 @@ cat </etc/init.d/esphome name="esphome" description="ESPHome Service" +RC_SVCNAME="esphome" command="/usr/bin/esphome /root/config/ dashboard" pidfile="/run/$RC_SVCNAME/pid" From 1e42e065b49f62c17dcd38f95c5e0696e14bb336 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 09:20:18 -0400 Subject: [PATCH 1305/3335] Update alpine-esphome-install.sh --- install/alpine-esphome-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index 15fde305..b8dbf590 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -26,6 +26,7 @@ msg_info "Installing Alpine-ESPHome" $STD apk add py3-pip $STD pip3 install esphome $STD pip3 install tornado esptool +RC_SVCNAME="esphome" cat </etc/init.d/esphome #!/sbin/openrc-run From 18af21a1cc202f96bab9ee56082d99992f93f6ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 09:25:12 -0400 Subject: [PATCH 1306/3335] Update alpine-esphome-install.sh --- install/alpine-esphome-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index b8dbf590..e189e9a2 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -26,22 +26,20 @@ msg_info "Installing Alpine-ESPHome" $STD apk add py3-pip $STD pip3 install esphome $STD pip3 install tornado esptool -RC_SVCNAME="esphome" cat </etc/init.d/esphome #!/sbin/openrc-run name="esphome" description="ESPHome Service" -RC_SVCNAME="esphome" command="/usr/bin/esphome /root/config/ dashboard" -pidfile="/run/$RC_SVCNAME/pid" +pidfile="/run/esphome/pid" depend() { need net } start_pre() { - checkpath --directory --mode 0755 /run/$RC_SVCNAME + checkpath --directory --mode 0755 /run/esphome } start() { From d345712e7b06309dab9e6f529bdf2b9a57f41bfe Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 11:49:10 -0400 Subject: [PATCH 1307/3335] Update alpine-esphome-install.sh --- install/alpine-esphome-install.sh | 37 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index e189e9a2..6a9cecc6 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -26,38 +26,39 @@ msg_info "Installing Alpine-ESPHome" $STD apk add py3-pip $STD pip3 install esphome $STD pip3 install tornado esptool -cat </etc/init.d/esphome -#!/sbin/openrc-run -name="esphome" -description="ESPHome Service" -command="/usr/bin/esphome /root/config/ dashboard" -pidfile="/run/esphome/pid" +service_path="/etc/init.d/esphome" +echo "#!/sbin/openrc-run +name=\"esphome\" +description=\"ESPHome Dashboard\" +command=\"/usr/bin/esphome /root/config/ dashboard\" +command_user=\"root\" +command_background=true +pidfile=\"/run/\$name.pid\" depend() { need net } start_pre() { - checkpath --directory --mode 0755 /run/esphome + checkpath --directory --mode 0755 /run/\$name } start() { - ebegin "Starting $description" - start-stop-daemon --start --quiet --exec $command - eend $? + ebegin \"Starting \$description\" + start-stop-daemon --start --quiet --background --exec /usr/bin/esphome -- /root/config/ dashboard + eend \$? } stop() { - ebegin "Stopping $description" - start-stop-daemon --stop --quiet --exec $command - eend $? -} -EOF + ebegin \"Stopping \$description\" + pkill esphome + eend \$? +}" > $service_path -chmod 755 /etc/init.d/esphome -/etc/init.d/esphome start -rc-update add esphome default +chmod 755 $service_path +$STD rc-update add esphome default +$STD /etc/init.d/esphome start msg_ok "Installed Alpine-ESPHome" motd_ssh From ac62f07362221094c422ed06a6faa4a831239159 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 11:49:59 -0400 Subject: [PATCH 1308/3335] Update alpine-esphome.sh --- ct/alpine-esphome.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/alpine-esphome.sh b/ct/alpine-esphome.sh index 7d39590a..da0534ba 100644 --- a/ct/alpine-esphome.sh +++ b/ct/alpine-esphome.sh @@ -66,9 +66,7 @@ function update_script() { header_info case $CHOICE in 1) - esphome stop pip3 install esphome --upgrade - esphome start exit ;; esac From 86ec03dc35e70d4feb9b925ea7a54146fd499f27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 14:56:07 -0400 Subject: [PATCH 1309/3335] Update alpine-esphome.sh tweak update --- ct/alpine-esphome.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/alpine-esphome.sh b/ct/alpine-esphome.sh index da0534ba..0acbc670 100644 --- a/ct/alpine-esphome.sh +++ b/ct/alpine-esphome.sh @@ -66,7 +66,10 @@ function update_script() { header_info case $CHOICE in 1) - pip3 install esphome --upgrade + msg_info "Updating ESPHome" + pip3 install esphome --upgrade &>/dev/null + rc-service -q esphome restart + msg_ok "Updated Successfully!" exit ;; esac From 642048fb6d9c2306ddea24a9d8ce6d4be20f128e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 14:57:42 -0400 Subject: [PATCH 1310/3335] Update alpine-esphome-install.sh correct openrc --- install/alpine-esphome-install.sh | 37 +++++++++---------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index 6a9cecc6..ca9f4628 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -27,38 +27,21 @@ $STD apk add py3-pip $STD pip3 install esphome $STD pip3 install tornado esptool -service_path="/etc/init.d/esphome" echo "#!/sbin/openrc-run -name=\"esphome\" -description=\"ESPHome Dashboard\" -command=\"/usr/bin/esphome /root/config/ dashboard\" -command_user=\"root\" -command_background=true -pidfile=\"/run/\$name.pid\" - -depend() { - need net -} - -start_pre() { - checkpath --directory --mode 0755 /run/\$name -} - +description=\"ESPHome\" +pidfile=\"/run/esphome.pid\" start() { - ebegin \"Starting \$description\" - start-stop-daemon --start --quiet --background --exec /usr/bin/esphome -- /root/config/ dashboard - eend \$? + esphome dashboard /root/esphome/config/ > /dev/null 2>&1 & + echo \$! > \$pidfile } - stop() { - ebegin \"Stopping \$description\" - pkill esphome - eend \$? -}" > $service_path + kill \$(cat \$pidfile) + rm \$pidfile +}" > /etc/init.d/esphome -chmod 755 $service_path -$STD rc-update add esphome default -$STD /etc/init.d/esphome start +chmod 755 /etc/init.d/esphome +rc-service -q esphome start +rc-update add -q esphome default msg_ok "Installed Alpine-ESPHome" motd_ssh From 676f240113c2eb235340cdd19797e85add50c30f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 15:07:06 -0400 Subject: [PATCH 1311/3335] Update alpine-esphome-install.sh tweak --- install/alpine-esphome-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index ca9f4628..9f7b1070 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -22,8 +22,11 @@ $STD apk add mc $STD apk add git msg_ok "Installed Dependencies" -msg_info "Installing Alpine-ESPHome" +msg_info "Installing pip3 Package Manager" $STD apk add py3-pip +msg_ok "Installed pip3 Package Manager" + +msg_info "Installing Alpine-ESPHome" $STD pip3 install esphome $STD pip3 install tornado esptool From 4db1c1360e0c98972d2bdc40e81a282d90d4e395 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 15:23:24 -0400 Subject: [PATCH 1312/3335] Create alpine-whoogle-install.sh --- install/alpine-whoogle-install.sh | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 install/alpine-whoogle-install.sh diff --git a/install/alpine-whoogle-install.sh b/install/alpine-whoogle-install.sh new file mode 100644 index 00000000..443001bd --- /dev/null +++ b/install/alpine-whoogle-install.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Installing pip3 Package Manager" +$STD apk add py3-pip +msg_ok "Installed pip3 Package Manager" + +msg_info "Installing Alpine-Whoogle" +$STD pip3 install brotli +$STD pip3 install whoogle-search + +echo "#!/sbin/openrc-run +description=\"Whoogle-Search\" +pidfile=\"/run/whoogle.pid\" + +start() { + /usr/bin/whoogle-search --host 0.0.0.0 & + echo \$! > \$pidfile +} + +stop() { + kill \$(cat \$pidfile) + rm \$pidfile +}" > /etc/init.d/whoogle + +chmod 755 /etc/init.d/whoogle +rc-service -q whoogle start +rc-update add -q whoogle default +msg_ok "Installed Alpine-Whoogle" + +motd_ssh +root From ac837891e057ea19c2a9196e62aed4f1f121c1ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 15:28:01 -0400 Subject: [PATCH 1313/3335] Create alpine-whoogle.sh --- ct/alpine-whoogle.sh | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 ct/alpine-whoogle.sh diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh new file mode 100644 index 00000000..1b20e9fa --- /dev/null +++ b/ct/alpine-whoogle.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + _ ____ __ +| | / / /_ ____ ____ ____ _/ /__ +| | /| / / __ \/ __ \/ __ \/ __ `/ / _ \ +| |/ |/ / / / / /_/ / /_/ / /_/ / / __/ +|__/|__/_/ /_/\____/\____/\__, /_/\___/ + Alpine /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Alpine-Whoogle" +var_disk="0.3" +var_cpu="1" +var_ram="256" +var_os="alpine" +var_version="3.17" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { + if [[ ! -f /usr/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + while true; do + CHOICE=$( + whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + "1" "Check for Whoogle Updates" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + msg_info "Updating Whoogle" + pip3 install whoogle-search --upgrade &>/dev/null + rc-service -q whoogle restart + msg_ok "Updated Successfully!" + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From be211699b90f18729fcf55ddefb7723e79e1588c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 17:24:06 -0400 Subject: [PATCH 1314/3335] Update alpine-esphome.sh tweak --- ct/alpine-esphome.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/alpine-esphome.sh b/ct/alpine-esphome.sh index 0acbc670..5497853b 100644 --- a/ct/alpine-esphome.sh +++ b/ct/alpine-esphome.sh @@ -52,7 +52,10 @@ function default_settings() { } function update_script() { - if [[ ! -f /usr/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ ! -f /usr/bin/esphome ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ From b0c767d9abcb25d83401a393150a811f591f5ada Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 17:25:23 -0400 Subject: [PATCH 1315/3335] Update alpine-whoogle.sh tweak --- ct/alpine-whoogle.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh index 1b20e9fa..b2e2eaa7 100644 --- a/ct/alpine-whoogle.sh +++ b/ct/alpine-whoogle.sh @@ -52,7 +52,10 @@ function default_settings() { } function update_script() { - if [[ ! -f /usr/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ ! -f /usr/bin/whoogle-search ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi while true; do CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ From b494fa404bd2fabc510a269cc1ef51ac2bb98788 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 17:26:28 -0400 Subject: [PATCH 1316/3335] Update build.func lower rest time --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 50ba9e1a..7de773bd 100644 --- a/misc/build.func +++ b/misc/build.func @@ -452,7 +452,7 @@ EOF pct start "$CTID" msg_ok "Started LXC Container" if [ "$var_os" == "alpine" ]; then - sleep 5 + sleep 2 pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit From 1954973e7722571691ef7873f5d78d142a3acb50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 17:29:00 -0400 Subject: [PATCH 1317/3335] Update alpine-whoogle-install.sh tweak --- install/alpine-whoogle-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-whoogle-install.sh b/install/alpine-whoogle-install.sh index 443001bd..b85e76d0 100644 --- a/install/alpine-whoogle-install.sh +++ b/install/alpine-whoogle-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -41,7 +41,7 @@ start() { stop() { kill \$(cat \$pidfile) rm \$pidfile -}" > /etc/init.d/whoogle +}" >/etc/init.d/whoogle chmod 755 /etc/init.d/whoogle rc-service -q whoogle start From 59cf81026e0dcbc15b35989737b975ce4e7b56f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 17:30:25 -0400 Subject: [PATCH 1318/3335] Update alpine-esphome-install.sh tweak --- install/alpine-esphome-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh index 9f7b1070..d9d84bde 100644 --- a/install/alpine-esphome-install.sh +++ b/install/alpine-esphome-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -40,7 +40,7 @@ start() { stop() { kill \$(cat \$pidfile) rm \$pidfile -}" > /etc/init.d/esphome +}" >/etc/init.d/esphome chmod 755 /etc/init.d/esphome rc-service -q esphome start From e2b999caa0ac62a0e593941a3098cc023d3e25c4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 17:51:04 -0400 Subject: [PATCH 1319/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 907c02ea..94366868 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,15 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-25 + +### Changed + +- **Alpine-ESPHome LXC** + - NEW Script +- **Alpine-Whoogle LXC** + - NEW Script + ## 2023-03-22 ### Changed From ab40267e90f8309d79e2165fb219ec8877e8010a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Mar 2023 20:21:12 -0400 Subject: [PATCH 1320/3335] Update alpine-install.func enable root SSH access --- misc/alpine-install.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index f85d8d83..a7d282d9 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -111,6 +111,7 @@ motd_ssh() { echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd if [[ "${SSH_ROOT}" == "yes" ]]; then $STD rc-update add sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config $STD /etc/init.d/sshd start fi } From 10ecbb856b4599ebcb0c029efc51783c84efda03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Mar 2023 11:06:28 -0400 Subject: [PATCH 1321/3335] Update build.func ssh_check --- misc/build.func | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/misc/build.func b/misc/build.func index 7de773bd..53000673 100644 --- a/misc/build.func +++ b/misc/build.func @@ -65,6 +65,18 @@ arch_check() { fi } +ssh_check() { +if command -v pveversion >/dev/null 2>&1; then + if [ -n "$SSH_CLIENT" ]; then + if whiptail --defaultno --title "SSH DETECTED" --yesno "The scripts suggest using the Proxmox shell instead of SSH, since the latter can create issues while gathering variables. Would you like to proceed with using SSH?" 10 68; then + echo "you've been warned" + else + exit + fi + fi +fi +} + echo_default() { if [ "$var_os" == "ubuntu" ]; then echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" From 6368df0b9ded6c3ba01f0fbfecfe1626aa78ff58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Mar 2023 11:11:13 -0400 Subject: [PATCH 1322/3335] Update build.func shfmt --- misc/build.func | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/build.func b/misc/build.func index 53000673..45176495 100644 --- a/misc/build.func +++ b/misc/build.func @@ -66,15 +66,15 @@ arch_check() { } ssh_check() { -if command -v pveversion >/dev/null 2>&1; then - if [ -n "$SSH_CLIENT" ]; then - if whiptail --defaultno --title "SSH DETECTED" --yesno "The scripts suggest using the Proxmox shell instead of SSH, since the latter can create issues while gathering variables. Would you like to proceed with using SSH?" 10 68; then - echo "you've been warned" - else - exit - fi + if command -v pveversion >/dev/null 2>&1; then + if [ -n "$SSH_CLIENT" ]; then + if whiptail --defaultno --title "SSH DETECTED" --yesno "The scripts suggest using the Proxmox shell instead of SSH, since the latter can create issues while gathering variables. Would you like to proceed with using SSH?" 10 68; then + echo "you've been warned" + else + exit + fi + fi fi -fi } echo_default() { @@ -398,9 +398,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" fi export tz="$timezone" if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then @@ -464,8 +464,8 @@ EOF pct start "$CTID" msg_ok "Started LXC Container" if [ "$var_os" == "alpine" ]; then - sleep 2 - pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + sleep 2 + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit From ec432fce345e6fabd29afd068bf0edcb42e15cb0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Mar 2023 22:56:13 -0400 Subject: [PATCH 1323/3335] Update nginxproxymanager-install.sh hold v2.9.22 --- install/nginxproxymanager-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index b2baa37f..bda3670c 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -66,10 +66,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v$RELEASE" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v$RELEASE -O - | tar -xz -cd ./nginx-proxy-manager-$RELEASE -msg_ok "Downloaded Nginx Proxy Manager v$RELEASE" +msg_info "Downloading Nginx Proxy Manager v2.9.22" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz +cd ./nginx-proxy-manager-2.9.22 +msg_ok "Downloaded Nginx Proxy Manager v2.9.22" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python @@ -77,8 +77,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+${RELEASE}+g" backend/package.json -sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json +sed -i "s+0.0.0+2.9.22+g" backend/package.json +sed -i "s+0.0.0+2.9.22+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") From 636ca27c9e3aea3cfcd45d96abc34b1e00327340 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Mar 2023 22:58:34 -0400 Subject: [PATCH 1324/3335] Update nginxproxymanager.sh hold v2.9.22 --- ct/nginxproxymanager.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 99b95e30..ce7fc32f 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -74,18 +74,18 @@ function update_script() { /var/cache/nginx &>/dev/null msg_ok "Cleaned Old Files" - msg_info "Downloading NPM v${RELEASE}" - wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null - cd nginx-proxy-manager-${RELEASE} - msg_ok "Downloaded NPM v${RELEASE}" + msg_info "Downloading NPM v2.9.22" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz &>/dev/null + cd nginx-proxy-manager-2.9.22 + msg_ok "Downloaded NPM v2.9.22" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx - sed -i "s+0.0.0+${RELEASE}+g" backend/package.json - sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json + sed -i "s+0.0.0+2.9.22+g" backend/package.json + sed -i "s+0.0.0+2.9.22+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do From 7daa751c3c9866a2148331bd24a27ff07dac2e4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 10:03:50 -0400 Subject: [PATCH 1325/3335] Update grafana-install.sh enable/start grafana --- install/grafana-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 718cc230..1ab76079 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -30,6 +30,8 @@ msg_ok "Set up Grafana Repository" msg_info "Installing Grafana" $STD apt-get update $STD apt-get install -y grafana +systemctl start grafana-server +systemctl enable --now -q grafana-server.service msg_ok "Installed Grafana" motd_ssh From c536591de396b07b41e5011a65f24eeb73604042 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 11:09:03 -0400 Subject: [PATCH 1326/3335] Delete alpine-esphome.sh nonoperational --- ct/alpine-esphome.sh | 88 -------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 ct/alpine-esphome.sh diff --git a/ct/alpine-esphome.sh b/ct/alpine-esphome.sh deleted file mode 100644 index 5497853b..00000000 --- a/ct/alpine-esphome.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { - clear - cat <<"EOF" - ___________ ____ __ __ - / ____/ ___// __ \/ / / /___ ____ ___ ___ - / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ - / /___ ___/ / ____/ __ / /_/ / / / / / / __/ -/_____//____/_/ /_/ /_/\____/_/ /_/ /_/\___/ - Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-ESPHome" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="alpine" -var_version="3.17" -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="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - echo_default -} - -function update_script() { - if [[ ! -f /usr/bin/esphome ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - while true; do - CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ - "1" "Check for ESPHome Updates" 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - clear - exit-script - fi - header_info - case $CHOICE in - 1) - msg_info "Updating ESPHome" - pip3 install esphome --upgrade &>/dev/null - rc-service -q esphome restart - msg_ok "Updated Successfully!" - exit - ;; - esac - done -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:6052${CL} \n" From 0efbaa27eeb0ed12fc0714c84141df9377f7f655 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 11:09:34 -0400 Subject: [PATCH 1327/3335] Delete alpine-esphome-install.sh nonoperational --- install/alpine-esphome-install.sh | 51 ------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 install/alpine-esphome-install.sh diff --git a/install/alpine-esphome-install.sh b/install/alpine-esphome-install.sh deleted file mode 100644 index d9d84bde..00000000 --- a/install/alpine-esphome-install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/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" -$STD apk add newt -$STD apk add curl -$STD apk add openssh -$STD apk add nano -$STD apk add mc -$STD apk add git -msg_ok "Installed Dependencies" - -msg_info "Installing pip3 Package Manager" -$STD apk add py3-pip -msg_ok "Installed pip3 Package Manager" - -msg_info "Installing Alpine-ESPHome" -$STD pip3 install esphome -$STD pip3 install tornado esptool - -echo "#!/sbin/openrc-run -description=\"ESPHome\" -pidfile=\"/run/esphome.pid\" -start() { - esphome dashboard /root/esphome/config/ > /dev/null 2>&1 & - echo \$! > \$pidfile -} -stop() { - kill \$(cat \$pidfile) - rm \$pidfile -}" >/etc/init.d/esphome - -chmod 755 /etc/init.d/esphome -rc-service -q esphome start -rc-update add -q esphome default -msg_ok "Installed Alpine-ESPHome" - -motd_ssh -root From 8ff557f9c2e53bfc1671ed6138e0390a171d2c47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 11:11:49 -0400 Subject: [PATCH 1328/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 94366868..1463c0d3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-27 + +### Changed + +- **Removed Alpine-ESPHome LXC** + - Nonoperational + ## 2023-03-25 ### Changed From 3d3a03ce3faefebbcaba6626bdb6fbbe8ea9460b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 18:58:28 -0400 Subject: [PATCH 1329/3335] Update alpine-whoogle.sh ssh_check --- ct/alpine-whoogle.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh index b2e2eaa7..7dbf5066 100644 --- a/ct/alpine-whoogle.sh +++ b/ct/alpine-whoogle.sh @@ -79,6 +79,7 @@ function update_script() { done } +ssh_check start build_container description From 36ee55e61d2fbcbadf5c111fe38064ef1e827fe5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 19:02:50 -0400 Subject: [PATCH 1330/3335] Update build.func tweak --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 45176495..465d132f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -71,6 +71,7 @@ ssh_check() { if whiptail --defaultno --title "SSH DETECTED" --yesno "The scripts suggest using the Proxmox shell instead of SSH, since the latter can create issues while gathering variables. Would you like to proceed with using SSH?" 10 68; then echo "you've been warned" else + clear exit fi fi From 726cbe6ba9ecaf515dc01944df787752a65a326a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 19:09:22 -0400 Subject: [PATCH 1331/3335] add ssh_check --- ct/adguard.sh | 1 + ct/alpine-adguard.sh | 1 + ct/alpine-docker.sh | 1 + ct/alpine-grafana.sh | 1 + ct/alpine-vaultwarden.sh | 1 + ct/alpine-zigbee2mqtt.sh | 1 + ct/alpine.sh | 1 + ct/audiobookshelf.sh | 1 + ct/autobrr.sh | 1 + ct/blocky.sh | 1 + ct/casaos.sh | 1 + ct/changedetection.sh | 1 + ct/cronicle.sh | 1 + ct/daemonsync.sh | 1 + ct/dashy.sh | 1 + ct/debian.sh | 1 + ct/deconz.sh | 1 + ct/deluge.sh | 1 + ct/devuan.sh | 1 + ct/docker.sh | 1 + ct/emby.sh | 1 + ct/emqx.sh | 1 + ct/esphome.sh | 1 + ct/go2rtc.sh | 1 + ct/grafana.sh | 1 + ct/grocy.sh | 1 + ct/heimdalldashboard.sh | 1 + ct/homeassistant-core.sh | 1 + ct/homeassistant.sh | 1 + ct/homebridge.sh | 1 + ct/homepage.sh | 1 + ct/homer.sh | 1 + ct/hyperion.sh | 1 + ct/influxdb.sh | 1 + ct/iobroker.sh | 1 + ct/jackett.sh | 1 + ct/jellyfin.sh | 1 + ct/k0s.sh | 1 + ct/kavita.sh | 1 + ct/keycloak.sh | 1 + ct/lidarr.sh | 1 + ct/magicmirror.sh | 1 + ct/mariadb.sh | 1 + ct/meshcentral.sh | 1 + ct/motioneye.sh | 1 + ct/mqtt.sh | 1 + ct/n8n.sh | 1 + ct/navidrome.sh | 1 + ct/nextcloudpi.sh | 1 + ct/nginxproxymanager.sh | 1 + ct/nocodb.sh | 1 + ct/node-red.sh | 1 + ct/omada.sh | 1 + ct/omv.sh | 1 + ct/openhab.sh | 1 + ct/paperless-ngx.sh | 1 + ct/photoprism.sh | 1 + ct/pihole.sh | 1 + ct/plex.sh | 1 + ct/podman-homeassistant.sh | 1 + ct/podman.sh | 1 + ct/postgresql.sh | 1 + ct/prometheus.sh | 1 + ct/prowlarr.sh | 1 + ct/qbittorrent.sh | 1 + ct/radarr.sh | 1 + ct/readarr.sh | 1 + ct/rockylinux.sh | 1 + ct/rstptoweb.sh | 1 + ct/sabnzbd.sh | 1 + ct/scrypted.sh | 1 + ct/shinobi.sh | 1 + ct/sonarr.sh | 1 + ct/syncthing.sh | 1 + ct/tdarr.sh | 1 + ct/technitiumdns.sh | 1 + ct/transmission.sh | 1 + ct/trilium.sh | 1 + ct/ubuntu.sh | 1 + ct/umbrel.sh | 1 + ct/unifi.sh | 1 + ct/uptimekuma.sh | 1 + ct/vaultwarden.sh | 1 + ct/whisparr.sh | 1 + ct/whoogle.sh | 1 + ct/wikijs.sh | 1 + ct/wireguard.sh | 1 + ct/yunohost.sh | 1 + ct/zigbee2mqtt.sh | 1 + ct/zwave-js-ui.sh | 1 + 90 files changed, 90 insertions(+) diff --git a/ct/adguard.sh b/ct/adguard.sh index e8c65085..c36e12bf 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -78,6 +78,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 248aa7f2..5dd9e955 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -81,6 +81,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index a7b08ba6..8bde63ce 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -75,6 +75,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 7cb26ae6..36872876 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -88,6 +88,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 45ea5390..70b5f7f8 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -81,6 +81,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 55df4544..f9185143 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -75,6 +75,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine.sh b/ct/alpine.sh index a3348a9f..3eb6a0c9 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -63,6 +63,7 @@ exit; fi } +ssh_check start build_container description diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 558dbc44..b208249c 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 3261b560..91e8a8be 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -71,6 +71,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/blocky.sh b/ct/blocky.sh index 08e769e8..4a2f77b2 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/casaos.sh b/ct/casaos.sh index c98a025d..593379c8 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/changedetection.sh b/ct/changedetection.sh index c8da20ae..d0ba97e8 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 53702989..3f812270 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -100,6 +100,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index d13e5b40..7f6ed79f 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/dashy.sh b/ct/dashy.sh index 5c76cf70..7b95c492 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -86,6 +86,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/debian.sh b/ct/debian.sh index b67a0a26..dc09cba4 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/deconz.sh b/ct/deconz.sh index 6195bd10..f5aee5fc 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/deluge.sh b/ct/deluge.sh index 0b3ce6c4..b82cebce 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -61,6 +61,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/devuan.sh b/ct/devuan.sh index db48bf4e..beb4b23d 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/docker.sh b/ct/docker.sh index 1805787c..77b9c184 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/emby.sh b/ct/emby.sh index 2e617cfb..d87c1aae 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -71,6 +71,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/emqx.sh b/ct/emqx.sh index 7c0ffcd9..e3ce0056 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/esphome.sh b/ct/esphome.sh index cd6e56d2..82c0c6c8 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -68,6 +68,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 58b82f5c..b840dc30 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -61,6 +61,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/grafana.sh b/ct/grafana.sh index 3de34626..4a363954 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/grocy.sh b/ct/grocy.sh index dd30c554..f33b8a87 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index aad87f46..6eeaf236 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -140,6 +140,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 858433c2..b635db1d 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -207,6 +207,7 @@ EOF fi } +ssh_check start build_container description diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index ac667247..7c96ab1c 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -128,6 +128,7 @@ WantedBy=default.target" >$service_path fi } +ssh_check start build_container description diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 22039d22..8b67fdb1 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/homepage.sh b/ct/homepage.sh index e8041087..87bc8cc1 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -67,6 +67,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/homer.sh b/ct/homer.sh index 217b2800..05939da2 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -84,6 +84,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 92535765..0021c3be 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/influxdb.sh b/ct/influxdb.sh index f6c078cf..8b6c3150 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 841f135e..17dcd29d 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/jackett.sh b/ct/jackett.sh index f895f4d7..2c6eff8d 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index d11b8212..a67c5967 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/k0s.sh b/ct/k0s.sh index 75b5648a..5f39de39 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/kavita.sh b/ct/kavita.sh index 8410daa7..f0ebf4cc 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 4488dd1a..2585d900 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 6bc88997..c4959153 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index c57121c2..aeda1e47 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -63,6 +63,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/mariadb.sh b/ct/mariadb.sh index d6894ed9..857fabbb 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 2739b517..932ea4bd 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 4a106f03..b5084568 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 0dde1c0e..312c467d 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/n8n.sh b/ct/n8n.sh index d4862ef1..297c9eed 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/navidrome.sh b/ct/navidrome.sh index c9e53584..0ebb3d38 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -71,6 +71,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index a1718208..52f04f49 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index ce7fc32f..012ebd53 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -171,6 +171,7 @@ EOF exit } +ssh_check start build_container description diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 4b7636f6..e56521ba 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -63,6 +63,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/node-red.sh b/ct/node-red.sh index 3dba9183..c90d898c 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -96,6 +96,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/omada.sh b/ct/omada.sh index 104183df..51127d43 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/omv.sh b/ct/omv.sh index 532df042..c898c92e 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/openhab.sh b/ct/openhab.sh index 21a77dc7..d197aec1 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 09d46d45..30b1d9f9 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -132,6 +132,7 @@ EOF fi } +ssh_check start build_container description diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 231f7d1e..c6c943bd 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -86,6 +86,7 @@ function update_script() { exit } +ssh_check start build_container description diff --git a/ct/pihole.sh b/ct/pihole.sh index 07e786ea..57f09f15 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/plex.sh b/ct/plex.sh index 48d12505..beb328e7 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -71,6 +71,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index d916cc95..e3ccf4d7 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -111,6 +111,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/podman.sh b/ct/podman.sh index b4297c51..c18a858a 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/postgresql.sh b/ct/postgresql.sh index f0b606a1..606ee95d 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 16f17758..bfbf2367 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 2c323541..cb5c5347 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 83cc8526..499cfcf3 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/radarr.sh b/ct/radarr.sh index a379e8ac..df6704a8 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/readarr.sh b/ct/readarr.sh index bea527d0..40e2ac20 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index edc69291..715a4a5f 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh index 1c1bb453..c7db7f59 100644 --- a/ct/rstptoweb.sh +++ b/ct/rstptoweb.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index ea75032d..8514ba30 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -66,6 +66,7 @@ msg_ok "Updated $APP" exit } +ssh_check start build_container description diff --git a/ct/scrypted.sh b/ct/scrypted.sh index d307d78c..eadc2f0f 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/shinobi.sh b/ct/shinobi.sh index bc5572e6..b8b003bf 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -64,6 +64,7 @@ msg_ok "Updated Shinobi LXC" exit } +ssh_check start build_container description diff --git a/ct/sonarr.sh b/ct/sonarr.sh index ac6f2399..48a249e5 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 292cf4db..f6b3d67c 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 994ae3db..1d570df8 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index f947cd07..ca568c91 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -70,6 +70,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/transmission.sh b/ct/transmission.sh index 94e654d6..cb0f21d8 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/trilium.sh b/ct/trilium.sh index 3e15c458..1288b82a 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -80,6 +80,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index bc2f0cc6..c30b4067 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 46ed1aa2..d35b3ac1 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/unifi.sh b/ct/unifi.sh index 542f1f87..bd619787 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 4f64ecc3..77b81ecc 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -78,6 +78,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 8f887956..e5373967 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -131,6 +131,7 @@ function update_script() { fi } +ssh_check start build_container description diff --git a/ct/whisparr.sh b/ct/whisparr.sh index c616282a..2a99863f 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -61,6 +61,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/whoogle.sh b/ct/whoogle.sh index e93b19d7..67ecf793 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/wikijs.sh b/ct/wikijs.sh index e1ac9863..a8051de0 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -83,6 +83,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 553de4e5..4afea4d0 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -115,6 +115,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 22198999..6ffda45d 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index c1c59ff0..a91c9ec4 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -126,6 +126,7 @@ function update_script() { exit } +ssh_check start build_container description diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index ed8c0d64..2dfcaaa5 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -78,6 +78,7 @@ function update_script() { exit } +ssh_check start build_container description From 43ca5981f7c57b87f316be96820013e4be68b0f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 20:00:26 -0400 Subject: [PATCH 1332/3335] Update build.func reword ssh_check --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 465d132f..df2de2d2 100644 --- a/misc/build.func +++ b/misc/build.func @@ -68,7 +68,7 @@ arch_check() { ssh_check() { if command -v pveversion >/dev/null 2>&1; then if [ -n "$SSH_CLIENT" ]; then - if whiptail --defaultno --title "SSH DETECTED" --yesno "The scripts suggest using the Proxmox shell instead of SSH, since the latter can create issues while gathering variables. Would you like to proceed with using SSH?" 10 68; then + if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then echo "you've been warned" else clear From 6bf9e68f89aca2a64687be82802099de365988f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 20:24:49 -0400 Subject: [PATCH 1333/3335] Update haos-vm.sh add SSH_CHECK --- vm/haos-vm.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 5160d8be..87cf3b3e 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -95,6 +95,18 @@ function ARCH_CHECK() { exit fi } +function SSH_CHECK() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "$SSH_CLIENT" ]; then + if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} function default_settings() { BRANCH="$stable" VMID="$NEXTID" @@ -257,6 +269,7 @@ function START_SCRIPT() { } ARCH_CHECK PVE_CHECK +SSH_CHECK START_SCRIPT msg_info "Validating Storage" while read -r line; do From 23d8d1b807038258cb4f62238d68aae9d291868d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 20:52:46 -0400 Subject: [PATCH 1334/3335] revert ssh_check --- ct/adguard.sh | 1 - ct/alpine-adguard.sh | 1 - ct/alpine-docker.sh | 1 - ct/alpine-grafana.sh | 1 - ct/alpine-vaultwarden.sh | 1 - ct/alpine-whoogle.sh | 1 - ct/alpine-zigbee2mqtt.sh | 1 - ct/alpine.sh | 1 - ct/audiobookshelf.sh | 1 - ct/autobrr.sh | 1 - ct/blocky.sh | 1 - ct/casaos.sh | 1 - ct/changedetection.sh | 1 - ct/cronicle.sh | 1 - ct/daemonsync.sh | 1 - ct/dashy.sh | 1 - ct/debian.sh | 1 - ct/deconz.sh | 1 - ct/deluge.sh | 1 - ct/devuan.sh | 1 - ct/docker.sh | 1 - ct/emby.sh | 1 - ct/emqx.sh | 1 - ct/esphome.sh | 1 - ct/go2rtc.sh | 1 - ct/grafana.sh | 1 - ct/grocy.sh | 1 - ct/heimdalldashboard.sh | 1 - ct/homeassistant-core.sh | 1 - ct/homeassistant.sh | 1 - ct/homebridge.sh | 1 - ct/homepage.sh | 1 - ct/homer.sh | 1 - ct/hyperion.sh | 1 - ct/influxdb.sh | 1 - ct/iobroker.sh | 1 - ct/jackett.sh | 1 - ct/jellyfin.sh | 1 - ct/k0s.sh | 1 - ct/kavita.sh | 1 - ct/keycloak.sh | 1 - ct/lidarr.sh | 1 - ct/magicmirror.sh | 1 - ct/mariadb.sh | 1 - ct/meshcentral.sh | 1 - ct/motioneye.sh | 1 - ct/mqtt.sh | 1 - ct/n8n.sh | 1 - ct/navidrome.sh | 1 - ct/nextcloudpi.sh | 1 - ct/nginxproxymanager.sh | 1 - ct/nocodb.sh | 1 - ct/node-red.sh | 1 - ct/omada.sh | 1 - ct/omv.sh | 1 - ct/openhab.sh | 1 - ct/paperless-ngx.sh | 1 - ct/photoprism.sh | 1 - ct/pihole.sh | 1 - ct/plex.sh | 1 - ct/podman-homeassistant.sh | 1 - ct/podman.sh | 1 - ct/postgresql.sh | 1 - ct/prometheus.sh | 1 - ct/prowlarr.sh | 1 - ct/qbittorrent.sh | 1 - ct/radarr.sh | 1 - ct/readarr.sh | 1 - ct/rockylinux.sh | 1 - ct/rstptoweb.sh | 1 - ct/sabnzbd.sh | 1 - ct/scrypted.sh | 1 - ct/shinobi.sh | 1 - ct/sonarr.sh | 1 - ct/syncthing.sh | 1 - ct/tdarr.sh | 1 - ct/technitiumdns.sh | 1 - ct/transmission.sh | 1 - ct/trilium.sh | 1 - ct/ubuntu.sh | 1 - ct/umbrel.sh | 1 - ct/unifi.sh | 1 - ct/uptimekuma.sh | 1 - ct/vaultwarden.sh | 1 - ct/whisparr.sh | 1 - ct/whoogle.sh | 1 - ct/wikijs.sh | 1 - ct/wireguard.sh | 1 - ct/yunohost.sh | 1 - ct/zigbee2mqtt.sh | 1 - ct/zwave-js-ui.sh | 1 - 91 files changed, 91 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index c36e12bf..e8c65085 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -78,7 +78,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 5dd9e955..248aa7f2 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -81,7 +81,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 8bde63ce..a7b08ba6 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -75,7 +75,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 36872876..7cb26ae6 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -88,7 +88,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 70b5f7f8..45ea5390 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -81,7 +81,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh index 7dbf5066..b2e2eaa7 100644 --- a/ct/alpine-whoogle.sh +++ b/ct/alpine-whoogle.sh @@ -79,7 +79,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index f9185143..55df4544 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -75,7 +75,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine.sh b/ct/alpine.sh index 3eb6a0c9..a3348a9f 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -63,7 +63,6 @@ exit; fi } -ssh_check start build_container description diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index b208249c..558dbc44 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 91e8a8be..3261b560 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -71,7 +71,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/blocky.sh b/ct/blocky.sh index 4a2f77b2..08e769e8 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/casaos.sh b/ct/casaos.sh index 593379c8..c98a025d 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/changedetection.sh b/ct/changedetection.sh index d0ba97e8..c8da20ae 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 3f812270..53702989 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -100,7 +100,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 7f6ed79f..d13e5b40 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/dashy.sh b/ct/dashy.sh index 7b95c492..5c76cf70 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -86,7 +86,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/debian.sh b/ct/debian.sh index dc09cba4..b67a0a26 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/deconz.sh b/ct/deconz.sh index f5aee5fc..6195bd10 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/deluge.sh b/ct/deluge.sh index b82cebce..0b3ce6c4 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -61,7 +61,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/devuan.sh b/ct/devuan.sh index beb4b23d..db48bf4e 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/docker.sh b/ct/docker.sh index 77b9c184..1805787c 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/emby.sh b/ct/emby.sh index d87c1aae..2e617cfb 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -71,7 +71,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/emqx.sh b/ct/emqx.sh index e3ce0056..7c0ffcd9 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/esphome.sh b/ct/esphome.sh index 82c0c6c8..cd6e56d2 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -68,7 +68,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index b840dc30..58b82f5c 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -61,7 +61,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/grafana.sh b/ct/grafana.sh index 4a363954..3de34626 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/grocy.sh b/ct/grocy.sh index f33b8a87..dd30c554 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 6eeaf236..aad87f46 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -140,7 +140,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index b635db1d..858433c2 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -207,7 +207,6 @@ EOF fi } -ssh_check start build_container description diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 7c96ab1c..ac667247 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -128,7 +128,6 @@ WantedBy=default.target" >$service_path fi } -ssh_check start build_container description diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 8b67fdb1..22039d22 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/homepage.sh b/ct/homepage.sh index 87bc8cc1..e8041087 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -67,7 +67,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/homer.sh b/ct/homer.sh index 05939da2..217b2800 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -84,7 +84,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 0021c3be..92535765 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 8b6c3150..f6c078cf 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 17dcd29d..841f135e 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/jackett.sh b/ct/jackett.sh index 2c6eff8d..f895f4d7 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index a67c5967..d11b8212 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/k0s.sh b/ct/k0s.sh index 5f39de39..75b5648a 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/kavita.sh b/ct/kavita.sh index f0ebf4cc..8410daa7 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 2585d900..4488dd1a 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/lidarr.sh b/ct/lidarr.sh index c4959153..6bc88997 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index aeda1e47..c57121c2 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -63,7 +63,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 857fabbb..d6894ed9 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 932ea4bd..2739b517 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/motioneye.sh b/ct/motioneye.sh index b5084568..4a106f03 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 312c467d..0dde1c0e 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/n8n.sh b/ct/n8n.sh index 297c9eed..d4862ef1 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 0ebb3d38..c9e53584 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -71,7 +71,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 52f04f49..a1718208 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 012ebd53..ce7fc32f 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -171,7 +171,6 @@ EOF exit } -ssh_check start build_container description diff --git a/ct/nocodb.sh b/ct/nocodb.sh index e56521ba..4b7636f6 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -63,7 +63,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/node-red.sh b/ct/node-red.sh index c90d898c..3dba9183 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -96,7 +96,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/omada.sh b/ct/omada.sh index 51127d43..104183df 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/omv.sh b/ct/omv.sh index c898c92e..532df042 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/openhab.sh b/ct/openhab.sh index d197aec1..21a77dc7 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 30b1d9f9..09d46d45 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -132,7 +132,6 @@ EOF fi } -ssh_check start build_container description diff --git a/ct/photoprism.sh b/ct/photoprism.sh index c6c943bd..231f7d1e 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -86,7 +86,6 @@ function update_script() { exit } -ssh_check start build_container description diff --git a/ct/pihole.sh b/ct/pihole.sh index 57f09f15..07e786ea 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/plex.sh b/ct/plex.sh index beb328e7..48d12505 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -71,7 +71,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index e3ccf4d7..d916cc95 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -111,7 +111,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/podman.sh b/ct/podman.sh index c18a858a..b4297c51 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 606ee95d..f0b606a1 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/prometheus.sh b/ct/prometheus.sh index bfbf2367..16f17758 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index cb5c5347..2c323541 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 499cfcf3..83cc8526 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/radarr.sh b/ct/radarr.sh index df6704a8..a379e8ac 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/readarr.sh b/ct/readarr.sh index 40e2ac20..bea527d0 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index 715a4a5f..edc69291 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh index c7db7f59..1c1bb453 100644 --- a/ct/rstptoweb.sh +++ b/ct/rstptoweb.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 8514ba30..ea75032d 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -66,7 +66,6 @@ msg_ok "Updated $APP" exit } -ssh_check start build_container description diff --git a/ct/scrypted.sh b/ct/scrypted.sh index eadc2f0f..d307d78c 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/shinobi.sh b/ct/shinobi.sh index b8b003bf..bc5572e6 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -64,7 +64,6 @@ msg_ok "Updated Shinobi LXC" exit } -ssh_check start build_container description diff --git a/ct/sonarr.sh b/ct/sonarr.sh index 48a249e5..ac6f2399 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/syncthing.sh b/ct/syncthing.sh index f6b3d67c..292cf4db 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 1d570df8..994ae3db 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index ca568c91..f947cd07 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -70,7 +70,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/transmission.sh b/ct/transmission.sh index cb0f21d8..94e654d6 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/trilium.sh b/ct/trilium.sh index 1288b82a..3e15c458 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -80,7 +80,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index c30b4067..bc2f0cc6 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/umbrel.sh b/ct/umbrel.sh index d35b3ac1..46ed1aa2 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/unifi.sh b/ct/unifi.sh index bd619787..542f1f87 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 77b81ecc..4f64ecc3 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -78,7 +78,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index e5373967..8f887956 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -131,7 +131,6 @@ function update_script() { fi } -ssh_check start build_container description diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 2a99863f..c616282a 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -61,7 +61,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 67ecf793..e93b19d7 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/wikijs.sh b/ct/wikijs.sh index a8051de0..e1ac9863 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -83,7 +83,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 4afea4d0..553de4e5 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -115,7 +115,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 6ffda45d..22198999 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index a91c9ec4..c1c59ff0 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -126,7 +126,6 @@ function update_script() { exit } -ssh_check start build_container description diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 2dfcaaa5..ed8c0d64 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -78,7 +78,6 @@ function update_script() { exit } -ssh_check start build_container description From 92c24cefe48ab13c5829789fb835f042eed3fb96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 20:53:51 -0400 Subject: [PATCH 1335/3335] revert SSH_CHECK --- vm/haos-vm.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 87cf3b3e..aa19d7b9 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -269,7 +269,6 @@ function START_SCRIPT() { } ARCH_CHECK PVE_CHECK -SSH_CHECK START_SCRIPT msg_info "Validating Storage" while read -r line; do From 8bf03a6cb6d520094d6d659256291c9e934295fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 21:16:23 -0400 Subject: [PATCH 1336/3335] Update build.func update ssh_check code --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index df2de2d2..a6e7e0e3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -67,7 +67,7 @@ arch_check() { ssh_check() { if command -v pveversion >/dev/null 2>&1; then - if [ -n "$SSH_CLIENT" ]; then + if [ -n "${SSH_CLIENT:+x}" ]; then if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then echo "you've been warned" else From b19b5e1039f38f4be9eefaa5872c9c32d577e609 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 21:21:14 -0400 Subject: [PATCH 1337/3335] revert revert ssh_check --- ct/adguard.sh | 1 + ct/alpine-adguard.sh | 1 + ct/alpine-docker.sh | 1 + ct/alpine-grafana.sh | 1 + ct/alpine-vaultwarden.sh | 1 + ct/alpine-whoogle.sh | 1 + ct/alpine-zigbee2mqtt.sh | 1 + ct/alpine.sh | 1 + ct/audiobookshelf.sh | 1 + ct/autobrr.sh | 1 + ct/blocky.sh | 1 + ct/casaos.sh | 1 + ct/changedetection.sh | 1 + ct/cronicle.sh | 1 + ct/daemonsync.sh | 1 + ct/dashy.sh | 1 + ct/debian.sh | 1 + ct/deconz.sh | 1 + ct/deluge.sh | 1 + ct/devuan.sh | 1 + ct/docker.sh | 1 + ct/emby.sh | 1 + ct/emqx.sh | 1 + ct/esphome.sh | 1 + ct/go2rtc.sh | 1 + ct/grafana.sh | 1 + ct/grocy.sh | 1 + ct/heimdalldashboard.sh | 1 + ct/homeassistant-core.sh | 1 + ct/homeassistant.sh | 1 + ct/homebridge.sh | 1 + ct/homepage.sh | 1 + ct/homer.sh | 1 + ct/hyperion.sh | 1 + ct/influxdb.sh | 1 + ct/iobroker.sh | 1 + ct/jackett.sh | 1 + ct/jellyfin.sh | 1 + ct/k0s.sh | 1 + ct/kavita.sh | 1 + ct/keycloak.sh | 1 + ct/lidarr.sh | 1 + ct/magicmirror.sh | 1 + ct/mariadb.sh | 1 + ct/meshcentral.sh | 1 + ct/motioneye.sh | 1 + ct/mqtt.sh | 1 + ct/n8n.sh | 1 + ct/navidrome.sh | 1 + ct/nextcloudpi.sh | 1 + ct/nginxproxymanager.sh | 1 + ct/nocodb.sh | 1 + ct/node-red.sh | 1 + ct/omada.sh | 1 + ct/omv.sh | 1 + ct/openhab.sh | 1 + ct/paperless-ngx.sh | 1 + ct/photoprism.sh | 1 + ct/pihole.sh | 1 + ct/plex.sh | 1 + ct/podman-homeassistant.sh | 1 + ct/podman.sh | 1 + ct/postgresql.sh | 1 + ct/prometheus.sh | 1 + ct/prowlarr.sh | 1 + ct/qbittorrent.sh | 1 + ct/radarr.sh | 1 + ct/readarr.sh | 1 + ct/rockylinux.sh | 1 + ct/rstptoweb.sh | 1 + ct/sabnzbd.sh | 1 + ct/scrypted.sh | 1 + ct/shinobi.sh | 1 + ct/sonarr.sh | 1 + ct/syncthing.sh | 1 + ct/tdarr.sh | 1 + ct/technitiumdns.sh | 1 + ct/transmission.sh | 1 + ct/trilium.sh | 1 + ct/ubuntu.sh | 1 + ct/umbrel.sh | 1 + ct/unifi.sh | 1 + ct/uptimekuma.sh | 1 + ct/vaultwarden.sh | 1 + ct/whisparr.sh | 1 + ct/whoogle.sh | 1 + ct/wikijs.sh | 1 + ct/wireguard.sh | 1 + ct/yunohost.sh | 1 + ct/zigbee2mqtt.sh | 1 + ct/zwave-js-ui.sh | 1 + vm/haos-vm.sh | 3 ++- 92 files changed, 93 insertions(+), 1 deletion(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index e8c65085..c36e12bf 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -78,6 +78,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 248aa7f2..5dd9e955 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -81,6 +81,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index a7b08ba6..8bde63ce 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -75,6 +75,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 7cb26ae6..36872876 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -88,6 +88,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 45ea5390..70b5f7f8 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -81,6 +81,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh index b2e2eaa7..7dbf5066 100644 --- a/ct/alpine-whoogle.sh +++ b/ct/alpine-whoogle.sh @@ -79,6 +79,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 55df4544..f9185143 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -75,6 +75,7 @@ function update_script() { done } +ssh_check start build_container description diff --git a/ct/alpine.sh b/ct/alpine.sh index a3348a9f..3eb6a0c9 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -63,6 +63,7 @@ exit; fi } +ssh_check start build_container description diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 558dbc44..b208249c 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 3261b560..91e8a8be 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -71,6 +71,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/blocky.sh b/ct/blocky.sh index 08e769e8..4a2f77b2 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/casaos.sh b/ct/casaos.sh index c98a025d..593379c8 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/changedetection.sh b/ct/changedetection.sh index c8da20ae..d0ba97e8 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 53702989..3f812270 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -100,6 +100,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index d13e5b40..7f6ed79f 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/dashy.sh b/ct/dashy.sh index 5c76cf70..7b95c492 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -86,6 +86,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/debian.sh b/ct/debian.sh index b67a0a26..dc09cba4 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/deconz.sh b/ct/deconz.sh index 6195bd10..f5aee5fc 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/deluge.sh b/ct/deluge.sh index 0b3ce6c4..b82cebce 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -61,6 +61,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/devuan.sh b/ct/devuan.sh index db48bf4e..beb4b23d 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/docker.sh b/ct/docker.sh index 1805787c..77b9c184 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/emby.sh b/ct/emby.sh index 2e617cfb..d87c1aae 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -71,6 +71,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/emqx.sh b/ct/emqx.sh index 7c0ffcd9..e3ce0056 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/esphome.sh b/ct/esphome.sh index cd6e56d2..82c0c6c8 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -68,6 +68,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 58b82f5c..b840dc30 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -61,6 +61,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/grafana.sh b/ct/grafana.sh index 3de34626..4a363954 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/grocy.sh b/ct/grocy.sh index dd30c554..f33b8a87 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index aad87f46..6eeaf236 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -140,6 +140,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 858433c2..b635db1d 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -207,6 +207,7 @@ EOF fi } +ssh_check start build_container description diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index ac667247..7c96ab1c 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -128,6 +128,7 @@ WantedBy=default.target" >$service_path fi } +ssh_check start build_container description diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 22039d22..8b67fdb1 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/homepage.sh b/ct/homepage.sh index e8041087..87bc8cc1 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -67,6 +67,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/homer.sh b/ct/homer.sh index 217b2800..05939da2 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -84,6 +84,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 92535765..0021c3be 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/influxdb.sh b/ct/influxdb.sh index f6c078cf..8b6c3150 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 841f135e..17dcd29d 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/jackett.sh b/ct/jackett.sh index f895f4d7..2c6eff8d 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index d11b8212..a67c5967 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/k0s.sh b/ct/k0s.sh index 75b5648a..5f39de39 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/kavita.sh b/ct/kavita.sh index 8410daa7..f0ebf4cc 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 4488dd1a..2585d900 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 6bc88997..c4959153 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index c57121c2..aeda1e47 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -63,6 +63,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/mariadb.sh b/ct/mariadb.sh index d6894ed9..857fabbb 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 2739b517..932ea4bd 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 4a106f03..b5084568 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 0dde1c0e..312c467d 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/n8n.sh b/ct/n8n.sh index d4862ef1..297c9eed 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/navidrome.sh b/ct/navidrome.sh index c9e53584..0ebb3d38 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -71,6 +71,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index a1718208..52f04f49 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index ce7fc32f..012ebd53 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -171,6 +171,7 @@ EOF exit } +ssh_check start build_container description diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 4b7636f6..e56521ba 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -63,6 +63,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/node-red.sh b/ct/node-red.sh index 3dba9183..c90d898c 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -96,6 +96,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/omada.sh b/ct/omada.sh index 104183df..51127d43 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/omv.sh b/ct/omv.sh index 532df042..c898c92e 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/openhab.sh b/ct/openhab.sh index 21a77dc7..d197aec1 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 09d46d45..30b1d9f9 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -132,6 +132,7 @@ EOF fi } +ssh_check start build_container description diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 231f7d1e..c6c943bd 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -86,6 +86,7 @@ function update_script() { exit } +ssh_check start build_container description diff --git a/ct/pihole.sh b/ct/pihole.sh index 07e786ea..57f09f15 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/plex.sh b/ct/plex.sh index 48d12505..beb328e7 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -71,6 +71,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index d916cc95..e3ccf4d7 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -111,6 +111,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/podman.sh b/ct/podman.sh index b4297c51..c18a858a 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/postgresql.sh b/ct/postgresql.sh index f0b606a1..606ee95d 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 16f17758..bfbf2367 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 2c323541..cb5c5347 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 83cc8526..499cfcf3 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -61,6 +61,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/radarr.sh b/ct/radarr.sh index a379e8ac..df6704a8 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/readarr.sh b/ct/readarr.sh index bea527d0..40e2ac20 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index edc69291..715a4a5f 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh index 1c1bb453..c7db7f59 100644 --- a/ct/rstptoweb.sh +++ b/ct/rstptoweb.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index ea75032d..8514ba30 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -66,6 +66,7 @@ msg_ok "Updated $APP" exit } +ssh_check start build_container description diff --git a/ct/scrypted.sh b/ct/scrypted.sh index d307d78c..eadc2f0f 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/shinobi.sh b/ct/shinobi.sh index bc5572e6..b8b003bf 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -64,6 +64,7 @@ msg_ok "Updated Shinobi LXC" exit } +ssh_check start build_container description diff --git a/ct/sonarr.sh b/ct/sonarr.sh index ac6f2399..48a249e5 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 292cf4db..f6b3d67c 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -62,6 +62,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 994ae3db..1d570df8 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index f947cd07..ca568c91 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -70,6 +70,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/transmission.sh b/ct/transmission.sh index 94e654d6..cb0f21d8 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/trilium.sh b/ct/trilium.sh index 3e15c458..1288b82a 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -80,6 +80,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index bc2f0cc6..c30b4067 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 46ed1aa2..d35b3ac1 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -60,6 +60,7 @@ msg_ok "Updated ${APP} LXC" exit } +ssh_check start build_container description diff --git a/ct/unifi.sh b/ct/unifi.sh index 542f1f87..bd619787 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -61,6 +61,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 4f64ecc3..77b81ecc 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -78,6 +78,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 8f887956..e5373967 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -131,6 +131,7 @@ function update_script() { fi } +ssh_check start build_container description diff --git a/ct/whisparr.sh b/ct/whisparr.sh index c616282a..2a99863f 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -61,6 +61,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/whoogle.sh b/ct/whoogle.sh index e93b19d7..67ecf793 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -60,6 +60,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/wikijs.sh b/ct/wikijs.sh index e1ac9863..a8051de0 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -83,6 +83,7 @@ msg_ok "Update Successfull" exit } +ssh_check start build_container description diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 553de4e5..4afea4d0 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -115,6 +115,7 @@ exit fi } +ssh_check start build_container description diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 22198999..6ffda45d 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -60,6 +60,7 @@ msg_ok "Updated $APP LXC" exit } +ssh_check start build_container description diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index c1c59ff0..a91c9ec4 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -126,6 +126,7 @@ function update_script() { exit } +ssh_check start build_container description diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index ed8c0d64..2dfcaaa5 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -78,6 +78,7 @@ function update_script() { exit } +ssh_check start build_container description diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index aa19d7b9..ab628f89 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -97,7 +97,7 @@ function ARCH_CHECK() { } function SSH_CHECK() { if command -v pveversion >/dev/null 2>&1; then - if [ -n "$SSH_CLIENT" ]; then + if [ -n "${SSH_CLIENT:+x}" ]; then if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then echo "you've been warned" else @@ -269,6 +269,7 @@ function START_SCRIPT() { } ARCH_CHECK PVE_CHECK +SSH_CHECK START_SCRIPT msg_info "Validating Storage" while read -r line; do From 0cc475115a286ab7d5c75a2c03952830c10a1a52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Mar 2023 21:44:58 -0400 Subject: [PATCH 1338/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1463c0d3..dd74f685 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. - **Removed Alpine-ESPHome LXC** - Nonoperational +- **All Scripts** + - Incorporate code that examines whether SSH is being used and, if yes, offers a suggestion against it without restricting or blocking its usage. ## 2023-03-25 From b800e3485683fa3b5335a4a4fc9dfbd24f293b68 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 Mar 2023 17:32:30 -0400 Subject: [PATCH 1339/3335] Update blocky-install.sh fix path change --- install/blocky-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/blocky-install.sh b/install/blocky-install.sh index e4656a13..aafff542 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -23,10 +23,10 @@ msg_info "Installing Blocky" systemctl stop systemd-resolved $STD systemctl disable systemd-resolved.service RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz +wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_v${RELEASE}_Linux_x86_64.tar.gz mkdir -p /opt/blocky -tar -xf blocky_${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky -rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz +tar -xf blocky_v${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky +rm -rf blocky_v${RELEASE}_Linux_x86_64.tar.gz cat </opt/blocky/config.yml upstream: # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query From 5b414def47ef8bdc1653e8922c9790d82cd57c1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Mar 2023 06:14:21 -0400 Subject: [PATCH 1340/3335] Update nginxproxymanager-install.sh fix for v2.10.1 --- install/nginxproxymanager-install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index bda3670c..5e920bbb 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -66,10 +66,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v2.9.22" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz -cd ./nginx-proxy-manager-2.9.22 -msg_ok "Downloaded Nginx Proxy Manager v2.9.22" +msg_info "Downloading Nginx Proxy Manager v${RELEASE}" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz +cd ./nginx-proxy-manager-${RELEASE} +msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python @@ -77,8 +77,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+2.9.22+g" backend/package.json -sed -i "s+0.0.0+2.9.22+g" frontend/package.json +sed -i "s+0.0.0+${RELEASE}+g" backend/package.json +sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") @@ -181,6 +181,7 @@ motd_ssh root msg_info "Starting Services" +sed -i 's/^pid/#pid/' /usr/local/openresty/nginx/conf/nginx.conf $STD systemctl enable --now openresty $STD systemctl enable --now npm msg_ok "Started Services" From 420492341f4e0ce49683693804cbe33a60929308 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Mar 2023 06:14:49 -0400 Subject: [PATCH 1341/3335] Update nginxproxymanager.sh fix update for v2.10.1 --- ct/nginxproxymanager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 012ebd53..7e7fafd2 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -158,6 +158,7 @@ EOF msg_ok "Initialized Backend" msg_info "Starting Services" + sed -i 's/^pid/#pid/' /usr/local/openresty/nginx/conf/nginx.conf systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm From 46836f0583045f4f10f77ec979e18861ae7b9186 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Mar 2023 06:17:21 -0400 Subject: [PATCH 1342/3335] Update nginxproxymanager.sh download latest --- ct/nginxproxymanager.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 7e7fafd2..c17e3c53 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -74,18 +74,18 @@ function update_script() { /var/cache/nginx &>/dev/null msg_ok "Cleaned Old Files" - msg_info "Downloading NPM v2.9.22" - wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz &>/dev/null - cd nginx-proxy-manager-2.9.22 - msg_ok "Downloaded NPM v2.9.22" + msg_info "Downloading NPM v${RELEASE}" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null + cd nginx-proxy-manager-${RELEASE} + msg_ok "Downloaded NPM v${RELEASE}" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx - sed -i "s+0.0.0+2.9.22+g" backend/package.json - sed -i "s+0.0.0+2.9.22+g" frontend/package.json + sed -i "s+0.0.0+${RELEASE}+g" backend/package.json + sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do From d0528d4913272b81d23baca1ad35044f3f48d4fb Mon Sep 17 00:00:00 2001 From: Jimi Ford Date: Wed, 29 Mar 2023 18:21:05 -0400 Subject: [PATCH 1343/3335] Update CONTRIBUTING.md (#1272) --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2f938e25..bc95960c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,4 +2,4 @@ Everybody is invited and welcome to contribute to Proxmox Helper Scripts. -- Pull requests are always created against the [**pull-requests**](https://github.com/tteck/Proxmox/tree/pull-requests) branch. +- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if I reject your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main) :partying_face:! From 651b81c7e27aebe509abe306bc6d7e7a66257d1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Mar 2023 18:41:02 -0400 Subject: [PATCH 1344/3335] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index acdc8c2d..74a9f44a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +

Contributing to Proxmox Helper Scripts

+ These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup provides additional options such as container type, root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox Helper Scripts

From 12a51913390165aa34b6a374661d79ddf91bf5a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Mar 2023 18:45:27 -0400 Subject: [PATCH 1345/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74a9f44a..3e093c9a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Contributing to Proxmox Helper Scripts

-These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup provides additional options such as container type, root password, hostname, disk size, core count, RAM size, network settings, and others. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine. +These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while The advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From 5f8c6ecdf85b1b1686cd7c538440fbbdb852686a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Mar 2023 18:46:33 -0400 Subject: [PATCH 1346/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e093c9a..a94517d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Contributing to Proxmox Helper Scripts

-These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while The advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine. +These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From 8d5e6aedd4d6a721d76af260c824d1b4198172b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Mar 2023 05:09:03 -0400 Subject: [PATCH 1347/3335] Update homepage-install.sh Change the installation method from using git to using releases. --- install/homepage-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 4ebc685e..157352c0 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -30,7 +29,12 @@ $STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Installing Homepage (Patience)" -$STD git clone https://github.com/benphelps/homepage.git /opt/homepage +RELEASE=$(curl -s https://api.github.com/repos/benphelps/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/benphelps/homepage/archive/refs/tags/v${RELEASE}.tar.gz +$STD tar -xvf v${RELEASE}.tar.gz +mkdir -p /opt/homepage +cp -r homepage-${RELEASE}/* /opt/homepage +rm -rf v${RELEASE}.tar.gz homepage-${RELEASE} cd /opt/homepage mkdir -p config cp /opt/homepage/src/skeleton/* /opt/homepage/config From a243d8ef260f97fb14f0344f8c7245ababe52cd9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Mar 2023 05:17:16 -0400 Subject: [PATCH 1348/3335] Update homepage-install.sh add back git for update --- install/homepage-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 157352c0..3800244f 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" From 3b2c81cf1c21fa6d811e3f23a9f116b61c8520fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Mar 2023 07:02:00 -0400 Subject: [PATCH 1349/3335] Optimizing code --- ct/adguard.sh | 1 - ct/alpine-adguard.sh | 1 - ct/alpine-docker.sh | 1 - ct/alpine-grafana.sh | 1 - ct/alpine-vaultwarden.sh | 1 - ct/alpine-whoogle.sh | 1 - ct/alpine-zigbee2mqtt.sh | 1 - ct/alpine.sh | 1 - ct/audiobookshelf.sh | 1 - ct/autobrr.sh | 1 - ct/blocky.sh | 1 - ct/casaos.sh | 1 - ct/changedetection.sh | 1 - ct/cronicle.sh | 1 - ct/daemonsync.sh | 1 - ct/dashy.sh | 1 - ct/debian.sh | 1 - ct/deconz.sh | 1 - ct/deluge.sh | 1 - ct/devuan.sh | 1 - ct/docker.sh | 1 - ct/emby.sh | 1 - ct/emqx.sh | 1 - ct/esphome.sh | 1 - ct/go2rtc.sh | 1 - ct/grafana.sh | 1 - ct/grocy.sh | 1 - ct/heimdalldashboard.sh | 1 - ct/homeassistant-core.sh | 1 - ct/homeassistant.sh | 1 - ct/homebridge.sh | 1 - ct/homepage.sh | 1 - ct/homer.sh | 1 - ct/hyperion.sh | 1 - ct/influxdb.sh | 1 - ct/iobroker.sh | 1 - ct/jackett.sh | 1 - ct/jellyfin.sh | 1 - ct/k0s.sh | 1 - ct/kavita.sh | 1 - ct/keycloak.sh | 1 - ct/lidarr.sh | 1 - ct/magicmirror.sh | 1 - ct/mariadb.sh | 1 - ct/meshcentral.sh | 1 - ct/motioneye.sh | 1 - ct/mqtt.sh | 1 - ct/n8n.sh | 1 - ct/navidrome.sh | 1 - ct/nextcloudpi.sh | 1 - ct/nginxproxymanager.sh | 1 - ct/nocodb.sh | 1 - ct/node-red.sh | 1 - ct/omada.sh | 1 - ct/omv.sh | 1 - ct/openhab.sh | 1 - ct/paperless-ngx.sh | 1 - ct/photoprism.sh | 1 - ct/pihole.sh | 1 - ct/plex.sh | 1 - ct/podman-homeassistant.sh | 1 - ct/podman.sh | 1 - ct/postgresql.sh | 1 - ct/prometheus.sh | 1 - ct/prowlarr.sh | 1 - ct/qbittorrent.sh | 1 - ct/radarr.sh | 1 - ct/readarr.sh | 1 - ct/rockylinux.sh | 1 - ct/rstptoweb.sh | 1 - ct/sabnzbd.sh | 1 - ct/scrypted.sh | 1 - ct/shinobi.sh | 1 - ct/sonarr.sh | 1 - ct/syncthing.sh | 1 - ct/tdarr.sh | 1 - ct/technitiumdns.sh | 1 - ct/transmission.sh | 1 - ct/trilium.sh | 1 - ct/ubuntu.sh | 1 - ct/umbrel.sh | 1 - ct/unifi.sh | 1 - ct/uptimekuma.sh | 1 - ct/vaultwarden.sh | 1 - ct/whisparr.sh | 1 - ct/whoogle.sh | 1 - ct/wikijs.sh | 1 - ct/wireguard.sh | 1 - ct/yunohost.sh | 1 - ct/zigbee2mqtt.sh | 1 - ct/zwave-js-ui.sh | 1 - misc/build.func | 1 + 92 files changed, 1 insertion(+), 91 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index c36e12bf..e8c65085 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -78,7 +78,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 5dd9e955..248aa7f2 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -81,7 +81,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 8bde63ce..a7b08ba6 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -75,7 +75,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 36872876..7cb26ae6 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -88,7 +88,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 70b5f7f8..45ea5390 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -81,7 +81,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh index 7dbf5066..b2e2eaa7 100644 --- a/ct/alpine-whoogle.sh +++ b/ct/alpine-whoogle.sh @@ -79,7 +79,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index f9185143..55df4544 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -75,7 +75,6 @@ function update_script() { done } -ssh_check start build_container description diff --git a/ct/alpine.sh b/ct/alpine.sh index 3eb6a0c9..a3348a9f 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -63,7 +63,6 @@ exit; fi } -ssh_check start build_container description diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index b208249c..558dbc44 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 91e8a8be..3261b560 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -71,7 +71,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/blocky.sh b/ct/blocky.sh index 4a2f77b2..08e769e8 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/casaos.sh b/ct/casaos.sh index 593379c8..c98a025d 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/changedetection.sh b/ct/changedetection.sh index d0ba97e8..c8da20ae 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 3f812270..53702989 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -100,7 +100,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 7f6ed79f..d13e5b40 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/dashy.sh b/ct/dashy.sh index 7b95c492..5c76cf70 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -86,7 +86,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/debian.sh b/ct/debian.sh index dc09cba4..b67a0a26 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/deconz.sh b/ct/deconz.sh index f5aee5fc..6195bd10 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/deluge.sh b/ct/deluge.sh index b82cebce..0b3ce6c4 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -61,7 +61,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/devuan.sh b/ct/devuan.sh index beb4b23d..db48bf4e 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/docker.sh b/ct/docker.sh index 77b9c184..1805787c 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/emby.sh b/ct/emby.sh index d87c1aae..2e617cfb 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -71,7 +71,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/emqx.sh b/ct/emqx.sh index e3ce0056..7c0ffcd9 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/esphome.sh b/ct/esphome.sh index 82c0c6c8..cd6e56d2 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -68,7 +68,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index b840dc30..58b82f5c 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -61,7 +61,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/grafana.sh b/ct/grafana.sh index 4a363954..3de34626 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/grocy.sh b/ct/grocy.sh index f33b8a87..dd30c554 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 6eeaf236..aad87f46 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -140,7 +140,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index b635db1d..858433c2 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -207,7 +207,6 @@ EOF fi } -ssh_check start build_container description diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 7c96ab1c..ac667247 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -128,7 +128,6 @@ WantedBy=default.target" >$service_path fi } -ssh_check start build_container description diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 8b67fdb1..22039d22 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/homepage.sh b/ct/homepage.sh index 87bc8cc1..e8041087 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -67,7 +67,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/homer.sh b/ct/homer.sh index 05939da2..217b2800 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -84,7 +84,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 0021c3be..92535765 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 8b6c3150..f6c078cf 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 17dcd29d..841f135e 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/jackett.sh b/ct/jackett.sh index 2c6eff8d..f895f4d7 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index a67c5967..d11b8212 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/k0s.sh b/ct/k0s.sh index 5f39de39..75b5648a 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/kavita.sh b/ct/kavita.sh index f0ebf4cc..8410daa7 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 2585d900..4488dd1a 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/lidarr.sh b/ct/lidarr.sh index c4959153..6bc88997 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index aeda1e47..c57121c2 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -63,7 +63,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 857fabbb..d6894ed9 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 932ea4bd..2739b517 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/motioneye.sh b/ct/motioneye.sh index b5084568..4a106f03 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 312c467d..0dde1c0e 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/n8n.sh b/ct/n8n.sh index 297c9eed..d4862ef1 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 0ebb3d38..c9e53584 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -71,7 +71,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 52f04f49..a1718208 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index c17e3c53..e8c5be3a 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -172,7 +172,6 @@ EOF exit } -ssh_check start build_container description diff --git a/ct/nocodb.sh b/ct/nocodb.sh index e56521ba..4b7636f6 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -63,7 +63,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/node-red.sh b/ct/node-red.sh index c90d898c..3dba9183 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -96,7 +96,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/omada.sh b/ct/omada.sh index 51127d43..104183df 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/omv.sh b/ct/omv.sh index c898c92e..532df042 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/openhab.sh b/ct/openhab.sh index d197aec1..21a77dc7 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 30b1d9f9..09d46d45 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -132,7 +132,6 @@ EOF fi } -ssh_check start build_container description diff --git a/ct/photoprism.sh b/ct/photoprism.sh index c6c943bd..231f7d1e 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -86,7 +86,6 @@ function update_script() { exit } -ssh_check start build_container description diff --git a/ct/pihole.sh b/ct/pihole.sh index 57f09f15..07e786ea 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/plex.sh b/ct/plex.sh index beb328e7..48d12505 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -71,7 +71,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index e3ccf4d7..d916cc95 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -111,7 +111,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/podman.sh b/ct/podman.sh index c18a858a..b4297c51 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 606ee95d..f0b606a1 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/prometheus.sh b/ct/prometheus.sh index bfbf2367..16f17758 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index cb5c5347..2c323541 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 499cfcf3..83cc8526 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -61,7 +61,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/radarr.sh b/ct/radarr.sh index df6704a8..a379e8ac 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/readarr.sh b/ct/readarr.sh index 40e2ac20..bea527d0 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index 715a4a5f..edc69291 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh index c7db7f59..1c1bb453 100644 --- a/ct/rstptoweb.sh +++ b/ct/rstptoweb.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 8514ba30..ea75032d 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -66,7 +66,6 @@ msg_ok "Updated $APP" exit } -ssh_check start build_container description diff --git a/ct/scrypted.sh b/ct/scrypted.sh index eadc2f0f..d307d78c 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/shinobi.sh b/ct/shinobi.sh index b8b003bf..bc5572e6 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -64,7 +64,6 @@ msg_ok "Updated Shinobi LXC" exit } -ssh_check start build_container description diff --git a/ct/sonarr.sh b/ct/sonarr.sh index 48a249e5..ac6f2399 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/syncthing.sh b/ct/syncthing.sh index f6b3d67c..292cf4db 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -62,7 +62,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 1d570df8..994ae3db 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index ca568c91..f947cd07 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -70,7 +70,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/transmission.sh b/ct/transmission.sh index cb0f21d8..94e654d6 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/trilium.sh b/ct/trilium.sh index 1288b82a..3e15c458 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -80,7 +80,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index c30b4067..bc2f0cc6 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/umbrel.sh b/ct/umbrel.sh index d35b3ac1..46ed1aa2 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -60,7 +60,6 @@ msg_ok "Updated ${APP} LXC" exit } -ssh_check start build_container description diff --git a/ct/unifi.sh b/ct/unifi.sh index bd619787..542f1f87 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -61,7 +61,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 77b81ecc..4f64ecc3 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -78,7 +78,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index e5373967..8f887956 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -131,7 +131,6 @@ function update_script() { fi } -ssh_check start build_container description diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 2a99863f..c616282a 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -61,7 +61,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 67ecf793..e93b19d7 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -60,7 +60,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/wikijs.sh b/ct/wikijs.sh index a8051de0..e1ac9863 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -83,7 +83,6 @@ msg_ok "Update Successfull" exit } -ssh_check start build_container description diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 4afea4d0..553de4e5 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -115,7 +115,6 @@ exit fi } -ssh_check start build_container description diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 6ffda45d..22198999 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -60,7 +60,6 @@ msg_ok "Updated $APP LXC" exit } -ssh_check start build_container description diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index a91c9ec4..c1c59ff0 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -126,7 +126,6 @@ function update_script() { exit } -ssh_check start build_container description diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 2dfcaaa5..ed8c0d64 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -78,7 +78,6 @@ function update_script() { exit } -ssh_check start build_container description diff --git a/misc/build.func b/misc/build.func index a6e7e0e3..43dd3fbe 100644 --- a/misc/build.func +++ b/misc/build.func @@ -342,6 +342,7 @@ advanced_settings() { } install_script() { + ssh_check arch_check pve_check NEXTID=$(pvesh get /cluster/nextid) From ca8ed4f5cb78eced991f4ec0e27d7a4a8b96581d Mon Sep 17 00:00:00 2001 From: LordXaosa Date: Fri, 31 Mar 2023 00:37:54 +0300 Subject: [PATCH 1350/3335] Fix missing methods (#1275) Some Heimdall apps uses method simplexml_load_string() which depends on php-xml package. Since Heimdall uses php 7.4 I added such dependency. --- install/heimdalldashboard-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 8e83e9ef..a26b67ea 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -23,6 +23,7 @@ msg_info "Installing PHP" $STD apt-get install -y php $STD apt-get install -y php-sqlite3 $STD apt-get install -y php-zip +$STD apt-get install -y php7.4-xml msg_ok "Installed PHP" RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') From 645f0ab431f2a7694f75120e38c90daee3e9aafd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Mar 2023 23:25:02 -0400 Subject: [PATCH 1351/3335] Update heimdalldashboard-install.sh By default, Debian 11 (Bullseye) includes PHP version 7.4 --- install/heimdalldashboard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index a26b67ea..df8e7cc2 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -23,7 +23,7 @@ msg_info "Installing PHP" $STD apt-get install -y php $STD apt-get install -y php-sqlite3 $STD apt-get install -y php-zip -$STD apt-get install -y php7.4-xml +$STD apt-get install -y php-xml msg_ok "Installed PHP" RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') From 4ca034ed11449001f2ff445c0855100438715aa8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 00:57:43 -0400 Subject: [PATCH 1352/3335] Update nginxproxymanager.sh prep for v2.10.2 --- ct/nginxproxymanager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index e8c5be3a..1b9c33f6 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -158,7 +158,7 @@ EOF msg_ok "Initialized Backend" msg_info "Starting Services" - sed -i 's/^pid/#pid/' /usr/local/openresty/nginx/conf/nginx.conf + sed -i -e 's/^pid/#pid/' -e 's/^user/#user/' /usr/local/openresty/nginx/conf/nginx.conf systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm From 1088e52b615caa366ddf6dade3fdbba691f0fb68 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 00:58:44 -0400 Subject: [PATCH 1353/3335] Update nginxproxymanager-install.sh prep for v2.10.2 --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 5e920bbb..1108198d 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -181,7 +181,7 @@ motd_ssh root msg_info "Starting Services" -sed -i 's/^pid/#pid/' /usr/local/openresty/nginx/conf/nginx.conf +sed -i -e 's/^pid/#pid/' -e 's/^user/#user/' /usr/local/openresty/nginx/conf/nginx.conf $STD systemctl enable --now openresty $STD systemctl enable --now npm msg_ok "Started Services" From 59bfc8d3e3fa2dc77f2c1f52957e2a666389ada0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 17:26:56 -0400 Subject: [PATCH 1354/3335] Update haos-vm.sh Include a choice within the "Advanced" settings to configure the disk cache. --- vm/haos-vm.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index ab628f89..8f3c244b 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -112,6 +112,7 @@ function default_settings() { VMID="$NEXTID" FORMAT=",efitype=4m" MACHINE="" + DISK_CACHE="" HN="haos$stable" CORE_COUNT="2" RAM_SIZE="4096" @@ -123,6 +124,7 @@ function default_settings() { echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" @@ -141,6 +143,7 @@ function advanced_settings() { 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi + while true; do VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? @@ -173,6 +176,20 @@ function advanced_settings() { FORMAT=",efitype=4m" MACHINE="" fi + + DISK_CACHE1=$(whiptail --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "Default" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $DISK_CACHE1 = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" + DISK_CACHE="" + fi + VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $VM_NAME ]; then @@ -184,6 +201,7 @@ function advanced_settings() { echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" fi fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $CORE_COUNT ]; then @@ -192,6 +210,7 @@ function advanced_settings() { else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $RAM_SIZE ]; then @@ -200,6 +219,7 @@ function advanced_settings() { else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi fi + BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then @@ -208,6 +228,7 @@ function advanced_settings() { else if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi fi + MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $MAC1 ]; then @@ -219,6 +240,7 @@ function advanced_settings() { echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi + VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -230,6 +252,7 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -241,6 +264,7 @@ function advanced_settings() { echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi fi + if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" @@ -248,6 +272,7 @@ function advanced_settings() { echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else @@ -342,7 +367,7 @@ pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ - -scsi0 ${DISK1_REF},${THIN}size=32G \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=32G \ -boot order=scsi0 \ -description "# Home Assistant OS ### https://github.com/tteck/Proxmox From 324a485930d8a2e292f9a224ccce34ad331a6653 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 17:30:53 -0400 Subject: [PATCH 1355/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index dd74f685..b577dfc1 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-03-31 + +### Changed + +- **Home Assistant OS VM** + - Include a choice within the "Advanced" settings to configure the disk cache. + ## 2023-03-27 ### Changed From daa1720d85e5288c4b279fc4eaccd31f2b06e75a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 18:02:24 -0400 Subject: [PATCH 1356/3335] Update nginxproxymanager-install.sh --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 1108198d..e3eb7d8b 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -40,7 +40,7 @@ $STD python3 -m venv /opt/certbot/ if [ "$(getconf LONG_BIT)" = "32" ]; then $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 fi -$STD python3 -m pip install --no-cache-dir cffi certbot +$STD python3 -m pip install --no-cache-dir cffi certbot certbot-dns-cloudflare msg_ok "Installed Python" msg_info "Installing Openresty" From 1f17d282a611670e767f166f746e76bb3fccba0e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 18:04:25 -0400 Subject: [PATCH 1357/3335] Update nginxproxymanager.sh --- ct/nginxproxymanager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 1b9c33f6..cb447ad2 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -124,6 +124,7 @@ function update_script() { mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global + python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null msg_ok "Setup Enviroment" msg_info "Building Frontend" From d8ed7b5060033ce3a9653d4961181e10534f2ac3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 20:02:47 -0400 Subject: [PATCH 1358/3335] Update nginxproxymanager-install.sh lock script to version 2.9.22 --- install/nginxproxymanager-install.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index e3eb7d8b..bda3670c 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -40,7 +40,7 @@ $STD python3 -m venv /opt/certbot/ if [ "$(getconf LONG_BIT)" = "32" ]; then $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 fi -$STD python3 -m pip install --no-cache-dir cffi certbot certbot-dns-cloudflare +$STD python3 -m pip install --no-cache-dir cffi certbot msg_ok "Installed Python" msg_info "Installing Openresty" @@ -66,10 +66,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v${RELEASE}" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz -cd ./nginx-proxy-manager-${RELEASE} -msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" +msg_info "Downloading Nginx Proxy Manager v2.9.22" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz +cd ./nginx-proxy-manager-2.9.22 +msg_ok "Downloaded Nginx Proxy Manager v2.9.22" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python @@ -77,8 +77,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+${RELEASE}+g" backend/package.json -sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json +sed -i "s+0.0.0+2.9.22+g" backend/package.json +sed -i "s+0.0.0+2.9.22+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") @@ -181,7 +181,6 @@ motd_ssh root msg_info "Starting Services" -sed -i -e 's/^pid/#pid/' -e 's/^user/#user/' /usr/local/openresty/nginx/conf/nginx.conf $STD systemctl enable --now openresty $STD systemctl enable --now npm msg_ok "Started Services" From 5826ee33b36c82bd91ac5dda1f18d04294532038 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 Mar 2023 20:04:57 -0400 Subject: [PATCH 1359/3335] Update nginxproxymanager.sh lock script version to 2.9.22 --- ct/nginxproxymanager.sh | 310 +++++++++++++++++++++------------------- 1 file changed, 160 insertions(+), 150 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index cb447ad2..bda3670c 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -1,145 +1,144 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) + # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -function header_info { - clear - cat <<"EOF" - _ __ _ ____ __ ___ - / | / /___ _(_)___ _ __ / __ \_________ __ ____ __ / |/ /___ _____ ____ _____ ____ _____ - / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ - / /| / /_/ / / / / /> < / ____/ / / /_/ /> /dev/null - msg_ok "Cleaned Old Files" +msg_info "Installing Openresty" +$STD apt-key add <(curl -fsSL https://openresty.org/package/pubkey.gpg) +sh -c 'echo "deb http://openresty.org/package/debian $(lsb_release -cs) openresty" > /etc/apt/sources.list.d/openresty.list' +$STD apt-get -y update +$STD apt-get -y install --no-install-recommends openresty +msg_ok "Installed Openresty" - msg_info "Downloading NPM v${RELEASE}" - wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null - cd nginx-proxy-manager-${RELEASE} - msg_ok "Downloaded NPM v${RELEASE}" +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" - msg_info "Setting up Enviroment" - ln -sf /usr/bin/python3 /usr/bin/python - ln -sf /usr/bin/certbot /opt/certbot/bin/certbot - ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx - ln -sf /usr/local/openresty/nginx/ /etc/nginx - sed -i "s+0.0.0+${RELEASE}+g" backend/package.json - sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json - sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf - NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") - for NGINX_CONF in $NGINX_CONFS; do - sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" - done - mkdir -p /var/www/html /etc/nginx/logs - cp -r docker/rootfs/var/www/html/* /var/www/html/ - cp -r docker/rootfs/etc/nginx/* /etc/nginx/ - cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini - cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager - ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf - rm -f /etc/nginx/conf.d/dev.conf - mkdir -p /tmp/nginx/body \ - /run/nginx \ - /data/nginx \ - /data/custom_ssl \ - /data/logs \ - /data/access \ - /data/nginx/default_host \ - /data/nginx/default_www \ - /data/nginx/proxy_host \ - /data/nginx/redirection_host \ - /data/nginx/stream \ - /data/nginx/dead_host \ - /data/nginx/temp \ - /var/lib/nginx/cache/public \ - /var/lib/nginx/cache/private \ - /var/cache/nginx/proxy_temp - chmod -R 777 /var/cache/nginx - chown root /tmp/nginx - echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf - if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null - fi - mkdir -p /app/global /app/frontend/images - cp -r backend/* /app - cp -r global/* /app/global - python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null - msg_ok "Setup Enviroment" +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" - msg_info "Building Frontend" - cd ./frontend - export NODE_ENV=development - yarn install --network-timeout=30000 &>/dev/null - yarn build &>/dev/null - cp -r dist/* /app/frontend - cp -r app-images/* /app/frontend/images - msg_ok "Built Frontend" +msg_info "Installing Yarn" +$STD npm install --global yarn +msg_ok "Installed Yarn" - msg_info "Initializing Backend" - rm -rf /app/config/default.json &>/dev/null - if [ ! -f /app/config/production.json ]; then - cat <<'EOF' >/app/config/production.json +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Downloading Nginx Proxy Manager v2.9.22" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz +cd ./nginx-proxy-manager-2.9.22 +msg_ok "Downloaded Nginx Proxy Manager v2.9.22" + +msg_info "Setting up Enviroment" +ln -sf /usr/bin/python3 /usr/bin/python +ln -sf /usr/bin/certbot /opt/certbot/bin/certbot +ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx +ln -sf /usr/local/openresty/nginx/ /etc/nginx + +sed -i "s+0.0.0+2.9.22+g" backend/package.json +sed -i "s+0.0.0+2.9.22+g" frontend/package.json + +sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf +NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") +for NGINX_CONF in $NGINX_CONFS; do + sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" +done + +mkdir -p /var/www/html /etc/nginx/logs +cp -r docker/rootfs/var/www/html/* /var/www/html/ +cp -r docker/rootfs/etc/nginx/* /etc/nginx/ +cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini +cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager +ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf +rm -f /etc/nginx/conf.d/dev.conf + +mkdir -p /tmp/nginx/body \ + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp + +chmod -R 777 /var/cache/nginx +chown root /tmp/nginx + +echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf + +if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then + echo -en "${GN} Generating dummy SSL Certificate... " + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null +fi + +mkdir -p /app/global /app/frontend/images +cp -r backend/* /app +cp -r global/* /app/global +msg_ok "Set up Enviroment" + +msg_info "Building Frontend" +cd ./frontend +export NODE_ENV=development +$STD yarn install --network-timeout=30000 +$STD yarn build +cp -r dist/* /app/frontend +cp -r app-images/* /app/frontend/images +msg_ok "Built Frontend" + +msg_info "Initializing Backend" +rm -rf /app/config/default.json +if [ ! -f /app/config/production.json ]; then + cat <<'EOF' >/app/config/production.json { "database": { "engine": "knex-native", @@ -152,31 +151,42 @@ function update_script() { } } EOF - fi - cd /app - export NODE_ENV=development - yarn install --network-timeout=30000 &>/dev/null - msg_ok "Initialized Backend" +fi +cd /app +export NODE_ENV=development +$STD yarn install --network-timeout=30000 +msg_ok "Initialized Backend" - msg_info "Starting Services" - sed -i -e 's/^pid/#pid/' -e 's/^user/#user/' /usr/local/openresty/nginx/conf/nginx.conf - systemctl enable npm &>/dev/null - systemctl start openresty - systemctl start npm - msg_ok "Started Services" +msg_info "Creating Service" +cat <<'EOF' >/lib/systemd/system/npm.service +[Unit] +Description=Nginx Proxy Manager +After=network.target +Wants=openresty.service - msg_info "Cleaning up" - rm -rf ~/nginx-proxy-manager-* - msg_ok "Cleaned" +[Service] +Type=simple +Environment=NODE_ENV=production +ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge +ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 +WorkingDirectory=/app +Restart=on-failure - msg_ok "Update Successfull" - exit -} +[Install] +WantedBy=multi-user.target +EOF +msg_ok "Created Service" -start -build_container -description +motd_ssh +root -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} \n" +msg_info "Starting Services" +$STD systemctl enable --now openresty +$STD systemctl enable --now npm +msg_ok "Started Services" + +msg_info "Cleaning up" +rm -rf ../nginx-proxy-manager-* +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From a03831227ad3f501c1b07f3454e900c8c9ef0994 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Apr 2023 05:36:01 -0400 Subject: [PATCH 1360/3335] Update nginxproxymanager.sh --- ct/nginxproxymanager.sh | 308 +++++++++++++++++++--------------------- 1 file changed, 148 insertions(+), 160 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index bda3670c..ce7fc32f 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -1,144 +1,144 @@ #!/usr/bin/env bash - +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +function header_info { + clear + cat <<"EOF" + _ __ _ ____ __ ___ + / | / /___ _(_)___ _ __ / __ \_________ __ ____ __ / |/ /___ _____ ____ _____ ____ _____ + / |/ / __ / / __ \| |/_/ / /_/ / ___/ __ \| |/_/ / / / / /|_/ / __ / __ \/ __ / __ / _ \/ ___/ + / /| / /_/ / / / / /> < / ____/ / / /_/ /> /etc/apt/sources.list.d/openresty.list' -$STD apt-get -y update -$STD apt-get -y install --no-install-recommends openresty -msg_ok "Installed Openresty" + msg_info "Cleaning Old Files" + rm -rf /app \ + /var/www/html \ + /etc/nginx \ + /var/log/nginx \ + /var/lib/nginx \ + /var/cache/nginx &>/dev/null + msg_ok "Cleaned Old Files" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" + msg_info "Downloading NPM v2.9.22" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz &>/dev/null + cd nginx-proxy-manager-2.9.22 + msg_ok "Downloaded NPM v2.9.22" -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" + msg_info "Setting up Enviroment" + ln -sf /usr/bin/python3 /usr/bin/python + ln -sf /usr/bin/certbot /opt/certbot/bin/certbot + ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx + ln -sf /usr/local/openresty/nginx/ /etc/nginx + sed -i "s+0.0.0+2.9.22+g" backend/package.json + sed -i "s+0.0.0+2.9.22+g" frontend/package.json + sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf + NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") + for NGINX_CONF in $NGINX_CONFS; do + sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" + done + mkdir -p /var/www/html /etc/nginx/logs + cp -r docker/rootfs/var/www/html/* /var/www/html/ + cp -r docker/rootfs/etc/nginx/* /etc/nginx/ + cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini + cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager + ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf + rm -f /etc/nginx/conf.d/dev.conf + mkdir -p /tmp/nginx/body \ + /run/nginx \ + /data/nginx \ + /data/custom_ssl \ + /data/logs \ + /data/access \ + /data/nginx/default_host \ + /data/nginx/default_www \ + /data/nginx/proxy_host \ + /data/nginx/redirection_host \ + /data/nginx/stream \ + /data/nginx/dead_host \ + /data/nginx/temp \ + /var/lib/nginx/cache/public \ + /var/lib/nginx/cache/private \ + /var/cache/nginx/proxy_temp + chmod -R 777 /var/cache/nginx + chown root /tmp/nginx + echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf + if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then + echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" + openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null + fi + mkdir -p /app/global /app/frontend/images + cp -r backend/* /app + cp -r global/* /app/global + msg_ok "Setup Enviroment" -msg_info "Installing Yarn" -$STD npm install --global yarn -msg_ok "Installed Yarn" + msg_info "Building Frontend" + cd ./frontend + export NODE_ENV=development + yarn install --network-timeout=30000 &>/dev/null + yarn build &>/dev/null + cp -r dist/* /app/frontend + cp -r app-images/* /app/frontend/images + msg_ok "Built Frontend" -RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Downloading Nginx Proxy Manager v2.9.22" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz -cd ./nginx-proxy-manager-2.9.22 -msg_ok "Downloaded Nginx Proxy Manager v2.9.22" - -msg_info "Setting up Enviroment" -ln -sf /usr/bin/python3 /usr/bin/python -ln -sf /usr/bin/certbot /opt/certbot/bin/certbot -ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx -ln -sf /usr/local/openresty/nginx/ /etc/nginx - -sed -i "s+0.0.0+2.9.22+g" backend/package.json -sed -i "s+0.0.0+2.9.22+g" frontend/package.json - -sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf -NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") -for NGINX_CONF in $NGINX_CONFS; do - sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF" -done - -mkdir -p /var/www/html /etc/nginx/logs -cp -r docker/rootfs/var/www/html/* /var/www/html/ -cp -r docker/rootfs/etc/nginx/* /etc/nginx/ -cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini -cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager -ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf -rm -f /etc/nginx/conf.d/dev.conf - -mkdir -p /tmp/nginx/body \ - /run/nginx \ - /data/nginx \ - /data/custom_ssl \ - /data/logs \ - /data/access \ - /data/nginx/default_host \ - /data/nginx/default_www \ - /data/nginx/proxy_host \ - /data/nginx/redirection_host \ - /data/nginx/stream \ - /data/nginx/dead_host \ - /data/nginx/temp \ - /var/lib/nginx/cache/public \ - /var/lib/nginx/cache/private \ - /var/cache/nginx/proxy_temp - -chmod -R 777 /var/cache/nginx -chown root /tmp/nginx - -echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf - -if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -en "${GN} Generating dummy SSL Certificate... " - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null -fi - -mkdir -p /app/global /app/frontend/images -cp -r backend/* /app -cp -r global/* /app/global -msg_ok "Set up Enviroment" - -msg_info "Building Frontend" -cd ./frontend -export NODE_ENV=development -$STD yarn install --network-timeout=30000 -$STD yarn build -cp -r dist/* /app/frontend -cp -r app-images/* /app/frontend/images -msg_ok "Built Frontend" - -msg_info "Initializing Backend" -rm -rf /app/config/default.json -if [ ! -f /app/config/production.json ]; then - cat <<'EOF' >/app/config/production.json + msg_info "Initializing Backend" + rm -rf /app/config/default.json &>/dev/null + if [ ! -f /app/config/production.json ]; then + cat <<'EOF' >/app/config/production.json { "database": { "engine": "knex-native", @@ -151,42 +151,30 @@ if [ ! -f /app/config/production.json ]; then } } EOF -fi -cd /app -export NODE_ENV=development -$STD yarn install --network-timeout=30000 -msg_ok "Initialized Backend" + fi + cd /app + export NODE_ENV=development + yarn install --network-timeout=30000 &>/dev/null + msg_ok "Initialized Backend" -msg_info "Creating Service" -cat <<'EOF' >/lib/systemd/system/npm.service -[Unit] -Description=Nginx Proxy Manager -After=network.target -Wants=openresty.service + msg_info "Starting Services" + systemctl enable npm &>/dev/null + systemctl start openresty + systemctl start npm + msg_ok "Started Services" -[Service] -Type=simple -Environment=NODE_ENV=production -ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge -ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 -WorkingDirectory=/app -Restart=on-failure + msg_info "Cleaning up" + rm -rf ~/nginx-proxy-manager-* + msg_ok "Cleaned" -[Install] -WantedBy=multi-user.target -EOF -msg_ok "Created Service" + msg_ok "Update Successfull" + exit +} -motd_ssh -root +start +build_container +description -msg_info "Starting Services" -$STD systemctl enable --now openresty -$STD systemctl enable --now npm -msg_ok "Started Services" - -msg_info "Cleaning up" -rm -rf ../nginx-proxy-manager-* -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:81${CL} \n" From 2ff5df2ea8e84ef636d23c824fcb8a977043d83f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Apr 2023 09:06:28 -0400 Subject: [PATCH 1361/3335] Update haos-vm.sh Code refactoring --- vm/haos-vm.sh | 199 +++++++++++++++++++++++++++++--------------------- 1 file changed, 116 insertions(+), 83 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 8f3c244b..4af0722f 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -48,16 +48,19 @@ function error_handler() { echo -e "\n$error_message\n" cleanup_vmid } + function cleanup_vmid() { if qm status $VMID &>/dev/null; then qm stop $VMID &>/dev/null qm destroy $VMID &>/dev/null fi } + function cleanup() { popd >/dev/null rm -rf $TEMP_DIR } + TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then @@ -70,15 +73,18 @@ function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -function PVE_CHECK() { + +function pve_check() { if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.2 or higher" @@ -87,7 +93,8 @@ function PVE_CHECK() { exit fi } -function ARCH_CHECK() { + +function arch_check() { if [ "$(dpkg --print-architecture)" != "amd64" ]; then echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." @@ -95,7 +102,8 @@ function ARCH_CHECK() { exit fi } -function SSH_CHECK() { + +function ssh_check() { if command -v pveversion >/dev/null 2>&1; then if [ -n "${SSH_CLIENT:+x}" ]; then if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then @@ -107,6 +115,13 @@ function SSH_CHECK() { fi fi } + +exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function default_settings() { BRANCH="$stable" VMID="$NEXTID" @@ -136,133 +151,149 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { - BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ + if BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$stable" "Stable " ON \ "$beta" "Beta " OFF \ "$dev" "Dev " OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" + else + exit-script + fi while true; do - VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z "$VMID" ]; then - VMID="$NEXTID" - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break - else - if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then - echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" - sleep 2 - continue + if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break fi - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break + else + exit-script fi done - MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + if MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "i440fx" "Machine i440fx" ON \ "q35" "Machine q35" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $MACH = q35 ]; then - echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT="" - MACHINE=" -machine q35" + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi else - echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT=",efitype=4m" - MACHINE="" + exit-script fi - DISK_CACHE1=$(whiptail --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + if DISK_CACHE1=$(whiptail --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ "0" "Default" ON \ "1" "Write Through" OFF \ - 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $DISK_CACHE1 = "1" ]; then - echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" - DISK_CACHE="cache=writethrough," + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE1 = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" + DISK_CACHE="" + fi else - echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" - DISK_CACHE="" + exit-script fi - VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $VM_NAME ]; then - HN="haos${BRANCH}" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - if [ $exitstatus = 0 ]; then + if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="haos${BRANCH}" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else HN=$(echo ${VM_NAME,,} | tr -d ' ') echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" fi + else + exit-script fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $CORE_COUNT ]; then - CORE_COUNT="2" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi + exit-script fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $RAM_SIZE ]; then - RAM_SIZE="4096" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="4096" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi + exit-script fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi else - if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi + exit-script fi - MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ -z $MAC1 ]; then - MAC="$GEN_MAC" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" - else - if [ $exitstatus = 0 ]; then + if MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else MAC="$MAC1" echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi + else + exit-script fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" + VLAN1="Default" + VLAN="" echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" else VLAN=",tag=$VLAN1" echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi + else + exit-script fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" + MTU1="Default" + MTU="" echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" else MTU=",mtu=$MTU1" echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi + else + exit-script fi if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then @@ -281,7 +312,8 @@ function advanced_settings() { advanced_settings fi } -function START_SCRIPT() { + +function start_script() { if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" @@ -292,10 +324,11 @@ function START_SCRIPT() { advanced_settings fi } -ARCH_CHECK -PVE_CHECK -SSH_CHECK -START_SCRIPT + +arch_check +pve_check +ssh_check +start_script msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') From a2b5ce070d93e100accb9a51b4cd49eb844bb536 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Apr 2023 08:48:09 -0400 Subject: [PATCH 1362/3335] Update haos-vm.sh tweak --- vm/haos-vm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 4af0722f..64eea8ba 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -116,7 +116,7 @@ function ssh_check() { fi } -exit-script() { +function exit-script() { clear echo -e "⚠ User exited script \n" exit @@ -150,6 +150,7 @@ function default_settings() { echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } + function advanced_settings() { if BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$stable" "Stable " ON \ @@ -329,6 +330,7 @@ arch_check pve_check ssh_check start_script + msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') From 49263e9874b602dccabb22cbc4adb43943411207 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Apr 2023 11:26:00 -0400 Subject: [PATCH 1363/3335] Update haos-vm.sh Include a choice within the "Advanced" settings to configure the CPU model between kvm64 (default) or host. --- vm/haos-vm.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 64eea8ba..199dabaa 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -129,6 +129,7 @@ function default_settings() { MACHINE="" DISK_CACHE="" HN="haos$stable" + CPU_TYPE="" CORE_COUNT="2" RAM_SIZE="4096" BRG="vmbr0" @@ -141,6 +142,7 @@ function default_settings() { echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}Default${CL}" echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" @@ -226,6 +228,21 @@ function advanced_settings() { exit-script fi + if CPU_TYPE1=$(whiptail --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}Default${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $CORE_COUNT ]; then CORE_COUNT="2" @@ -396,7 +413,7 @@ for i in {0,1}; do done msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" -qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE \ +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null From b1451e795e1f0675fcd6c0d12cc216939edab9e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Apr 2023 11:28:39 -0400 Subject: [PATCH 1364/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b577dfc1..352231e8 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,12 +2,19 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-02 + +### Changed + +- **Home Assistant OS VM** + - Include a choice within the "Advanced" settings to configure the CPU model between kvm64 (default) or host. + ## 2023-03-31 ### Changed - **Home Assistant OS VM** - - Include a choice within the "Advanced" settings to configure the disk cache. + - Include a choice within the "Advanced" settings to configure the disk cache between none (default) or Write Through. ## 2023-03-27 From 3e7f070ea836bf9436757f964269bb43b8a06a25 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Apr 2023 06:41:33 -0400 Subject: [PATCH 1365/3335] Update jellyfin-install.sh Use the Deb822 format jellyfin.sources --- install/jellyfin-install.sh | 49 +++++++++++++++---------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index e0ac97b4..98d427b0 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -16,9 +16,8 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo +$STD apt-get install -y gnupg $STD apt-get install -y mc -$STD apt-get install -y apt-transport-https -$STD apt-get install -y software-properties-common msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then @@ -37,35 +36,27 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then msg_ok "Set Up Hardware Acceleration" fi -msg_info "Setting Up Jellyfin Repository" -$STD add-apt-repository universe -y -$STD apt-key add <(curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key) -sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" > /etc/apt/sources.list.d/jellyfin.list' -msg_ok "Set Up Jellyfin Repository" - msg_info "Installing Jellyfin" -$STD apt-get update -$STD apt install jellyfin-server -y -$STD apt install jellyfin-ffmpeg5 -y -msg_ok "Installed Jellyfin" - -msg_info "Creating Service" -cat <<'EOF' >/lib/systemd/system/jellyfin.service -[Unit] -Description = Jellyfin Media Server -After = network.target -[Service] -Type = simple -EnvironmentFile = /etc/default/jellyfin -User = root -ExecStart = /usr/bin/jellyfin -Restart = on-failure -TimeoutSec = 15 -[Install] -WantedBy = multi-user.target +VERSION="$( awk -F'=' '/^UBUNTU_CODENAME=/{ print $NF }' /etc/os-release )" +# If the keyring directory is absent, create it +if [[ ! -d /etc/apt/keyrings ]]; then + mkdir -p /etc/apt/keyrings +fi +# Download the repository signing key and install it to the keyring directory +curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --yes --output /etc/apt/keyrings/jellyfin.gpg +# Install the Deb822 format jellyfin.sources entry +cat </etc/apt/sources.list.d/jellyfin.sources +Types: deb +URIs: https://repo.jellyfin.org/${PCT_OSTYPE} +Suites: ${VERSION} +Components: main +Architectures: amd64 +Signed-By: /etc/apt/keyrings/jellyfin.gpg EOF -ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web -msg_ok "Created Service" +# Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5) +$STD apt-get update +$STD apt-get install -y jellyfin +msg_ok "Installed Jellyfin" motd_ssh root From cd275ac57adb7f5a33a6e257495f3c67d790afb3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Apr 2023 06:42:37 -0400 Subject: [PATCH 1366/3335] Update jellyfin.sh Set v22.04 as default --- ct/jellyfin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index d11b8212..88eb4d8d 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -24,7 +24,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="ubuntu" -var_version="20.04" +var_version="22.04" variables color catch_errors From 6d644b35d73c7874dcf8202d3ef8a0af57f04e7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Apr 2023 06:44:12 -0400 Subject: [PATCH 1367/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 352231e8..7c6899db 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,14 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-05 + +### Changed + +- **Jellyfin LXC** + - Set Ubuntu 22.04 as default + - Use the Deb822 format jellyfin.sources configuration (jellyfin.list configuration has been obsoleted) + ## 2023-04-02 ### Changed From 1b0ec6b87d68b012745e96827cf8f582fefa4211 Mon Sep 17 00:00:00 2001 From: glerak Date: Fri, 7 Apr 2023 14:26:25 +0200 Subject: [PATCH 1368/3335] ct/podman-homeassistant.sh - added container update and purge images (#1304) Added podman container(s) update. Added removing unused images. --- ct/podman-homeassistant.sh | 98 +++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 38 deletions(-) diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index d916cc95..e806a7a8 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -57,58 +57,80 @@ function default_settings() { function update_script() { if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Update Podman" ON \ + "1" "Update system and containers" ON \ "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ + "4" "Remove ALL Unused Images" OFF \ 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" -exit + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + msg_ok "Update os system Successfull" + + msg_info "Updating All Containers\n" + CONTAINER_LIST="${1:-$(podman ps -q)}" + for container in ${CONTAINER_LIST}; do + CONTAINER_IMAGE="$(podman inspect --format "{{.Config.Image}}" --type container ${container})" + RUNNING_IMAGE="$(podman inspect --format "{{.Image}}" --type container "${container}")" + podman pull "docker.io/${CONTAINER_IMAGE}" + LATEST_IMAGE="$(podman inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" + if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then + echo "Updating ${container} image ${CONTAINER_IMAGE}" + systemctl restart homeassistant + fi + done + msg_ok "All containers updated." + exit fi if [ "$UPD" == "2" ]; then -msg_info "Installing Home Assistant Comunity Store (HACS)" -apt update &>/dev/null -apt install unzip &>/dev/null -cd /var/lib/containers/storage/volumes/hass_config/_data -bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null -msg_ok "Installed Home Assistant Comunity Store (HACS)" -echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" -exit + msg_info "Installing Home Assistant Comunity Store (HACS)" + apt update &>/dev/null + apt install unzip &>/dev/null + cd /var/lib/containers/storage/volumes/hass_config/_data + bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + msg_ok "Installed Home Assistant Comunity Store (HACS)" + echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" + exit fi if [ "$UPD" == "3" ]; then -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing FileBrowser" -curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null -filebrowser config init -a '0.0.0.0' &>/dev/null -filebrowser config set -a '0.0.0.0' &>/dev/null -filebrowser users add admin changeme --perm.admin &>/dev/null -msg_ok "Installed FileBrowser" + IP=$(hostname -I | awk '{print $1}') + msg_info "Installing FileBrowser" + curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser users add admin changeme --perm.admin &>/dev/null + msg_ok "Installed FileBrowser" -msg_info "Creating Service" -service_path="/etc/systemd/system/filebrowser.service" -echo "[Unit] -Description=Filebrowser -After=network-online.target -[Service] -User=root -WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r / -[Install] -WantedBy=default.target" >$service_path + msg_info "Creating Service" + service_path="/etc/systemd/system/filebrowser.service" + echo "[Unit] + Description=Filebrowser + After=network-online.target + [Service] + User=root + WorkingDirectory=/root/ + ExecStart=/usr/local/bin/filebrowser -r / + [Install] + WantedBy=default.target" >$service_path -systemctl enable --now filebrowser.service &>/dev/null -msg_ok "Created Service" + systemctl enable --now filebrowser.service &>/dev/null + msg_ok "Created Service" -msg_ok "Completed Successfully!\n" -echo -e "FileBrowser should be reachable by going to the following URL. + msg_ok "Completed Successfully!\n" + echo -e "FileBrowser should be reachable by going to the following URL. ${BL}http://$IP:8080${CL} admin|changeme\n" -exit + exit fi +if [ "$UPD" == "4" ]; then + msg_info "Removing ALL Unused Images" + podman image prune -a -f + msg_ok "Removed ALL Unused Images" + exit +fi + } start From fb34f21e7b48ca52cf6d9c8126f33bfb5bd3f80a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Apr 2023 11:30:08 -0400 Subject: [PATCH 1369/3335] Update influxdb.sh fix for rotating keys --- ct/influxdb.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ct/influxdb.sh b/ct/influxdb.sh index f6c078cf..e945cdde 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -53,10 +53,14 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" +msg_info "Updating ${APP}" +wget -q https://repos.influxdata.com/influxdata-archive_compat.key +cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null +echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list +rm -f /etc/apt/trusted.gpg.d/influxdb.gpg apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" +msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } From b2124be08f82169cc2902ba047f2544fb76d62af Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Apr 2023 11:32:38 -0400 Subject: [PATCH 1370/3335] Update grafana.sh fix for rotating keys --- ct/grafana.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ct/grafana.sh b/ct/grafana.sh index 3de34626..ea1136c5 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -52,11 +52,14 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" +if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +apt-key del 4E40DDF6D76E284A4A6780E48C8C34C524098CB6 +wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key +echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" +msg_ok "Updated ${APP}" msg_ok "Update Successfull" exit } From c1f7fd340e9835b70b458fe763b7bd9444de7876 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 03:11:31 -0400 Subject: [PATCH 1371/3335] Update nginxproxymanager-install.sh v2.10.2 --- install/nginxproxymanager-install.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index bda3670c..61a78c40 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -40,7 +40,7 @@ $STD python3 -m venv /opt/certbot/ if [ "$(getconf LONG_BIT)" = "32" ]; then $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 fi -$STD python3 -m pip install --no-cache-dir cffi certbot +$STD python3 -m pip install --no-cache-dir cffi certbot certbot-dns-cloudflare msg_ok "Installed Python" msg_info "Installing Openresty" @@ -66,10 +66,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v2.9.22" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz -cd ./nginx-proxy-manager-2.9.22 -msg_ok "Downloaded Nginx Proxy Manager v2.9.22" +msg_info "Downloading Nginx Proxy Manager v2.10.2" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.2 -O - | tar -xz +cd ./nginx-proxy-manager-2.10.2 +msg_ok "Downloaded Nginx Proxy Manager v2.10.2" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python @@ -77,8 +77,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+2.9.22+g" backend/package.json -sed -i "s+0.0.0+2.9.22+g" frontend/package.json +sed -i "s+0.0.0+2.10.2+g" backend/package.json +sed -i "s+0.0.0+2.10.2+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") @@ -124,6 +124,10 @@ fi mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global +wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-noarch.tar.xz" +wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-x86_64.tar.xz" +tar -C / -Jxpf s6-overlay-noarch.tar.xz +tar -C / -Jxpf s6-overlay-x86_64.tar.xz msg_ok "Set up Enviroment" msg_info "Building Frontend" @@ -181,12 +185,13 @@ motd_ssh root msg_info "Starting Services" +sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf $STD systemctl enable --now openresty $STD systemctl enable --now npm msg_ok "Started Services" msg_info "Cleaning up" -rm -rf ../nginx-proxy-manager-* +rm -rf ../nginx-proxy-manager-* s6-overlay-noarch.tar.xz s6-overlay-x86_64.tar.xz $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From b465ada678b56ee612c8f010aa66c8d8828b387b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 03:13:12 -0400 Subject: [PATCH 1372/3335] Update nginxproxymanager.sh v2.10.2 --- ct/nginxproxymanager.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index ce7fc32f..62603405 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT @@ -74,18 +74,18 @@ function update_script() { /var/cache/nginx &>/dev/null msg_ok "Cleaned Old Files" - msg_info "Downloading NPM v2.9.22" - wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.22 -O - | tar -xz &>/dev/null - cd nginx-proxy-manager-2.9.22 - msg_ok "Downloaded NPM v2.9.22" + msg_info "Downloading NPM v2.10.2" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.2 -O - | tar -xz &>/dev/null + cd nginx-proxy-manager-2.10.2 + msg_ok "Downloaded NPM v2.10.2" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx - sed -i "s+0.0.0+2.9.22+g" backend/package.json - sed -i "s+0.0.0+2.9.22+g" frontend/package.json + sed -i "s+0.0.0+2.10.2+g" backend/package.json + sed -i "s+0.0.0+2.10.2+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do @@ -124,6 +124,11 @@ function update_script() { mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global + wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-noarch.tar.xz" + wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-x86_64.tar.xz" + tar -C / -Jxpf s6-overlay-noarch.tar.xz + tar -C / -Jxpf s6-overlay-x86_64.tar.xz + python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null msg_ok "Setup Enviroment" msg_info "Building Frontend" @@ -158,13 +163,14 @@ EOF msg_ok "Initialized Backend" msg_info "Starting Services" + sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm msg_ok "Started Services" msg_info "Cleaning up" - rm -rf ~/nginx-proxy-manager-* + rm -rf ~/nginx-proxy-manager-* s6-overlay-noarch.tar.xz s6-overlay-x86_64.tar.xz msg_ok "Cleaned" msg_ok "Update Successfull" From b39bb439bf674bfb75ec6e44dd5b540f09beaa60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 03:46:42 -0400 Subject: [PATCH 1373/3335] Update nginxproxymanager.sh fix branch --- ct/nginxproxymanager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 62603405..9b71bfe5 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/dev/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT From 14ddc3b5052301c89d5ed421e87ceafb36c0e943 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 09:04:49 -0400 Subject: [PATCH 1374/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bc95960c..d86a82c6 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,4 +2,6 @@ Everybody is invited and welcome to contribute to Proxmox Helper Scripts. -- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if I reject your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main) :partying_face:! +- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if I reject your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). + +- While it is true that the decision to accept or decline a pull request ultimately rests with the project maintainer, it is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to show respect for the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. From 3bbb4e76d6cb14aedf83fa0d847ea2e5ce5cf0a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 09:07:57 -0400 Subject: [PATCH 1375/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d86a82c6..73cca9f7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,6 +2,6 @@ Everybody is invited and welcome to contribute to Proxmox Helper Scripts. -- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if I reject your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). +- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). - While it is true that the decision to accept or decline a pull request ultimately rests with the project maintainer, it is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to show respect for the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. From fc2ff40ad97a008593283611dd316ee92c498a16 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 09:09:33 -0400 Subject: [PATCH 1376/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 73cca9f7..8a797bb8 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,4 +4,4 @@ Everybody is invited and welcome to contribute to Proxmox Helper Scripts. - Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). -- While it is true that the decision to accept or decline a pull request ultimately rests with the project maintainer, it is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to show respect for the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. +- While it is true that the decision to accept or decline a pull request ultimately rests with the project maintainer, it is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. From 6d510952e25b1a4c86facfb2b32dd3a302f980a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 09:18:57 -0400 Subject: [PATCH 1377/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8a797bb8..837e4bec 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,6 +2,6 @@ Everybody is invited and welcome to contribute to Proxmox Helper Scripts. -- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. If you follow the patterns that have been established throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). +- Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. By adhering to the established patterns and conventions throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). - While it is true that the decision to accept or decline a pull request ultimately rests with the project maintainer, it is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. From c152e24ef8d393efb788dff14ddc35ac50fc5b3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 09:36:42 -0400 Subject: [PATCH 1378/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 837e4bec..c8649c97 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,4 +4,4 @@ Everybody is invited and welcome to contribute to Proxmox Helper Scripts. - Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. By adhering to the established patterns and conventions throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). -- While it is true that the decision to accept or decline a pull request ultimately rests with the project maintainer, it is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. +- It is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. From 1267ac0131344d5a1b9a8ebfa56e23c1c2f4e579 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 23:45:57 -0400 Subject: [PATCH 1379/3335] Update vaultwarden.sh Use Argon2 to securely hash passwords and protect them against various types of attacks. --- ct/vaultwarden.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 8f887956..c5d06839 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -65,7 +65,7 @@ function update_script() { UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ "1" "VaultWarden $VAULT" ON \ "2" "Web-Vault $WVRELEASE" OFF \ - "3" "Show Admin Token" OFF \ + "3" "Set Admin Token" OFF \ 3>&1 1>&2 2>&3) header_info @@ -121,11 +121,12 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then - DIR=/usr/bin/vaultwarden - if [ -d "$DIR" ]; then - cat /etc/vaultwarden.env | grep "ADMIN_TOKEN" - else - cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN" + if NEWTOKEN=$(whiptail --passwordbox "Set your ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then + if [[ -z "$NEWTOKEN" ]]; then exit; fi + if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi + TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) + sed -i "s|ADMIN_TOKEN='.*'|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env + systemctl restart vaultwarden fi exit fi From c46675f2504afedee99022ce6d32a918fecdc139 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 23:47:27 -0400 Subject: [PATCH 1380/3335] Update vaultwarden-install.sh Add Argon2 --- install/vaultwarden-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index dd079560..fe0edc19 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -24,6 +24,7 @@ $STD apt-get -qqy install \ libpq-dev \ curl \ sudo \ + argon2 \ mc msg_ok "Installed Dependencies" @@ -61,7 +62,7 @@ $STD tar -xzf bw_web_$WEBVAULT.tar.gz -C /opt/vaultwarden/ msg_ok "Downloaded Web-Vault ${WEBVAULT}" cat </opt/vaultwarden/.env -ADMIN_TOKEN=$(openssl rand -base64 48) +ADMIN_TOKEN='' ROCKET_ADDRESS=0.0.0.0 DATA_FOLDER=/opt/vaultwarden/data DATABASE_MAX_CONNS=10 From ab2cd43c159e79145b699e3c0bdda48c45ff776c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Apr 2023 23:50:49 -0400 Subject: [PATCH 1381/3335] Update vaultwarden.sh tweak --- ct/vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index c5d06839..74fb9f94 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -121,7 +121,7 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then - if NEWTOKEN=$(whiptail --passwordbox "Set your ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then + if NEWTOKEN=$(whiptail --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then if [[ -z "$NEWTOKEN" ]]; then exit; fi if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) From a4720801277a76b91f51fd4b535340330b8e9d49 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 10 Apr 2023 00:21:11 -0400 Subject: [PATCH 1382/3335] Update vaultwarden.sh tweak --- ct/vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 74fb9f94..f74ef4fe 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -125,7 +125,7 @@ function update_script() { if [[ -z "$NEWTOKEN" ]]; then exit; fi if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) - sed -i "s|ADMIN_TOKEN='.*'|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env + sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env systemctl restart vaultwarden fi exit From d21c70bc850f5fb6d4b42fcf0c38f07e96ed416d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 10 Apr 2023 05:49:23 -0400 Subject: [PATCH 1383/3335] Update cronicle-install.sh fix unbound variable --- install/cronicle-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index 1060a494..281a6f19 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -40,7 +40,7 @@ $STD tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST $STD npm install $STD node bin/build.js dist sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json -if [[ $SERV == "y" ]]; then $STD /opt/cronicle/bin/control.sh setup; fi +$STD /opt/cronicle/bin/control.sh setup $STD /opt/cronicle/bin/control.sh start $STD cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled chmod 775 /etc/init.d/cronicled From 3621dd0c35043a10bc9d918021bc38d917a7cea6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 10 Apr 2023 06:34:44 -0400 Subject: [PATCH 1384/3335] Update cronicle.sh --- ct/cronicle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 53702989..e210d897 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -106,4 +106,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} Primary should be reachable by going to the following URL. - ${BL}http://${IP}:3012${CL} admin|admin \n" + ${BL}http://${IP}:3012${CL} \n" From 76479a7733b1e1122835a1b1b0afd05a5204e6b0 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:16:47 +0200 Subject: [PATCH 1385/3335] alpine-vaultwarden-argon2 (#1314) Use Argon2 to securely hash passwords and protect them against various types of attacks. --- ct/alpine-vaultwarden.sh | 14 ++++++++++++-- install/alpine-vaultwarden-install.sh | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 45ea5390..3783d633 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -59,7 +59,7 @@ function update_script() { CHOICE=$( whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ "1" "Update Vaultwarden" \ - "2" "Show Admin Token" 3>&2 2>&1 1>&3 + "2" "Reset ADMIN_TOKEN" 3>&2 2>&1 1>&3 ) exit_status=$? if [ $exit_status == 1 ]; then @@ -73,7 +73,17 @@ function update_script() { exit ;; 2) - whiptail --title "ADMIN TOKEN" --msgbox "$(cat /etc/conf.d/vaultwarden | grep ADMIN_TOKEN | awk '{print substr($2, 13) }')" 7 68 + if NEWTOKEN=$(whiptail --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then + if [[ -z "$NEWTOKEN" ]]; then exit-script; fi + if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi + TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1) + if [[ ! -f /var/lib/vaultwarden/config.json ]]; then + sed -i "s|export ADMIN_TOKEN=.*|export ADMIN_TOKEN='${TOKEN}'|" /etc/conf.d/vaultwarden + else + sed -i "s|\"admin_token\": .*|\"admin_token\": \"${TOKEN}\",|" /var/lib/vaultwarden/config.json + fi + rc-service vaultwarden restart -q + fi clear exit ;; diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 6c6f90a5..f048745b 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -20,6 +20,7 @@ $STD apk add openssl $STD apk add openssh $STD apk add nano $STD apk add mc +$STD apk add argon2 msg_ok "Installed Dependencies" msg_info "Installing Alpine-Vaultwarden" @@ -28,7 +29,7 @@ cat </etc/conf.d/vaultwarden export DATA_FOLDER=/var/lib/vaultwarden export WEB_VAULT_FOLDER=/var/lib/vaultwarden/web-vault export WEB_VAULT_ENABLED=true -export ADMIN_TOKEN=$(openssl rand -base64 48) +export ADMIN_TOKEN='' export ROCKET_ADDRESS=0.0.0.0 EOF $STD rc-service vaultwarden start From 322de1f407407f94ab718f921a827e9f670f6702 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Apr 2023 10:34:18 -0400 Subject: [PATCH 1386/3335] Update nginxproxymanager-install.sh Python interpreter will include packages installed in the global site-packages directory. --- install/nginxproxymanager-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 61a78c40..05194c8f 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -186,6 +186,7 @@ root msg_info "Starting Services" sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf +sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg $STD systemctl enable --now openresty $STD systemctl enable --now npm msg_ok "Started Services" From d0ccf41b59cd4365639e00273a8ed937ac531264 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Apr 2023 11:02:15 -0400 Subject: [PATCH 1387/3335] Update nginxproxymanager.sh Python interpreter will include packages installed in the global site-packages. --- ct/nginxproxymanager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 9b71bfe5..defdbde9 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -164,6 +164,7 @@ EOF msg_info "Starting Services" sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf + sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg systemctl enable npm &>/dev/null systemctl start openresty systemctl start npm From 21574e25a6123200284a7fc223b0c0ac03afe0e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Apr 2023 06:14:14 -0400 Subject: [PATCH 1388/3335] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a94517d8..fc889b20 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -

Contributing to Proxmox Helper Scripts

+

Contributing to Proxmox VE Helper Scripts

These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine. -

Proxmox Helper Scripts

-
Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
+

Proxmox VE Helper Scripts

+
Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
+ +
Proxmox® is a registered trademark of Proxmox Server Solutions GmbH.
From cc19644063592f9c7e23ee332f51937842237917 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Apr 2023 06:38:33 -0400 Subject: [PATCH 1389/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c8649c97..142f6aa9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to Proxmox Helper Scripts +# Contributing to Proxmox VE Helper Scripts -Everybody is invited and welcome to contribute to Proxmox Helper Scripts. +Everybody is invited and welcome to contribute to Proxmox VE Helper Scripts. - Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. By adhering to the established patterns and conventions throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). From b85dd70aca3f5ddcde2419bc1683d532a90e3054 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Apr 2023 12:42:31 -0400 Subject: [PATCH 1390/3335] Update tdarr-install.sh fix install fixes https://github.com/tteck/Proxmox/issues/1329 --- install/tdarr-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 34e4ce6a..212df862 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -25,8 +25,9 @@ mkdir -p /opt/tdarr cd /opt/tdarr wget -q https://f000.backblazeb2.com/file/tdarrs/versions/2.00.15/linux_x64/Tdarr_Updater.zip $STD unzip Tdarr_Updater.zip +rm -rf Tdarr_Updater.zip chmod +x Tdarr_Updater -$STD ./Tdarr_Updater +./Tdarr_Updater &>/dev/null msg_ok "Installed Tdarr" msg_info "Creating Service" From 994a7f1067915b2a224eeb4752d98de741083455 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Apr 2023 11:58:14 -0400 Subject: [PATCH 1391/3335] Create cloudflared-install.sh --- install/cloudflared-install.sh | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 install/cloudflared-install.sh diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh new file mode 100644 index 00000000..d75c0191 --- /dev/null +++ b/install/cloudflared-install.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Cloudflared" +mkdir -p --mode=0755 /usr/share/keyrings +curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null +echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared bullseye main' | tee /etc/apt/sources.list.d/cloudflared.list >/dev/null +$STD apt-get update +$STD apt-get install -y cloudflared +msg_ok "Installed Cloudflared" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 6192f0d48c4d3b531f422e24f2f68fbe1f74e55b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Apr 2023 11:59:16 -0400 Subject: [PATCH 1392/3335] Create cloudflared.sh --- ct/cloudflared.sh | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ct/cloudflared.sh diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh new file mode 100644 index 00000000..b4fa4518 --- /dev/null +++ b/ct/cloudflared.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ ________ __ + / ____/ /___ __ ______/ / __/ /___ _________ ____/ / + / / / / __ \/ / / / __ / /_/ / __ `/ ___/ _ \/ __ / +/ /___/ / /_/ / /_/ / /_/ / __/ / /_/ / / / __/ /_/ / +\____/_/\____/\__,_/\__,_/_/ /_/\__,_/_/ \___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Cloudflared" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" From 024c80287c4e76e5d18f3a8a1ea0c28ec3768e19 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Apr 2023 13:30:40 -0400 Subject: [PATCH 1393/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7c6899db..f4636445 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-14 + +### Changed + +- **Cloudflared LXC** + - NEW Script + ## 2023-04-05 ### Changed From b60c21522373205b7a5a8c7be75eddf5ca1f577d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Apr 2023 18:52:27 -0400 Subject: [PATCH 1394/3335] Update kavita-install.sh tweak --- install/kavita-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/kavita-install.sh b/install/kavita-install.sh index 72e353d9..b46f819a 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Kavita" cd /opt RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) && +$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) msg_ok "Installed Kavita" msg_info "Creating Service" From 65dbf8a75bbab2ffa54e28d7ed228e7d363e9392 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Apr 2023 07:10:50 -0400 Subject: [PATCH 1395/3335] Update influxdb-install.sh Choosing InfluxDB v1 will result in Chronograf being installed automatically. --- install/influxdb-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 1c501b0b..8167b01f 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -41,6 +41,8 @@ if [[ $INFLUX == "2" ]]; then $STD apt-get install -y influxdb2 else $STD apt-get install -y influxdb + wget -q https://dl.influxdata.com/chronograf/releases/chronograf_1.10.1_amd64.deb + $STD dpkg -i chronograf_1.10.1_amd64.deb fi $STD systemctl enable --now influxdb msg_ok "Installed InfluxDB" From a80a0e666744741bc7e4dd94fba228db8d28bde7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Apr 2023 07:12:47 -0400 Subject: [PATCH 1396/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f4636445..38e56d87 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-15 + +### Changed + +- **InfluxDB LXC** + - Choosing InfluxDB v1 will result in Chronograf being installed automatically. + ## 2023-04-14 ### Changed From b366d4e7ee8918f78d7bdb855bf8ecd8a710824d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Apr 2023 08:03:29 -0400 Subject: [PATCH 1397/3335] Create USER_SUBMITTED_GUIDES.md In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. --- USER_SUBMITTED_GUIDES.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 USER_SUBMITTED_GUIDES.md diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md new file mode 100644 index 00000000..28046569 --- /dev/null +++ b/USER_SUBMITTED_GUIDES.md @@ -0,0 +1,6 @@ +

User Submitted Guides

+ + In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. + +[Installing Home Assistant OS using Proxmox 7](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-7/201835) + From b706c9016879f7b8364f6857da7f8e975a3a6681 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Apr 2023 08:12:23 -0400 Subject: [PATCH 1398/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 38e56d87..154c12f9 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. - **InfluxDB LXC** - Choosing InfluxDB v1 will result in Chronograf being installed automatically. +- **[User Submitted Guides](https://github.com/tteck/Proxmox/blob/main/USER_SUBMITTED_GUIDES.md)** + - Informative guides that demonstrate how to install various software packages using Proxmox VE Helper Scripts. ## 2023-04-14 From 3bd8e3eaa80bb6ff2d80e1bf30d595b30e4b3ec0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Apr 2023 16:28:59 -0400 Subject: [PATCH 1399/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 28046569..0e7de8e4 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -4,3 +4,11 @@ [Installing Home Assistant OS using Proxmox 7](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-7/201835) +[How To Separate Zigbee2MQTT From Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-separate-zigbee2mqtt-from-home-assistant-in-proxmox/) + +[How To Install Home Assistant On Proxmox: The Easy Way](https://smarthomescene.com/guides/how-to-install-home-assistant-on-proxmox-the-easy-way/) + +[Home Assistant: Installing InfluxDB (LXC)](https://www.derekseaman.com/2023/04/home-assistant-installing-influxdb-lxc.html) + +[Home Assistant: Proxmox Quick Start Guide](https://www.derekseaman.com/2023/04/installing-home-assistant-on-proxmox-quick-start-guide.html) + From 33654ab8c92997245f9070c8d5b5c55680fb2053 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Apr 2023 22:19:34 -0400 Subject: [PATCH 1400/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 0e7de8e4..6f66327b 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -12,3 +12,4 @@ [Home Assistant: Proxmox Quick Start Guide](https://www.derekseaman.com/2023/04/installing-home-assistant-on-proxmox-quick-start-guide.html) +[Home Assistant: Installing Grafana (LXC) with Let’s Encrypt SSL](https://www.derekseaman.com/2023/04/home-assistant-installing-grafana-lxc.html) From aa18e6ad7b718cb581f3618eb59e63fad225bc56 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 16 Apr 2023 08:24:39 -0400 Subject: [PATCH 1401/3335] Update homeassistant-core-install.sh Python 3.11.2 --- install/homeassistant-core-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index d7b64ad1..d42b53b5 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -64,10 +64,10 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path) msg_ok "Installed pyenv" . ~/.bashrc set -e -msg_info "Installing Python 3.11.1" -$STD pyenv install 3.11.1 -pyenv global 3.11.1 -msg_ok "Installed Python 3.11.1" +msg_info "Installing Python 3.11.2" +$STD pyenv install 3.11.2 +pyenv global 3.11.2 +msg_ok "Installed Python 3.11.2" msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant From 663197feefc568f74f1b1b712320b74364142c7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 16 Apr 2023 08:27:14 -0400 Subject: [PATCH 1402/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 154c12f9..7f240e60 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-16 + +### Changed + +- **Home Assistant Core LXC** + - Python 3.11.2 + ## 2023-04-15 ### Changed From d14a41e94e9bfa6ad59be7cb46db3b1a4cbc3502 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Apr 2023 03:27:46 -0400 Subject: [PATCH 1403/3335] Update homebridge-install.sh add avahi-daemon --- install/homebridge-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 5c12bbfe..573acf8f 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y avahi-daemon msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" From 3492971e461944de1e29a0f935576bfc96f57638 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Apr 2023 03:29:32 -0400 Subject: [PATCH 1404/3335] Update scrypted-install.sh add avahi-daemon --- install/scrypted-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 5294e95b..dd766825 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get -y install software-properties-common apt-utils $STD apt-get -y update $STD apt-get -y upgrade +$STD apt-get install -y avahi-daemon $STD apt-get -y install \ build-essential \ gcc \ From 0675f9bb2865ebc3383409da14bfc3bcb2a04c1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Apr 2023 14:30:34 -0400 Subject: [PATCH 1405/3335] Update zigbee2mqtt.sh set default settings to privileged --- ct/zigbee2mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index c1c59ff0..21562435 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -30,7 +30,7 @@ color catch_errors function default_settings() { - CT_TYPE="1" + CT_TYPE="0" PW="" CT_ID=$NEXTID HN=$NSAPP From 5d7da7e83390a660c2996b9297fe275620e4d1bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Apr 2023 14:30:56 -0400 Subject: [PATCH 1406/3335] Update zwave-js-ui.sh set default settings to privileged --- ct/zwave-js-ui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index ed8c0d64..2255e299 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="1" + CT_TYPE="0" PW="" CT_ID=$NEXTID HN=$NSAPP From 202827ce4189ccf71080bc0a2521fb96b757c524 Mon Sep 17 00:00:00 2001 From: Chris Heath Date: Tue, 18 Apr 2023 06:12:17 -0500 Subject: [PATCH 1407/3335] Update adguard.sh (#1343) Fix for DNS lookup failing during wget command. --- ct/adguard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index e8c65085..b90049bc 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -54,12 +54,12 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz msg_info "Stopping AdguardHome" systemctl stop AdGuardHome msg_ok "Stopped AdguardHome" msg_info "Updating AdguardHome" -wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null mkdir -p adguard-backup cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ @@ -74,7 +74,7 @@ msg_ok "Started AdguardHome" msg_info "Cleaning Up" rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup msg_ok "Cleaned" -msg_ok "Update Successfull" +msg_ok "Update Successful" exit } From c44ab752e4e243ba75e78a1e42b15a0aab39aea9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Apr 2023 07:40:03 -0400 Subject: [PATCH 1408/3335] grammar --- ct/adguard.sh | 2 +- ct/archlinux.sh | 2 +- ct/autobrr.sh | 2 +- ct/changedetection.sh | 3 +-- ct/dashy.sh | 2 +- ct/emby.sh | 2 +- ct/esphome.sh | 2 +- ct/grafana.sh | 3 +-- ct/grocy.sh | 3 +-- ct/heimdalldashboard.sh | 2 +- ct/homebridge.sh | 3 +-- ct/homepage.sh | 2 +- ct/homer.sh | 2 +- ct/hyperion.sh | 3 +-- ct/influxdb.sh | 3 +-- ct/iobroker.sh | 3 +-- ct/k0s.sh | 3 +-- ct/keycloak.sh | 3 +-- ct/magicmirror.sh | 3 +-- ct/mariadb.sh | 3 +-- ct/meshcentral.sh | 3 +-- ct/motioneye.sh | 3 +-- ct/mqtt.sh | 3 +-- ct/n8n.sh | 3 +-- ct/navidrome.sh | 2 +- ct/nextcloudpi.sh | 3 +-- ct/nginxproxymanager.sh | 2 +- ct/nocodb.sh | 3 +-- ct/omada.sh | 3 +-- ct/omv.sh | 3 +-- ct/openhab.sh | 3 +-- ct/pihole.sh | 3 +-- ct/podman-homeassistant.sh | 3 +-- ct/podman.sh | 3 +-- ct/postgresql.sh | 3 +-- ct/prometheus.sh | 3 +-- ct/rockylinux.sh | 2 +- ct/scrypted.sh | 3 +-- ct/syncthing.sh | 3 +-- ct/technitiumdns.sh | 2 +- ct/trilium.sh | 2 +- ct/unifi.sh | 3 +-- ct/uptimekuma.sh | 2 +- ct/whoogle.sh | 3 +-- ct/wikijs.sh | 2 +- ct/wireguard.sh | 3 +-- 46 files changed, 46 insertions(+), 76 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index b90049bc..4c7db3a7 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -74,7 +74,7 @@ msg_ok "Started AdguardHome" msg_info "Cleaning Up" rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup msg_ok "Cleaned" -msg_ok "Update Successful" +msg_ok "Updated Successfully" exit } diff --git a/ct/archlinux.sh b/ct/archlinux.sh index 62f04bb3..a28cfed3 100644 --- a/ct/archlinux.sh +++ b/ct/archlinux.sh @@ -356,7 +356,7 @@ msg_info "Updating ${APP} LXC" pacman-key --init pacman-key --populate archlinux pacman -Sy archlinux-keyring && pacman -Su -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 3261b560..b92412f0 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -67,7 +67,7 @@ msg_ok "Updated ${APP} LXC" msg_info "Starting ${APP} LXC" systemctl start autobrr.service msg_ok "Started ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/changedetection.sh b/ct/changedetection.sh index c8da20ae..80748b5e 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -55,8 +55,7 @@ header_info if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" pip3 install changedetection.io --upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/dashy.sh b/ct/dashy.sh index 5c76cf70..69385bd4 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -82,7 +82,7 @@ msg_ok "Cleaned" msg_info "Starting Dashy" systemctl start dashy msg_ok "Started Dashy" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/emby.sh b/ct/emby.sh index 2e617cfb..63abf748 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -67,7 +67,7 @@ msg_ok "Updated ${APP}" msg_info "Starting ${APP}" systemctl start emby-server msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/esphome.sh b/ct/esphome.sh index cd6e56d2..2bbd3d4d 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -64,7 +64,7 @@ msg_ok "Updated ESPHome" msg_info "Starting ESPHome" systemctl start esphomeDashboard msg_ok "Started ESPHome" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/grafana.sh b/ct/grafana.sh index ea1136c5..e1164a01 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -59,8 +59,7 @@ wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/grocy.sh b/ct/grocy.sh index dd30c554..6e0a66d9 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -55,8 +55,7 @@ header_info if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" bash /var/www/html/update.sh -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index aad87f46..c06501f3 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -136,7 +136,7 @@ msg_info "Starting ${APP}" systemctl enable --now heimdall.service &>/dev/null sleep 2 msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 22039d22..36281e8e 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -56,8 +56,7 @@ if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/homepage.sh b/ct/homepage.sh index e8041087..13b4fca6 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -63,7 +63,7 @@ git pull --force &>/dev/null pnpm install &>/dev/null pnpm build &>/dev/null systemctl start homepage -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/homer.sh b/ct/homer.sh index 217b2800..34bf6620 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -80,7 +80,7 @@ msg_ok "Cleaned" msg_info "Starting ${APP}" systemctl start homer msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 92535765..51108e46 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -57,8 +57,7 @@ if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then msg_error "No ${APP} I msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get install -y hyperion &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/influxdb.sh b/ct/influxdb.sh index e945cdde..1505020a 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -60,8 +60,7 @@ echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https rm -f /etc/apt/trusted.gpg.d/influxdb.gpg apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 841f135e..d715199a 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -56,8 +56,7 @@ if [[ ! -d /opt/iobroker ]]; then msg_error "No ${APP} Installation Found!"; exi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/k0s.sh b/ct/k0s.sh index 75b5648a..1d64a0ce 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -56,8 +56,7 @@ if [[ ! -f /etc/k0s/k0s.yaml ]]; then msg_error "No ${APP} Installation Found!"; msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 4488dd1a..218f56f4 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -57,8 +57,7 @@ if [[ ! -f /etc/systemd/system/keycloak.service ]]; then msg_error "No ${APP} In msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index c57121c2..2554bd1b 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -58,8 +58,7 @@ msg_info "Updating ${APP} LXC" cd /opt/magicmirror git pull &>/dev/null npm install --only=prod --omit=dev &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/mariadb.sh b/ct/mariadb.sh index d6894ed9..03e24726 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -56,8 +56,7 @@ if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then msg_error "No ${APP} In msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 2739b517..a9288d90 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -56,8 +56,7 @@ if [[ ! -d /opt/meshcentral ]]; then msg_error "No ${APP} Installation Found!"; msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 4a106f03..e46e9fd4 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -55,8 +55,7 @@ header_info if [[ ! -f /etc/systemd/system/motioneye.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" pip install motioneye --upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 0dde1c0e..0eb3c974 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -56,8 +56,7 @@ if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then msg_error "N msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/n8n.sh b/ct/n8n.sh index d4862ef1..58e56db7 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -56,8 +56,7 @@ header_info if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" npm update -g n8n &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/navidrome.sh b/ct/navidrome.sh index c9e53584..10c308c3 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -67,7 +67,7 @@ rm Navidrome.tar.gz msg_info "${GN} Starting ${APP}" systemctl start navidrome.service msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index a1718208..8e18cc2a 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -56,8 +56,7 @@ if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then msg_error "No $ msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index defdbde9..89b0382d 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -174,7 +174,7 @@ EOF rm -rf ~/nginx-proxy-manager-* s6-overlay-noarch.tar.xz s6-overlay-x86_64.tar.xz msg_ok "Cleaned" - msg_ok "Update Successfull" + msg_ok "Updated Successfully" exit } diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 4b7636f6..bcfcdc7b 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -58,8 +58,7 @@ cd /opt/nocodb npm uninstall -s --save nocodb &>/dev/null npm install -s --save nocodb &>/dev/null systemctl restart nocodb.service -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/omada.sh b/ct/omada.sh index 104183df..3b02947e 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -56,8 +56,7 @@ if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/omv.sh b/ct/omv.sh index 532df042..7b31de75 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -57,8 +57,7 @@ if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then msg_error "No ${ msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/openhab.sh b/ct/openhab.sh index 21a77dc7..d4c33704 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -57,8 +57,7 @@ if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then msg_error "No ${APP} In msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/pihole.sh b/ct/pihole.sh index 07e786ea..d5233719 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -56,8 +56,7 @@ if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; exit; msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index e806a7a8..fbdc906e 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -67,8 +67,7 @@ if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null - msg_ok "Updated ${APP} LXC" - msg_ok "Update os system Successfull" + msg_ok "Updated Successfully" msg_info "Updating All Containers\n" CONTAINER_LIST="${1:-$(podman ps -q)}" diff --git a/ct/podman.sh b/ct/podman.sh index b4297c51..b313e673 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -56,8 +56,7 @@ if [[ ! -f /etc/containers/registries.conf ]]; then msg_error "No ${APP} Install msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/postgresql.sh b/ct/postgresql.sh index f0b606a1..700ad409 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -56,8 +56,7 @@ if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then msg_error "No ${APP} Insta msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 16f17758..571a18bb 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -56,8 +56,7 @@ if [[ ! -f /etc/systemd/system/prometheus.service ]]; then msg_error "No ${APP} msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index edc69291..38700c95 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -57,7 +57,7 @@ if [[ ! -d /etc/pacman.d ]]; then msg_error "No ${APP} Installation Found!"; exi msg_info "Updating ${APP} LXC" dnf -y update dnf -y upgrade -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/scrypted.sh b/ct/scrypted.sh index d307d78c..f4b7d0ee 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -57,8 +57,7 @@ if [[ ! -f /etc/systemd/system/scrypted.service ]]; then msg_error "No ${APP} In msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 292cf4db..4df4d33a 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -57,8 +57,7 @@ if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then msg_error "No ${APP} msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index f947cd07..7c9d30f4 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -66,7 +66,7 @@ wget -q https://download.technitium.com/dns/DnsServerPortable.tar.gz tar -zxf DnsServerPortable.tar.gz -C /etc/dns/ &>/dev/null rm -rf DnsServerPortable.tar.gz systemctl restart dns.service -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/trilium.sh b/ct/trilium.sh index 3e15c458..350a945e 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -76,7 +76,7 @@ msg_info "Starting ${APP}" systemctl start trilium.service sleep 1 msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/unifi.sh b/ct/unifi.sh index 542f1f87..cb8f2e68 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -56,8 +56,7 @@ if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; ex msg_info "Updating ${APP}" wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh bash unifi-update.sh -msg_ok "Updated ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 4f64ecc3..d7d1cc0f 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -74,7 +74,7 @@ msg_ok "Updated ${APP}" msg_info "Starting ${APP}" sudo systemctl start uptime-kuma &>/dev/null msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/whoogle.sh b/ct/whoogle.sh index e93b19d7..bb4257ec 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -55,8 +55,7 @@ header_info if [[ ! -f /usr/local/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" pip3 install whoogle-search --upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/wikijs.sh b/ct/wikijs.sh index e1ac9863..416e54ee 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -79,7 +79,7 @@ msg_ok "Restored Data" msg_info "Starting ${APP}" systemctl start wikijs msg_ok "Started ${APP}" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit } diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 553de4e5..d6a6b48e 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -61,8 +61,7 @@ if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_ok "Update Successfull" +msg_ok "Updated Successfully" exit fi if [ "$UPD" == "2" ]; then From bd7c1ee7dbdefc7c4edff8f3c6932a6bcb532c2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Apr 2023 10:53:30 -0400 Subject: [PATCH 1409/3335] Update nextcloudpi-install.sh set `memory_limit = 512M` --- install/nextcloudpi-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index 0e73cb55..a2ac437c 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -23,6 +23,7 @@ msg_info "Installing NextCloudPi (Patience)" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php sed -i '{s|root:/usr/sbin/nologin|root:/bin/bash|g}' /etc/passwd +sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.1/fpm/php.ini /etc/php/8.1/cli/php.ini service apache2 restart msg_ok "Installed NextCloudPi" From 9aade4f6a78f92c62c9267d441c7a63337914b6b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Apr 2023 01:03:18 -0400 Subject: [PATCH 1410/3335] Update kavita-install.sh --- install/kavita-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/kavita-install.sh b/install/kavita-install.sh index b46f819a..af0e6bba 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -22,7 +22,9 @@ msg_ok "Installed Dependencies" msg_info "Installing Kavita" cd /opt RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) +wget -q https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz +$STD tar -xvf kavita-linux-x64.tar.gz +rm kavita-linux-x64.tar.gz msg_ok "Installed Kavita" msg_info "Creating Service" From 92f58314ffcd7384f3ddf367b883d6b78aeb6801 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Apr 2023 01:07:17 -0400 Subject: [PATCH 1411/3335] Update kavita-install.sh --- install/kavita-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/kavita-install.sh b/install/kavita-install.sh index af0e6bba..59886f1c 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -23,7 +23,7 @@ msg_info "Installing Kavita" cd /opt RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz -$STD tar -xvf kavita-linux-x64.tar.gz +$STD tar -xvzf kavita-linux-x64.tar.gz rm kavita-linux-x64.tar.gz msg_ok "Installed Kavita" From 488322bf2a9150642ec4c33329e54d39d210d9e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Apr 2023 01:20:31 -0400 Subject: [PATCH 1412/3335] Update kavita-install.sh --- install/kavita-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/kavita-install.sh b/install/kavita-install.sh index 59886f1c..3f119a0e 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -23,7 +23,7 @@ msg_info "Installing Kavita" cd /opt RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz -$STD tar -xvzf kavita-linux-x64.tar.gz +tar -xvzf kavita-linux-x64.tar.gz &>/dev/null rm kavita-linux-x64.tar.gz msg_ok "Installed Kavita" From 8a780c67f80dd552de09c78484b313f7c87e937c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Apr 2023 01:58:56 -0400 Subject: [PATCH 1413/3335] Update kavita-install.sh fix unprivileged install --- install/kavita-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/kavita-install.sh b/install/kavita-install.sh index 3f119a0e..eaf48992 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -22,9 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Kavita" cd /opt RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget -q https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz -tar -xvzf kavita-linux-x64.tar.gz &>/dev/null -rm kavita-linux-x64.tar.gz +$STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) --no-same-owner msg_ok "Installed Kavita" msg_info "Creating Service" From 1e23eb23be1c6e6d2fcf32cca8659b84e4bba612 Mon Sep 17 00:00:00 2001 From: ka2er Date: Thu, 20 Apr 2023 08:05:51 +0200 Subject: [PATCH 1414/3335] ENH : point webdriver to 127.0.0.1:4444/wd/hub instead of browser-chrome:4444/wd/hub (#1349) --- install/changedetection-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index fc9832c7..53c78041 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -34,6 +34,7 @@ After=network-online.target [Service] Type=simple WorkingDirectory=/opt/changedetection +Environment="WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub" ExecStart=changedetection.io -d /opt/changedetection -p 5000 [Install] WantedBy=multi-user.target From bb7c08e0fe8d994fadffd6aca718b2360a83c161 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Apr 2023 02:12:48 -0400 Subject: [PATCH 1415/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 6f66327b..fadae182 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -13,3 +13,5 @@ [Home Assistant: Proxmox Quick Start Guide](https://www.derekseaman.com/2023/04/installing-home-assistant-on-proxmox-quick-start-guide.html) [Home Assistant: Installing Grafana (LXC) with Let’s Encrypt SSL](https://www.derekseaman.com/2023/04/home-assistant-installing-grafana-lxc.html) + +[Proxmox: Plex LXC with Alder Lake Transcoding](https://www.derekseaman.com/2023/04/proxmox-plex-lxc-with-alder-lake-transcoding.html) From 90b7a7f2d9bb8fe9e3e7cee0478f76a5b1738898 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:07:02 -0400 Subject: [PATCH 1416/3335] Update and rename bug_report.md to bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.md | 16 -------------- .github/ISSUE_TEMPLATE/bug_report.yaml | 29 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 16 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dae485c8..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve (script related) -title: '' -labels: '' -assignees: '' - ---- - -**Describe the issue** -A clear and concise description of what the bug is. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Bug reports will be closed after 12 hours of NO activity.** diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 00000000..91a749f7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,29 @@ +name: Bug report +description: Create a report to help us improve (script related) +body: + - type: markdown + attributes: + value: | + **IMPORTANT:** Before submitting: + - Please search through the closed issues to see if the bug you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. + - type: textarea + id: bug + attributes: + label: A clear and concise description of the bug. + validations: + required: true + - type: textarea + id: expect_to_happen + attributes: + label: A clear and concise description of what you expected to happen. + placeholder: I expected that ... + validations: + required: false + - type: textarea + id: reproduce + attributes: + label: Please provide detailed steps to reproduce the issue. + placeholder: First do this, then this.. + validations: + required: false + From 5ab4f10f9f30d1cb08729098442130cb56e0832c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:14:12 -0400 Subject: [PATCH 1417/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 91a749f7..adc9af1a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -12,6 +12,12 @@ body: label: A clear and concise description of the bug. validations: required: true + - type: textarea + id: screenshot + attributes: + label: If applicable, add screenshots to help explain the issue. + validations: + required: false - type: textarea id: expect_to_happen attributes: @@ -26,4 +32,3 @@ body: placeholder: First do this, then this.. validations: required: false - From 1da3bcb81778e32fa9d60c11f9aeb93e4fccf187 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:22:16 -0400 Subject: [PATCH 1418/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index adc9af1a..cc13c3ad 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -15,7 +15,7 @@ body: - type: textarea id: screenshot attributes: - label: If applicable, add screenshots to help explain the issue. + label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. validations: required: false - type: textarea From 233f7c80018b47fa4b7f022d4f84ee4cd914e8c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:28:47 -0400 Subject: [PATCH 1419/3335] Update and rename feature-script-request.md to feature-script-request.yaml --- .github/ISSUE_TEMPLATE/feature-script-request.md | 11 ----------- .github/ISSUE_TEMPLATE/feature-script-request.yaml | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature-script-request.md create mode 100644 .github/ISSUE_TEMPLATE/feature-script-request.yaml diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.md b/.github/ISSUE_TEMPLATE/feature-script-request.md deleted file mode 100644 index ddcfa3a4..00000000 --- a/.github/ISSUE_TEMPLATE/feature-script-request.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Feature/Script Request -about: Suggest an idea for this project in Discussions -title: Please submit feature/script requests in Discussions -labels: Feature Request -assignees: tteck - ---- - -Please submit feature/script requests in Discussions -https://github.com/tteck/Proxmox/discussions diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.yaml b/.github/ISSUE_TEMPLATE/feature-script-request.yaml new file mode 100644 index 00000000..94c3b299 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-script-request.yaml @@ -0,0 +1,11 @@ +name: Feature/Script Request +about: Suggest an idea for this project in Discussions +title: Please submit feature/script requests in Discussions + +body: + - type: markdown + attributes: + value: | + **NOTICE:** + - If you have requests for features or scripts, please share them in the Discussions section. + From 3a5952431a164545af12af8df5ca97387cf44af4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:37:09 -0400 Subject: [PATCH 1420/3335] Update feature-script-request.yaml --- .github/ISSUE_TEMPLATE/feature-script-request.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.yaml b/.github/ISSUE_TEMPLATE/feature-script-request.yaml index 94c3b299..3534ec4b 100644 --- a/.github/ISSUE_TEMPLATE/feature-script-request.yaml +++ b/.github/ISSUE_TEMPLATE/feature-script-request.yaml @@ -8,4 +8,13 @@ body: value: | **NOTICE:** - If you have requests for features or scripts, please share them in the Discussions section. + - type: dropdown + validations: + required: false + attributes: + label: Discussions + description: > + Discussions + options: + - From 81daa5820b22f14c6b5afb4f282eb5e721b0fd70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:38:24 -0400 Subject: [PATCH 1421/3335] Update feature-script-request.yaml --- .github/ISSUE_TEMPLATE/feature-script-request.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.yaml b/.github/ISSUE_TEMPLATE/feature-script-request.yaml index 3534ec4b..70825921 100644 --- a/.github/ISSUE_TEMPLATE/feature-script-request.yaml +++ b/.github/ISSUE_TEMPLATE/feature-script-request.yaml @@ -11,10 +11,3 @@ body: - type: dropdown validations: required: false - attributes: - label: Discussions - description: > - Discussions - options: - - - From 1bfee11f7a85b2e75952558dddecffb0bb870bcd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:41:02 -0400 Subject: [PATCH 1422/3335] Update feature-script-request.yaml --- .github/ISSUE_TEMPLATE/feature-script-request.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.yaml b/.github/ISSUE_TEMPLATE/feature-script-request.yaml index 70825921..d64008c0 100644 --- a/.github/ISSUE_TEMPLATE/feature-script-request.yaml +++ b/.github/ISSUE_TEMPLATE/feature-script-request.yaml @@ -8,6 +8,9 @@ body: value: | **NOTICE:** - If you have requests for features or scripts, please share them in the Discussions section. - - type: dropdown + - type: textarea + id: feature + attributes: + label: Please submit feature/script requests in Discussions validations: required: false From d4aa6b0d07c4018c616fe066ca631759db512470 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:44:00 -0400 Subject: [PATCH 1423/3335] Update feature-script-request.yaml --- .github/ISSUE_TEMPLATE/feature-script-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.yaml b/.github/ISSUE_TEMPLATE/feature-script-request.yaml index d64008c0..1da0d62b 100644 --- a/.github/ISSUE_TEMPLATE/feature-script-request.yaml +++ b/.github/ISSUE_TEMPLATE/feature-script-request.yaml @@ -1,5 +1,5 @@ name: Feature/Script Request -about: Suggest an idea for this project in Discussions +description: Suggest an idea for this project in Discussions title: Please submit feature/script requests in Discussions body: From 9463d406434d55b37f6c8025afe8766e38d15170 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:47:25 -0400 Subject: [PATCH 1424/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index cc13c3ad..98178a17 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -6,6 +6,7 @@ body: value: | **IMPORTANT:** Before submitting: - Please search through the closed issues to see if the bug you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. + - If you have requests for features or scripts, please share them in the Discussions section. - type: textarea id: bug attributes: From e6a104ad8b128b744f1babf93b60027acada1714 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:47:58 -0400 Subject: [PATCH 1425/3335] Delete feature-script-request.yaml --- .../ISSUE_TEMPLATE/feature-script-request.yaml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature-script-request.yaml diff --git a/.github/ISSUE_TEMPLATE/feature-script-request.yaml b/.github/ISSUE_TEMPLATE/feature-script-request.yaml deleted file mode 100644 index 1da0d62b..00000000 --- a/.github/ISSUE_TEMPLATE/feature-script-request.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Feature/Script Request -description: Suggest an idea for this project in Discussions -title: Please submit feature/script requests in Discussions - -body: - - type: markdown - attributes: - value: | - **NOTICE:** - - If you have requests for features or scripts, please share them in the Discussions section. - - type: textarea - id: feature - attributes: - label: Please submit feature/script requests in Discussions - validations: - required: false From 93fc56336f97cf37ef1c4cae612dedf2dd91b2c4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 13:57:28 -0400 Subject: [PATCH 1426/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 98178a17..56246301 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -6,7 +6,7 @@ body: value: | **IMPORTANT:** Before submitting: - Please search through the closed issues to see if the bug you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. - - If you have requests for features or scripts, please share them in the Discussions section. + - If you have requests for features or scripts, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug attributes: From 90afb75199170c0ca2c394c0f4b8abc77af2505b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 14:40:03 -0400 Subject: [PATCH 1427/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 56246301..793c5779 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,16 +1,16 @@ -name: Bug report -description: Create a report to help us improve (script related) +name: Issue report +description: Generate a report on the issue pertaining specifically to the script in order to aid us in improving it. body: - type: markdown attributes: value: | **IMPORTANT:** Before submitting: - - Please search through the closed issues to see if the bug you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. + - Please search through the closed issues to see if the issue you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. - If you have requests for features or scripts, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug attributes: - label: A clear and concise description of the bug. + label: A clear and concise description of the issue. validations: required: true - type: textarea @@ -30,6 +30,6 @@ body: id: reproduce attributes: label: Please provide detailed steps to reproduce the issue. - placeholder: First do this, then this.. + placeholder: First do this, then this ... validations: required: false From 3463abe13cadc2fab5c5f787eb0b8b4de2c7d399 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 14:43:05 -0400 Subject: [PATCH 1428/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 793c5779..9949dbb1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,4 +1,4 @@ -name: Issue report +name: Problems with a script. description: Generate a report on the issue pertaining specifically to the script in order to aid us in improving it. body: - type: markdown From 02c542d9dbd62024ccfd994e155537cb7713bb2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Apr 2023 18:54:12 -0400 Subject: [PATCH 1429/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 9949dbb1..e9641023 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -19,13 +19,6 @@ body: label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. validations: required: false - - type: textarea - id: expect_to_happen - attributes: - label: A clear and concise description of what you expected to happen. - placeholder: I expected that ... - validations: - required: false - type: textarea id: reproduce attributes: From 0e9aa8e6200ec772b8232fe6fcf512980dff932e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Apr 2023 01:12:22 -0400 Subject: [PATCH 1430/3335] Update plex-install.sh move trusted.gpg --- install/plex-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/plex-install.sh b/install/plex-install.sh index 01744201..cabe3871 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -39,6 +39,7 @@ fi msg_info "Setting Up Plex Media Server Repository" $STD apt-key add <(curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key) sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list' +mv -f /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/ &>/dev/null msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" From 52ce746cbeb2f8f8662de85ec6ded9ae38bc5000 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Apr 2023 05:31:32 -0400 Subject: [PATCH 1431/3335] Update plex-install.sh - The command apt-key is now considered deprecated, so migrate keyring to the new location with the new format. - Remove the unnecessary dependency gnupg --- install/plex-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/plex-install.sh b/install/plex-install.sh index cabe3871..127d4a11 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then @@ -37,9 +36,8 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then fi msg_info "Setting Up Plex Media Server Repository" -$STD apt-key add <(curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key) -sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list' -mv -f /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/ &>/dev/null +wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key >/etc/apt/trusted.gpg.d/PlexSign.asc +echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" >/etc/apt/sources.list.d/plexmediaserver.list msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" From 811589a470ba815493287dcdcbf125634eb1df8f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Apr 2023 05:37:20 -0400 Subject: [PATCH 1432/3335] Update build.func Remove Ubuntu 18.04, which will reach EOL on April 30, 2023 --- misc/build.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 43dd3fbe..f513ab21 100644 --- a/misc/build.func +++ b/misc/build.func @@ -114,8 +114,7 @@ exit-script() { advanced_settings() { if [ "$var_os" == "ubuntu" ]; then - if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \ - "18.04" "Bionic" OFF \ + if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "20.04" "Focal" ON \ "22.04" "Jammy" OFF \ "22.10" "Kinetic" OFF \ From 775134c2595cc96aa669410207fef32519dce598 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Apr 2023 21:40:43 -0400 Subject: [PATCH 1433/3335] Update prometheus-install.sh correct path --- install/prometheus-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index 4d3d77a2..118241fd 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -60,5 +60,5 @@ root msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean -rm -rf /root/prometheus-${RELEASE}.linux-amd64 /root/prometheus-${RELEASE}.linux-amd64.tar.gz +rm -rf ../prometheus-${RELEASE}.linux-amd64 ../prometheus-${RELEASE}.linux-amd64.tar.gz msg_ok "Cleaned" From fc89a4b42688e36cdb9f7ba0c95ea8efa8850062 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 10:56:37 -0400 Subject: [PATCH 1434/3335] Update blocky-install.sh pin to version 0.20 for now --- install/blocky-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/blocky-install.sh b/install/blocky-install.sh index aafff542..521156b7 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Blocky" systemctl stop systemd-resolved $STD systemctl disable systemd-resolved.service -RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=0.20 #$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_v${RELEASE}_Linux_x86_64.tar.gz mkdir -p /opt/blocky tar -xf blocky_v${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky From 3f309d3fda52359559e14f00894dc6c4bc07d0e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 11:07:23 -0400 Subject: [PATCH 1435/3335] Update blocky-install.sh fix path for older downloads --- install/blocky-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 521156b7..5e8821ec 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -23,7 +23,7 @@ msg_info "Installing Blocky" systemctl stop systemd-resolved $STD systemctl disable systemd-resolved.service RELEASE=0.20 #$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_v${RELEASE}_Linux_x86_64.tar.gz +wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz mkdir -p /opt/blocky tar -xf blocky_v${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky rm -rf blocky_v${RELEASE}_Linux_x86_64.tar.gz From ec321b76d9e86cd8eb365ebb1205754d1eada152 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 11:13:42 -0400 Subject: [PATCH 1436/3335] Update blocky-install.sh --- install/blocky-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 5e8821ec..3f0409bf 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -25,8 +25,8 @@ $STD systemctl disable systemd-resolved.service RELEASE=0.20 #$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz mkdir -p /opt/blocky -tar -xf blocky_v${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky -rm -rf blocky_v${RELEASE}_Linux_x86_64.tar.gz +tar -xf blocky_${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky +rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz cat </opt/blocky/config.yml upstream: # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query From 4744ccb562d2bc17450567176b8d590370ed72f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 11:26:27 -0400 Subject: [PATCH 1437/3335] Update plex.sh --- ct/plex.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/plex.sh b/ct/plex.sh index 48d12505..5e23d446 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -66,6 +66,7 @@ msg_ok "Updated ${APP} LXC" exit fi if [ "$UPD" == "2" ]; then +set +e bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)" exit fi From 34d311371c8c3c7ecbbc7e3b660366a4b7184016 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 18:09:32 -0400 Subject: [PATCH 1438/3335] Update build.func provide the option for users to switch between Debian and Ubuntu distributions --- misc/build.func | 67 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/misc/build.func b/misc/build.func index f513ab21..a464738b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -79,9 +79,8 @@ ssh_check() { } echo_default() { - if [ "$var_os" == "ubuntu" ]; then - echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}" - fi + echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}" + echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}" echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" @@ -113,26 +112,56 @@ exit-script() { } advanced_settings() { + if [ "$var_os" != "alpine" ]; then + var_os="" + while [ -z "$var_os" ]; do + if var_os=$(whiptail --title "DISTRIBUTION" --radiolist "Choose" 10 58 2 \ + "debian" "" OFF \ + "ubuntu" "" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_os" ]; then + echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}" + fi + else + exit-script + fi + done + fi + + if [ "$var_os" == "debian" ]; then + var_version="11" + fi + if [ "$var_os" == "ubuntu" ]; then - if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ - "20.04" "Focal" ON \ - "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ + var_version="" + while [ -z "$var_version" ]; do + if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + "20.04" "Focal" OFF \ + "22.04" "Jammy" OFF \ + "22.10" "Kinetic" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" + fi + else + exit-script + fi + done + fi + + CT_TYPE="" + while [ -z "$CT_TYPE" ]; do + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" OFF \ + "0" "Privileged" OFF \ 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" + if [ -n "$CT_TYPE" ]; then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" + fi else exit-script fi - fi - - if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" - else - exit-script - fi + done if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then @@ -468,7 +497,7 @@ EOF sleep 2 pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/install/$var_install.sh)" || exit } From 83c7091d21bdac069a24e911cb91958c241f5796 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 18:12:25 -0400 Subject: [PATCH 1439/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 7f240e60..d43b2266 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-23 + +### Changed + +- **Non-Alpine LXC's** + - Advanced settings provide the option for users to switch between Debian and Ubuntu distributions. However, some applications or services, such as Deconz or Omada, may not be compatible with the selected distribution due to dependencies. + ## 2023-04-16 ### Changed From ab48d60861e95b32c554af59b4deef80fa2c33d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 18:13:25 -0400 Subject: [PATCH 1440/3335] Update build.func fix branch --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index a464738b..8eeeac53 100644 --- a/misc/build.func +++ b/misc/build.func @@ -497,7 +497,7 @@ EOF sleep 2 pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/dev/install/$var_install.sh)" || exit + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit } From e31ddbac140b41c613efb1a00755c2f1bd124ddb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 18:19:05 -0400 Subject: [PATCH 1441/3335] Update build.func tweak --- misc/build.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 8eeeac53..1643c42a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -130,6 +130,7 @@ advanced_settings() { if [ "$var_os" == "debian" ]; then var_version="11" + echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" fi if [ "$var_os" == "ubuntu" ]; then @@ -141,7 +142,7 @@ advanced_settings() { "22.10" "Kinetic" OFF \ 3>&1 1>&2 2>&3); then if [ -n "$var_version" ]; then - echo -e "${DGN}Using Ubuntu Version: ${BGN}$var_version${CL}" + echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" fi else exit-script From d8809c9e801a57afa017be8fb0c6dc9e784247fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Apr 2023 18:34:36 -0400 Subject: [PATCH 1442/3335] Update plex.sh set default Ubuntu 22.04 --- ct/plex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/plex.sh b/ct/plex.sh index 5e23d446..bcc7d96d 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="ubuntu" -var_version="20.04" +var_version="22.04" variables color catch_errors From 899c015fb9f202398238f4ecda43fdff18cafb45 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Apr 2023 12:06:45 -0400 Subject: [PATCH 1443/3335] Update post-pve-install.sh Code refactoring --- misc/post-pve-install.sh | 226 ++++++++++++++++++++++++++++----------- 1 file changed, 163 insertions(+), 63 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 2e03f852..e4787cad 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -5,8 +5,9 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -function header_info { - cat <<"EOF" +header_info() { + clear + cat <<"EOF" ____ _ _____________ ____ __ ____ __ ____ / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / @@ -15,120 +16,219 @@ function header_info { EOF } -set -euo pipefail -shopt -s inherit_errexit nullglob -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") +YW=$(echo "\033[33m") GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -clear -header_info -echo -e "${BL}This script will Perform Post Install Routines.${CL}" -while true; do - read -p "Start the PVE7 Post Install Script (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -if ! command -v pveversion >/dev/null 2>&1; then - echo -e "\n🛑 No PVE Detected, Wrong Script!\n" - exit 1 -fi +set -euo pipefail +shopt -s inherit_errexit nullglob -if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then - echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version: 7.XX${CL}" - echo -e "\nExiting..." - sleep 3 - exit -fi - -function msg_info() { +msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } -function msg_ok() { +msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -clear -header_info -read -r -p "Disable Enterprise Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +exit_script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +start_routines() { + header_info + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nDisable Enterprise Repository?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Disabling Enterprise Repository" - sleep 2 sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list msg_ok "Disabled Enterprise Repository" -fi + ;; + no) + msg_error "Selected no to Disabling Enterprise Repository" + ;; + esac -read -r -p "Add/Correct PVE7 Sources (sources.list)? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nAdd/Correct PVE7 Sources (sources.list)?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Adding or Correcting PVE7 Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib deb http://ftp.debian.org/debian bullseye-updates main contrib deb http://security.debian.org/debian-security bullseye-security main contrib EOF - sleep 2 msg_ok "Added or Corrected PVE7 Sources" -fi + ;; + no) + msg_error "Selected no to Correcting PVE7 Sources" + ;; + esac - -read -r -p "Enable No-Subscription Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nEnable No-Subscription Repository?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Enabling No-Subscription Repository" cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription EOF - sleep 2 msg_ok "Enabled No-Subscription Repository" -fi + ;; + no) + msg_error "Selected no to Enabling No-Subscription Repository" + ;; + esac -read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nAdd (Disabled) Beta/Test Repository?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Adding Beta/Test Repository and set disabled" cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pve bullseye pvetest EOF - sleep 2 msg_ok "Added Beta/Test Repository" -fi + ;; + no) + msg_error "Selected no to Adding Beta/Test Repository" + ;; + esac -read -r -p "Disable Subscription Nag? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nDisable Subscription Nag?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Disabling Subscription Nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled Subscription Nag (Delete browser cache)" -fi + ;; + no) + msg_error "Selected no to Disabling Subscription Nag" + ;; + esac -read -r -p "Update Proxmox VE 7 now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nUpdate Proxmox VE 7 now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Updating Proxmox VE 7 (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)" -fi + msg_ok "Updated Proxmox VE 7 (Reboot Recommended)" + ;; + no) + msg_error "Selected no to Updating Proxmox VE 7" + ;; + esac -read -r -p "Reboot Proxmox VE 7 now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + CHOICE=$( + whiptail --title "Proxmox VE 7 Post Install" --menu "\nReboot Proxmox VE 7 now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + exit_script + fi + case $CHOICE in + yes) msg_info "Rebooting Proxmox VE 7" sleep 2 msg_ok "Completed Post Install Routines" reboot + ;; + no) + msg_error "Selected no to Rebooting Proxmox VE 7" + msg_ok "Completed Post Install Routines" + ;; + esac +} + +header_info +echo -e "\nThis script will Perform Post Install Routines.\n" +while true; do + read -p "Start the PVE7 Post Install Script (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit_script ;; + *) echo "Please answer yes or no." ;; + esac +done + +if ! command -v pveversion >/dev/null 2>&1; then + header_info + msg_error "\n No PVE Detected!\n" + exit fi -sleep 2 -msg_ok "Completed Post Install Routines" +if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then + header_info + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e " Requires PVE Version: 7.XX" + echo -e "\nExiting..." + sleep 3 + exit +fi + +start_routines From e09d96287cf68817304f096dc7c52abc76db0384 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Apr 2023 21:05:10 -0400 Subject: [PATCH 1444/3335] Update post-pve-install.sh add description --- misc/post-pve-install.sh | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index e4787cad..e8fae97f 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -53,7 +53,7 @@ exit_script() { start_routines() { header_info CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nDisable Enterprise Repository?" 11 58 2 \ + whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3 ) @@ -63,17 +63,17 @@ start_routines() { fi case $CHOICE in yes) - msg_info "Disabling Enterprise Repository" + msg_info "Disabling 'pve-enterprise' repository" sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list - msg_ok "Disabled Enterprise Repository" + msg_ok "Disabled 'pve-enterprise' repository" ;; no) - msg_error "Selected no to Disabling Enterprise Repository" + msg_error "Selected no to Disabling 'pve-enterprise' repository" ;; esac CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nAdd/Correct PVE7 Sources (sources.list)?" 11 58 2 \ + whiptail --title "Proxmox VE 7 Post Install" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 7 server.\n \nCorrect Proxmox VE 7 sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3 ) @@ -83,21 +83,21 @@ start_routines() { fi case $CHOICE in yes) - msg_info "Adding or Correcting PVE7 Sources" + msg_info "Correcting Proxmox VE 7 Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib deb http://ftp.debian.org/debian bullseye-updates main contrib deb http://security.debian.org/debian-security bullseye-security main contrib EOF - msg_ok "Added or Corrected PVE7 Sources" + msg_ok "Corrected Proxmox VE 7 Sources" ;; no) - msg_error "Selected no to Correcting PVE7 Sources" + msg_error "Selected no to Correcting Proxmox VE 7 Sources" ;; esac CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nEnable No-Subscription Repository?" 11 58 2 \ + whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3 ) @@ -107,19 +107,19 @@ EOF fi case $CHOICE in yes) - msg_info "Enabling No-Subscription Repository" + msg_info "Enabling 'pve-no-subscription' repository" cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription EOF - msg_ok "Enabled No-Subscription Repository" + msg_ok "Enabled 'pve-no-subscription' repository" ;; no) - msg_error "Selected no to Enabling No-Subscription Repository" + msg_error "Selected no to Enabling 'pve-no-subscription' repository" ;; esac CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nAdd (Disabled) Beta/Test Repository?" 11 58 2 \ + whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3 ) @@ -129,19 +129,19 @@ EOF fi case $CHOICE in yes) - msg_info "Adding Beta/Test Repository and set disabled" + msg_info "Adding 'pvetest' repository and set disabled" cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pve bullseye pvetest EOF - msg_ok "Added Beta/Test Repository" + msg_ok "Added 'pvetest' repository" ;; no) - msg_error "Selected no to Adding Beta/Test Repository" + msg_error "Selected no to Adding 'pvetest' repository" ;; esac CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nDisable Subscription Nag?" 11 58 2 \ + whiptail --title "Proxmox VE 7 Post Install" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3 ) @@ -151,13 +151,13 @@ EOF fi case $CHOICE in yes) - msg_info "Disabling Subscription Nag" + msg_info "Disabling subscription nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null - msg_ok "Disabled Subscription Nag (Delete browser cache)" + msg_ok "Disabled subscription nag (Delete browser cache)" ;; no) - msg_error "Selected no to Disabling Subscription Nag" + msg_error "Selected no to Disabling subscription nag" ;; esac @@ -175,7 +175,7 @@ EOF msg_info "Updating Proxmox VE 7 (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox VE 7 (Reboot Recommended)" + msg_ok "Updated Proxmox VE 7 (Reboot recommended)" ;; no) msg_error "Selected no to Updating Proxmox VE 7" @@ -208,7 +208,7 @@ EOF header_info echo -e "\nThis script will Perform Post Install Routines.\n" while true; do - read -p "Start the PVE7 Post Install Script (y/n)?" yn + read -p "Start the Proxmox VE 7 Post Install Script (y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit_script ;; From ec99f941fe61f7ae75df0d9abd3e00e528ad1e00 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Apr 2023 04:24:08 -0400 Subject: [PATCH 1445/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index e9641023..1157d709 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -6,6 +6,8 @@ body: value: | **IMPORTANT:** Before submitting: - Please search through the closed issues to see if the issue you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. + - Switching Linux distributions without verifying that the default settings function properly, may lead to immediate closure. + - Failing to run the script in verbose mode to determine the actual issue, while encountering the error message `[ERROR] in line 22: exit code *: while executing command "$@" > /dev/null 2>&1`, may lead to immediate closure. - If you have requests for features or scripts, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug From 22300b0c4de9e64b5961ec22f5f03a35fa36c6f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Apr 2023 04:51:39 -0400 Subject: [PATCH 1446/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index d43b2266..69cc48ab 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Non-Alpine LXC's** - - Advanced settings provide the option for users to switch between Debian and Ubuntu distributions. However, some applications or services, such as Deconz or Omada, may not be compatible with the selected distribution due to dependencies. + - Advanced settings provide the option for users to switch between Debian and Ubuntu distributions. However, some applications or services, such as Deconz, grocy or Omada, may not be compatible with the selected distribution due to dependencies. ## 2023-04-16 From 70d51d964df90b425c9ed5da66ae723c19c83cb6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Apr 2023 05:51:55 -0400 Subject: [PATCH 1447/3335] Update build.func add default distribution message box --- misc/build.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 1643c42a..4859554b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -112,10 +112,11 @@ exit-script() { } advanced_settings() { + whiptail --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58 if [ "$var_os" != "alpine" ]; then var_os="" while [ -z "$var_os" ]; do - if var_os=$(whiptail --title "DISTRIBUTION" --radiolist "Choose" 10 58 2 \ + if var_os=$(whiptail --title "DISTRIBUTION" --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" OFF \ "ubuntu" "" OFF \ 3>&1 1>&2 2>&3); then From 513049c50b9dfd78012fef52bfa55052429714d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Apr 2023 05:38:40 -0400 Subject: [PATCH 1448/3335] Update pimox-haos-vm.sh update pve_check --- vm/pimox-haos-vm.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index ca69e858..fff2fa52 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -79,10 +79,10 @@ else exit fi function PVE_CHECK() { - if [ $(pveversion | grep "pve-manager/7.2\|7.3" | wc -l) -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: =>7.2" - echo "Exiting..." + if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." sleep 2 exit fi From 5569d7039883b82af5b444be1d5acfa24efe9487 Mon Sep 17 00:00:00 2001 From: Adam Maracz Date: Wed, 26 Apr 2023 11:40:14 +0200 Subject: [PATCH 1449/3335] updated cleanup with current omada version (#1365) --- install/omada-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index 0bc5fe85..6a359884 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -33,7 +33,7 @@ motd_ssh root msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_v5.9.9_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb +rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From a4f2aa59e25009c3978ced4b8dd8914c5e2d1c43 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Apr 2023 09:05:28 -0400 Subject: [PATCH 1450/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 69cc48ab..2e77f146 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,12 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-26 + +### Changed + +- **The site can now be accessed through a more memorable URL, which is [helper-scripts.com](http://helper-scripts.com).** + ## 2023-04-23 ### Changed From 10deb58fcbd8370059f498a6584ccbc6e3842d32 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Apr 2023 14:26:45 -0400 Subject: [PATCH 1451/3335] Update homepage-install.sh Switching from building a release to building from source --- install/homepage-install.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 3800244f..7cabc3c3 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -30,12 +30,8 @@ $STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Installing Homepage (Patience)" -RELEASE=$(curl -s https://api.github.com/repos/benphelps/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q https://github.com/benphelps/homepage/archive/refs/tags/v${RELEASE}.tar.gz -$STD tar -xvf v${RELEASE}.tar.gz -mkdir -p /opt/homepage -cp -r homepage-${RELEASE}/* /opt/homepage -rm -rf v${RELEASE}.tar.gz homepage-${RELEASE} +cd /opt +$STD git clone https://github.com/benphelps/homepage.git cd /opt/homepage mkdir -p config cp /opt/homepage/src/skeleton/* /opt/homepage/config From 13e65979ee9d467798fdac89f9065f46827769b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Apr 2023 01:34:39 -0400 Subject: [PATCH 1452/3335] Update nginxproxymanager.sh enable services after update fixes https://github.com/tteck/Proxmox/issues/1368 --- ct/nginxproxymanager.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 89b0382d..4425570c 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -165,9 +165,8 @@ EOF msg_info "Starting Services" sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg - systemctl enable npm &>/dev/null - systemctl start openresty - systemctl start npm + systemctl enable -q --now openresty + systemctl enable -q --now npm msg_ok "Started Services" msg_info "Cleaning up" From f74869108c0c1a5a1a181a80de96c595666c265f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Apr 2023 01:48:35 -0400 Subject: [PATCH 1453/3335] Update update-lxcs.sh silent `apt update` and show `apt list --upgradable` --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index b1a6827a..8f2daf58 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -45,7 +45,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update && apt-get -y dist-upgrade" ;; + ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; esac } header_info From 700717da430ed6a6cd57894fce17895bf3887ba1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Apr 2023 16:45:11 -0400 Subject: [PATCH 1454/3335] Create monitor-lxcs.sh --- misc/monitor-lxcs.sh | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 misc/monitor-lxcs.sh diff --git a/misc/monitor-lxcs.sh b/misc/monitor-lxcs.sh new file mode 100644 index 00000000..74ab9b0b --- /dev/null +++ b/misc/monitor-lxcs.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Proxmox VE LXC Monitor +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/monitor-lxcs.sh)" + +clear +cat <<"EOF" + __ ___ _ __ __ _ ________ + / |/ /___ ____ (_) /_____ _____ / / | |/ / ____/ + / /|_/ / __ \/ __ \/ / __/ __ \/ ___/ / / | / / + / / / / /_/ / / / / / /_/ /_/ / / / /___/ / /___ +/_/ /_/\____/_/ /_/_/\__/\____/_/ /_____/_/|_\____/ + +EOF + +while true; do + read -p "This script will add Monitor LXC to Proxmox VE. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +echo '#!/usr/bin/env bash +while true +do + # Get the list of containers + containers=$(pct list | tail -n +2 | cut -f1 -d" ") + + for container in $containers + do + # Skip containers based on templates + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "true" ]; then + continue + fi + + # Get the IP address of the container + IP=$(pct exec $container ip a s dev eth0 | awk '\''/inet / {print $2}'\'' | cut -d/ -f1) + + # Ping the container + if ! ping -c 1 $IP >/dev/null 2>&1; then + # If the container can'\''t be pinged, stop and start it + echo -e "$(date): Container $container is not responding, restarting..." + pct stop $container >/dev/null 2>&1 + sleep 5 + pct start $container >/dev/null 2>&1 + fi + done + + # Wait for 5 minutes + echo -e "$(date): Sleeping for 5 minutes..." + sleep 300 +done >> /var/log/ping-containers.log 2>&1' >/usr/local/bin/ping-containers.sh + +# Change the permissions +chmod +x /usr/local/bin/ping-containers.sh + +# Create service +echo '[Unit] +Description=Pings containers every 5 minutes and restarts if necessary + +[Service] +Type=simple +ExecStart=/usr/local/bin/ping-containers.sh +Restart=always +StandardOutput=file:/var/log/ping-containers.log +StandardError=file:/var/log/ping-containers.log + +[Install] +WantedBy=multi-user.target' >/etc/systemd/system/ping-containers.service + +# Reload daemon, enable and start ping-containers.service +systemctl daemon-reload +systemctl enable -q --now ping-containers.service +clear +echo -e "\n To view Monitor LXC logs: cat /var/log/ping-containers.log" + +# To remove Monitor LXC from Proxmox VE +# 1) systemctl stop ping-containers.service +# 2) systemctl disable ping-containers.service +# 3) rm /etc/systemd/system/ping-containers.service +# 4) rm /usr/local/bin/ping-containers.sh +# 5) rm /var/log/ping-containers.log From 488895ad5a2bfda13e87d958f9f9ad8cb82f89d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Apr 2023 18:38:02 -0400 Subject: [PATCH 1455/3335] Update monitor-lxcs.sh add option to exclude containers --- misc/monitor-lxcs.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/misc/monitor-lxcs.sh b/misc/monitor-lxcs.sh index 74ab9b0b..5648ba4d 100644 --- a/misc/monitor-lxcs.sh +++ b/misc/monitor-lxcs.sh @@ -11,9 +11,9 @@ clear cat <<"EOF" __ ___ _ __ __ _ ________ / |/ /___ ____ (_) /_____ _____ / / | |/ / ____/ - / /|_/ / __ \/ __ \/ / __/ __ \/ ___/ / / | / / + / /|_/ / __ \/ __ \/ / __/ __ \/ ___/ / / | / / / / / / /_/ / / / / / /_/ /_/ / / / /___/ / /___ -/_/ /_/\____/_/ /_/_/\__/\____/_/ /_____/_/|_\____/ +/_/ /_/\____/_/ /_/_/\__/\____/_/ /_____/_/|_\____/ EOF @@ -27,6 +27,11 @@ while true; do done echo '#!/usr/bin/env bash + +# Read excluded containers from command line arguments +excluded_containers=("$@") +echo "Excluded containers: ${excluded_containers[@]}" + while true do # Get the list of containers @@ -34,6 +39,11 @@ do for container in $containers do + # Skip excluded containers + if [[ " ${excluded_containers[@]} " =~ " ${container} " ]]; then + continue + fi + # Skip containers based on templates template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") if [ "$template" == "true" ]; then @@ -46,27 +56,29 @@ do # Ping the container if ! ping -c 1 $IP >/dev/null 2>&1; then # If the container can'\''t be pinged, stop and start it - echo -e "$(date): Container $container is not responding, restarting..." + echo "$(date): Container $container is not responding, restarting..." pct stop $container >/dev/null 2>&1 sleep 5 pct start $container >/dev/null 2>&1 fi done - # Wait for 5 minutes - echo -e "$(date): Sleeping for 5 minutes..." + # Wait for 5 minutes. (Edit to your needs) + echo "$(date): Sleeping for 5 minutes..." sleep 300 done >> /var/log/ping-containers.log 2>&1' >/usr/local/bin/ping-containers.sh -# Change the permissions +# Change file permissions to executable chmod +x /usr/local/bin/ping-containers.sh -# Create service +# Create ping-containers.service echo '[Unit] Description=Pings containers every 5 minutes and restarts if necessary [Service] Type=simple +# Include the container ID at the end of the line where ExecStart=/usr/local/bin/ping-containers.sh is specified, +# to indicate which container should be excluded. Example: ExecStart=/usr/local/bin/ping-containers.sh 100 102 ExecStart=/usr/local/bin/ping-containers.sh Restart=always StandardOutput=file:/var/log/ping-containers.log From c90063059f40fc23350de25ad5b7fbae2055520c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Apr 2023 07:22:15 -0400 Subject: [PATCH 1456/3335] Update cronicle.sh fix for worker --- ct/cronicle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index e210d897..8b45e79f 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -51,7 +51,7 @@ function default_settings() { } function update_script() { -if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +#if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install ${APP} Worker" OFF \ From 8f9b06609fb4fa313002630c359956c2e72a14d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Apr 2023 08:17:20 -0400 Subject: [PATCH 1457/3335] Update monitor-lxcs.sh incorporate add/remove functions --- misc/monitor-lxcs.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/misc/monitor-lxcs.sh b/misc/monitor-lxcs.sh index 5648ba4d..7576114a 100644 --- a/misc/monitor-lxcs.sh +++ b/misc/monitor-lxcs.sh @@ -17,6 +17,7 @@ cat <<"EOF" EOF +add() { while true; do read -p "This script will add Monitor LXC to Proxmox VE. Proceed(y/n)?" yn case $yn in @@ -92,10 +93,22 @@ systemctl daemon-reload systemctl enable -q --now ping-containers.service clear echo -e "\n To view Monitor LXC logs: cat /var/log/ping-containers.log" +} -# To remove Monitor LXC from Proxmox VE -# 1) systemctl stop ping-containers.service -# 2) systemctl disable ping-containers.service -# 3) rm /etc/systemd/system/ping-containers.service -# 4) rm /usr/local/bin/ping-containers.sh -# 5) rm /var/log/ping-containers.log +remove() { + systemctl stop ping-containers.service + systemctl disable ping-containers.service &>/dev/null + rm /etc/systemd/system/ping-containers.service + rm /usr/local/bin/ping-containers.sh + rm /var/log/ping-containers.log + echo "Removed Monitor LXC from Proxmox VE" +} + +if [ "$1" == "add" ]; then + add +elif [ "$1" == "remove" ]; then + remove +else + echo "Usage: $0 [add | remove]" + exit 1 +fi From c92d92a4999cfc0ca1df5a4bba257588eb3fa418 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Apr 2023 08:42:35 -0400 Subject: [PATCH 1458/3335] Update monitor-lxcs.sh tweak --- misc/monitor-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/monitor-lxcs.sh b/misc/monitor-lxcs.sh index 7576114a..4218e53a 100644 --- a/misc/monitor-lxcs.sh +++ b/misc/monitor-lxcs.sh @@ -109,6 +109,6 @@ if [ "$1" == "add" ]; then elif [ "$1" == "remove" ]; then remove else - echo "Usage: $0 [add | remove]" + echo "Usage: $0 [ -s add | -s remove ]" exit 1 fi From 0f26a686f9d691b956be5c20400c2fd272fbc5cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Apr 2023 09:20:11 -0400 Subject: [PATCH 1459/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2e77f146..77cffa3b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-28 + +### Changed + +- **Proxmox VE LXC Monitor** + - NEW Script + ## 2023-04-26 ### Changed From 0abd1c5b84ffa5c7104d47c76fadc545b30f7646 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Apr 2023 09:25:14 -0400 Subject: [PATCH 1460/3335] Update cronicle.sh fix unbound variable --- ct/cronicle.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 8b45e79f..8eb6aaa5 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -51,7 +51,6 @@ function default_settings() { } function update_script() { -#if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install ${APP} Worker" OFF \ @@ -59,6 +58,7 @@ UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spaceb if [ "$UPD" == "1" ]; then header_info +if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" /opt/cronicle/bin/control.sh upgrade &>/dev/null msg_ok "Updated ${APP}" @@ -94,7 +94,7 @@ sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null chmod 775 /etc/init.d/cronicled update-rc.d cronicled defaults &>/dev/null -msg_ok "Installed Cronicle Worker on $hostname" +msg_ok "Installed Cronicle Worker" echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" exit fi From e7194c92fc3b8b0958b510b8b33b26cea7df9d9f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Apr 2023 00:04:09 -0400 Subject: [PATCH 1461/3335] Create monitor-all.sh --- misc/monitor-all.sh | 138 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 misc/monitor-all.sh diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh new file mode 100644 index 00000000..4eb0bb70 --- /dev/null +++ b/misc/monitor-all.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Proxmox VE LXC Monitor All +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/monitor-all.sh)" -s add + +clear +cat <<"EOF" + __ ___ _ __ ___ ____ + / |/ /___ ____ (_) /_____ _____ / | / / / + / /|_/ / __ \/ __ \/ / __/ __ \/ ___/ / /| | / / / + / / / / /_/ / / / / / /_/ /_/ / / / ___ |/ / / +/_/ /_/\____/_/ /_/_/\__/\____/_/ /_/ |_/_/_/ + +EOF + +add() { +while true; do + read -p "This script will add Monitor All to Proxmox VE. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +echo '#!/usr/bin/env bash +# Read excluded instances from command line arguments +excluded_instances=("$@") +echo "Excluded instances: ${excluded_instances[@]}" + +while true +do + # Get the list of containers and virtual machines + containers=$(pct list | tail -n +2 | cut -f1 -d" ") + virtual_machines=$(qm list | grep -oP "^\s*\K\d+(?=\s)") + + # Combine the container and virtual machine lists + all_instances="$containers $virtual_machines" + + for instance in $all_instances + do + # Skip excluded instances + if [[ " ${excluded_instances[@]} " =~ " ${instance} " ]]; then + continue + fi + + # Determine the type of the instance (container or virtual machine) + if pct status $instance >/dev/null 2>&1; then + # It is a container + config_cmd="pct config" + IP=$(pct exec $instance ip a s dev eth0 | awk '\''/inet / {print $2}'\'' | cut -d/ -f1) + else + # It is a virtual machine + config_cmd="qm config" + IP=$(qm guest cmd $instance network-get-interfaces | egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -E "192\.|10\.") + fi + + # Skip instances based on templates + template=$($config_cmd $instance | grep template | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "true" ]; then + echo "Skipping $instance because it is a template" + continue + fi + + # Ping the instance + if ! ping -c 1 $IP >/dev/null 2>&1; then + # If the instance can not be pinged, stop and start it + if pct status $instance >/dev/null 2>&1; then + # It is a container + echo "$(date): CT $instance is not responding, restarting..." + pct stop $instance >/dev/null 2>&1 + sleep 5 + pct start $instance >/dev/null 2>&1 + else + # It is a virtual machine + if qm status $instance | grep -q "status: running"; then + echo "$(date): VM $instance is not responding, resetting..." + qm reset $instance >/dev/null 2>&1 + else + qm start $instance >/dev/null 2>&1 + echo "$(date): VM $instance is not running, starting..." + fi + fi + fi + done + + # Wait for 5 minutes. (Edit to your needs) + echo "$(date): Pausing for 5 minutes..." + sleep 300 +done >> /var/log/ping-instances.log 2>&1' >/usr/local/bin/ping-instances.sh + +# Change file permissions to executable +chmod +x /usr/local/bin/ping-instances.sh + +# Create ping-containers.service +echo '[Unit] +Description=Ping instances every 5 minutes and restarts if necessary + +[Service] +Type=simple +# Include the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified, +# to indicate which CT/VN should be excluded. Example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 +ExecStart=/usr/local/bin/ping-instances.sh +Restart=always +StandardOutput=file:/var/log/ping-instances.log +StandardError=file:/var/log/ping-instances.log + +[Install] +WantedBy=multi-user.target' >/etc/systemd/system/ping-instances.service + +# Reload daemon, enable and start ping-containers.service +systemctl daemon-reload +systemctl enable -q --now ping-instances.service +clear +echo -e "\n To view Monitor All logs: cat /var/log/ping-instances.log" +} + +remove() { + systemctl stop ping-instances.service + systemctl disable ping-instances.service &>/dev/null + rm /etc/systemd/system/ping-instances.service + rm /usr/local/bin/ping-instances.sh + rm /var/log/ping-instances.log + echo "Removed Monitor All from Proxmox VE" +} + +if [ "$1" == "add" ]; then + add +elif [ "$1" == "remove" ]; then + remove +else + echo "Usage: $0 [ -s add | -s remove ]" + exit 1 +fi From 2ca3e77bea73561c70c088fa731cf7435c0e0963 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Apr 2023 02:39:40 -0400 Subject: [PATCH 1462/3335] Update motioneye-install.sh switched to dev branch for continued development --- install/motioneye-install.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index 69489209..cbb1a732 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y git $STD apt-get install -y cifs-utils msg_ok "Installed Dependencies" @@ -30,27 +31,23 @@ msg_info "Installing FFmpeg" $STD apt-get install -y ffmpeg v4l-utils msg_ok "Installed FFmpeg" -msg_info "Installing Python" -$STD apt-get update -$STD apt-get install -y python2 -curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py -$STD python2 get-pip.py -$STD apt-get install -y libffi-dev libzbar-dev libzbar0 -$STD apt-get install -y python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -msg_ok "Installed Python" +msg_info "Installing Python3-pip" +$STD apt-get install -y python3-pip +msg_ok "Installed Python3-pip" msg_info "Installing MotionEye" $STD apt-get update -$STD pip install motioneye +$STD pip install git+https://github.com/motioneye-project/motioneye.git@dev mkdir -p /etc/motioneye -cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf +chown -R root:root /etc/motioneye +chmod -R 777 /etc/motioneye +cp /usr/local/lib/python3.9/dist-packages/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf mkdir -p /var/lib/motioneye msg_ok "Installed MotionEye" msg_info "Creating Service" -cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service -$STD systemctl enable motioneye -systemctl start motioneye +cp /usr/local/lib/python3.9/dist-packages/motioneye/extra/motioneye.systemd /etc/systemd/system/motioneye.service +systemctl enable -q --now motioneye msg_ok "Created Service" motd_ssh From 485444b07d5520aaa2a9874c64dfae583b91ec66 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 04:20:16 -0400 Subject: [PATCH 1463/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 8f2daf58..3590bb84 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -49,7 +49,7 @@ function update_container() { esac } header_info -for container in $(pct list | tail -n +2 | cut -f1 -d' '); do +for container in $(pct list | awk '{if(NR>1) print $1}'); do excluded=false for excluded_container in "${excluded_containers[@]}"; do if [ "$container" == "$excluded_container" ]; then From 15f528512029d4e21435324e72dfe990557d6beb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 04:22:09 -0400 Subject: [PATCH 1464/3335] Update monitor-all.sh Code refactoring --- misc/monitor-all.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 4eb0bb70..ce61017c 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -34,14 +34,8 @@ echo "Excluded instances: ${excluded_instances[@]}" while true do - # Get the list of containers and virtual machines - containers=$(pct list | tail -n +2 | cut -f1 -d" ") - virtual_machines=$(qm list | grep -oP "^\s*\K\d+(?=\s)") - # Combine the container and virtual machine lists - all_instances="$containers $virtual_machines" - - for instance in $all_instances + for instance in $(pct list | awk '\''{if(NR>1) print $1}'\''; qm list | awk '\''{if(NR>1) print $1}'\'') do # Skip excluded instances if [[ " ${excluded_instances[@]} " =~ " ${instance} " ]]; then @@ -96,7 +90,7 @@ done >> /var/log/ping-instances.log 2>&1' >/usr/local/bin/ping-instances.sh # Change file permissions to executable chmod +x /usr/local/bin/ping-instances.sh -# Create ping-containers.service +# Create ping-instances.service echo '[Unit] Description=Ping instances every 5 minutes and restarts if necessary @@ -112,7 +106,7 @@ StandardError=file:/var/log/ping-instances.log [Install] WantedBy=multi-user.target' >/etc/systemd/system/ping-instances.service -# Reload daemon, enable and start ping-containers.service +# Reload daemon, enable and start ping-instances.service systemctl daemon-reload systemctl enable -q --now ping-instances.service clear From 1dc63002ad6023e95d661a4fe600834fc6d02f86 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 04:43:52 -0400 Subject: [PATCH 1465/3335] Update clean-lxcs.sh tweak --- misc/clean-lxcs.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 0273c2e3..a3465dc1 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info() { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ / / / / _ \/ __ `/ __ \ / / | / / @@ -34,7 +34,6 @@ while true; do esac done clear -containers=$(pct list | tail -n +2 | cut -f1 -d' ') function clean_container() { container=$1 header_info @@ -43,7 +42,7 @@ function clean_container() { pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/main/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } -for container in $containers; do +for container in $(pct list | awk '{if(NR>1) print $1}'); do os=$(pct config "$container" | awk '/^ostype/ {print $2}') if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ]; then header_info @@ -53,16 +52,16 @@ for container in $containers; do fi status=$(pct status $container) template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") - if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then - echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" - pct start $container - echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" - sleep 5 - clean_container $container - echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" - pct shutdown $container & - elif [ "$status" == "status: running" ]; then - clean_container $container + if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then + echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" + pct start $container + echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" + sleep 5 + clean_container $container + echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" + pct shutdown $container & + elif [ "$status" == "status: running" ]; then + clean_container $container fi done wait From 465cd750150c6c761f77a6bf2aa8d46576990cb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 04:48:05 -0400 Subject: [PATCH 1466/3335] Update monitor-all.sh tweak --- misc/monitor-all.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index ce61017c..624e71d5 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -32,11 +32,9 @@ echo '#!/usr/bin/env bash excluded_instances=("$@") echo "Excluded instances: ${excluded_instances[@]}" -while true -do +while true; do - for instance in $(pct list | awk '\''{if(NR>1) print $1}'\''; qm list | awk '\''{if(NR>1) print $1}'\'') - do + for instance in $(pct list | awk '\''{if(NR>1) print $1}'\''; qm list | awk '\''{if(NR>1) print $1}'\''); do # Skip excluded instances if [[ " ${excluded_instances[@]} " =~ " ${instance} " ]]; then continue From e946f41890752745ec4a1885ca2c2a58a6573cb3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 05:56:05 -0400 Subject: [PATCH 1467/3335] Update build.func Check if the Monitor-All service is currently active. If it is, stop the service until the creation process is complete. Once the creation process is finished, start the Monitor-All service again. --- misc/build.func | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/build.func b/misc/build.func index 4859554b..3a80c03b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -375,6 +375,9 @@ install_script() { ssh_check arch_check pve_check + if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service + fi NEXTID=$(pvesh get /cluster/nextid) timezone=$(cat /etc/timezone) header_info @@ -508,4 +511,7 @@ description() { pct set "$CTID" -description "# ${APP} LXC ### https://tteck.github.io/Proxmox/ " + if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service + fi } From 70ce72fcbfb58daf0335eea1fee1b9dad3c2dc9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 05:59:26 -0400 Subject: [PATCH 1468/3335] Update monitor-all.sh final tweak --- misc/monitor-all.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 624e71d5..3b616b31 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -4,8 +4,6 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# Proxmox VE LXC Monitor All -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/monitor-all.sh)" -s add clear cat <<"EOF" From d51a8df90f611e9e2aff52cc090f93c946fe39cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 06:24:27 -0400 Subject: [PATCH 1469/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 77cffa3b..64fb6b37 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,14 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-04-30 + +### Changed + +- **Proxmox VE Monitor-All** + - NEW Script + - Replaces Proxmox VE LXC Monitor + ## 2023-04-28 ### Changed From eeafae190c2a36acb49f8c391e76fe2860ae9c61 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Apr 2023 15:15:51 -0400 Subject: [PATCH 1470/3335] Update paperless-ngx-install.sh fix paperless-ngx incorrect user:pass https://github.com/tteck/Proxmox/issues/1376 --- install/paperless-ngx-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 8d31b183..55820dbb 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -94,7 +94,7 @@ msg_ok "Installed Natural Language Toolkit" msg_info "Setting up database" DB_USER=paperless -DB_PASS="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)" +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" DB_NAME=paperlessdb $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" @@ -118,11 +118,10 @@ msg_info "Setting up admin Paperless-ngx User & Password" cat <>~/paperless.creds echo "Paperless-ngx WebUI User" >>~/paperless.creds From 2139f9b9db8355cce707a27cb820cf5a63a9c738 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 12:53:21 -0400 Subject: [PATCH 1471/3335] Create octoprint-install.sh --- install/octoprint-install.sh | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 install/octoprint-install.sh diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh new file mode 100644 index 00000000..56492b3b --- /dev/null +++ b/install/octoprint-install.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y libyaml-dev +$STD apt-get install -y build-essential +msg_ok "Installed Dependencies" + +msg_info "Installing Python3" +$STD apt-get install -y \ + python3-pip \ + python3-dev \ + python3-setuptools \ + python3-venv +msg_ok "Installed Python3" + +msg_info "Creating user octoprint" +useradd -m -s /bin/bash -p $(openssl passwd -1 octoprint) octoprint +usermod -aG sudo,tty,dialout octoprint +chown -R octoprint:octoprint /opt +msg_ok "Created user octoprint" + +msg_info "Installing OctoPrint" +$STD sudo -u octoprint bash << EOF +mkdir /opt/octoprint +cd /opt/octoprint +python3 -m venv . +source bin/activate +pip install --upgrade pip +pip install octoprint +EOF +msg_ok "Installed OctoPrint" + +msg_info "Creating Service" +cat </etc/systemd/system/octoprint.service +[Unit] +Description=The snappy web interface for your 3D printer +After=network-online.target +Wants=network-online.target + +[Service] +Environment="LC_ALL=C.UTF-8" +Environment="LANG=C.UTF-8" +Type=exec +User=octoprint +ExecStart=/opt/octoprint/bin/octoprint serve + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now octoprint.service +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From bda2ff41545a8f4e56a97670f395da4cc08d76b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 12:54:39 -0400 Subject: [PATCH 1472/3335] Create octoprint.sh --- ct/octoprint.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/octoprint.sh diff --git a/ct/octoprint.sh b/ct/octoprint.sh new file mode 100644 index 00000000..e7b93f45 --- /dev/null +++ b/ct/octoprint.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ ____ _ __ + / __ \_____/ /_____ / __ \_____(_)___ / /_ + / / / / ___/ __/ __ \/ /_/ / ___/ / __ \/ __/ +/ /_/ / /__/ /_/ /_/ / ____/ / / / / / / /_ +\____/\___/\__/\____/_/ /_/ /_/_/ /_/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="OctoPrint" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="11" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET=dhcp + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/octoprint ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From 5405f4dc9d02156e5c61bf372384118819ab48d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 13:09:10 -0400 Subject: [PATCH 1473/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 64fb6b37..70ae780d 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-01 + +### Changed + +- **OctoPrint LXC** + - NEW Script + ## 2023-04-30 ### Changed From e8bd1c21a01ce82cf2713c4d8904e00c3bc41f8e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 13:13:59 -0400 Subject: [PATCH 1474/3335] Update octoprint.sh create update script --- ct/octoprint.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ct/octoprint.sh b/ct/octoprint.sh index e7b93f45..e53023a6 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -53,10 +53,18 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/octoprint ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_info "Stopping OctoPrint" +systemctl stop octoprint +msg_ok "Stopped OctoPrint" + +msg_info "Updating OctoPrint" +pip3 install octoprint --upgrade &>/dev/null +msg_ok "Updated OctoPrint" + +msg_info "Starting OctoPrint" +systemctl start octoprint +msg_ok "Started OctoPrint" +msg_ok "Updated Successfully" exit } From 214e0d13d5bbd490fdadd1ba3f8b2501352670b8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 13:33:30 -0400 Subject: [PATCH 1475/3335] Update octoprint.sh set source --- ct/octoprint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/octoprint.sh b/ct/octoprint.sh index e53023a6..c0f14e37 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -58,6 +58,7 @@ systemctl stop octoprint msg_ok "Stopped OctoPrint" msg_info "Updating OctoPrint" +source /opt/octoprint/bin/activate pip3 install octoprint --upgrade &>/dev/null msg_ok "Updated OctoPrint" From eea752fa798c9f5237614a7b8bc9b2d826f7b4b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 17:50:43 -0400 Subject: [PATCH 1476/3335] Create microcode.sh --- misc/microcode.sh | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 misc/microcode.sh diff --git a/misc/microcode.sh b/misc/microcode.sh new file mode 100644 index 00000000..07b2fff5 --- /dev/null +++ b/misc/microcode.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +clear +while true; do + read -p "Install the latest Intel Processor Microcode (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +clear +cat <<"EOF" + ____ __ __ __ ____ __ + / _/___ / /____ / / / |/ (_)_____________ _________ ____/ /__ + / // __ \/ __/ _ \/ / / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ + _/ // / / / /_/ __/ / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/ +/___/_/ /_/\__/\___/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ + +EOF + +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" +apt-get install -y iucode-tool &>/dev/null +msg_ok "Installed iucode-tool" + +msg_info "Downloading the latest Intel Processor Microcode Package for Linux" +release=$(curl -s https://api.github.com/repos/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/latest | awk -F'"' '/tag_name/{print $4}' | tr -cd '[:digit:]') +wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.${release}.1_amd64.deb +msg_ok "Downloaded the latest Intel Processor Microcode Package" + +msg_info "Installing the Intel Processor Microcode (Patience)" +dpkg -i intel-microcode_3.${release}.1_amd64.deb &>/dev/null +msg_ok "Installed the Intel Processor Microcode" + +msg_info "Cleaning up" +rm intel-microcode_3.${release}.1_amd64.deb +msg_ok "Cleaned" + +echo -e "\n To apply the settings, the system will need to be rebooted.\n" From 07b088723f083798ca4dbf8e33b746598ea50801 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 18:14:06 -0400 Subject: [PATCH 1477/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 70ae780d..cbe73016 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. - **OctoPrint LXC** - NEW Script +- **Proxmox VE Intel Processor Microcode** + - NEW Script ## 2023-04-30 From e6e421b38af23293ccf8d930fc2ebec49cd10846 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 May 2023 11:34:10 -0400 Subject: [PATCH 1478/3335] Update octoprint-install.sh add `pip install wheel` --- install/octoprint-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index 56492b3b..b871219a 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -43,6 +43,7 @@ cd /opt/octoprint python3 -m venv . source bin/activate pip install --upgrade pip +pip install wheel pip install octoprint EOF msg_ok "Installed OctoPrint" From d9926b376b6dd03e82396e2345447e65b1fa4c2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 May 2023 12:58:36 -0400 Subject: [PATCH 1479/3335] Add files via upload --- misc/images/intel.png | Bin 0 -> 130540 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/intel.png diff --git a/misc/images/intel.png b/misc/images/intel.png new file mode 100644 index 0000000000000000000000000000000000000000..97b53a678cc69d6850865c839ea391a012eebe89 GIT binary patch literal 130540 zcmb?ig;&#W)JGAdML|MZ3F&S|gMf5*igbg(D3y{JJ-SmGqy!0(24QrENQ{BRU@&^` z;P<}&!MnrG&f)BS?|p83ZajBUn(A)|@m}CzU|LFA+FZ~d zxb8|uUKkieJ$LU118!g6VPMc>D9g*}`epyid7SR807g1Jq}P(xl-GRJjYW!?|K$OH zboA3cA1%$f#=Pin?A^P9cC)co2EC2LFEn{RKERw6q-V>wq|d^^Q+l=D-|I0Gpq4o8MBNK?p$cLc9F+T09exKCR zI&`b`_2re`1@Kz*e|dh?QzZDt=<+&xos8fIJd=6Hi3C3Q&HOssCmG?_ejVfr2+;u8 z{Ybf19q5{X9kTRzWe2}}Ux^fB^etzpI%(Go&!u2Ff(3o9$Got%UD=--~^%0lT%4&kT)@ttdX;20`| zn-P$a8$f*XuV*KaTPWeM{}A$iPjGmzze*3ga*OcOpHHWGX8R{2R=qeRcg~4^RT1x( zkcLi1r&T3sjw_!PgEIQs6LWg>2dsC#{=griQh&k-$n}1GbDK6b$4RsH_EI1xPX-cz zxo?2zNK2|I^y0&-40(hJ`S$sf(l+HZF*e;$H<+vR*BJ)H7(T5UO>)UE%?fU30d;rS*mIX5BQ1jzx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0FU8aKp)TAY%N!6v9lHZ(yv$jlS)@WNnLS!8@}7#l{%E zz5Q}okIYh%DdJ@|TYrb#?O6F|lsad~avhuLnoTN1L!6xV_|%U!$fd2Uzor4!7nz<@ z#wgVGZ>6r>iByEQ8peek*N?;#9^y3w+i$khkMwIYh zVaji_?DF|$L#&KwVmfV2MfWZdEthCtXIo`0eB8vJXl)Zg4$EBid0kG&%hHiVo)L8V zF9jOc%YU)}djm~S+=Z}N=&yg~h3VYG+GH=hu!{KZea96$3IB>uz5}2cco?ZaC1c@< zE1Orl>tB!U@s49{OuXx`V1yeaXyQ<@xPR;+HV>dXWBRgM3DYSpR?3h-)aneejDYzF z_o4aO_+b;lRn3~!fB@Q%s9Lk~neC#VA$NA`8lEAucg_x{*O8U^t=r#aX{=QT`L#E9 zUA@_{9TvY=#}b@nJOUqlmD7t%6WrHrtA!Ij7}X~Mo?s|_l9FS?DwI^ z(giXrH_}$rR40}BI)g30s3lKw|8=+vQUC1JmLcEw6)-XIHZApV)QFF`DV$hvEXTX- zhCY}hfQ2od08N)<_5EjYoLtGlfn@U?P&LnF-48cQ+ z&;9a51|E0vkAJd)K&ybA+|H+OUCmSX3N}Z^cmiX@lB>3vKO>%J{nvbs8q2#ZT0?S% z=)lzz8Htiams>ZV&=qiQ8_-e#rRRXpM4Dq0qmsq4PCc|_TE_08Y0F^tyPx|S@AuED zPh{ZvrB2k2>pU1*v~&I`jy!Kp= Date: Tue, 2 May 2023 17:30:56 -0400 Subject: [PATCH 1480/3335] Add files via upload --- misc/images/monitor.png | Bin 0 -> 139846 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/monitor.png diff --git a/misc/images/monitor.png b/misc/images/monitor.png new file mode 100644 index 0000000000000000000000000000000000000000..8b280dfd05a334af25c6679653a966dd934c0829 GIT binary patch literal 139846 zcmeFZ_g7P0v;`VOMUQi9S&KQ5f& zgFvTDPTuFv0^cAVQYL{9daozXeL$cKtS4_8(3dn05a>Ec{n34cK+E;!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`d)Y2Tx)|HT<;_4i3zmk-`_fFID=%IzR<1|Q-W`-h8MqcB5EF#J zQ6xUnnG(@r1X0AB24MGDIeGSbuGrcvM8#QRvLAU-y@_%>u_^DUJyIsW16(wnSP8=4 z)zz+QHbR@htXGc&ZmC%tp(RxG70kJbC{VT-1`}^FYJ=Vv1xy}lItLdaw=Y&Acw_Gc zNEdedoBFBvM_3WFs)0Br>R9qSeVX_W(eD%+kw@()*Tf$T&7I% zob%qIoYw=Df<)#TloJm!-eNg6aeQoWz|hdJ$$!TP?odhbpV&^^st7GqE4W*;f#_Kw z*aRQJs=Jg*Wi*zp^{d{G+B6exEJhnsy{>_TG}Ntt=Yh8<*lL6QfZ=2KS{c|iw`8bq ziNM6wI24m%4F8gU&dnREzw?AQSG<>@j}rRoFQsbb*ku+N(CbrsuxWms`99cd3}e~? z8nM(uQMUaC*Ap?@^Aw#@zC+{vQ)jJB?~jM<;OLVGPz?O-(s?f1s|?!4eA;G;{%+~6 zt)MM}w-Ir0Nr$6O+4&;fr(Fkhq$KW9%qG~aMMobRj+`?L$(7|TcLY5M(avd4yjSX}^|VM_JbtuL8VL(a@sJdk@kS>tFSxgC zml5k^dFVhA7TQXhHTs*xU_77}52d|yfP4d=M}4-kz8P8H{f^xG$N6LIbgspExAvY1 zanGFF_u8*>^mxMJm3|ee`?%`n4j-wlV=`TJ(zNoE)YsslID%M?I6&;xkD|tV-{Gl{ zre*L8F<F4C*4JQ6Md!Q884bUCUz)P7z~z5_t@;e z0*+S`34zuy>+;|+-LmAZ2&%dH%i%gFc8<-41GS``O&N`kFFE;#B~p>+Dv$WyF!24y tLKimM`S%{AwYx_)@fMo-pWgV)>E!rVPdL- Date: Wed, 3 May 2023 10:27:14 -0400 Subject: [PATCH 1481/3335] Delete monitor-lxcs.sh --- misc/monitor-lxcs.sh | 114 ------------------------------------------- 1 file changed, 114 deletions(-) delete mode 100644 misc/monitor-lxcs.sh diff --git a/misc/monitor-lxcs.sh b/misc/monitor-lxcs.sh deleted file mode 100644 index 4218e53a..00000000 --- a/misc/monitor-lxcs.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE -# Proxmox VE LXC Monitor -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/monitor-lxcs.sh)" - -clear -cat <<"EOF" - __ ___ _ __ __ _ ________ - / |/ /___ ____ (_) /_____ _____ / / | |/ / ____/ - / /|_/ / __ \/ __ \/ / __/ __ \/ ___/ / / | / / - / / / / /_/ / / / / / /_/ /_/ / / / /___/ / /___ -/_/ /_/\____/_/ /_/_/\__/\____/_/ /_____/_/|_\____/ - -EOF - -add() { -while true; do - read -p "This script will add Monitor LXC to Proxmox VE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -echo '#!/usr/bin/env bash - -# Read excluded containers from command line arguments -excluded_containers=("$@") -echo "Excluded containers: ${excluded_containers[@]}" - -while true -do - # Get the list of containers - containers=$(pct list | tail -n +2 | cut -f1 -d" ") - - for container in $containers - do - # Skip excluded containers - if [[ " ${excluded_containers[@]} " =~ " ${container} " ]]; then - continue - fi - - # Skip containers based on templates - template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") - if [ "$template" == "true" ]; then - continue - fi - - # Get the IP address of the container - IP=$(pct exec $container ip a s dev eth0 | awk '\''/inet / {print $2}'\'' | cut -d/ -f1) - - # Ping the container - if ! ping -c 1 $IP >/dev/null 2>&1; then - # If the container can'\''t be pinged, stop and start it - echo "$(date): Container $container is not responding, restarting..." - pct stop $container >/dev/null 2>&1 - sleep 5 - pct start $container >/dev/null 2>&1 - fi - done - - # Wait for 5 minutes. (Edit to your needs) - echo "$(date): Sleeping for 5 minutes..." - sleep 300 -done >> /var/log/ping-containers.log 2>&1' >/usr/local/bin/ping-containers.sh - -# Change file permissions to executable -chmod +x /usr/local/bin/ping-containers.sh - -# Create ping-containers.service -echo '[Unit] -Description=Pings containers every 5 minutes and restarts if necessary - -[Service] -Type=simple -# Include the container ID at the end of the line where ExecStart=/usr/local/bin/ping-containers.sh is specified, -# to indicate which container should be excluded. Example: ExecStart=/usr/local/bin/ping-containers.sh 100 102 -ExecStart=/usr/local/bin/ping-containers.sh -Restart=always -StandardOutput=file:/var/log/ping-containers.log -StandardError=file:/var/log/ping-containers.log - -[Install] -WantedBy=multi-user.target' >/etc/systemd/system/ping-containers.service - -# Reload daemon, enable and start ping-containers.service -systemctl daemon-reload -systemctl enable -q --now ping-containers.service -clear -echo -e "\n To view Monitor LXC logs: cat /var/log/ping-containers.log" -} - -remove() { - systemctl stop ping-containers.service - systemctl disable ping-containers.service &>/dev/null - rm /etc/systemd/system/ping-containers.service - rm /usr/local/bin/ping-containers.sh - rm /var/log/ping-containers.log - echo "Removed Monitor LXC from Proxmox VE" -} - -if [ "$1" == "add" ]; then - add -elif [ "$1" == "remove" ]; then - remove -else - echo "Usage: $0 [ -s add | -s remove ]" - exit 1 -fi From aee12a7ede36568fc31f57e7a558d543579f33f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 May 2023 10:03:04 -0400 Subject: [PATCH 1482/3335] Update influxdb.sh fix check source list closes https://github.com/tteck/Proxmox/issues/1391 --- ct/influxdb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 1505020a..7408d33c 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" wget -q https://repos.influxdata.com/influxdata-archive_compat.key cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null From e72c28c3244bcdb77c2697e528a4628df004bd9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 04:24:18 -0400 Subject: [PATCH 1483/3335] Update build.func validate IPv4 CIDR address --- misc/build.func | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index 3a80c03b..1f3afaf9 100644 --- a/misc/build.func +++ b/misc/build.func @@ -247,16 +247,25 @@ advanced_settings() { exit-script fi - if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + while true; do + NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status -eq 0 ]; then + if [ "$NET" = "dhcp" ]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + break + else + if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + break + else + whiptail --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + fi + fi else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + exit-script fi - else - exit-script - fi + done if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then @@ -376,7 +385,7 @@ install_script() { arch_check pve_check if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service + systemctl stop ping-instances.service fi NEXTID=$(pvesh get /cluster/nextid) timezone=$(cat /etc/timezone) @@ -512,6 +521,6 @@ description() { ### https://tteck.github.io/Proxmox/ " if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service + systemctl start ping-instances.service fi } From 6312591e588d562c9c0d04d2d3e2f48961c6d677 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 05:04:50 -0400 Subject: [PATCH 1484/3335] Update build.func if a static IP was used, check for gateway IP --- misc/build.func | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/misc/build.func b/misc/build.func index 1f3afaf9..d76e1a7c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -267,17 +267,32 @@ advanced_settings() { fi done - if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" + while true; do + GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status -eq 0 ]; then + if [ -z "$GATE1" ]; then + if [ "$NET" = "dhcp" ]; then + GATE1="Default" + GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + break + else + whiptail --msgbox "Since a static IP was used, a gateway IP address is mandatory." 8 58 + fi + else + if [[ "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + break + else + whiptail --msgbox "Invalid IP address. Please enter a valid IP address." 8 58 + fi + fi else - GATE=",gw=$GATE1" + exit-script fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - else - exit-script - fi + done if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" From 13ae767e7f394d8b90deca3c1543780744619ddc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 07:30:41 -0400 Subject: [PATCH 1485/3335] Update monitor-all.sh code refactoring --- misc/monitor-all.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 3b616b31..a72300c6 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -118,11 +118,24 @@ remove() { echo "Removed Monitor All from Proxmox VE" } -if [ "$1" == "add" ]; then +# Define options for the whiptail menu +OPTIONS=(Add "Add Monitor-All to Proxmox VE" \ + Remove "Remove Monitor-All from Proxmox VE") + +# Show the whiptail menu and save the user's choice +CHOICE=$(whiptail --title "Monitor-All for Proxmox VE" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + +# Check the user's choice and perform the corresponding action +case $CHOICE in + "Add") add -elif [ "$1" == "remove" ]; then + ;; + "Remove") remove -else - echo "Usage: $0 [ -s add | -s remove ]" - exit 1 -fi + ;; + *) + echo "Exiting..." + exit 0 + ;; +esac From 2c247bc58832cfe81e1bca39964df7447e7009e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 17:08:36 -0400 Subject: [PATCH 1486/3335] Update build.func add error message --- misc/build.func | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index d76e1a7c..46069435 100644 --- a/misc/build.func +++ b/misc/build.func @@ -28,7 +28,10 @@ error_handler() { local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" + echo -e "\n$error_message" + if [[ "$line_number" -eq 22 ]]; then + echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" + fi } msg_info() { From 353e74f86b55db96407efe02f1e6a9b42890dbe7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 17:09:28 -0400 Subject: [PATCH 1487/3335] Update install.func add error message --- misc/install.func | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index a2fa99e0..d4bf0af0 100644 --- a/misc/install.func +++ b/misc/install.func @@ -36,7 +36,10 @@ error_handler() { local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" + echo -e "\n$error_message" + if [[ "$line_number" -eq 22 ]]; then + echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" + fi } msg_info() { From 67df4100199225968cb0b489e225758925149755 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 17:10:17 -0400 Subject: [PATCH 1488/3335] Update create_lxc.sh add error message --- ct/create_lxc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index f8326f55..c9e09a7b 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -22,7 +22,10 @@ function error_handler() { local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" + echo -e "\n$error_message" + if [[ "$line_number" -eq 22 ]]; then + echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" + fi } function msg_info() { local msg="$1" From 5e7a808fb9bbae411ed2b6434fbc7a09ca3143e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 17:17:37 -0400 Subject: [PATCH 1489/3335] Update build.func revert add error message, no silent function used --- misc/build.func | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 46069435..d76e1a7c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -28,10 +28,7 @@ error_handler() { local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message" - if [[ "$line_number" -eq 22 ]]; then - echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" - fi + echo -e "\n$error_message\n" } msg_info() { From 9c3fb90eb87d8cde426698468dca997f98bc77ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 May 2023 17:19:12 -0400 Subject: [PATCH 1490/3335] Update create_lxc.sh revert add error message, silent function not used --- ct/create_lxc.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index c9e09a7b..f8326f55 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -22,10 +22,7 @@ function error_handler() { local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message" - if [[ "$line_number" -eq 22 ]]; then - echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" - fi + echo -e "\n$error_message\n" } function msg_info() { local msg="$1" From 1c1f986cee64ffdc3c71d88191cf6c8fa70dea53 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 10:39:56 -0400 Subject: [PATCH 1491/3335] Update unifi-install.sh Code refactoring --- install/unifi-install.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 530fcd0d..8ccddd57 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -17,24 +17,31 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -read -r -p "Local Controller? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - LOCAL="--local-controller" -else - LOCAL="" -fi +msg_info "Installing OpenJDK" +$STD apt-get install -y openjdk-11-jre-headless +$STD apt-mark hold openjdk-11-* +msg_ok "Installed OpenJDK" -msg_info "Installing UniFi Network Application (Patience)" -wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh -$STD bash unifi-latest.sh --skip --add-repository $LOCAL +msg_info "Installing MongoDB" +wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb +$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb +msg_ok "Installed MongoDB" + +msg_info "Installing UniFi Network Application" +wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg +echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' >/etc/apt/sources.list.d/100-ubnt-unifi.list +$STD apt-get update +$STD apt-get install -y unifi msg_ok "Installed UniFi Network Application" motd_ssh root msg_info "Cleaning up" +rm -rf dpkg -i mongodb-org-server_3.6.23_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 29f34c8b51409b5ce4ca4a3618879630c01b9e6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 10:44:54 -0400 Subject: [PATCH 1492/3335] Update unifi-install.sh tweak --- install/unifi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 8ccddd57..9f297731 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -41,7 +41,7 @@ motd_ssh root msg_info "Cleaning up" -rm -rf dpkg -i mongodb-org-server_3.6.23_amd64.deb +rm -rf mongodb-org-server_3.6.23_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 6f2f334a81655cf80a474b68964cb9883c4d5c42 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 10:52:17 -0400 Subject: [PATCH 1493/3335] Update unifi.sh fix update --- ct/unifi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/unifi.sh b/ct/unifi.sh index cb8f2e68..d3876aa6 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -54,8 +54,8 @@ function update_script() { header_info if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" -wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh -bash unifi-update.sh +apt-get update +apt-get install -y unifi msg_ok "Updated Successfully" exit } From 7cd2ca29704754452ddc360db666a2fae59bc201 Mon Sep 17 00:00:00 2001 From: Samuel Burkhard Date: Sun, 7 May 2023 21:01:15 +0200 Subject: [PATCH 1494/3335] Refactor homebridge lxc install (#1401) * simplify homebridge install --- install/homebridge-install.sh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 573acf8f..463b7ab8 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -18,24 +18,19 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y avahi-daemon +$STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs gcc g++ make python net-tools -msg_ok "Installed Node.js" +msg_info "Setting up Homebridge Repository" +curl -sSf https://repo.homebridge.io/KEY.gpg | gpg --dearmor >/etc/apt/trusted.gpg.d/homebridge.gpg +echo 'deb [signed-by=/etc/apt/trusted.gpg.d/homebridge.gpg] https://repo.homebridge.io stable main' >/etc/apt/sources.list.d/homebridge.list +msg_ok "Set up Homebridge Repository" msg_info "Installing Homebridge" -$STD npm install -g --unsafe-perm homebridge homebridge-config-ui-x +$STD apt update +$STD apt-get install -y homebridge msg_info "Installed Homebridge" -msg_info "Creating Service" -$STD hb-service install --user homebridge -msg_ok "Created Service" - motd_ssh root From 78a34078efd3701702e5dd191ca7f6fcf983a4e8 Mon Sep 17 00:00:00 2001 From: Samuel Burkhard Date: Sun, 7 May 2023 21:04:08 +0200 Subject: [PATCH 1495/3335] add fhem container script (#1400) --- ct/fhem.sh | 69 +++++++++++++++++++++++++++++++++++++++++ install/fhem-install.sh | 40 ++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 ct/fhem.sh create mode 100644 install/fhem-install.sh diff --git a/ct/fhem.sh b/ct/fhem.sh new file mode 100644 index 00000000..13c042d7 --- /dev/null +++ b/ct/fhem.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ + / ____/ /_ ___ ____ ___ + / /_ / __ \/ _ \/ __ `__ \ + / __/ / / / / __/ / / / / / +/_/ /_/ /_/\___/_/ /_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Fhem" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/fhem.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8083${CL} \n" diff --git a/install/fhem-install.sh b/install/fhem-install.sh new file mode 100644 index 00000000..caf99993 --- /dev/null +++ b/install/fhem-install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y avahi-daemon +$STD apt-get install -y gnupg2 +msg_ok "Installed Dependencies" + +msg_info "Setting up Fhem Repository" +curl -sSf https://debian.fhem.de/archive.key | gpg --dearmor >/etc/apt/trusted.gpg.d/debianfhemde-archive-keyring.gpg +echo 'deb [signed-by=/etc/apt/trusted.gpg.d/debianfhemde-archive-keyring.gpg] https://debian.fhem.de/nightly/ /' >/etc/apt/sources.list.d/fhem.list +msg_ok "Set up Fhem Repository" + +msg_info "Installing Fhem" +$STD apt-get update +$STD apt-get install -y fhem +msg_info "Installed Fhem" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 5fbe9ae8841c735d861d25590b887f9882a8e7f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 15:13:39 -0400 Subject: [PATCH 1496/3335] Update homebridge.sh fix update --- ct/homebridge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 36281e8e..6c751496 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -55,7 +55,7 @@ header_info if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +apt-get install -y homebridge &>/dev/null msg_ok "Updated Successfully" exit } From e52df1c02a8b7432924d37aa67d9436f900f045c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 15:15:37 -0400 Subject: [PATCH 1497/3335] Update homebridge.sh fix file check --- ct/homebridge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 6c751496..efd2b36e 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/apt/sources.list.d/homebridge.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get install -y homebridge &>/dev/null From 0d977e3881202ae82b25d643f78b14404f60d780 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 16:00:20 -0400 Subject: [PATCH 1498/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index cbe73016..2aede023 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-07 + +### Changed + +- **FHEM LXC** + - NEW Script + ## 2023-05-01 ### Changed From 3486bba827b2b1b9a6a4027e551abc19e14e7693 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 16:10:15 -0400 Subject: [PATCH 1499/3335] Update microcode.sh add CPU Vendor check --- misc/microcode.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/misc/microcode.sh b/misc/microcode.sh index 07b2fff5..2758138a 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -23,12 +23,14 @@ cat <<"EOF" EOF +RD=$(echo "\033[01;31m") YW=$(echo "\033[33m") GN=$(echo "\033[1;92m") CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" set -euo pipefail shopt -s inherit_errexit nullglob @@ -43,6 +45,20 @@ msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +msg_info "Checking CPU Vendor" +cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') +if [ "$cpu" == "GenuineIntel" ]; then + msg_ok "${cpu} was detected" +else + msg_error "${cpu} is not supported" + exit +fi + msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" apt-get install -y iucode-tool &>/dev/null msg_ok "Installed iucode-tool" From bbf27909542b3ce05f5204729357e42777b8b454 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 20:23:14 -0400 Subject: [PATCH 1500/3335] Create microcode2.sh automatically identifies the processor vendor (Intel/AMD) and installs the appropriate microcode --- misc/microcode2.sh | 111 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 misc/microcode2.sh diff --git a/misc/microcode2.sh b/misc/microcode2.sh new file mode 100644 index 00000000..fbb74988 --- /dev/null +++ b/misc/microcode2.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +clear +while true; do + read -p "Install the latest Processor Microcode (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +clear +cat <<"EOF" + ____ __ ____ __ + / __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__ + / /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ + / ____/ / / /_/ / /__/ __(__ |__ ) /_/ / / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/ +/_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ + +EOF + +RD=$(echo "\033[01;31m") +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +intel() { + msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" + apt-get install -y iucode-tool &>/dev/null + msg_ok "Installed iucode-tool" + + msg_info "Downloading the latest Intel Processor Microcode Package for Linux" + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb + msg_ok "Downloaded the latest Intel Processor Microcode Package" + + msg_info "Installing the Intel Processor Microcode (Patience)" + dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null + msg_ok "Installed the Intel Processor Microcode" + + msg_info "Cleaning up" + rm intel-microcode_3.20230214.1_amd64.deb + msg_ok "Cleaned" + + echo -e "\n To apply the changes, the system will need to be rebooted.\n" +} + +amd() { + msg_info "Installing amd-ucode: a tool for updating AMD processor microcode" + apt-get install -y amd-ucode &>/dev/null + msg_ok "Installed amd-ucode" + + msg_info "Downloading the latest AMD Processor Microcode Package for Linux" + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb + msg_ok "Downloaded the latest AMD Processor Microcode Package" + + msg_info "Installing the AMD Processor Microcode (Patience)" + dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null + msg_ok "Installed the AMD Processor Microcode" + + msg_info "Cleaning up" + rm amd64-microcode_3.20230414.1_amd64.deb + msg_ok "Cleaned" + + echo -e "\n To apply the changes, the system will need to be rebooted.\n" +} + +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} Proxmox Virtual Environment Not Detected" + echo -e "Exiting..." + sleep 2 + exit +fi + +msg_info "Checking CPU Vendor" +cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') +if [ "$cpu" == "GenuineIntel" ]; then + msg_ok "${cpu} was detected" + intel +elif [ "$cpu" == "AuthenticAMD" ]; then + msg_ok "${cpu} was detected" + amd +else + msg_error "${cpu} is not supported" + exit +fi From 82743f68daadbcea429c2521c51a9eade8645181 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 May 2023 21:23:52 -0400 Subject: [PATCH 1501/3335] Add files via upload --- misc/images/processor.png | Bin 0 -> 42886 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/processor.png diff --git a/misc/images/processor.png b/misc/images/processor.png new file mode 100644 index 0000000000000000000000000000000000000000..75af60a9eef9cf6d853a91042fa9703293eeadf3 GIT binary patch literal 42886 zcmV)LK)JtCNk&F~rvLy~MM6+kP&iC-rvLyi&%(115s7UZ36ccMzPh`wz5D~-nW~=s z1S0xB0eUv;haUBzoUurR2^3RbRW^3*}2< zW6l*4Q%SDNmSt~*Sh%clHt;)g*`6fK{+PD_M$pYbGixP$&eaDv<|?UnvX8i`TI{+x z;d)o?8i^FJ+;iT(FvYI z|H(V;+AqwFj4?Pr4p9`? zTPDEjI~SIbhS}YpRJgnz8Qn3#Y`Eu$YmwD=2F}@;+7Omlp}YFO@72gmX~N7{ms>2{ zvg+IePO=KanduP;7lW|5c7SWaFrm)u2!}pr0XBq9>Fxey6^1iOIH*fnz%A!n7~Z|z zX|pajn5~vC_I*V+zC9o32_Ya9#pc@k{*YCuGeP?wB_%0@fXhq8 zX3>*&{~DT^(Xc-SA%ya-RP?g({VrT*`~u)@0)Q$ZgrX=6ia7~R>Nsh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c8iGG>>qIO zlL0_ozSQ!zt=Z*hEvtt_V?e^fHZ_lPgQozl4pz9R2Fg1%!b%gYrX~=E>F$Qus(N^t zKr&Y5i+?7R;+Q^*#fauEs;cV(i-O59mykKMK0#E;62kbi4{P5l${ulG2G}6+kx!+t)(c+($yRC998IK``r{wYZhK*L_!^@1Z748p=l11l^8SiGzaO z49Klfo=63cChS0Hz=-JSF(m7OB|3U8M-Wmazsw&)==ny50&_V^A|+gbL(?0MpvU9y z<#oBL6LQMqZn-@+>3|u1IRCylaLG5ODFuMt!MJVP*X7vD5l>OiaRky>qGr(k7TVlA z8UTQa&(`va-$@mlVQ4t1hT$Q0QjOvV1`|rc=}Yr#$`Uq=NkVtehZqSf`6?pJ2SYGf zh7t!=(#tyFa#$Qz1}nRW7^Cd|A|<_iG&Y&VrM-s}bKZ@;AerMVbihhSoRkN|Qiq(6 zd?UdP0KkUNCuwgB4K2epayxQ5fraG2C4pMP4p{%GiDKExrk zP-8|0>ZD4woBoRLOQ^_AZL(@$B|5`a7$6*AWGwb{VP}^`T0le$Fj!oMuokgYZZMq0 z5<+1K45G7Z4S^UjPT_>$2&WWXcc%c=9l^9tq)o=2mQ|gUV;XJp3A_0KJEOz-ch%|p zpoRWxvcI~&ZEfUotnY|3AVs~&)5e0DJ+5&!#4ys|dWIIhhP!gPXZIGnzaOei^;IU^ zhY$55=uc3sC-+u^-fB?Bql!d;Q-p)zgb-s1wwVxNf#r4x0~{kOlMTT$J7eT~q?!Rg z7bE_XzaHseIQ0b5CrOHp0?zvLFdt^OBa>hb|bza}iEtbgJ=nzA$)4L>G~R!5`nhA)d( zQ=Ufd);5^&+I00zxBdt{CAP7x+QNfrZF*-~3EI($TmAB!o(&9>of0|0x)75go*E*# GHEIAlQaybD literal 0 HcmV?d00001 From c72475b1f7651f89cfd929cd470bacc8ec687b09 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 09:13:34 -0400 Subject: [PATCH 1502/3335] Update microcode.sh Code refactoring --- misc/microcode.sh | 94 +++++++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 31 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 2758138a..fbb74988 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -6,7 +6,7 @@ clear while true; do - read -p "Install the latest Intel Processor Microcode (y/n)?" yn + read -p "Install the latest Processor Microcode (y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -15,11 +15,11 @@ while true; do done clear cat <<"EOF" - ____ __ __ __ ____ __ - / _/___ / /____ / / / |/ (_)_____________ _________ ____/ /__ - / // __ \/ __/ _ \/ / / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ - _/ // / / / /_/ __/ / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/ -/___/_/ /_/\__/\___/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ + ____ __ ____ __ + / __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__ + / /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ + / ____/ / / /_/ / /__/ __(__ |__ ) /_/ / / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/ +/_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ EOF @@ -36,13 +36,13 @@ set -euo pipefail shopt -s inherit_errexit nullglob msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } msg_error() { @@ -50,30 +50,62 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +intel() { + msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" + apt-get install -y iucode-tool &>/dev/null + msg_ok "Installed iucode-tool" + + msg_info "Downloading the latest Intel Processor Microcode Package for Linux" + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb + msg_ok "Downloaded the latest Intel Processor Microcode Package" + + msg_info "Installing the Intel Processor Microcode (Patience)" + dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null + msg_ok "Installed the Intel Processor Microcode" + + msg_info "Cleaning up" + rm intel-microcode_3.20230214.1_amd64.deb + msg_ok "Cleaned" + + echo -e "\n To apply the changes, the system will need to be rebooted.\n" +} + +amd() { + msg_info "Installing amd-ucode: a tool for updating AMD processor microcode" + apt-get install -y amd-ucode &>/dev/null + msg_ok "Installed amd-ucode" + + msg_info "Downloading the latest AMD Processor Microcode Package for Linux" + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb + msg_ok "Downloaded the latest AMD Processor Microcode Package" + + msg_info "Installing the AMD Processor Microcode (Patience)" + dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null + msg_ok "Installed the AMD Processor Microcode" + + msg_info "Cleaning up" + rm amd64-microcode_3.20230414.1_amd64.deb + msg_ok "Cleaned" + + echo -e "\n To apply the changes, the system will need to be rebooted.\n" +} + +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} Proxmox Virtual Environment Not Detected" + echo -e "Exiting..." + sleep 2 + exit +fi + msg_info "Checking CPU Vendor" cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') if [ "$cpu" == "GenuineIntel" ]; then msg_ok "${cpu} was detected" + intel +elif [ "$cpu" == "AuthenticAMD" ]; then + msg_ok "${cpu} was detected" + amd else - msg_error "${cpu} is not supported" + msg_error "${cpu} is not supported" exit -fi - -msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" -apt-get install -y iucode-tool &>/dev/null -msg_ok "Installed iucode-tool" - -msg_info "Downloading the latest Intel Processor Microcode Package for Linux" -release=$(curl -s https://api.github.com/repos/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/latest | awk -F'"' '/tag_name/{print $4}' | tr -cd '[:digit:]') -wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.${release}.1_amd64.deb -msg_ok "Downloaded the latest Intel Processor Microcode Package" - -msg_info "Installing the Intel Processor Microcode (Patience)" -dpkg -i intel-microcode_3.${release}.1_amd64.deb &>/dev/null -msg_ok "Installed the Intel Processor Microcode" - -msg_info "Cleaning up" -rm intel-microcode_3.${release}.1_amd64.deb -msg_ok "Cleaned" - -echo -e "\n To apply the settings, the system will need to be rebooted.\n" +fi From 44398fbfc2b33e405bfa00acbed2150aa85c5199 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 09:13:56 -0400 Subject: [PATCH 1503/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2aede023..1dda2d61 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,14 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-08 + +### Changed + +- **Proxmox VE Intel Processor Microcode** + - Renamed to **Proxmox VE Processor Microcode** + - Automatically identifies the processor vendor (Intel/AMD) and installs the appropriate microcode. + ## 2023-05-07 ### Changed From 0efa38825e0abcaa0b12916afe19ebbe3ee576ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 09:16:00 -0400 Subject: [PATCH 1504/3335] Delete intel.png --- misc/images/intel.png | Bin 130540 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/intel.png diff --git a/misc/images/intel.png b/misc/images/intel.png deleted file mode 100644 index 97b53a678cc69d6850865c839ea391a012eebe89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130540 zcmb?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@nJOUqlmD7t%6WrHrtA!Ij7}X~Mo?s|_l9FS?DwI^ z(giXrH_}$rR40}BI)g30s3lKw|8=+vQUC1JmLcEw6)-XIHZApV)QFF`DV$hvEXTX- zhCY}hfQ2od08N)<_5EjYoLtGlfn@U?P&LnF-48cQ+ z&;9a51|E0vkAJd)K&ybA+|H+OUCmSX3N}Z^cmiX@lB>3vKO>%J{nvbs8q2#ZT0?S% z=)lzz8Htiams>ZV&=qiQ8_-e#rRRXpM4Dq0qmsq4PCc|_TE_08Y0F^tyPx|S@AuED zPh{ZvrB2k2>pU1*v~&I`jy!Kp= Date: Mon, 8 May 2023 09:16:39 -0400 Subject: [PATCH 1505/3335] Delete microcode2.sh --- misc/microcode2.sh | 111 --------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 misc/microcode2.sh diff --git a/misc/microcode2.sh b/misc/microcode2.sh deleted file mode 100644 index fbb74988..00000000 --- a/misc/microcode2.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -clear -while true; do - read -p "Install the latest Processor Microcode (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -cat <<"EOF" - ____ __ ____ __ - / __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__ - / /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ - / ____/ / / /_/ / /__/ __(__ |__ ) /_/ / / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/ -/_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ - -EOF - -RD=$(echo "\033[01;31m") -YW=$(echo "\033[33m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" - -set -euo pipefail -shopt -s inherit_errexit nullglob - -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -intel() { - msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" - apt-get install -y iucode-tool &>/dev/null - msg_ok "Installed iucode-tool" - - msg_info "Downloading the latest Intel Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb - msg_ok "Downloaded the latest Intel Processor Microcode Package" - - msg_info "Installing the Intel Processor Microcode (Patience)" - dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null - msg_ok "Installed the Intel Processor Microcode" - - msg_info "Cleaning up" - rm intel-microcode_3.20230214.1_amd64.deb - msg_ok "Cleaned" - - echo -e "\n To apply the changes, the system will need to be rebooted.\n" -} - -amd() { - msg_info "Installing amd-ucode: a tool for updating AMD processor microcode" - apt-get install -y amd-ucode &>/dev/null - msg_ok "Installed amd-ucode" - - msg_info "Downloading the latest AMD Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb - msg_ok "Downloaded the latest AMD Processor Microcode Package" - - msg_info "Installing the AMD Processor Microcode (Patience)" - dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null - msg_ok "Installed the AMD Processor Microcode" - - msg_info "Cleaning up" - rm amd64-microcode_3.20230414.1_amd64.deb - msg_ok "Cleaned" - - echo -e "\n To apply the changes, the system will need to be rebooted.\n" -} - -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} Proxmox Virtual Environment Not Detected" - echo -e "Exiting..." - sleep 2 - exit -fi - -msg_info "Checking CPU Vendor" -cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') -if [ "$cpu" == "GenuineIntel" ]; then - msg_ok "${cpu} was detected" - intel -elif [ "$cpu" == "AuthenticAMD" ]; then - msg_ok "${cpu} was detected" - amd -else - msg_error "${cpu} is not supported" - exit -fi From 8047265b2bbb653a9005300c30927c36fea23d60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 12:10:34 -0400 Subject: [PATCH 1506/3335] Update microcode.sh tweak --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index fbb74988..453feb9b 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -72,7 +72,7 @@ intel() { amd() { msg_info "Installing amd-ucode: a tool for updating AMD processor microcode" - apt-get install -y amd-ucode &>/dev/null + apt-get install -y amd64-microcode &>/dev/null msg_ok "Installed amd-ucode" msg_info "Downloading the latest AMD Processor Microcode Package for Linux" From 22a20617023edd67dfcd951d08e900021fe3d2b8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 13:28:06 -0400 Subject: [PATCH 1507/3335] Update microcode.sh fix for AMD --- misc/microcode.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 453feb9b..30218ee9 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -51,11 +51,8 @@ msg_error() { } intel() { - msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" - apt-get install -y iucode-tool &>/dev/null - msg_ok "Installed iucode-tool" - msg_info "Downloading the latest Intel Processor Microcode Package for Linux" + apt-get install -y iucode-tool &>/dev/null wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb msg_ok "Downloaded the latest Intel Processor Microcode Package" @@ -71,10 +68,6 @@ intel() { } amd() { - msg_info "Installing amd-ucode: a tool for updating AMD processor microcode" - apt-get install -y amd64-microcode &>/dev/null - msg_ok "Installed amd-ucode" - msg_info "Downloading the latest AMD Processor Microcode Package for Linux" wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb msg_ok "Downloaded the latest AMD Processor Microcode Package" From 36a0528b99fc1b1cfcd894f9f2439e8024d4864d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 13:37:09 -0400 Subject: [PATCH 1508/3335] Update microcode.sh set AMD to verbose --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 30218ee9..1eb68105 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -57,7 +57,7 @@ intel() { msg_ok "Downloaded the latest Intel Processor Microcode Package" msg_info "Installing the Intel Processor Microcode (Patience)" - dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null + dpkg -i intel-microcode_3.20230214.1_amd64.deb msg_ok "Installed the Intel Processor Microcode" msg_info "Cleaning up" From 62bc6600580a0ab15914517e29f0ea7b224e8618 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 13:37:49 -0400 Subject: [PATCH 1509/3335] Update microcode.sh --- misc/microcode.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 1eb68105..ba80a7ce 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -57,7 +57,7 @@ intel() { msg_ok "Downloaded the latest Intel Processor Microcode Package" msg_info "Installing the Intel Processor Microcode (Patience)" - dpkg -i intel-microcode_3.20230214.1_amd64.deb + dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null msg_ok "Installed the Intel Processor Microcode" msg_info "Cleaning up" @@ -73,7 +73,7 @@ amd() { msg_ok "Downloaded the latest AMD Processor Microcode Package" msg_info "Installing the AMD Processor Microcode (Patience)" - dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null + dpkg -i amd64-microcode_3.20230414.1_amd64.deb msg_ok "Installed the AMD Processor Microcode" msg_info "Cleaning up" From 5b9709c93446a664ab643f9c020c0d008c718d05 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 May 2023 14:24:29 -0400 Subject: [PATCH 1510/3335] Update microcode.sh tweak --- misc/microcode.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index ba80a7ce..b30e3fc7 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -51,8 +51,11 @@ msg_error() { } intel() { - msg_info "Downloading the latest Intel Processor Microcode Package for Linux" + msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" apt-get install -y iucode-tool &>/dev/null + msg_ok "Installed iucode-tool" + + msg_info "Downloading the latest Intel Processor Microcode Package for Linux" wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb msg_ok "Downloaded the latest Intel Processor Microcode Package" From 9c2f48c2656fa3a8b7da90043feb42c469e14caa Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 May 2023 00:01:07 -0400 Subject: [PATCH 1511/3335] Update monitor-all.sh spelling --- misc/monitor-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index a72300c6..fed2652a 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -93,7 +93,7 @@ Description=Ping instances every 5 minutes and restarts if necessary [Service] Type=simple # Include the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified, -# to indicate which CT/VN should be excluded. Example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 +# to indicate which CT/VM should be excluded. Example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 ExecStart=/usr/local/bin/ping-instances.sh Restart=always StandardOutput=file:/var/log/ping-instances.log From 8b1a1f201b1f2f550c9582dcb3204bdf77b3f87a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 May 2023 00:23:37 -0400 Subject: [PATCH 1512/3335] Update monitor-all.sh clarify exclusion instructions --- misc/monitor-all.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index fed2652a..236016ee 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -92,8 +92,9 @@ Description=Ping instances every 5 minutes and restarts if necessary [Service] Type=simple -# Include the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified, -# to indicate which CT/VM should be excluded. Example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 +# To specify which CT/VM should be excluded, add the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified. +# For example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 +# Virtual machines without the QEMU guest agent installed must be excluded. ExecStart=/usr/local/bin/ping-instances.sh Restart=always StandardOutput=file:/var/log/ping-instances.log From a3dfc8f41de5093bee868ee14044ab9b91a874db Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 May 2023 04:43:43 -0400 Subject: [PATCH 1513/3335] Update microcode.sh remove AMD verbose confirmed working --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index b30e3fc7..4fc7c8d9 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -76,7 +76,7 @@ amd() { msg_ok "Downloaded the latest AMD Processor Microcode Package" msg_info "Installing the AMD Processor Microcode (Patience)" - dpkg -i amd64-microcode_3.20230414.1_amd64.deb + dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null msg_ok "Installed the AMD Processor Microcode" msg_info "Cleaning up" From 5afa9e37cbfe303229cdad0dfa6ffcd97f767ff8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 May 2023 08:29:51 -0400 Subject: [PATCH 1514/3335] Update build.func add tags --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index d76e1a7c..de385eeb 100644 --- a/misc/build.func +++ b/misc/build.func @@ -476,6 +476,7 @@ build_container() { export PCT_OPTIONS=" -features $FEATURES -hostname $HN + -tags proxmox-helper-scripts $SD $NS -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU From 1de6cc4cb866b17ff92ab7dec812329d6b8f3f44 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 May 2023 10:10:46 -0400 Subject: [PATCH 1515/3335] Update nginxproxymanager.sh using `RELEASE` to obtain the latest version for updating --- ct/nginxproxymanager.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 4425570c..b460da3f 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -74,18 +74,18 @@ function update_script() { /var/cache/nginx &>/dev/null msg_ok "Cleaned Old Files" - msg_info "Downloading NPM v2.10.2" - wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.2 -O - | tar -xz &>/dev/null - cd nginx-proxy-manager-2.10.2 - msg_ok "Downloaded NPM v2.10.2" + msg_info "Downloading NPM v${RELEASE}" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null + cd nginx-proxy-manager-${RELEASE} + msg_ok "Downloaded NPM v${RELEASE}" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx - sed -i "s+0.0.0+2.10.2+g" backend/package.json - sed -i "s+0.0.0+2.10.2+g" frontend/package.json + sed -i "s+0.0.0+${RELEASE}+g" backend/package.json + sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do @@ -124,8 +124,8 @@ function update_script() { mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global - wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-noarch.tar.xz" - wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-x86_64.tar.xz" + wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-noarch.tar.xz" + wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-x86_64.tar.xz" tar -C / -Jxpf s6-overlay-noarch.tar.xz tar -C / -Jxpf s6-overlay-x86_64.tar.xz python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null @@ -163,7 +163,7 @@ EOF msg_ok "Initialized Backend" msg_info "Starting Services" - sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf + sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg systemctl enable -q --now openresty systemctl enable -q --now npm From 0038a8b74f88810a2ab9185bd43167c046c7dbb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 May 2023 10:13:58 -0400 Subject: [PATCH 1516/3335] Update nginxproxymanager-install.sh using RELEASE to obtain the latest version. update s6 fix user --- install/nginxproxymanager-install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 05194c8f..8d797267 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -66,10 +66,10 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v2.10.2" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.2 -O - | tar -xz -cd ./nginx-proxy-manager-2.10.2 -msg_ok "Downloaded Nginx Proxy Manager v2.10.2" +msg_info "Downloading Nginx Proxy Manager v${RELEASE}" +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz +cd ./nginx-proxy-manager-${RELEASE} +msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python @@ -77,8 +77,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+2.10.2+g" backend/package.json -sed -i "s+0.0.0+2.10.2+g" frontend/package.json +sed -i "s+0.0.0+${RELEASE}+g" backend/package.json +sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") @@ -124,8 +124,8 @@ fi mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global -wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-noarch.tar.xz" -wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.4.1/s6-overlay-x86_64.tar.xz" +wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-noarch.tar.xz" +wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-x86_64.tar.xz" tar -C / -Jxpf s6-overlay-noarch.tar.xz tar -C / -Jxpf s6-overlay-x86_64.tar.xz msg_ok "Set up Enviroment" @@ -185,7 +185,7 @@ motd_ssh root msg_info "Starting Services" -sed -i -e 's/^pid/#pid/' -e 's/npmuser/root/' /usr/local/openresty/nginx/conf/nginx.conf +sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg $STD systemctl enable --now openresty $STD systemctl enable --now npm From 1263944d40e95e28c81c7e6d5571877ef6666780 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 May 2023 22:40:49 -0400 Subject: [PATCH 1517/3335] Update build.func add instructional tip --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index de385eeb..fd0b6369 100644 --- a/misc/build.func +++ b/misc/build.func @@ -112,6 +112,7 @@ exit-script() { } advanced_settings() { + whiptail --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 whiptail --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58 if [ "$var_os" != "alpine" ]; then var_os="" From 9e9b8286ad52f75d1a2b26f686e74bcc8c72528a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 May 2023 23:20:05 -0400 Subject: [PATCH 1518/3335] Update haos-vm.sh add tag --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 199dabaa..27c8e64e 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -414,7 +414,7 @@ done msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ From 71eecd1efcf9f4331c5131d96efcd874f21c5147 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 May 2023 14:04:12 -0400 Subject: [PATCH 1519/3335] Update build.func improve whiptail menu --- misc/build.func | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/misc/build.func b/misc/build.func index fd0b6369..28e09eb0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -268,32 +268,23 @@ advanced_settings() { fi done +if [ "$NET" != "dhcp" ]; then while true; do - GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3) - exit_status=$? - if [ $exit_status -eq 0 ]; then - if [ -z "$GATE1" ]; then - if [ "$NET" = "dhcp" ]; then - GATE1="Default" - GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - break - else - whiptail --msgbox "Since a static IP was used, a gateway IP address is mandatory." 8 58 - fi - else - if [[ "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - break - else - whiptail --msgbox "Invalid IP address. Please enter a valid IP address." 8 58 - fi - fi + GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [ -z "$GATE1" ]; then + whiptail --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + whiptail --msgbox "Invalid IP address format" 8 58 else - exit-script + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + break fi done +else + GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" +fi if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" @@ -363,12 +354,17 @@ advanced_settings() { exit-script fi - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" + if [[ "$PW" == -password* ]]; then + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" else SSH="no" + echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then From 325071c2f1e853aaefa789dd29ce74b34f706c8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 May 2023 14:15:10 -0400 Subject: [PATCH 1520/3335] Update build.func shfmt --- misc/build.func | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/misc/build.func b/misc/build.func index 28e09eb0..115ba768 100644 --- a/misc/build.func +++ b/misc/build.func @@ -268,23 +268,23 @@ advanced_settings() { fi done -if [ "$NET" != "dhcp" ]; then - while true; do - GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) - if [ -z "$GATE1" ]; then - whiptail --msgbox "Gateway IP address cannot be empty" 8 58 - elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --msgbox "Invalid IP address format" 8 58 - else - GATE=",gw=$GATE1" - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" - break - fi - done -else - GATE="" - echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" -fi + if [ "$NET" != "dhcp" ]; then + while true; do + GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + if [ -z "$GATE1" ]; then + whiptail --msgbox "Gateway IP address cannot be empty" 8 58 + elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then + whiptail --msgbox "Invalid IP address format" 8 58 + else + GATE=",gw=$GATE1" + echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" + break + fi + done + else + GATE="" + echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" + fi if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" From e1f561ae748a261e458a6f23596c6987be1fdac5 Mon Sep 17 00:00:00 2001 From: MrTylerjet Date: Fri, 12 May 2023 10:50:39 -0600 Subject: [PATCH 1521/3335] add Bazarr LXC script (#1418) * add bazzar LXC script (https://www.bazarr.media/) --- ct/bazarr.sh | 69 +++++++++++++++++++++++++++++++++++++++ install/bazarr-install.sh | 62 +++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100755 ct/bazarr.sh create mode 100755 install/bazarr-install.sh diff --git a/ct/bazarr.sh b/ct/bazarr.sh new file mode 100755 index 00000000..97c6b375 --- /dev/null +++ b/ct/bazarr.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ + / __ )____ _____ ____ ___________ + / __ / __ `/_ / / __ `/ ___/ ___/ + / /_/ / /_/ / / /_/ /_/ / / / / +/_____/\__,_/ /___/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Bazarr" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var/lib/bazarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6767${CL} \n" \ No newline at end of file diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh new file mode 100755 index 00000000..bd395f66 --- /dev/null +++ b/install/bazarr-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +$STD apt-get install -y python3-pip +msg_ok "Installed Dependencies" + +msg_info "Installing Bazarr" +mkdir -p /var/lib/bazarr/ +wget -q https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip +unzip -qq bazarr -d /opt/bazarr +chmod 775 /opt/bazarr /var/lib/bazarr/ +python3 -m pip install -q -r /opt/bazarr/requirements.txt +msg_ok "Installed Bazarr" + +msg_info "Creating Service" +cat </etc/systemd/system/bazarr.service +[Unit] +Description=Bazarr Daemon +After=syslog.target network.target + +[Service] +WorkingDirectory=/opt/bazarr/ +UMask=0002 +Restart=on-failure +RestartSec=5 +Type=simple +ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py +KillSignal=SIGINT +TimeoutStopSec=20 +SyslogIdentifier=bazarr + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now bazarr +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +rm -rf bazarr.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" \ No newline at end of file From 3d4dc6d0a4b987f419b06fef68b9f4ecdfc349b8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 May 2023 16:05:17 -0400 Subject: [PATCH 1522/3335] Update CHANGELOG.MD --- CHANGELOG.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1dda2d61..69068747 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-12 + +### Changed + +- **Bazarr LXC** + - NEW Script + ## 2023-05-08 ### Changed From adf4ffddb30aea96c7737c1a8607d9d032169d1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 May 2023 16:17:32 -0400 Subject: [PATCH 1523/3335] Rename CHANGELOG.MD to CHANGELOG.md --- CHANGELOG.MD => CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename CHANGELOG.MD => CHANGELOG.md (100%) diff --git a/CHANGELOG.MD b/CHANGELOG.md similarity index 100% rename from CHANGELOG.MD rename to CHANGELOG.md From 825a55152192836d1eb2df8f2fc8ba26026493cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 06:34:33 -0400 Subject: [PATCH 1524/3335] Update create_lxc.sh change menu message --- ct/create_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index f8326f55..427d7ee3 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -85,7 +85,7 @@ function select_storage() { local STORAGE while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." done From f5a8f4ca732dc33fc3d74d8a9306e66332d00305 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 07:19:25 -0400 Subject: [PATCH 1525/3335] Update create_lxc.sh tweak --- ct/create_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 427d7ee3..6fd83826 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -85,7 +85,7 @@ function select_storage() { local STORAGE while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ + "Which storage pool you would like to use for ${APPLICATION}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." done From 7680982315274c598d0e487288c014f6f2c3f0a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 07:31:12 -0400 Subject: [PATCH 1526/3335] Update haos-vm.sh change storage menu message --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 27c8e64e..46c4bc08 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -369,7 +369,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then else while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the HAOS VM?\n\n" \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit done From c542221883f18d5d70b3406248995f9d33fbc37f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 10:02:02 -0400 Subject: [PATCH 1527/3335] Update homeassistant-core-install.sh update `homeassistant.service` --- install/homeassistant-core-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index d42b53b5..f7cc1c9c 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -91,6 +91,7 @@ After=network-online.target Type=simple WorkingDirectory=/root/.homeassistant ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant" +Restart=always RestartForceExitStatus=100 [Install] WantedBy=multi-user.target From 41ed6d8df92f4965a559bdb456e6d0e2e629b091 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 14:09:34 -0400 Subject: [PATCH 1528/3335] Update clean-lxcs.sh tweak --- misc/clean-lxcs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index a3465dc1..447d8076 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -24,7 +24,6 @@ CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info -echo -e "\n ${RD} USE AT YOUR OWN RISK. Deleting logs/cache may result in some apps/services broken!${CL} \n" while true; do read -p "This Will Clean logs, cache and update apt lists on all LXC Containers. Proceed(y/n)?" yn case $yn in From a35d823b1ff268d21deffd6f6d0ec0991dbaac75 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 20:39:18 -0400 Subject: [PATCH 1529/3335] Create tautulli.sh --- ct/tautulli.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/tautulli.sh diff --git a/ct/tautulli.sh b/ct/tautulli.sh new file mode 100644 index 00000000..b8d052c4 --- /dev/null +++ b/ct/tautulli.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ _____ + /_ __/___ ___ __/ /___ __/ / (_) + / / / __ `/ / / / __/ / / / / / / + / / / /_/ / /_/ / /_/ /_/ / / / / +/_/ \__,_/\__,_/\__/\__,_/_/_/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Tautulli" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="11" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/Tautulli/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8181${CL} \n" From f4fe0353474f7cfec30cde12e2231345417c477b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 20:41:46 -0400 Subject: [PATCH 1530/3335] Create tautulli-install.sh --- install/tautulli-install.sh | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 install/tautulli-install.sh diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh new file mode 100644 index 00000000..ca918615 --- /dev/null +++ b/install/tautulli-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y pip +msg_ok "Installed Dependencies" + +msg_info "Installing Tautulli" +cd /opt +git clone https://github.com/Tautulli/Tautulli.git +python3 -m pip install -q -r /opt/Tautulli/requirements.txt +msg_ok "Installed Tautulli" + +msg_info "Creating Service" +cat </etc/systemd/system/tautulli.service +[Unit] +Description=Tautulli +After=syslog.target network.target + +[Service] +WorkingDirectory=/opt/Tautulli/ +Restart=on-failure +RestartSec=5 +Type=simple +ExecStart=/usr/bin/python3 /opt/Tautulli/Tautulli.py +KillSignal=SIGINT +TimeoutStopSec=20 +SyslogIdentifier=tautulli + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now tautulli +msg_ok "Created Service" + +motd_ssh +root + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 81f1443a83f50df019fd89c3a2b286bdadb29dce Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 20:47:32 -0400 Subject: [PATCH 1531/3335] Update tautulli-install.sh tweak --- install/tautulli-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index ca918615..43a6a316 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -23,7 +23,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Tautulli" cd /opt -git clone https://github.com/Tautulli/Tautulli.git +$STD git clone https://github.com/Tautulli/Tautulli.git python3 -m pip install -q -r /opt/Tautulli/requirements.txt msg_ok "Installed Tautulli" From 1aa74d4ec631b2de6439c981960022fbc881bb89 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 21:05:33 -0400 Subject: [PATCH 1532/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69068747..90582703 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-13 + +### Changed + +- **Tautulli LXC** + - NEW Script + ## 2023-05-12 ### Changed From d7d4d296e50340c38b64a2cb5e1863b247ef9be5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 May 2023 21:22:09 -0400 Subject: [PATCH 1533/3335] tweak --- ct/adguard.sh | 2 +- ct/alpine-adguard.sh | 2 +- ct/alpine-docker.sh | 2 +- ct/alpine-grafana.sh | 2 +- ct/alpine-vaultwarden.sh | 2 +- ct/alpine-whoogle.sh | 2 +- ct/alpine-zigbee2mqtt.sh | 2 +- ct/alpine.sh | 2 +- ct/archlinux.sh | 2 +- ct/audiobookshelf.sh | 2 +- ct/autobrr.sh | 2 +- ct/bazarr.sh | 2 +- ct/blocky.sh | 2 +- ct/casaos.sh | 2 +- ct/changedetection.sh | 2 +- ct/cloudflared.sh | 2 +- ct/cronicle.sh | 2 +- ct/daemonsync.sh | 2 +- ct/dashy.sh | 2 +- ct/debian.sh | 2 +- ct/deconz.sh | 2 +- ct/deluge.sh | 2 +- ct/devuan.sh | 2 +- ct/docker.sh | 2 +- ct/emby.sh | 2 +- ct/emqx.sh | 2 +- ct/esphome.sh | 2 +- ct/fhem.sh | 2 +- ct/go2rtc.sh | 2 +- ct/grafana.sh | 2 +- ct/grocy.sh | 2 +- ct/heimdalldashboard.sh | 2 +- ct/homeassistant-core.sh | 2 +- ct/homeassistant.sh | 2 +- ct/homebridge.sh | 2 +- ct/homepage.sh | 2 +- ct/homer.sh | 2 +- ct/hyperion.sh | 2 +- ct/influxdb.sh | 2 +- ct/iobroker.sh | 2 +- ct/jackett.sh | 2 +- ct/jellyfin.sh | 2 +- ct/k0s.sh | 2 +- ct/kavita.sh | 2 +- ct/keycloak.sh | 2 +- ct/lidarr.sh | 2 +- ct/magicmirror.sh | 2 +- ct/mariadb.sh | 2 +- ct/meshcentral.sh | 2 +- ct/motioneye.sh | 2 +- ct/mqtt.sh | 2 +- ct/n8n.sh | 2 +- ct/navidrome.sh | 2 +- ct/nextcloudpi.sh | 2 +- ct/nginxproxymanager.sh | 2 +- ct/nocodb.sh | 2 +- ct/node-red.sh | 2 +- ct/octoprint.sh | 2 +- ct/omada.sh | 2 +- ct/omv.sh | 2 +- ct/openhab.sh | 2 +- ct/paperless-ngx.sh | 2 +- ct/photoprism.sh | 2 +- ct/pihole.sh | 2 +- ct/plex.sh | 2 +- ct/podman-homeassistant.sh | 2 +- ct/podman.sh | 2 +- ct/postgresql.sh | 2 +- ct/prometheus.sh | 2 +- ct/prowlarr.sh | 2 +- ct/qbittorrent.sh | 2 +- ct/radarr.sh | 2 +- ct/readarr.sh | 2 +- ct/rockylinux.sh | 2 +- ct/rstptoweb.sh | 2 +- ct/sabnzbd.sh | 2 +- ct/scrypted.sh | 2 +- ct/shinobi.sh | 2 +- ct/sonarr.sh | 2 +- ct/syncthing.sh | 2 +- ct/tdarr.sh | 2 +- ct/technitiumdns.sh | 2 +- ct/transmission.sh | 2 +- ct/trilium.sh | 2 +- ct/ubuntu.sh | 2 +- ct/umbrel.sh | 2 +- ct/unifi.sh | 2 +- ct/uptimekuma.sh | 2 +- ct/vaultwarden.sh | 2 +- ct/whisparr.sh | 2 +- ct/whoogle.sh | 2 +- ct/wikijs.sh | 2 +- ct/wireguard.sh | 2 +- ct/yunohost.sh | 2 +- ct/zigbee2mqtt.sh | 2 +- ct/zwave-js-ui.sh | 2 +- 96 files changed, 96 insertions(+), 96 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index 4c7db3a7..a0cab6e7 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh index 248aa7f2..929708a5 100644 --- a/ct/alpine-adguard.sh +++ b/ct/alpine-adguard.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index a7b08ba6..d3d4c8ca 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 7cb26ae6..254cead3 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 3783d633..525f1404 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh index b2e2eaa7..02dec1f1 100644 --- a/ct/alpine-whoogle.sh +++ b/ct/alpine-whoogle.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 55df4544..b7d87edb 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/alpine.sh b/ct/alpine.sh index a3348a9f..42c9546a 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/archlinux.sh b/ct/archlinux.sh index a28cfed3..55067dab 100644 --- a/ct/archlinux.sh +++ b/ct/archlinux.sh @@ -100,7 +100,7 @@ function default_settings() { echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" BRG="vmbr0" echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET=dhcp + NET="dhcp" echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" GATE="" echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 558dbc44..86d51e68 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/autobrr.sh b/ct/autobrr.sh index b92412f0..c3f79c42 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/bazarr.sh b/ct/bazarr.sh index 97c6b375..cf85c64c 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/blocky.sh b/ct/blocky.sh index 08e769e8..049f979d 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/casaos.sh b/ct/casaos.sh index c98a025d..52e9f880 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 80748b5e..e114edc3 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index b4fa4518..fafb6595 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 8eb6aaa5..f5227c32 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index d13e5b40..c134ce41 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/dashy.sh b/ct/dashy.sh index 69385bd4..3bd3284d 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/debian.sh b/ct/debian.sh index b67a0a26..ee23d6c5 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/deconz.sh b/ct/deconz.sh index 6195bd10..ccf279d1 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/deluge.sh b/ct/deluge.sh index 0b3ce6c4..163fe125 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/devuan.sh b/ct/devuan.sh index db48bf4e..25bdc96f 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/docker.sh b/ct/docker.sh index 1805787c..ecbc4892 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/emby.sh b/ct/emby.sh index 63abf748..1491a55c 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/emqx.sh b/ct/emqx.sh index 7c0ffcd9..fb198fce 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/esphome.sh b/ct/esphome.sh index 2bbd3d4d..d7d4f753 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/fhem.sh b/ct/fhem.sh index 13c042d7..075d4b45 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 58b82f5c..ba243dc3 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/grafana.sh b/ct/grafana.sh index e1164a01..bb50c557 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/grocy.sh b/ct/grocy.sh index 6e0a66d9..cfe213d5 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index c06501f3..1a2b701a 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 858433c2..8f612cb5 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index ac667247..3a67b1fc 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/homebridge.sh b/ct/homebridge.sh index efd2b36e..7522a7f4 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/homepage.sh b/ct/homepage.sh index 13b4fca6..d133e7a8 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/homer.sh b/ct/homer.sh index 34bf6620..fcdc17ac 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 51108e46..fbd17687 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 7408d33c..8f660810 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/iobroker.sh b/ct/iobroker.sh index d715199a..8feef540 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/jackett.sh b/ct/jackett.sh index f895f4d7..892e2da2 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 88eb4d8d..5c8018fd 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/k0s.sh b/ct/k0s.sh index 1d64a0ce..0591912e 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/kavita.sh b/ct/kavita.sh index 8410daa7..4d86cd74 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 218f56f4..83895ba7 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 6bc88997..17114c71 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 2554bd1b..c3078bc3 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 03e24726..b955a589 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index a9288d90..03b3efd2 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/motioneye.sh b/ct/motioneye.sh index e46e9fd4..8ec8f6a2 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 0eb3c974..f4f0bed7 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/n8n.sh b/ct/n8n.sh index 58e56db7..906d46c1 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 10c308c3..258c0acd 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 8e18cc2a..1b63695c 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index b460da3f..72bffcac 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/nocodb.sh b/ct/nocodb.sh index bcfcdc7b..3c400a1e 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/node-red.sh b/ct/node-red.sh index 3dba9183..0555b6b4 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/octoprint.sh b/ct/octoprint.sh index c0f14e37..3d4cb3e0 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/omada.sh b/ct/omada.sh index 3b02947e..c355622e 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/omv.sh b/ct/omv.sh index 7b31de75..063bc49b 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/openhab.sh b/ct/openhab.sh index d4c33704..7841d610 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 09d46d45..7a5483f4 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 231f7d1e..31dd6735 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/pihole.sh b/ct/pihole.sh index d5233719..b6ba11a6 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/plex.sh b/ct/plex.sh index bcc7d96d..a24fa465 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index fbdc906e..a1c8c4fc 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -41,7 +41,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/podman.sh b/ct/podman.sh index b313e673..bd048a08 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 700ad409..06212e1a 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 571a18bb..3ee8a3de 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 2c323541..c53b162b 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 83cc8526..8615ae2d 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/radarr.sh b/ct/radarr.sh index a379e8ac..6282e685 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/readarr.sh b/ct/readarr.sh index bea527d0..eb6466e5 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index 38700c95..02a0a090 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/rstptoweb.sh b/ct/rstptoweb.sh index 1c1bb453..b0e68ab9 100644 --- a/ct/rstptoweb.sh +++ b/ct/rstptoweb.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index ea75032d..1b198e99 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/scrypted.sh b/ct/scrypted.sh index f4b7d0ee..474f3af3 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/shinobi.sh b/ct/shinobi.sh index bc5572e6..58882700 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/sonarr.sh b/ct/sonarr.sh index ac6f2399..0ed45a21 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 4df4d33a..b45fcfd8 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 994ae3db..de386554 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index 7c9d30f4..6b538f6a 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/transmission.sh b/ct/transmission.sh index 94e654d6..fd8a5c2d 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/trilium.sh b/ct/trilium.sh index 350a945e..a54e36a4 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index bc2f0cc6..1804b96b 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 46ed1aa2..8babfc1b 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/unifi.sh b/ct/unifi.sh index d3876aa6..c44b0182 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index d7d1cc0f..2f82fc3b 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index f74ef4fe..2d326b6c 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/whisparr.sh b/ct/whisparr.sh index c616282a..4304d4aa 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/whoogle.sh b/ct/whoogle.sh index bb4257ec..c6054537 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 416e54ee..a8f58ce8 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/wireguard.sh b/ct/wireguard.sh index d6a6b48e..60156f2e 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 22198999..b024d239 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 21562435..a9634918 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -38,7 +38,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 2255e299..c4217d3e 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -37,7 +37,7 @@ function default_settings() { CORE_COUNT="$var_cpu" RAM_SIZE="$var_ram" BRG="vmbr0" - NET=dhcp + NET="dhcp" GATE="" DISABLEIP6="no" MTU="" From 58909e197a2005c066155d2b9334df04d31d6f46 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 May 2023 11:43:17 -0400 Subject: [PATCH 1534/3335] Update build.func add Tdarr to Hardware Acceleration Support --- misc/build.func | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 115ba768..2aac2b0a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -467,6 +467,7 @@ build_container() { export VERBOSE="$VERB" export SSH_ROOT="${SSH}" export CTID="$CT_ID" + export CTTYPE="$CT_TYPE" export PCT_OSTYPE="$var_os" export PCT_OSVERSION="$var_version" export PCT_DISK_SIZE="$DISK_SIZE" @@ -487,7 +488,7 @@ build_container() { LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" ]]; then + if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" && "$APP" != "Tdarr" ]]; then cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: @@ -503,7 +504,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" ]]; then + if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Tdarr" ]]; then cat <>$LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: From 66aef55ab0bf7e94454263ab508937932e272f60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 May 2023 11:44:18 -0400 Subject: [PATCH 1535/3335] Update tdarr-install.sh Hardware Acceleration --- install/tdarr-install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 212df862..02a7baa8 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -20,6 +20,19 @@ $STD apt-get install -y mc $STD apt-get install -y unzip msg_ok "Installed Dependencies" +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 Tdarr" mkdir -p /opt/tdarr cd /opt/tdarr From 3a3f00e522fe8bbb7e5139347d8ae38848c2ef2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 May 2023 11:45:22 -0400 Subject: [PATCH 1536/3335] Update tdarr.sh default privileged --- ct/tdarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/tdarr.sh b/ct/tdarr.sh index de386554..cff3d7fc 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="1" + CT_TYPE="0" PW="" CT_ID=$NEXTID HN=$NSAPP From 08235d8ac250852d684e906684d789ce4a9aa2d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 May 2023 12:04:15 -0400 Subject: [PATCH 1537/3335] Update plex.sh change wording --- ct/plex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/plex.sh b/ct/plex.sh index a24fa465..ac09683a 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -54,7 +54,7 @@ function update_script() { if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ "1" "Update LXC" ON \ - "2" "Run plexupdate" OFF \ + "2" "Install plexupdate" OFF \ 3>&1 1>&2 2>&3) header_info From b09f213c842a1d511efad2f473139cabb89a0618 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 05:53:35 -0400 Subject: [PATCH 1538/3335] Update build.func export PASSWORD --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 2aac2b0a..39438910 100644 --- a/misc/build.func +++ b/misc/build.func @@ -464,6 +464,7 @@ build_container() { fi export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" + export PASSWORD="$PW" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" export CTID="$CT_ID" From c12f2773e70248cc33ee205cf6ae025987230f05 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 07:39:30 -0400 Subject: [PATCH 1539/3335] Code refactoring --- install/adguard-install.sh | 2 +- install/alpine-adguard-install.sh | 2 +- install/alpine-docker-install.sh | 2 +- install/alpine-grafana-install.sh | 2 +- install/alpine-vaultwarden-install.sh | 2 +- install/alpine-whoogle-install.sh | 2 +- install/alpine-zigbee2mqtt-install.sh | 2 +- install/audiobookshelf-install.sh | 2 +- install/autobrr-install.sh | 2 +- install/bazarr-install.sh | 3 +-- install/blocky-install.sh | 2 +- install/casaos-install.sh | 3 +-- install/changedetection-install.sh | 2 +- install/cloudflared-install.sh | 2 +- install/cronicle-install.sh | 2 +- install/daemonsync-install.sh | 2 +- install/dashy-install.sh | 2 +- install/debian-install.sh | 2 +- install/deconz-install.sh | 2 +- install/deluge-install.sh | 2 +- install/devuan-install.sh | 2 +- install/docker-install.sh | 2 +- install/emby-install.sh | 4 ++-- install/emqx-install.sh | 2 +- install/esphome-install.sh | 2 +- install/fhem-install.sh | 2 +- install/go2rtc-install.sh | 2 +- install/grafana-install.sh | 2 +- install/grocy-install.sh | 3 +-- install/heimdalldashboard-install.sh | 2 +- install/homeassistant-core-install.sh | 2 +- install/homeassistant-install.sh | 2 +- install/homebridge-install.sh | 2 +- install/homepage-install.sh | 2 +- install/homer-install.sh | 3 +-- install/hyperion-install.sh | 2 +- install/influxdb-install.sh | 2 +- install/iobroker-install.sh | 2 +- install/jackett-install.sh | 2 +- install/jellyfin-install.sh | 4 ++-- install/k0s-install.sh | 2 +- install/kavita-install.sh | 2 +- install/keycloak-install.sh | 2 +- install/lidarr-install.sh | 2 +- install/magicmirror-install.sh | 2 +- install/mariadb-install.sh | 2 +- install/meshcentral-install.sh | 2 +- install/motioneye-install.sh | 2 +- install/mqtt-install.sh | 2 +- install/n8n-install.sh | 2 +- install/navidrome-install.sh | 2 +- install/nextcloudpi-install.sh | 2 +- install/nginxproxymanager-install.sh | 2 +- install/nocodb-install.sh | 2 +- install/node-red-install.sh | 2 +- install/octoprint-install.sh | 2 +- install/omada-install.sh | 2 +- install/omv-install.sh | 2 +- install/openhab-install.sh | 2 +- install/paperless-ngx-install.sh | 4 ++-- install/photoprism-install.sh | 3 +-- install/pihole-install.sh | 2 +- install/plex-install.sh | 4 ++-- install/podman-homeassistant-install.sh | 2 +- install/podman-install.sh | 2 +- install/postgresql-install.sh | 2 +- install/prometheus-install.sh | 2 +- install/prowlarr-install.sh | 2 +- install/qbittorrent-install.sh | 2 +- install/radarr-install.sh | 2 +- install/readarr-install.sh | 2 +- install/rstptoweb-install.sh | 2 +- install/sabnzbd-install.sh | 3 +-- install/scrypted-install.sh | 2 +- install/shinobi-install.sh | 2 +- install/sonarr-install.sh | 2 +- install/syncthing-install.sh | 2 +- install/tautulli-install.sh | 2 +- install/tdarr-install.sh | 3 +-- install/technitiumdns-install.sh | 2 +- install/transmission-install.sh | 2 +- install/trilium-install.sh | 2 +- install/ubuntu-install.sh | 2 +- install/umbrel-install.sh | 2 +- install/unifi-install.sh | 2 +- install/uptimekuma-install.sh | 2 +- install/vaultwarden-install.sh | 2 +- install/whisparr-install.sh | 2 +- install/whoogle-install.sh | 2 +- install/wikijs-install.sh | 2 +- install/wireguard-install.sh | 2 +- install/yunohost-install.sh | 2 +- install/zigbee2mqtt-install.sh | 2 +- install/zwave-js-ui-install.sh | 3 +-- misc/alpine-install.func | 8 ++------ misc/build.func | 2 +- misc/install.func | 8 ++------ 97 files changed, 103 insertions(+), 119 deletions(-) diff --git a/install/adguard-install.sh b/install/adguard-install.sh index fb490e06..124f2e68 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -29,7 +29,7 @@ rm install.sh msg_ok "Installed AdGuard Home" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh index 33df28ab..b43c55ce 100644 --- a/install/alpine-adguard-install.sh +++ b/install/alpine-adguard-install.sh @@ -33,4 +33,4 @@ $STD /opt/AdGuardHome/AdGuardHome -s start msg_ok "Installed Alpine-AdGuard" motd_ssh -root +customize diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 4ed450e5..368a4d3f 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -59,4 +59,4 @@ if echo "$prompt" | grep -Eq "^(y|yes)$"; then fi motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/alpine-grafana-install.sh b/install/alpine-grafana-install.sh index d20a7aca..09dc91ef 100644 --- a/install/alpine-grafana-install.sh +++ b/install/alpine-grafana-install.sh @@ -29,4 +29,4 @@ $STD rc-update add grafana default msg_ok "Installed Grafana" motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index f048745b..9d8b628d 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -37,4 +37,4 @@ $STD rc-update add vaultwarden default msg_ok "Installed Alpine-Vaultwarden" motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/alpine-whoogle-install.sh b/install/alpine-whoogle-install.sh index b85e76d0..d6cfcc69 100644 --- a/install/alpine-whoogle-install.sh +++ b/install/alpine-whoogle-install.sh @@ -49,4 +49,4 @@ rc-update add -q whoogle default msg_ok "Installed Alpine-Whoogle" motd_ssh -root +customize diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 4abf334e..322e6e5f 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -26,4 +26,4 @@ $STD apk add zigbee2mqtt msg_ok "Installed Alpine-Zigbee2MQTT" motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index 5586918e..0de9f082 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -28,7 +28,7 @@ $STD apt install audiobookshelf msg_ok "Installed audiobookshelf" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh index dbf1cea3..5a50883d 100644 --- a/install/autobrr-install.sh +++ b/install/autobrr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q autobrr.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index bd395f66..9e847172 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip $STD apt-get install -y python3-pip msg_ok "Installed Dependencies" @@ -53,7 +52,7 @@ systemctl enable -q --now bazarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf bazarr.zip diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 3f0409bf..6ef5abcc 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -282,7 +282,7 @@ $STD systemctl enable --now blocky msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/casaos-install.sh b/install/casaos-install.sh index cf4ee609..c0a068d0 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip msg_ok "Installed Dependencies" msg_info "Installing CasaOS (Patience)" @@ -37,7 +36,7 @@ $STD bash <(curl -fsSL https://get.casaos.io) msg_ok "Installed CasaOS" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 53c78041..34e0bcca 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -43,7 +43,7 @@ $STD systemctl enable --now changedetection msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index d75c0191..921da7cd 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -28,7 +28,7 @@ $STD apt-get install -y cloudflared msg_ok "Installed Cloudflared" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index 281a6f19..9f9073c3 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -48,7 +48,7 @@ $STD update-rc.d cronicled defaults msg_ok "Installed Cronicle Primary Server" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh index dead1801..8118f42b 100644 --- a/install/daemonsync-install.sh +++ b/install/daemonsync-install.sh @@ -26,7 +26,7 @@ $STD dpkg -i daemonsync_2.2.0.0059_amd64.deb msg_ok "Installed Daemon Sync Server" motd_ssh -root +customize msg_info "Cleaning up" rm -rf daemonsync_2.2.0.0059_amd64.deb diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 089fcdde..6bb812f7 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -57,7 +57,7 @@ systemctl start dashy msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/debian-install.sh b/install/debian-install.sh index 0e4905fb..af84fbb8 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 068cf5f3..eab4d521 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -50,7 +50,7 @@ $STD systemctl enable --now deconz msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/deluge-install.sh b/install/deluge-install.sh index 1a55fb27..b42e24f6 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -65,7 +65,7 @@ systemctl enable --now -q deluge-web.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/devuan-install.sh b/install/devuan-install.sh index eb2b237b..64e6f242 100644 --- a/install/devuan-install.sh +++ b/install/devuan-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/docker-install.sh b/install/docker-install.sh index c2a33444..8240ed8f 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -69,7 +69,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/emby-install.sh b/install/emby-install.sh index 668222f7..52fc3af6 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -19,7 +19,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then +if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ @@ -43,7 +43,7 @@ $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb msg_ok "Installed Emby" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/emqx-install.sh b/install/emqx-install.sh index 74b3c2d3..a1d69324 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -26,7 +26,7 @@ $STD systemctl enable --now emqx msg_ok "Installed EMQX" motd_ssh -root +customize msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/install/esphome-install.sh b/install/esphome-install.sh index fe8e8e46..ce0224f0 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -46,7 +46,7 @@ systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/fhem-install.sh b/install/fhem-install.sh index caf99993..e3ce0f67 100644 --- a/install/fhem-install.sh +++ b/install/fhem-install.sh @@ -32,7 +32,7 @@ $STD apt-get install -y fhem msg_info "Installed Fhem" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh index 75211aeb..a5092fd8 100644 --- a/install/go2rtc-install.sh +++ b/install/go2rtc-install.sh @@ -43,7 +43,7 @@ systemctl enable -q --now go2rtc msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 1ab76079..6f5a3efc 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -35,7 +35,7 @@ systemctl enable --now -q grafana-server.service msg_ok "Installed Grafana" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/grocy-install.sh b/install/grocy-install.sh index b51cfbcc..47da262c 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -18,7 +18,6 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y apache2 -$STD apt-get install -y unzip $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release msg_ok "Installed Dependencies" @@ -63,7 +62,7 @@ systemctl reload apache2 msg_ok "Installed grocy" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index df8e7cc2..78d3be90 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -58,7 +58,7 @@ $STD sudo systemctl enable --now heimdall.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index f7cc1c9c..663e5e99 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -100,7 +100,7 @@ $STD systemctl enable --now homeassistant msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index ab92e64a..789ec5ea 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -84,7 +84,7 @@ $STD docker run -d \ msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 463b7ab8..ed071136 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -32,7 +32,7 @@ $STD apt-get install -y homebridge msg_info "Installed Homebridge" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 7cabc3c3..3f5c85d9 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -58,7 +58,7 @@ $STD systemctl enable --now homepage msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homer-install.sh b/install/homer-install.sh index 197af604..f4a8d3eb 100644 --- a/install/homer-install.sh +++ b/install/homer-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip $STD apt-get install -y pip msg_ok "Installed Dependencies" @@ -46,7 +45,7 @@ $STD systemctl enable --now homer msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index f8a3df3c..17971c57 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -31,7 +31,7 @@ $STD systemctl enable --now hyperion@root.service msg_ok "Installed Hyperion" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove >/dev/null diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 8167b01f..b1683824 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -55,7 +55,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 5146abea..ae553a46 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -24,7 +24,7 @@ $STD bash <(curl -fsSL https://iobroker.net/install.sh) msg_ok "Installed ioBroker" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/jackett-install.sh b/install/jackett-install.sh index b4982d3c..e54858d5 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -46,7 +46,7 @@ systemctl enable -q --now jackett.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 98d427b0..1477ef87 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y gnupg $STD apt-get install -y mc msg_ok "Installed Dependencies" -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then +if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ @@ -59,7 +59,7 @@ $STD apt-get install -y jellyfin msg_ok "Installed Jellyfin" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/k0s-install.sh b/install/k0s-install.sh index 7e772932..323bbebe 100644 --- a/install/k0s-install.sh +++ b/install/k0s-install.sh @@ -35,7 +35,7 @@ $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/ msg_ok "Installed Helm" fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/kavita-install.sh b/install/kavita-install.sh index eaf48992..b3fe9267 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -46,7 +46,7 @@ systemctl enable --now -q kavita.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index 0dcf8c8f..ba9d4198 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -43,7 +43,7 @@ $STD systemctl enable --now keycloak.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh index a7ec14d2..e03c7680 100644 --- a/install/lidarr-install.sh +++ b/install/lidarr-install.sh @@ -51,7 +51,7 @@ systemctl enable --now -q lidarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Lidarr.master.*.tar.gz diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 249f46a6..f262b885 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -148,7 +148,7 @@ $STD systemctl enable --now magicmirror msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index a3326a35..3fefa9b1 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -35,7 +35,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 3defc5eb..bd76b239 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -35,7 +35,7 @@ $STD node node_modules/meshcentral --install msg_ok "Installed MeshCentral" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index cbb1a732..5ebe8fc7 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -51,7 +51,7 @@ systemctl enable -q --now motioneye msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 135abf56..71e0ef9a 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -31,7 +31,7 @@ $STD apt-get -y install mosquitto-clients msg_ok "Installed Mosquitto MQTT Broker" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 7e735a09..0c2c1cd2 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -46,7 +46,7 @@ $STD systemctl enable --now n8n msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 67f255a2..d1a890db 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -75,7 +75,7 @@ $STD systemctl enable --now navidrome.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index a2ac437c..912e5ad6 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -28,7 +28,7 @@ service apache2 restart msg_ok "Installed NextCloudPi" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 8d797267..1300266d 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -182,7 +182,7 @@ EOF msg_ok "Created Service" motd_ssh -root +customize msg_info "Starting Services" sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 63bf1ca6..8435fc06 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -53,7 +53,7 @@ systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/node-red-install.sh b/install/node-red-install.sh index fd2760f4..8e4d803b 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -56,7 +56,7 @@ $STD systemctl enable --now nodered.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index b871219a..132eedd1 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -69,7 +69,7 @@ systemctl enable -q --now octoprint.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/omada-install.sh b/install/omada-install.sh index 6a359884..adcfe5aa 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -30,7 +30,7 @@ $STD dpkg -i Omada_SDN_Controller_v5.9.31_Linux_x64.deb msg_ok "Installed Omada Controller" motd_ssh -root +customize msg_info "Cleaning up" rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb diff --git a/install/omv-install.sh b/install/omv-install.sh index be058e99..90911799 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -42,7 +42,7 @@ omv-confdbadm populate msg_ok "Installed OpenMediaVault" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/openhab-install.sh b/install/openhab-install.sh index 43d5454b..f87848f3 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -41,7 +41,7 @@ $STD systemctl enable --now openhab.service msg_ok "Installed openHAB" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 55820dbb..ca2679af 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -27,7 +27,7 @@ $STD apt-get install -y --no-install-recommends \ redis \ postgresql \ build-essential \ - imagemagick \ + imagemagick \ fonts-liberation \ optipng \ gnupg \ @@ -192,7 +192,7 @@ $STD systemctl enable --now paperless-consumer paperless-webserver paperless-sch msg_ok "Created Services" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 92c00afb..df63bd6e 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -23,7 +23,6 @@ $STD apt-get install -y git $STD apt-get install -y gnupg $STD apt-get install -y make $STD apt-get install -y zip -$STD apt-get install -y unzip $STD apt-get install -y exiftool $STD apt-get install -y ffmpeg msg_ok "Installed Dependencies" @@ -119,7 +118,7 @@ WantedBy=multi-user.target" >$service_path msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 8cf049f7..9006ae2f 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -46,7 +46,7 @@ $STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended msg_ok "Installed Pi-hole" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/plex-install.sh b/install/plex-install.sh index 127d4a11..5e7fda8d 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -19,7 +19,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then +if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ @@ -46,7 +46,7 @@ $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver msg_ok "Installed Plex Media Server" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 70351f5e..a0fb4f5e 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -46,7 +46,7 @@ $STD systemctl enable --now homeassistant msg_ok "Installed Home Assistant" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/podman-install.sh b/install/podman-install.sh index 8c248463..951da53b 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -26,7 +26,7 @@ echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registr msg_ok "Installed Podman" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 53fb2a25..5f455031 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -142,7 +142,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index 118241fd..f2aad6fd 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -55,7 +55,7 @@ $STD sudo systemctl enable --now prometheus msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prowlarr-install.sh b/install/prowlarr-install.sh index 638d93c1..b999d9b5 100644 --- a/install/prowlarr-install.sh +++ b/install/prowlarr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q prowlarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Prowlarr.master.*.tar.gz diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh index 6995f6bb..1a6147d2 100644 --- a/install/qbittorrent-install.sh +++ b/install/qbittorrent-install.sh @@ -38,7 +38,7 @@ systemctl enable -q --now qbittorrent-nox msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/radarr-install.sh b/install/radarr-install.sh index 4c736895..f9e88aa5 100644 --- a/install/radarr-install.sh +++ b/install/radarr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q radarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Radarr.master.*.tar.gz diff --git a/install/readarr-install.sh b/install/readarr-install.sh index 9452caa3..43897970 100644 --- a/install/readarr-install.sh +++ b/install/readarr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q readarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Readarr.develop.*.tar.gz diff --git a/install/rstptoweb-install.sh b/install/rstptoweb-install.sh index 76c3792d..d345a102 100644 --- a/install/rstptoweb-install.sh +++ b/install/rstptoweb-install.sh @@ -53,7 +53,7 @@ systemctl enable -q --now rtsptoweb msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index b779e31d..6c53de93 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip $STD apt-get install -y par2 $STD apt-get install -y p7zip-full wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.0.3-1+deb11u1_amd64.deb @@ -54,7 +53,7 @@ systemctl enable --now -q sabnzbd.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index dd766825..b1df07e1 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -110,7 +110,7 @@ $STD systemctl enable --now scrypted.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index d6682ba3..3d8801dd 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -82,7 +82,7 @@ $STD pm2 list msg_ok "Installed Shinobi" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index db1a7bf4..099257b0 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -29,7 +29,7 @@ DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" inst msg_ok "Installed Sonarr" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 14cd1b99..3e8eef08 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -33,7 +33,7 @@ systemctl restart syncthing@root.service msg_ok "Installed Syncthing" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index 43a6a316..80ee51f7 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -50,7 +50,7 @@ systemctl enable -q --now tautulli msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 02a7baa8..5e097586 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then @@ -90,7 +89,7 @@ systemctl enable --now -q tdarr-node.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Tdarr_Updater.zip diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index a795fa37..4f3f6c98 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -35,7 +35,7 @@ $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/transmission-install.sh b/install/transmission-install.sh index 1c7c6f0c..969e6aea 100644 --- a/install/transmission-install.sh +++ b/install/transmission-install.sh @@ -28,7 +28,7 @@ systemctl start transmission-daemon msg_ok "Installed Transmission" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/trilium-install.sh b/install/trilium-install.sh index 02ab6d0f..da811245 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -50,7 +50,7 @@ systemctl enable --now -q trilium msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index eb2b237b..64e6f242 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index 4ec349db..ea4d17ba 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -38,7 +38,7 @@ $STD systemctl enable --now umbrel-startup.service msg_ok "Installed Umbrel" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 9f297731..11515d90 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -38,7 +38,7 @@ $STD apt-get install -y unifi msg_ok "Installed UniFi Network Application" motd_ssh -root +customize msg_info "Cleaning up" rm -rf mongodb-org-server_3.6.23_amd64.deb diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index d5af2231..c78a890e 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -53,7 +53,7 @@ $STD systemctl enable --now uptime-kuma.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index fe0edc19..65061b80 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -111,7 +111,7 @@ $STD systemctl enable --now vaultwarden.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh index 64b757f5..422ae576 100644 --- a/install/whisparr-install.sh +++ b/install/whisparr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q whisparr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Whisparr.develop.*.tar.gz diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index 943c59ad..1eb492f2 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -42,7 +42,7 @@ $STD systemctl enable --now whoogle.service msg_ok "Installed Whoogle" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 4bea8690..32152da6 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -70,7 +70,7 @@ $STD systemctl enable --now wikijs msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index f63333c9..a133b2df 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -41,7 +41,7 @@ $STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf msg_ok "Installed WireGuard" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index 48e7bbd6..aaeadc1b 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -30,7 +30,7 @@ $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index ca4e2905..eb10fdd6 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -69,7 +69,7 @@ $STD systemctl enable zigbee2mqtt.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index 67862f1f..a9a05c3e 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip msg_ok "Installed Dependencies" msg_info "Installing Z-Wave JS UI" @@ -45,7 +44,7 @@ $STD systemctl enable zwave-js-ui msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm zwave-js-ui-${RELEASE}-linux.zip diff --git a/misc/alpine-install.func b/misc/alpine-install.func index a7d282d9..ce38abed 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -117,13 +117,9 @@ motd_ssh() { } customize() { + if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" bash -c "passwd -d root" >/dev/null 2>&1 msg_ok "Customized Container" -} - -root() { - if ! getent shadow root | grep -q '^root:[^:]*:\?\$'; then - customize fi -} +} \ No newline at end of file diff --git a/misc/build.func b/misc/build.func index 39438910..2b426d1f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -169,7 +169,7 @@ advanced_settings() { if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then PW1="Automatic Login" - PW=" " + PW="" else PW="-password $PW1" fi diff --git a/misc/install.func b/misc/install.func index d4bf0af0..df2c9cd6 100644 --- a/misc/install.func +++ b/misc/install.func @@ -116,6 +116,7 @@ motd_ssh() { } customize() { + if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -127,10 +128,5 @@ EOF systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" -} - -root() { - if ! getent shadow root | grep -q "^root:[^\!*]"; then - customize fi -} +} \ No newline at end of file From 9933ff371173a56eab3436a0ddf1910d228e3b46 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 09:25:03 -0400 Subject: [PATCH 1540/3335] Update paperless-ngx-install.sh shfmt --- install/paperless-ngx-install.sh | 80 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index ca2679af..87db1282 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -15,52 +15,52 @@ update_os msg_info "Installing Python3" $STD apt-get install -y --no-install-recommends \ - python3 \ - python3-pip \ - python3-dev \ - python3-setuptools \ - python3-wheel + python3 \ + python3-pip \ + python3-dev \ + python3-setuptools \ + python3-wheel msg_ok "Installed Python3" msg_info "Installing Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ - redis \ - postgresql \ - build-essential \ - imagemagick \ - fonts-liberation \ - optipng \ - gnupg \ - libpq-dev \ - libmagic-dev \ - mime-support \ - libzbar0 \ - poppler-utils \ - default-libmysqlclient-dev \ - automake \ - libtool \ - pkg-config \ - git \ - curl \ - libtiff-dev \ - libpng-dev \ - libleptonica-dev \ - sudo \ - mc + redis \ + postgresql \ + build-essential \ + imagemagick \ + fonts-liberation \ + optipng \ + gnupg \ + libpq-dev \ + libmagic-dev \ + mime-support \ + libzbar0 \ + poppler-utils \ + default-libmysqlclient-dev \ + automake \ + libtool \ + pkg-config \ + git \ + curl \ + libtiff-dev \ + libpng-dev \ + libleptonica-dev \ + sudo \ + mc msg_ok "Installed Dependencies" msg_info "Installing OCR Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ - unpaper \ - ghostscript \ - icc-profiles-free \ - qpdf \ - liblept5 \ - libxml2 \ - pngquant \ - zlib1g \ - tesseract-ocr \ - tesseract-ocr-eng + unpaper \ + ghostscript \ + icc-profiles-free \ + qpdf \ + liblept5 \ + libxml2 \ + pngquant \ + zlib1g \ + tesseract-ocr \ + tesseract-ocr-eng msg_ok "Installed OCR Dependencies" msg_info "Installing JBIG2" @@ -76,7 +76,7 @@ msg_ok "Installed JBIG2" msg_info "Installing Paperless-ngx (Patience)" Paperlessngx=$(wget -q https://github.com/paperless-ngx/paperless-ngx/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) cd /opt -$STD wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz +$STD wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz $STD tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ mv paperless-ngx paperless rm paperless-ngx-$Paperlessngx.tar.xz From 1a553a30c93dd16fd9dc7aa91b65fd853d3f7473 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 15:09:54 -0400 Subject: [PATCH 1541/3335] Create CODE-AUDIT.md --- CODE-AUDIT.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CODE-AUDIT.md diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md new file mode 100644 index 00000000..a3f07aa1 --- /dev/null +++ b/CODE-AUDIT.md @@ -0,0 +1,9 @@ +In the case of the < app > LXC, the process involves running multiple scripts for each application or service.
+Initially, the `.sh` script is executed to collect system parameters.
+Next, the `build.func` script adds user settings and integrates all the collected information.
+Then, the `create_lxc.sh` script constructs the LXC container.
+Following that, the `-install.sh` script is executed, which utilizes the functions exported from the `install.func` script for installing the required applications.
+Finally, the process returns to the `.sh` script to display the completion message.
+ +Thoroughly evaluating the `-install.sh` script is crucial to gain a better understanding of the application installation process.
+Every application installation utilizes the same set of reusable scripts: `build.func`, `create_lxc.sh`, and `install.func`. These scripts are not specific to any particular application.
From 287a0837d3cabb8328e9a4ed622de8ebff03933e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 15:21:15 -0400 Subject: [PATCH 1542/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc889b20..062073eb 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,5 @@

Proxmox VE Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
- +

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.

Proxmox® is a registered trademark of Proxmox Server Solutions GmbH.
From 9192b8b076e250d90dd135404d6c58c6523fcb67 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 18:33:04 -0400 Subject: [PATCH 1543/3335] Update install.func added code descriptions --- misc/install.func | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index df2c9cd6..cb835a1d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -1,3 +1,4 @@ +# This function sets color variables for formatting output in the terminal color() { YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -14,6 +15,7 @@ color() { HOLD="-" } +# This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" verb_ip6() { if [ "$VERBOSE" = "yes" ]; then set -x @@ -26,11 +28,13 @@ verb_ip6() { fi } +# This function sets error handling options and defines the error_handler function to handle errors catch_errors() { set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } +# This function handles errors error_handler() { local exit_code="$?" local line_number="$1" @@ -42,21 +46,25 @@ error_handler() { fi } +# This function prints an informational message msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } +# This function prints a success message msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +# This function prints an error message msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection setting_up_container() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen @@ -79,6 +87,7 @@ setting_up_container() { msg_ok "Network Connected: ${BL}$(hostname -I)" } +# This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected network_check() { set +e trap - ERR @@ -98,6 +107,7 @@ network_check() { trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } +# This function updates the Container OS by running apt-get update and upgrade update_os() { msg_info "Updating Container OS" $STD apt-get update @@ -105,6 +115,7 @@ update_os() { msg_ok "Updated Container OS" } +# This function modifies the message of the day (motd) and SSH settings motd_ssh() { echo "export TERM='xterm-256color'" >>/root/.bashrc echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd @@ -115,6 +126,7 @@ motd_ssh() { fi } +# This function customizes the container by modifying the getty service and enabling auto-login for the root user customize() { if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" @@ -129,4 +141,4 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi -} \ No newline at end of file +} From 3a06811e01dfc5132c4bcef68557224d9055c680 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 18:55:53 -0400 Subject: [PATCH 1544/3335] Update build.func added code descriptions --- misc/build.func | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index 2b426d1f..dce870e0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1,9 +1,10 @@ variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') - var_install="${NSAPP}-install" - INTEGER='^[0-9]+([.][0-9]+)?$' + 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. color() { YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -18,11 +19,13 @@ color() { HOLD="-" } +# This function enables error handling in the script by setting options and defining a trap for the ERR signal. catch_errors() { set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } +# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { local exit_code="$?" local line_number="$1" @@ -31,21 +34,25 @@ error_handler() { echo -e "\n$error_message\n" } +# This function displays an informational message with a yellow color. msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } +# This function displays a success message with a green color. msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +# This function displays an error message with a red color. msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" @@ -56,6 +63,7 @@ pve_check() { fi } +# This function checks the system architecture and exits if it's not "amd64". arch_check() { if [ "$(dpkg --print-architecture)" != "amd64" ]; then echo -e "\n ${CROSS} This script will not work with PiMox! \n" @@ -65,6 +73,7 @@ arch_check() { fi } +# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. ssh_check() { if command -v pveversion >/dev/null 2>&1; then if [ -n "${SSH_CLIENT:+x}" ]; then @@ -78,6 +87,7 @@ ssh_check() { fi } +# This function displays the default values for various settings. echo_default() { echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}" echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" @@ -105,12 +115,14 @@ echo_default() { echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } +# This function is called when the user decides to exit the script. It clears the screen and displays an exit message. exit-script() { clear echo -e "⚠ User exited script \n" exit } +# This function allows the user to configure advanced settings for the script. advanced_settings() { whiptail --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 whiptail --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58 @@ -433,6 +445,7 @@ start() { fi } +# This function collects user settings and integrates all the collected information. build_container() { if [ "$VERB" == "yes" ]; then set -x; fi @@ -485,6 +498,7 @@ build_container() { -unprivileged $CT_TYPE $PW " + # This executes create_lxc.sh and creates the container and .conf file bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf @@ -519,6 +533,7 @@ EOF fi fi +# This starts the container and executes -install.sh msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" @@ -530,6 +545,7 @@ EOF } +# This function sets the description of the container. description() { IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) pct set "$CTID" -description "# ${APP} LXC From caea206144c8b9f03c241ea2b9a12ced884ee288 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 19:15:26 -0400 Subject: [PATCH 1545/3335] Update create_lxc.sh added code descriptions --- ct/create_lxc.sh | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 6fd83826..4cf41103 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -5,7 +5,10 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE +# This sets verbose mode if the global variable is set to "yes" if [ "$VERBOSE" == "yes" ]; then set -x; fi + +# This function sets color variables for formatting output in the terminal YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -15,8 +18,12 @@ CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" HOLD="-" + +# This sets error handling options and defines the error_handler function to handle errors set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR + +# This function handles errors function error_handler() { local exit_code="$?" local line_number="$1" @@ -24,20 +31,26 @@ function error_handler() { local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" } + +# This function prints an informational message function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } +# This function prints a success message function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +# This function prints an error message function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# This checks for the presence of valid Container Storage and Template Storage locations msg_info "Validating Storage" VALIDCT=$(pvesm status -content rootdir | awk 'NR>1') if [ -z "$VALIDCT" ]; then @@ -50,6 +63,7 @@ if [ -z "$VALIDTMP" ]; then exit 1 fi +# This function is used to select the storage class and determine the corresponding storage content type and label. function select_storage() { local CLASS=$1 local CONTENT @@ -65,7 +79,8 @@ function select_storage() { ;; *) false || exit "Invalid storage class." ;; esac - + + # This Queries all storage locations local -a MENU while read -r line; do local TAG=$(echo $line | awk '{print $1}') @@ -78,7 +93,8 @@ function select_storage() { fi MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') - + + # Select storage location if [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} else @@ -93,32 +109,40 @@ function select_storage() { fi } +# Test if required variables are set [[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable." [[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable." +# Test if ID is valid [ "$CTID" -ge "100" ] || exit "ID cannot be less than 100." +# Test if ID is in use if pct status $CTID &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID exit "Cannot use ID that is already in use." fi +# Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage." +# Get container storage CONTAINER_STORAGE=$(select_storage container) || exit msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage." +# Update LXC template list msg_info "Updating LXC Template List" pveam update >/dev/null msg_ok "Updated LXC Template List" +# Get LXC template string TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) [ ${#TEMPLATES[@]} -gt 0 ] || exit "Unable to find a template when searching for '$TEMPLATE_SEARCH'." TEMPLATE="${TEMPLATES[-1]}" +# Download LXC template if needed if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then msg_info "Downloading LXC Template" pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || @@ -126,12 +150,14 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then msg_ok "Downloaded LXC Template" fi +# Combine all options DEFAULT_PCT_OPTIONS=( -arch $(dpkg --print-architecture)) PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) [[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) +# Create container msg_info "Creating LXC Container" pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || exit "A problem occured while trying to create container." From eda9208477f7b8d3a0894d83b0999d3e88b0bb8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 19:26:16 -0400 Subject: [PATCH 1546/3335] Update CODE-AUDIT.md --- CODE-AUDIT.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index a3f07aa1..3515e28a 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -1,9 +1,9 @@ -In the case of the < app > LXC, the process involves running multiple scripts for each application or service.
-Initially, the `.sh` script is executed to collect system parameters.
-Next, the `build.func` script adds user settings and integrates all the collected information.
-Then, the `create_lxc.sh` script constructs the LXC container.
-Following that, the `-install.sh` script is executed, which utilizes the functions exported from the `install.func` script for installing the required applications.
-Finally, the process returns to the `.sh` script to display the completion message.
+In the case of the AdGuard Home LXC, the process involves running multiple scripts for each application or service.
+Initially, the [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) script is executed to collect system parameters.
+Next, the [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func) script adds user settings and integrates all the collected information.
+Then, the [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh) script constructs the LXC container.
+Following that, the [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh) script is executed, which utilizes the functions exported from the [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func) script for installing the required applications.
+Finally, the process returns to the [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) script to display the completion message.
-Thoroughly evaluating the `-install.sh` script is crucial to gain a better understanding of the application installation process.
-Every application installation utilizes the same set of reusable scripts: `build.func`, `create_lxc.sh`, and `install.func`. These scripts are not specific to any particular application.
+Thoroughly evaluating the [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh) script is crucial to gain a better understanding of the application installation process.
+Every application installation utilizes the same set of reusable scripts: [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func), [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh), and [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func). These scripts are not specific to any particular application.
From 92babeac2322b24f6ad590a28573adc24f8cb6cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 00:27:25 -0400 Subject: [PATCH 1547/3335] Update update-lxcs.sh add information about the boot disk, which provides an easy way to determine if you need to expand the disk. --- misc/update-lxcs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 3590bb84..8a89ee73 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -39,7 +39,9 @@ function update_container() { container=$1 header_info name=$(pct exec "$container" hostname) - echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} \n" + disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') + read -ra disk_info_array <<< "$disk_info" + echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]${CL}\n" os=$(pct config "$container" | awk '/^ostype/ {print $2}') case "$os" in alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; From c9006a67d60f30e8d83b84cb0f4994e8d013d2cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 00:32:39 -0400 Subject: [PATCH 1548/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90582703..59fe70b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-16 + +### Changed + +- **Proxmox VE LXC Updater** + - Add information about the boot disk, which provides an easy way to determine if you need to expand the disk. + ## 2023-05-13 ### Changed From 51ee45e88f93a85f3d8dc3c7fd8a52f88c63445c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 03:10:49 -0400 Subject: [PATCH 1549/3335] Update kernel-clean.sh add warning for opt-in kernels --- misc/kernel-clean.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 053215af..30660b67 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -8,11 +8,11 @@ function header_info { cat <<"EOF" __ __ __ ________ - / //_/__ _________ ___ / / / ____/ /__ ____ _____ + / //_/__ _________ ___ / / / ____/ /__ ____ _____ / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / -/_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ - +/_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ + EOF } set -euo pipefail @@ -69,9 +69,9 @@ function other_kernel() { echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" exit 1 fi - if [[ "$current_kernel" == *"6.1"* ]]; then + if [[ "$current_kernel" == *"6.1"* || "$current_kernel" == *"6.2"* ]]; then echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" - echo -e "\nAs 5.15 is the current default kernel in PVE 7.3 the package management directly depends on it, it's not possible to use this script while running 6.1 kernels. (the script tries to remove ALL old kernels) \n" + echo -e "\nThe script cannot be used when running opt-in kernels. \nProxmox VE's package management relies directly on the current default kernel, which is 5.15. \nTherefore, it is not possible to utilize this script. In this case, you should use autoremove instead. \n`apt-get autoremove`\n" exit 1 fi } From ce1e4b7d29fd4f5fe8691424e5494ed8e68143af Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 11:20:28 -0400 Subject: [PATCH 1550/3335] Update microcode.sh new microcode --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 4fc7c8d9..6f45e82c 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -56,7 +56,7 @@ intel() { msg_ok "Installed iucode-tool" msg_info "Downloading the latest Intel Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230214.1_amd64.deb + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230512.1_amd64.deb msg_ok "Downloaded the latest Intel Processor Microcode Package" msg_info "Installing the Intel Processor Microcode (Patience)" From bfa0728054017b8dfd388e4675906fe995ff5469 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 11:24:40 -0400 Subject: [PATCH 1551/3335] Update microcode.sh --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 6f45e82c..24315f3b 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -60,7 +60,7 @@ intel() { msg_ok "Downloaded the latest Intel Processor Microcode Package" msg_info "Installing the Intel Processor Microcode (Patience)" - dpkg -i intel-microcode_3.20230214.1_amd64.deb &>/dev/null + dpkg -i intel-microcode_3.20230512.1_amd64.deb &>/dev/null msg_ok "Installed the Intel Processor Microcode" msg_info "Cleaning up" From d7b762398a381250b48c34fc4d6947819bc6d84f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 11:48:36 -0400 Subject: [PATCH 1552/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59fe70b5..0ade68a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. - **Proxmox VE LXC Updater** - Add information about the boot disk, which provides an easy way to determine if you need to expand the disk. +- **Proxmox VE Processor Microcode** + - [Intel microcode-20230512 Release](https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/tag/microcode-20230512) ## 2023-05-13 From c62e3f7ed40ea985423901f1800d69a208285a3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 May 2023 11:50:55 -0400 Subject: [PATCH 1553/3335] Update microcode.sh --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 24315f3b..5d799b81 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -64,7 +64,7 @@ intel() { msg_ok "Installed the Intel Processor Microcode" msg_info "Cleaning up" - rm intel-microcode_3.20230214.1_amd64.deb + rm intel-microcode_3.20230512.1_amd64.deb msg_ok "Cleaned" echo -e "\n To apply the changes, the system will need to be rebooted.\n" From f480487b12f643dfcd3dac51aa2c3f87f9b45434 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 May 2023 09:15:06 -0400 Subject: [PATCH 1554/3335] Update CODE-AUDIT.md --- CODE-AUDIT.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index 3515e28a..f1c40e9b 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -1,3 +1,5 @@ +

Exploring the Scripts and Steps Involved in an Application LXC Installation

+ In the case of the AdGuard Home LXC, the process involves running multiple scripts for each application or service.
Initially, the [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) script is executed to collect system parameters.
Next, the [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func) script adds user settings and integrates all the collected information.
From 9ca7ef55ddfa076b9ff57515b8624dd299cc86ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 May 2023 15:01:30 -0400 Subject: [PATCH 1555/3335] Remove Alpine applications that are not installed through the Alpine package manager. --- ct/alpine-adguard.sh | 90 ------------------------------- ct/alpine-whoogle.sh | 88 ------------------------------ install/alpine-adguard-install.sh | 36 ------------- install/alpine-whoogle-install.sh | 52 ------------------ 4 files changed, 266 deletions(-) delete mode 100644 ct/alpine-adguard.sh delete mode 100644 ct/alpine-whoogle.sh delete mode 100644 install/alpine-adguard-install.sh delete mode 100644 install/alpine-whoogle-install.sh diff --git a/ct/alpine-adguard.sh b/ct/alpine-adguard.sh deleted file mode 100644 index 929708a5..00000000 --- a/ct/alpine-adguard.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { - clear - cat <<"EOF" - ___ __ __ - / | ____/ /___ ___ ______ __________/ / - / /| |/ __ / __ / / / / __ / ___/ __ / - / ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / -/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/ - /____/ Alpine - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-AdGuard" -var_disk="0.3" -var_cpu="1" -var_ram="256" -var_os="alpine" -var_version="3.17" -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="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - echo_default -} - -function update_script() { - if ! apk -e info newt >/dev/null 2>&1; then - apk add -q newt - fi - while true; do - CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ - "1" "Update LXC OS" \ - "2" "Manually Update AdGuardHome" 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - clear - exit-script - fi - header_info - case $CHOICE in - 1) - apk update && apk upgrade - exit - ;; - 2) - header_info - echo "In the process of creating a method to update" - exit - ;; - esac - done -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/alpine-whoogle.sh b/ct/alpine-whoogle.sh deleted file mode 100644 index 02dec1f1..00000000 --- a/ct/alpine-whoogle.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { - clear - cat <<"EOF" - _ ____ __ -| | / / /_ ____ ____ ____ _/ /__ -| | /| / / __ \/ __ \/ __ \/ __ `/ / _ \ -| |/ |/ / / / / /_/ / /_/ / /_/ / / __/ -|__/|__/_/ /_/\____/\____/\__, /_/\___/ - Alpine /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="Alpine-Whoogle" -var_disk="0.3" -var_cpu="1" -var_ram="256" -var_os="alpine" -var_version="3.17" -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="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - echo_default -} - -function update_script() { - if [[ ! -f /usr/bin/whoogle-search ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - while true; do - CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ - "1" "Check for Whoogle Updates" 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - clear - exit-script - fi - header_info - case $CHOICE in - 1) - msg_info "Updating Whoogle" - pip3 install whoogle-search --upgrade &>/dev/null - rc-service -q whoogle restart - msg_ok "Updated Successfully!" - exit - ;; - esac - done -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh deleted file mode 100644 index b43c55ce..00000000 --- a/install/alpine-adguard-install.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/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" -$STD apk add newt -$STD apk add curl -$STD apk add nano -$STD apk add mc -$STD apk add openssh -msg_ok "Installed Dependencies" - -msg_info "Installing Alpine-AdGuard" -VER=$(curl --silent -qI https://github.com/AdguardTeam/AdGuardHome/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); -$STD wget -q "https://github.com/AdguardTeam/AdGuardHome/releases/download/$VER/AdGuardHome_linux_amd64.tar.gz" -$STD tar -xvf AdGuardHome_linux_amd64.tar.gz >/dev/null 2>&1 -$STD mv AdGuardHome /opt -$STD rm AdGuardHome_linux_amd64.tar.gz -$STD chmod +x /opt/AdGuardHome/AdGuardHome -$STD /opt/AdGuardHome/AdGuardHome -s install -$STD /opt/AdGuardHome/AdGuardHome -s start -msg_ok "Installed Alpine-AdGuard" - -motd_ssh -customize diff --git a/install/alpine-whoogle-install.sh b/install/alpine-whoogle-install.sh deleted file mode 100644 index d6cfcc69..00000000 --- a/install/alpine-whoogle-install.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/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" -$STD apk add newt -$STD apk add curl -$STD apk add openssh -$STD apk add nano -$STD apk add mc -msg_ok "Installed Dependencies" - -msg_info "Installing pip3 Package Manager" -$STD apk add py3-pip -msg_ok "Installed pip3 Package Manager" - -msg_info "Installing Alpine-Whoogle" -$STD pip3 install brotli -$STD pip3 install whoogle-search - -echo "#!/sbin/openrc-run -description=\"Whoogle-Search\" -pidfile=\"/run/whoogle.pid\" - -start() { - /usr/bin/whoogle-search --host 0.0.0.0 & - echo \$! > \$pidfile -} - -stop() { - kill \$(cat \$pidfile) - rm \$pidfile -}" >/etc/init.d/whoogle - -chmod 755 /etc/init.d/whoogle -rc-service -q whoogle start -rc-update add -q whoogle default -msg_ok "Installed Alpine-Whoogle" - -motd_ssh -customize From ad65c825b890c010c12ff480edff8bdcbd4858e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 May 2023 15:30:20 -0400 Subject: [PATCH 1556/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ade68a1..7699e2c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ # Change Log All notable changes to this project will be documented in this file. +## 2023-05-17 + +### Changed + +- **Alpine-AdGuard Home LXC** + - Removed, it wasn't installed through the Alpine package manager. +- **Alpine-Whoogle LXC** + - Removed, it wasn't installed through the Alpine package manager. + ## 2023-05-16 ### Changed From c71f204e263f9ba80017b8377d638dc5571b5b5f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 May 2023 17:52:16 -0400 Subject: [PATCH 1557/3335] Update update-lxcs.sh add no disk info message --- misc/update-lxcs.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 8a89ee73..8fc2a38f 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -10,10 +10,10 @@ clear cat <<"EOF" __ __ __ __ __ _ ________ / / / /___ ____/ /___ _/ /____ / / | |/ / ____/ - / / / / __ \/ __ / __ `/ __/ _ \ / / | / / -/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___ -\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/ - /_/ + / / / / __ \/ __ / __ `/ __/ _ \ / / | / / +/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___ +\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/ + /_/ EOF } @@ -39,10 +39,14 @@ function update_container() { container=$1 header_info name=$(pct exec "$container" hostname) - disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') - read -ra disk_info_array <<< "$disk_info" - echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]${CL}\n" os=$(pct config "$container" | awk '/^ostype/ {print $2}') + if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then + disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') + read -ra disk_info_array <<< "$disk_info" + echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]${CL}\n" + else + echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} ${YW}[No disk info for ${os}]${CL}\n" + fi case "$os" in alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; From bb0f9e7a0a6eb6c4fbe5905d7e3005d90df5680a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 May 2023 17:56:11 -0400 Subject: [PATCH 1558/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 8fc2a38f..4c293179 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -45,7 +45,7 @@ function update_container() { read -ra disk_info_array <<< "$disk_info" echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]${CL}\n" else - echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} ${YW}[No disk info for ${os}]${CL}\n" + echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}[No disk info for ${os}]${CL}\n" fi case "$os" in alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; From f80821cf7bb2aef072677c9596c0f175355b4795 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 May 2023 06:33:09 -0400 Subject: [PATCH 1559/3335] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7699e2c9..5dd961db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log -All notable changes to this project will be documented in this file. +**All notable changes to this project will be documented in this file.**
+ +- 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-05-17 From db8d22f721ceed662517c4a2766c9ae09988bc19 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 May 2023 17:06:08 -0400 Subject: [PATCH 1560/3335] Update haos-vm.sh code refactoring --- vm/haos-vm.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 46c4bc08..8709ebc6 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -10,9 +10,9 @@ function header_info { cat <<"EOF" __ __ ___ _ __ __ ____ _____ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ - / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ EOF } @@ -168,17 +168,14 @@ function advanced_settings() { if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then VMID="$NEXTID" - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break - else - if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then - echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" - sleep 2 - continue - fi - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break else exit-script fi From e861c41e163b791750d9dd3750de21624cb1f773 Mon Sep 17 00:00:00 2001 From: diemade Date: Sun, 21 May 2023 14:17:52 +0200 Subject: [PATCH 1561/3335] Update README.md (#1433) 1 grammar fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 062073eb..b096cadb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Contributing to Proxmox VE Helper Scripts

-These script's allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine. +These scripts allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox VE Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From fcce5d0570420728f677ff38729f9d55ac775132 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 May 2023 08:18:42 -0400 Subject: [PATCH 1562/3335] Update README.md more grammar fixes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b096cadb..49968ca7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Contributing to Proxmox VE Helper Scripts

-These scripts allows for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command and the script collects and validates the user's input to generate the final configuration of the container or virtual machine. +These scripts allow for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command, and the script collects and validates the user's input to generate the final configuration of the container or virtual machine.

Proxmox VE Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From 6a108a06cea25ac5d9960ff0f88c7f74ab7e82fb Mon Sep 17 00:00:00 2001 From: "Jon \"The Nice Guy\" Spriggs" Date: Mon, 22 May 2023 11:54:10 +0100 Subject: [PATCH 1563/3335] Add script to create an OpenWRT virtual machine (#1434) --- vm/openwrt-vm.sh | 425 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 425 insertions(+) create mode 100644 vm/openwrt-vm.sh diff --git a/vm/openwrt-vm.sh b/vm/openwrt-vm.sh new file mode 100644 index 00000000..4cf592e7 --- /dev/null +++ b/vm/openwrt-vm.sh @@ -0,0 +1,425 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# Jon Spriggs (jontheniceguy) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Based on work from https://i12bretro.github.io/tutorials/0405.html + +function header_info { + cat <<"EOF" + _______ ________ __ + | |.-----.-----.-----.| | | |.----.| |_ + | - || _ | -__| || | | || _|| _| + |_______|| __|_____|__|__||________||__| |____| + |__| W I R E L E S S F R E E D O M + ----------------------------------------------------- + +EOF +} +clear +header_info +echo -e "Loading..." +GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +GEN_MAC_LAN=$(echo '00 60 2e'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +NEXTID=$(pvesh get /cluster/nextid) +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -o errexit +set -o errtrace +set -o nounset +set -o pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +trap cleanup EXIT +function error_exit() { + trap - ERR + local reason="Unknown failure occurred." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 + [ ! -z ${VMID-} ] && cleanup_vmid + exit $EXIT +} +function cleanup_vmid() { + if $(qm status $VMID &>/dev/null); then + if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then + qm stop $VMID + fi + qm destroy $VMID + fi +} +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} +function send_line_to_vm() { + echo -e "${DGN}Sending line: ${YW}$1${CL}" + for ((i=0; i<${#1}; i++)); do + character=${1:i:1} + case $character in + " ") character="spc";; + "-") character="minus";; + "=") character="equal";; + ",") character="comma";; + ".") character="dot";; + "/") character="slash";; + "'") character="apostrophe";; + ";") character="semicolon";; + '\') character="backslash";; + '`') character="grave_accent";; + "[") character="bracket_left";; + "]") character="bracket_right";; + "_") character="shift-minus";; + "+") character="shift-equal";; + "?") character="shift-slash";; + "<") character="shift-comma";; + ">") character="shift-dot";; + '"') character="shift-apostrophe";; + ":") character="shift-semicolon";; + "|") character="shift-backslash";; + "~") character="shift-grave_accent";; + "{") character="shift-bracket_left";; + "}") character="shift-bracket_right";; + "A") character="shift-a";; + "B") character="shift-b";; + "C") character="shift-c";; + "D") character="shift-d";; + "E") character="shift-e";; + "F") character="shift-f";; + "G") character="shift-g";; + "H") character="shift-h";; + "I") character="shift-i";; + "J") character="shift-j";; + "K") character="shift-k";; + "L") character="shift-l";; + "M") character="shift-m";; + "N") character="shift-n";; + "O") character="shift-o";; + "P") character="shift-p";; + "Q") character="shift-q";; + "R") character="shift-r";; + "S") character="shift-s";; + "T") character="shift-t";; + "U") character="shift-u";; + "V") character="shift-v";; + "W") character="shift-w";; + "X") character="shift=x";; + "Y") character="shift-y";; + "Z") character="shift-z";; + "!") character="shift-1";; + "@") character="shift-2";; + "#") character="shift-3";; + '$') character="shift-4";; + "%") character="shift-5";; + "^") character="shift-6";; + "&") character="shift-7";; + "*") character="shift-8";; + "(") character="shift-9";; + ")") character="shift-0";; + esac + qm sendkey $VMID "$character" + done + qm sendkey $VMID ret +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then + echo "⚠ This version of Proxmox Virtual Environment is not supported" + echo "Requires PVE Version: 7.XX" + echo "Exiting..." + sleep 3 + exit +fi +if (whiptail --title "OpenWRT VM" --yesno "This will create a New OpenWRT VM. Proceed?" 10 58); then + echo "User selected Yes" +else + clear + echo -e "⚠ User exited script \n" + exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} +function default_settings() { + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" + VMID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}openwrt${CL}" + HN=openwrt + echo -e "${DGN}Allocated Cores: ${BGN}1${CL}" + CORE_COUNT="1" + echo -e "${DGN}Allocated RAM: ${BGN}256${CL}" + RAM_SIZE="256" + echo -e "${DGN}Using WAN Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using WAN VLAN: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Using WAN MAC Address: ${BGN}$GEN_MAC${CL}" + MAC=$GEN_MAC + echo -e "${DGN}Using LAN MAC Address: ${BGN}$GEN_MAC_LAN${CL}" + LAN_MAC=$GEN_MAC_LAN + echo -e "${DGN}Using LAN Bridge: ${BGN}vmbr0${CL}" + LAN_BRG="vmbr0" + echo -e "${DGN}Using LAN VLAN: ${BGN}999${CL}" + LAN_VLAN=",tag=999" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + echo -e "${BL}Creating a OpenWRT VM using the above default settings${CL}" +} +function advanced_settings() { + VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" + else + exit + fi + VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit + fi + CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + exit + fi + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + exit + fi + BRG=$(whiptail --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + exit + fi + LAN_BRG=$(whiptail --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + echo -e "${DGN}Using Bridge: ${BGN}$LAN_BRG${CL}" + else + exit + fi + MAC1=$(whiptail --inputbox "Set a WAN MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + MAC="$MAC1" + echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC1${CL}" + else + exit + fi + MAC2=$(whiptail --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + LAN_MAC="$MAC2" + echo -e "${DGN}Using LAN MAC Address: ${BGN}$MAC2${CL}" + else + exit + fi + VLAN1=$(whiptail --inputbox "Set a WAN VLAN tag(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN1 ]; then + VLAN1="Default" VLAN="" + echo -e "${DGN}Using WAN VLAN tag: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using WAN VLAN tag: ${BGN}$VLAN1${CL}" + fi + fi + VLAN2=$(whiptail --inputbox "Set a LAN VLAN tag(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $VLAN2 ]; then + VLAN2="Default" LAN_VLAN="" + echo -e "${DGN}Using LAN VLAN tag: ${BGN}$VLAN2${CL}" + else + LAN_VLAN=",tag=$VLAN2" + echo -e "${DGN}Using LAN VLAN tag: ${BGN}$VLAN2${CL}" + fi + fi + MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $MTU1 ]; then + MTU1="Default" MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + fi + if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start OpenWRT VM when completed?" 10 58); then + echo -e "${DGN}Start OpenWRT VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start OpenWRT VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWRT VM?" 10 58); then + echo -e "${RD}Creating OpenWRT VM using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +function start_script() { + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + clear + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} +start_script +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}" + echo -e "Exiting..." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the OpenWRT VM?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Getting URL for OpenWRT Disk Image" + +regex='Current Stable Release - OpenWrt ([^/]*)<\/strong>' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}" +URL=https://downloads.openwrt.org/releases/$stableVersion/targets/x86/64/openwrt-$stableVersion-x86-64-generic-ext4-combined.img.gz + +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}$FILE${CL}" +gunzip -f $FILE >/dev/null 2>/dev/null || true +NEWFILE="${FILE%.*}" +FILE="$NEWFILE" +mv $FILE ${FILE%.*} +qemu-img resize -f raw ${FILE%.*} 512M >/dev/null 2>/dev/null +msg_ok "Resized ${CL}${BL}$FILE${CL}" +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_FORMAT="subvol" + DISK_IMPORT="-format raw" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done +msg_ok "Extracted OpenWRT Disk Image" +msg_info "Creating OpenWRT VM" +qm create $VMID -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \ + -onboot 1 -ostype l26 -scsihw virtio-scsi-pci --tablet 0 +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -scsi0 ${DISK1_REF},size=512M \ + -boot order=scsi0 \ + -description "# OpenWRT VM +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null +msg_ok "OpenWRT VM ${CL}${BL}(${HN})" +qm start $VMID +sleep 15 +send_line_to_vm "" +send_line_to_vm "uci delete network.@device[0]" +send_line_to_vm "uci set network.wan=interface" +send_line_to_vm "uci set network.wan.device=eth0" +send_line_to_vm "uci set network.wan.proto=dhcp" +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=eth1" +send_line_to_vm "uci set network.lan.proto=static" +send_line_to_vm "uci set network.lan.ipaddr=192.0.2.1" +send_line_to_vm "uci set network.lan.netmask=255.255.255.0" +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" +send_line_to_vm "halt" +msg_ok "Pre-configured network interfaces" +until qm status $VMID | grep -q "stopped" +do + sleep 2 +done +qm set $VMID \ + -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ + -net1 virtio,bridge=${LAN_BRG},macaddr=${LAN_MAC}${LAN_VLAN}$MTU >/dev/null 2>/dev/null +msg_ok "Added bridge interface" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting OpenWRT VM" + qm start $VMID + msg_ok "Started OpenWRT VM" +fi +VLAN_FINISH="" +if [ "$VLAN" == "" ] && [ "$LAN_VLAN" != "999" ]; then + VLAN_FINISH=" Please remember to adjust the VLAN tags to suit your network." +fi +msg_ok "Completed Successfully!\n${VLAN_FINISH:-}" From 7e5206239ae219a8f751142bd0dbf7fb2eb1f449 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 May 2023 07:25:27 -0400 Subject: [PATCH 1564/3335] Update openwrt-vm.sh tweak --- vm/openwrt-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/openwrt-vm.sh b/vm/openwrt-vm.sh index 4cf592e7..dc855fb9 100644 --- a/vm/openwrt-vm.sh +++ b/vm/openwrt-vm.sh @@ -209,7 +209,7 @@ function advanced_settings() { else exit fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) + RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" From c5ee4993c8aab480c6e7126db1cddfe52b614ab6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 May 2023 07:36:05 -0400 Subject: [PATCH 1565/3335] Update openwrt-vm.sh tweak --- vm/openwrt-vm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vm/openwrt-vm.sh b/vm/openwrt-vm.sh index dc855fb9..2ad04848 100644 --- a/vm/openwrt-vm.sh +++ b/vm/openwrt-vm.sh @@ -387,6 +387,7 @@ qm set $VMID \ ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null msg_ok "OpenWRT VM ${CL}${BL}(${HN})" +msg_info "Pre-configuring network interfaces" qm start $VMID sleep 15 send_line_to_vm "" @@ -409,6 +410,7 @@ until qm status $VMID | grep -q "stopped" do sleep 2 done +msg_info "Adding bridge interface" qm set $VMID \ -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ -net1 virtio,bridge=${LAN_BRG},macaddr=${LAN_MAC}${LAN_VLAN}$MTU >/dev/null 2>/dev/null From 6a7cd6b956b1220110c8a709437646e52cc0e2d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 May 2023 07:40:19 -0400 Subject: [PATCH 1566/3335] Update openwrt-vm.sh shfmt --- vm/openwrt-vm.sh | 123 +++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/vm/openwrt-vm.sh b/vm/openwrt-vm.sh index 2ad04848..9e91441d 100644 --- a/vm/openwrt-vm.sh +++ b/vm/openwrt-vm.sh @@ -66,68 +66,68 @@ function cleanup() { } function send_line_to_vm() { echo -e "${DGN}Sending line: ${YW}$1${CL}" - for ((i=0; i<${#1}; i++)); do + for ((i = 0; i < ${#1}; i++)); do character=${1:i:1} case $character in - " ") character="spc";; - "-") character="minus";; - "=") character="equal";; - ",") character="comma";; - ".") character="dot";; - "/") character="slash";; - "'") character="apostrophe";; - ";") character="semicolon";; - '\') character="backslash";; - '`') character="grave_accent";; - "[") character="bracket_left";; - "]") character="bracket_right";; - "_") character="shift-minus";; - "+") character="shift-equal";; - "?") character="shift-slash";; - "<") character="shift-comma";; - ">") character="shift-dot";; - '"') character="shift-apostrophe";; - ":") character="shift-semicolon";; - "|") character="shift-backslash";; - "~") character="shift-grave_accent";; - "{") character="shift-bracket_left";; - "}") character="shift-bracket_right";; - "A") character="shift-a";; - "B") character="shift-b";; - "C") character="shift-c";; - "D") character="shift-d";; - "E") character="shift-e";; - "F") character="shift-f";; - "G") character="shift-g";; - "H") character="shift-h";; - "I") character="shift-i";; - "J") character="shift-j";; - "K") character="shift-k";; - "L") character="shift-l";; - "M") character="shift-m";; - "N") character="shift-n";; - "O") character="shift-o";; - "P") character="shift-p";; - "Q") character="shift-q";; - "R") character="shift-r";; - "S") character="shift-s";; - "T") character="shift-t";; - "U") character="shift-u";; - "V") character="shift-v";; - "W") character="shift-w";; - "X") character="shift=x";; - "Y") character="shift-y";; - "Z") character="shift-z";; - "!") character="shift-1";; - "@") character="shift-2";; - "#") character="shift-3";; - '$') character="shift-4";; - "%") character="shift-5";; - "^") character="shift-6";; - "&") character="shift-7";; - "*") character="shift-8";; - "(") character="shift-9";; - ")") character="shift-0";; + " ") character="spc" ;; + "-") character="minus" ;; + "=") character="equal" ;; + ",") character="comma" ;; + ".") character="dot" ;; + "/") character="slash" ;; + "'") character="apostrophe" ;; + ";") character="semicolon" ;; + '\') character="backslash" ;; + '`') character="grave_accent" ;; + "[") character="bracket_left" ;; + "]") character="bracket_right" ;; + "_") character="shift-minus" ;; + "+") character="shift-equal" ;; + "?") character="shift-slash" ;; + "<") character="shift-comma" ;; + ">") character="shift-dot" ;; + '"') character="shift-apostrophe" ;; + ":") character="shift-semicolon" ;; + "|") character="shift-backslash" ;; + "~") character="shift-grave_accent" ;; + "{") character="shift-bracket_left" ;; + "}") character="shift-bracket_right" ;; + "A") character="shift-a" ;; + "B") character="shift-b" ;; + "C") character="shift-c" ;; + "D") character="shift-d" ;; + "E") character="shift-e" ;; + "F") character="shift-f" ;; + "G") character="shift-g" ;; + "H") character="shift-h" ;; + "I") character="shift-i" ;; + "J") character="shift-j" ;; + "K") character="shift-k" ;; + "L") character="shift-l" ;; + "M") character="shift-m" ;; + "N") character="shift-n" ;; + "O") character="shift-o" ;; + "P") character="shift-p" ;; + "Q") character="shift-q" ;; + "R") character="shift-r" ;; + "S") character="shift-s" ;; + "T") character="shift-t" ;; + "U") character="shift-u" ;; + "V") character="shift-v" ;; + "W") character="shift-w" ;; + "X") character="shift=x" ;; + "Y") character="shift-y" ;; + "Z") character="shift-z" ;; + "!") character="shift-1" ;; + "@") character="shift-2" ;; + "#") character="shift-3" ;; + '$') character="shift-4" ;; + "%") character="shift-5" ;; + "^") character="shift-6" ;; + "&") character="shift-7" ;; + "*") character="shift-8" ;; + "(") character="shift-9" ;; + ")") character="shift-0" ;; esac qm sendkey $VMID "$character" done @@ -406,8 +406,7 @@ send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'" send_line_to_vm "uci commit" send_line_to_vm "halt" msg_ok "Pre-configured network interfaces" -until qm status $VMID | grep -q "stopped" -do +until qm status $VMID | grep -q "stopped"; do sleep 2 done msg_info "Adding bridge interface" From d37bbe628db7892857a9b5b749fa4f3654971ecf Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 May 2023 04:13:26 -0400 Subject: [PATCH 1567/3335] Update README.md tweak --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49968ca7..0098eea6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Contributing to Proxmox VE Helper Scripts

-These scripts allow for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. The options are presented in a dialog box format using the whiptail command, and the script collects and validates the user's input to generate the final configuration of the container or virtual machine. +These scripts allow for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. Using the whiptail command, the options are displayed in a dialog box format. The script then gathers and verifies the user's input in order to generate the final configuration of the container or virtual machine.

Proxmox VE Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From 86286fdb5fcbdc690e2fef58cdd129b9e5fc7a82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 May 2023 07:36:27 -0400 Subject: [PATCH 1568/3335] Update openwrt-vm.sh code refactoring --- vm/openwrt-vm.sh | 367 +++++++++++++++++++++++++++++------------------ 1 file changed, 226 insertions(+), 141 deletions(-) diff --git a/vm/openwrt-vm.sh b/vm/openwrt-vm.sh index 9e91441d..c9cf3c3e 100644 --- a/vm/openwrt-vm.sh +++ b/vm/openwrt-vm.sh @@ -8,21 +8,21 @@ # Based on work from https://i12bretro.github.io/tutorials/0405.html function header_info { + clear cat <<"EOF" - _______ ________ __ - | |.-----.-----.-----.| | | |.----.| |_ - | - || _ | -__| || | | || _|| _| - |_______|| __|_____|__|__||________||__| |____| - |__| W I R E L E S S F R E E D O M - ----------------------------------------------------- + ____ _ __ __ + / __ \____ ___ ____| | / /____/ /_ + / / / / __ \/ _ \/ __ \ | /| / / ___/ __/ +/ /_/ / /_/ / __/ / / / |/ |/ / / / /_ +\____/ .___/\___/_/ /_/|__/|__/_/ \__/ + /_/ W I R E L E S S F R E E D O M EOF } -clear header_info echo -e "Loading..." -GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') -GEN_MAC_LAN=$(echo '00 60 2e'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +GEN_MAC_LAN=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -35,35 +35,33 @@ CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR +CROSS="${RD}✗${CL}" +set -Eeuo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT -function error_exit() { - trap - ERR - local reason="Unknown failure occurred." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - [ ! -z ${VMID-} ] && cleanup_vmid - exit $EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid } + function cleanup_vmid() { - if $(qm status $VMID &>/dev/null); then - if [ "$(qm status $VMID | awk '{print $2}')" == "running" ]; then - qm stop $VMID - fi - qm destroy $VMID + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null fi } + function cleanup() { popd >/dev/null rm -rf $TEMP_DIR } + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null function send_line_to_vm() { echo -e "${DGN}Sending line: ${YW}$1${CL}" for ((i = 0; i < ${#1}; i++)); do @@ -136,179 +134,265 @@ function send_line_to_vm() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" - echo "Exiting..." - sleep 3 - exit -fi -if (whiptail --title "OpenWRT VM" --yesno "This will create a New OpenWRT VM. Proceed?" 10 58); then - echo "User selected Yes" + +if (whiptail --title "OpenWrt VM" --yesno "This will create a New OpenWrt VM. Proceed?" 10 58); then + : else - clear - echo -e "⚠ User exited script \n" - exit + header_info && echo -e "⚠ User exited script \n" && exit fi function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." } + function msg_ok() { local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function pve_check() { + if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + function default_settings() { - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}openwrt${CL}" HN=openwrt - echo -e "${DGN}Allocated Cores: ${BGN}1${CL}" CORE_COUNT="1" - echo -e "${DGN}Allocated RAM: ${BGN}256${CL}" RAM_SIZE="256" - echo -e "${DGN}Using WAN Bridge: ${BGN}vmbr0${CL}" BRG="vmbr0" - echo -e "${DGN}Using WAN VLAN: ${BGN}Default${CL}" VLAN="" - echo -e "${DGN}Using WAN MAC Address: ${BGN}$GEN_MAC${CL}" MAC=$GEN_MAC - echo -e "${DGN}Using LAN MAC Address: ${BGN}$GEN_MAC_LAN${CL}" LAN_MAC=$GEN_MAC_LAN - echo -e "${DGN}Using LAN Bridge: ${BGN}vmbr0${CL}" LAN_BRG="vmbr0" - echo -e "${DGN}Using LAN VLAN: ${BGN}999${CL}" LAN_VLAN=",tag=999" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" MTU="" - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using WAN Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using WAN VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using WAN MAC Address: ${BGN}${MAC}${CL}" + 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 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}" } + function advanced_settings() { - VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" + while true; do + if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="openwrt" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi else - exit + exit-script fi - VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - HN=$(echo ${VM_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="1" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi else - exit + exit-script fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="256" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi else - exit + exit-script fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + + if BRG=$(whiptail --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using WAN Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using WAN Bridge: ${BGN}$BRG${CL}" + fi else - exit + exit-script fi - BRG=$(whiptail --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + + if LAN_BRG=$(whiptail --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $LAN_BRG ]; then + LAN_BRG="vmbr0" + echo -e "${DGN}Using LAN Bridge: ${BGN}$LAN_BRG${CL}" + else + echo -e "${DGN}Using LAN Bridge: ${BGN}$LAN_BRG${CL}" + fi else - exit + exit-script fi - LAN_BRG=$(whiptail --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - echo -e "${DGN}Using Bridge: ${BGN}$LAN_BRG${CL}" + + 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" + echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC1${CL}" + fi else - exit + exit-script fi - MAC1=$(whiptail --inputbox "Set a WAN MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - MAC="$MAC1" - echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC1${CL}" + + if MAC2=$(whiptail --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC2 ]; then + LAN_MAC="$GEN_MAC_LAN" + echo -e "${DGN}Using LAN MAC Address: ${BGN}$LAN_MAC${CL}" + else + LAN_MAC="$MAC2" + echo -e "${DGN}Using LAN MAC Address: ${BGN}$MAC2${CL}" + fi else - exit + exit-script fi - MAC2=$(whiptail --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then - LAN_MAC="$MAC2" - echo -e "${DGN}Using LAN MAC Address: ${BGN}$MAC2${CL}" - else - exit - fi - VLAN1=$(whiptail --inputbox "Set a WAN VLAN tag(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then - VLAN1="Default" VLAN="" - echo -e "${DGN}Using WAN VLAN tag: ${BGN}$VLAN1${CL}" + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}" else VLAN=",tag=$VLAN1" - echo -e "${DGN}Using WAN VLAN tag: ${BGN}$VLAN1${CL}" + echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}" fi + else + exit-script fi - VLAN2=$(whiptail --inputbox "Set a LAN VLAN tag(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + + if VLAN2=$(whiptail --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN2 ]; then - VLAN2="Default" LAN_VLAN="" - echo -e "${DGN}Using LAN VLAN tag: ${BGN}$VLAN2${CL}" + VLAN2="999" + LAN_VLAN=",tag=$VLAN2" + echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}" else LAN_VLAN=",tag=$VLAN2" - echo -e "${DGN}Using LAN VLAN tag: ${BGN}$VLAN2${CL}" + echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}" fi + else + exit-script fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) - exitstatus=$? - if [ $exitstatus = 0 ]; then + + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then - MTU1="Default" MTU="" + MTU1="Default" + MTU="" echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" else MTU=",mtu=$MTU1" echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi + else + exit-script fi - if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start OpenWRT VM when completed?" 10 58); then - echo -e "${DGN}Start OpenWRT VM when completed: ${BGN}yes${CL}" + + if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" else - echo -e "${DGN}Start OpenWRT VM when completed: ${BGN}no${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWRT VM?" 10 58); then - echo -e "${RD}Creating OpenWRT VM using the above advanced settings${CL}" + + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a OpenWrt VM using the above advanced settings${CL}" else - clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings fi } + function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then - clear + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings else - clear header_info echo -e "${RD}Using Advanced Settings${CL}" advanced_settings fi } + +arch_check +pve_check +ssh_check start_script + msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -331,14 +415,14 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then else while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the OpenWRT VM?\n\n" \ + "Which storage pool you would like to use for the OpenWrt VM?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for OpenWRT Disk Image" +msg_info "Getting URL for OpenWrt Disk Image" regex='Current Stable Release - OpenWrt ([^/]*)<\/strong>' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}" URL=https://downloads.openwrt.org/releases/$stableVersion/targets/x86/64/openwrt-$stableVersion-x86-64-generic-ext4-combined.img.gz @@ -354,7 +438,7 @@ NEWFILE="${FILE%.*}" FILE="$NEWFILE" mv $FILE ${FILE%.*} qemu-img resize -f raw ${FILE%.*} 512M >/dev/null 2>/dev/null -msg_ok "Resized ${CL}${BL}$FILE${CL}" +msg_ok "Extracted & Resized OpenWrt Disk Image ${CL}${BL}$FILE${CL}" STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in nfs | dir) @@ -365,7 +449,6 @@ nfs | dir) btrfs) DISK_EXT=".raw" DISK_REF="$VMID/" - DISK_FORMAT="subvol" DISK_IMPORT="-format raw" ;; esac @@ -374,22 +457,24 @@ for i in {0,1}; do eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} done -msg_ok "Extracted OpenWRT Disk Image" -msg_info "Creating OpenWRT VM" + +msg_info "Creating OpenWrt VM" qm create $VMID -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci --tablet 0 pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ + -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=512M \ -boot order=scsi0 \ - -description "# OpenWRT VM + -description "# OpenWrt VM ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null -msg_ok "OpenWRT VM ${CL}${BL}(${HN})" -msg_info "Pre-configuring network interfaces" +msg_ok "OpenWrt VM ${CL}${BL}(${HN})" +msg_info "OpenWrt is being started in order to configure the network interfaces." qm start $VMID sleep 15 +msg_ok "Network interfaces are being configured as OpenWrt initiates." send_line_to_vm "" send_line_to_vm "uci delete network.@device[0]" send_line_to_vm "uci set network.wan=interface" @@ -405,22 +490,22 @@ 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" send_line_to_vm "halt" -msg_ok "Pre-configured network interfaces" +msg_ok "Network interfaces have been successfully configured." until qm status $VMID | grep -q "stopped"; do sleep 2 done -msg_info "Adding bridge interface" +msg_info "Bridge interfaces are being added." qm set $VMID \ - -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ - -net1 virtio,bridge=${LAN_BRG},macaddr=${LAN_MAC}${LAN_VLAN}$MTU >/dev/null 2>/dev/null -msg_ok "Added bridge interface" + -net0 virtio,bridge=${BRG},macaddr=${MAC}${VLAN}${MTU} \ + -net1 virtio,bridge=${LAN_BRG},macaddr=${LAN_MAC}${LAN_VLAN}${MTU} >/dev/null 2>/dev/null +msg_ok "Bridge interfaces have been successfully added." if [ "$START_VM" == "yes" ]; then - msg_info "Starting OpenWRT VM" + msg_info "Starting OpenWrt VM" qm start $VMID - msg_ok "Started OpenWRT VM" + msg_ok "Started OpenWrt VM" fi VLAN_FINISH="" -if [ "$VLAN" == "" ] && [ "$LAN_VLAN" != "999" ]; then +if [ "$VLAN" == "" ] && [ "$VLAN2" != "999" ]; then VLAN_FINISH=" Please remember to adjust the VLAN tags to suit your network." fi -msg_ok "Completed Successfully!\n${VLAN_FINISH:-}" +msg_ok "Completed Successfully!\n${VLAN_FINISH}" From 299fc5c82705739ccdb32d9bab05b5e327189596 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 May 2023 07:45:13 -0400 Subject: [PATCH 1569/3335] Rename openwrt-vm.sh to openwrt.sh --- vm/{openwrt-vm.sh => openwrt.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename vm/{openwrt-vm.sh => openwrt.sh} (100%) diff --git a/vm/openwrt-vm.sh b/vm/openwrt.sh similarity index 100% rename from vm/openwrt-vm.sh rename to vm/openwrt.sh From 1c3e107f4aa9e9460ea52de7bc00aa856de42564 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 May 2023 08:03:11 -0400 Subject: [PATCH 1570/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dd961db..11ed4695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-05-23 + +### Changed + +- **OpenWrt VM** + - NEW Script + ## 2023-05-17 ### Changed From 8d0a731090b034b98a1d5f0d0da983a1136ba011 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 May 2023 05:29:58 -0400 Subject: [PATCH 1571/3335] Update go2rtc.sh create app update --- ct/go2rtc.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index ba243dc3..982a03b3 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -53,11 +53,13 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +if [[ ! -d /opt/go2rtc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +cd /opt/go2rtc +rm go2rtc_linux_amd64 +wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 +chmod +x go2rtc_linux_amd64 +msg_ok "Updated $APP" exit } From 7a3530b24656d73dcb407c21d163524022ea5670 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 May 2023 05:50:57 -0400 Subject: [PATCH 1572/3335] Update go2rtc.sh tweak --- ct/go2rtc.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 982a03b3..89c7405b 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -55,10 +55,12 @@ function update_script() { header_info if [[ ! -d /opt/go2rtc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" +systemctl stop go2rtc cd /opt/go2rtc rm go2rtc_linux_amd64 wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 chmod +x go2rtc_linux_amd64 +systemctl start go2rtc msg_ok "Updated $APP" exit } From 767899c4f2262f5ede309b3b909dc775d7358799 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 May 2023 22:11:16 -0400 Subject: [PATCH 1573/3335] Update tautulli-install.sh add pyopenssl --- install/tautulli-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index 80ee51f7..502e4536 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -25,6 +25,7 @@ msg_info "Installing Tautulli" cd /opt $STD git clone https://github.com/Tautulli/Tautulli.git python3 -m pip install -q -r /opt/Tautulli/requirements.txt +$STD pip install pyopenssl msg_ok "Installed Tautulli" msg_info "Creating Service" From d5c38b978a922994cc40b3e069e231880e6fbe8c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 May 2023 07:22:03 -0400 Subject: [PATCH 1574/3335] Update install.func tweak --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index cb835a1d..ca112b9e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -41,7 +41,7 @@ error_handler() { local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message" - if [[ "$line_number" -eq 22 ]]; then + if [[ "$line_number" -eq 24 ]]; then echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" fi } From 3b6f82feacaff796251b4aec38f9c61c77976629 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 May 2023 07:23:30 -0400 Subject: [PATCH 1575/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 1157d709..3e4a30b9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -7,7 +7,7 @@ body: **IMPORTANT:** Before submitting: - Please search through the closed issues to see if the issue you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. - Switching Linux distributions without verifying that the default settings function properly, may lead to immediate closure. - - Failing to run the script in verbose mode to determine the actual issue, while encountering the error message `[ERROR] in line 22: exit code *: while executing command "$@" > /dev/null 2>&1`, may lead to immediate closure. + - Failing to run the script in verbose mode to determine the actual issue, while encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, may lead to immediate closure. - If you have requests for features or scripts, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug From 72c805b0814964068397b5b384fccd6d7cb9b74b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 May 2023 01:27:33 -0400 Subject: [PATCH 1576/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 3e4a30b9..d39cb67c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -4,11 +4,11 @@ body: - type: markdown attributes: value: | - **IMPORTANT:** Before submitting: - - Please search through the closed issues to see if the issue you are reporting has already been reported and resolved. If you find a closed issue that addresses your problem, please leave a comment on that issue instead of opening a new one. - - Switching Linux distributions without verifying that the default settings function properly, may lead to immediate closure. - - Failing to run the script in verbose mode to determine the actual issue, while encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, may lead to immediate closure. - - If you have requests for features or scripts, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) + **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. + - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. + - Changing Linux distributions without confirming the proper functioning of default settings. + - When encountering the error message `[ERROR] on line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. + - For questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug attributes: From b973d42760fdff000a4d969f76d1d6a956479ad3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 May 2023 01:31:06 -0400 Subject: [PATCH 1577/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index d39cb67c..af213103 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -7,7 +7,7 @@ body: **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - Changing Linux distributions without confirming the proper functioning of default settings. - - When encountering the error message `[ERROR] on line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. + - When encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - For questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug From e43ec5423ec11f40d824eea9dbf81c99ca0757a0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 May 2023 09:39:16 -0400 Subject: [PATCH 1578/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index fadae182..6db16420 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -15,3 +15,5 @@ [Home Assistant: Installing Grafana (LXC) with Let’s Encrypt SSL](https://www.derekseaman.com/2023/04/home-assistant-installing-grafana-lxc.html) [Proxmox: Plex LXC with Alder Lake Transcoding](https://www.derekseaman.com/2023/04/proxmox-plex-lxc-with-alder-lake-transcoding.html) + +[How To Backup Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-backup-home-assistant-in-proxmox/) From fed3fd387a5566d0b59d101cf189eb709fb15fe7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 May 2023 21:59:30 -0400 Subject: [PATCH 1579/3335] Update post-pve-install.sh If an Intel N-series processor is detected, the script provides options to install both the Proxmox 6.2 kernel and the Intel microcode. --- misc/post-pve-install.sh | 151 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 79 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index e8fae97f..a2e162f5 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -10,10 +10,10 @@ header_info() { cat <<"EOF" ____ _ _____________ ____ __ ____ __ ____ / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / - / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / - / ____/| |/ / /___ / / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / -/_/ |___/_____/ /_/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ - + / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / + / ____/| |/ / /___ / / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/ /_/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + EOF } @@ -30,13 +30,13 @@ set -euo pipefail shopt -s inherit_errexit nullglob msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } msg_error() { @@ -44,23 +44,12 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -exit_script() { - clear - echo -e "⚠ User exited script \n" - exit -} start_routines() { - header_info - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script - fi + header_info + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Disabling 'pve-enterprise' repository" @@ -72,15 +61,9 @@ start_routines() { ;; esac - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 7 server.\n \nCorrect Proxmox VE 7 sources?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script - fi + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 7 server.\n \nCorrect Proxmox VE 7 sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Correcting Proxmox VE 7 Sources" @@ -96,15 +79,9 @@ EOF ;; esac - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script - fi + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Enabling 'pve-no-subscription' repository" @@ -118,15 +95,9 @@ EOF ;; esac - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script - fi + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Adding 'pvetest' repository and set disabled" @@ -140,15 +111,9 @@ EOF ;; esac - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script - fi + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Disabling subscription nag" @@ -161,36 +126,64 @@ EOF ;; esac - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nUpdate Proxmox VE 7 now?" 11 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script - fi + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "\nUpdate Proxmox VE 7 now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Updating Proxmox VE 7 (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox VE 7 (Reboot recommended)" + msg_ok "Updated Proxmox VE 7" ;; no) msg_error "Selected no to Updating Proxmox VE 7" ;; esac - CHOICE=$( - whiptail --title "Proxmox VE 7 Post Install" --menu "\nReboot Proxmox VE 7 now?" 11 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3 - ) - exit_status=$? - if [ $exit_status == 1 ]; then - exit_script + microcode="" + cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') + if [ "$cpu" == "GenuineIntel" ]; then + if lscpu | awk '/Model name:.*N/ {exit 0} END {exit 1}'; then + CHOICE=$(whiptail --title "N-SERIES PROCESSOR DETECTED" --menu "\nTo ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install the Proxmox 6.2 kernel.\n\nInstall the Proxmox 6.2 kernel now?" 16 58 2 \ + "yes" " " \ + "no" " " 3>&1 1>&2 2>&3) + case $CHOICE in + yes) + msg_info "Installing Proxmox 6.2 kernel" + apt install pve-kernel-6.2 + microcode="need" + msg_ok "Installed Proxmox 6.2 kernel" + ;; + no) + msg_error "Selected no to Installing the Proxmox 6.2 kernel" + ;; + esac + fi fi + + if [ "$microcode" == "need" ]; then + CHOICE=$(whiptail --title "INTEL MICROCODE" --menu "\nMicrocode updates can fix hardware bugs, improve performance, and enhance security features of the processor.\n\nInstall the Intel Microcode now?" 16 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Installing Intel Microcode" + apt-get install -y iucode-tool &>/dev/null + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230512.1_amd64.deb + dpkg -i intel-microcode_3.20230512.1_amd64.deb &>/dev/null + rm intel-microcode_3.20230512.1_amd64.deb + msg_ok "Installed Intel Microcode" + ;; + no) + msg_error "Selected no to Installing the Intel Microcode" + ;; + esac + fi + + CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "\nReboot Proxmox VE 7 now? (recommended)" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Rebooting Proxmox VE 7" @@ -199,7 +192,7 @@ EOF reboot ;; no) - msg_error "Selected no to Rebooting Proxmox VE 7" + msg_error "Selected no to Rebooting Proxmox VE 7 (Reboot recommended)" msg_ok "Completed Post Install Routines" ;; esac @@ -211,7 +204,7 @@ while true; do read -p "Start the Proxmox VE 7 Post Install Script (y/n)?" yn case $yn in [Yy]*) break ;; - [Nn]*) exit_script ;; + [Nn]*) clear; exit ;; *) echo "Please answer yes or no." ;; esac done From f0ab5c9cccaac7f800f8b13f102748b479162b55 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 May 2023 22:06:41 -0400 Subject: [PATCH 1580/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ed4695..3387a338 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-05-27 + +### Changed + +- **Proxmox VE 7 Post Install** + - If an Intel N-series processor is detected, the script provides options to install both the Proxmox 6.2 kernel and the Intel microcode. + ## 2023-05-23 ### Changed From d3cfb2c3a749907011ecb64faa7010651379e9b3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 May 2023 22:08:35 -0400 Subject: [PATCH 1581/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index a2e162f5..0b87e94c 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -151,7 +151,7 @@ EOF case $CHOICE in yes) msg_info "Installing Proxmox 6.2 kernel" - apt install pve-kernel-6.2 + apt install pve-kernel-6.2 &>/dev/null microcode="need" msg_ok "Installed Proxmox 6.2 kernel" ;; From a85205cb80b5d0b9568f43fe4abf7ae329b7f332 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 May 2023 22:10:12 -0400 Subject: [PATCH 1582/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 0b87e94c..b9e737ee 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -151,7 +151,7 @@ EOF case $CHOICE in yes) msg_info "Installing Proxmox 6.2 kernel" - apt install pve-kernel-6.2 &>/dev/null + apt-get install -y pve-kernel-6.2 &>/dev/null microcode="need" msg_ok "Installed Proxmox 6.2 kernel" ;; From f2c54ba6defd0d68a9d4f63b402829bcb9f873ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 May 2023 13:03:05 -0400 Subject: [PATCH 1583/3335] Update post-pve-install.sh tweak the N-series processor detection --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index b9e737ee..93f4959d 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -144,7 +144,7 @@ EOF microcode="" cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') if [ "$cpu" == "GenuineIntel" ]; then - if lscpu | awk '/Model name:.*N/ {exit 0} END {exit 1}'; then + if lscpu | grep -qP 'Model name:.*N'; then CHOICE=$(whiptail --title "N-SERIES PROCESSOR DETECTED" --menu "\nTo ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install the Proxmox 6.2 kernel.\n\nInstall the Proxmox 6.2 kernel now?" 16 58 2 \ "yes" " " \ "no" " " 3>&1 1>&2 2>&3) From c7796d0fd20ee42bd4a26845bee2a05156e92c98 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 May 2023 13:38:52 -0400 Subject: [PATCH 1584/3335] Update post-pve-install.sh Code refactoring --- misc/post-pve-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 93f4959d..5a624b88 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -142,9 +142,7 @@ EOF esac microcode="" - cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') - if [ "$cpu" == "GenuineIntel" ]; then - if lscpu | grep -qP 'Model name:.*N'; then + if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N'; then CHOICE=$(whiptail --title "N-SERIES PROCESSOR DETECTED" --menu "\nTo ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install the Proxmox 6.2 kernel.\n\nInstall the Proxmox 6.2 kernel now?" 16 58 2 \ "yes" " " \ "no" " " 3>&1 1>&2 2>&3) @@ -159,7 +157,6 @@ EOF msg_error "Selected no to Installing the Proxmox 6.2 kernel" ;; esac - fi fi if [ "$microcode" == "need" ]; then From 69bdd6419375e0641d435604ede8d06ef632aaf7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 May 2023 09:40:56 -0400 Subject: [PATCH 1585/3335] Update changedetection-install.sh Code refactoring --- install/changedetection-install.sh | 126 ++++++++++++++++++++++++++--- 1 file changed, 117 insertions(+), 9 deletions(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 34e0bcca..193e5373 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -13,37 +13,145 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y pip +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + build-essential \ + dumb-init \ + gconf-service \ + ffmpeg \ #can find no need + libappindicator1 \ #can find no need + libappindicator3-1 \ #can find no need + libasound2 \ #can find no need + libatk-bridge2.0-0 \ + libatk1.0-0 \ + libcairo2 \ + libcups2 \ + libdbus-1-3 \ + libexpat1 \ + libgbm-dev \ + libgbm1 \ + libgconf-2-4 \ + libgdk-pixbuf2.0-0 \ + libglib2.0-0 \ + libgtk-3-0 \ + libnspr4 \ + libnss3 \ + libpango-1.0-0 \ + libpangocairo-1.0-0 \ + qpdf \ + xdg-utils \ + xvfb msg_ok "Installed Dependencies" +msg_info "Installing Python3" +$STD apt-get install -y \ + python3-dev \ + python3-pip +msg_ok "Installed Python3" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + msg_info "Installing Change Detection" mkdir /opt/changedetection $STD pip3 install changedetection.io $STD python3 -m pip install dnspython==2.2.1 msg_ok "Installed Change Detection" -msg_info "Creating Service" +msg_info "Installing Browserless & Playwright" +mkdir /opt/browserless +$STD python3 -m pip install playwright +$STD git clone https://github.com/browserless/chrome /opt/browserless +$STD npm install --prefix /opt/browserless +$STD npm run build --prefix /opt/browserless +$STD npm prune production --prefix /opt/browserless +msg_ok "Installed Browserless & Playwright" + +msg_info "Installing Font Packages" +$STD apt-get install -y \ + fontconfig \ + libfontconfig1 \ + fonts-freefont-ttf \ + fonts-gfs-neohellenic \ + fonts-indic fonts-ipafont-gothic \ + fonts-kacst fonts-liberation \ + fonts-noto-cjk \ + fonts-noto-color-emoji \ + msttcorefonts \ + fonts-roboto \ + fonts-thai-tlwg \ + fonts-wqy-zenhei +msg_ok "Installed Font Packages" + +msg_info "Installing X11 Packages" +$STD apt-get install -y \ + libx11-6 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxrandr2 \ + libxrender1 \ + libxss1 \ + libxtst6 +msg_ok "Installed X11 Packages" + +msg_info "Creating Services" cat </etc/systemd/system/changedetection.service [Unit] Description=Change Detection After=network-online.target +After=network.target browserless.service +Wants=browserless.service [Service] Type=simple WorkingDirectory=/opt/changedetection Environment="WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub" +Environment="PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?stealth=1&--disable-web-security=true" ExecStart=changedetection.io -d /opt/changedetection -p 5000 [Install] WantedBy=multi-user.target EOF -$STD systemctl enable --now changedetection -msg_ok "Created Service" + +cat </etc/systemd/system/browserless.service +[Unit] +Description=browserless service +After=network.target +[Service] +Environment=APP_DIR=/opt/browserless +Environment=PLAYWRIGHT_BROWSERS_PATH=/opt/browserless +Environment=CONNECTION_TIMEOUT=60000 +Environment=HOST=127.0.0.1 +Environment=LANG="C.UTF-8" +Environment=NODE_ENV=production +Environment=PORT=3000 +Environment=WORKSPACE_DIR=/opt/browserless/workspace +WorkingDirectory=/opt/browserless +ExecStart=/opt/browserless/start.sh +SyslogIdentifier=browserless +[Install] +WantedBy=default.target +EOF + +systemctl enable -q --now browserless +systemctl enable -q --now changedetection +msg_ok "Created Services" motd_ssh -customize +root msg_info "Cleaning up" $STD apt-get autoremove From a68786a63b982e796f49498f975751a2d40c5691 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 May 2023 16:47:56 -0400 Subject: [PATCH 1586/3335] Update homeassistant-core-install.sh code refactoring --- install/homeassistant-core-install.sh | 38 ++++++++++----------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 663e5e99..3a9d5691 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -15,46 +15,36 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - make \ + git \ + curl \ + sudo \ + mc \ build-essential \ - libjpeg-dev \ - libpcap-dev \ libssl-dev \ zlib1g-dev \ libbz2-dev \ libreadline-dev \ libsqlite3-dev \ - libmariadb-dev-compat \ - autoconf \ - git \ - curl \ - sudo \ - mc \ - llvm \ libncursesw5-dev \ xz-utils \ - tzdata \ - bluez \ tk-dev \ + llvm \ libxml2-dev \ libxmlsec1-dev \ libffi-dev \ + liblzma-dev \ + bluez \ + libmariadb-dev-compat \ + libjpeg-dev \ + autoconf \ libopenjp2-7 \ libtiff5 \ libturbojpeg0-dev \ - liblzma-dev + liblapack3 \ + liblapack-dev \ + libatlas-base-dev msg_ok "Installed Dependencies" -msg_info "Installing Linux D-Bus Message Broker" -cat <>/etc/apt/sources.list -deb http://deb.debian.org/debian bullseye-backports main contrib non-free -deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free -EOF -$STD apt-get update -$STD apt-get -t bullseye-backports install -y dbus-broker -$STD systemctl enable --now dbus-broker.service -msg_ok "Installed Linux D-Bus Message Broker" - msg_info "Installing pyenv" $STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv set +e @@ -64,7 +54,7 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path) msg_ok "Installed pyenv" . ~/.bashrc set -e -msg_info "Installing Python 3.11.2" +msg_info "Installing Python 3.11.2 (Patience)" $STD pyenv install 3.11.2 pyenv global 3.11.2 msg_ok "Installed Python 3.11.2" From 2c8341e72946dbe4c7d7e938dc62a8248548f01e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 May 2023 16:53:07 -0400 Subject: [PATCH 1587/3335] Update homeassistant-core-install.sh add dbus-broker --- install/homeassistant-core-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 3a9d5691..2cf3b410 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -33,6 +33,7 @@ $STD apt-get install -y \ libxmlsec1-dev \ libffi-dev \ liblzma-dev \ + dbus-broker \ bluez \ libmariadb-dev-compat \ libjpeg-dev \ From b612d7a69a4ca41af66782655476cfbf5065de3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 01:02:14 -0400 Subject: [PATCH 1588/3335] Update influxdb.sh tweak --- ct/influxdb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 8f660810..3c7bda46 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/apt/sources.list.d/influxdb.list || ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" wget -q https://repos.influxdata.com/influxdata-archive_compat.key cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null From 5ceb5cffbed04b84526edd8ff45560682d40492f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 01:06:37 -0400 Subject: [PATCH 1589/3335] Update changedetection-install.sh fix calling incorrect variable --- install/changedetection-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 193e5373..43180ac3 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -151,7 +151,7 @@ systemctl enable -q --now changedetection msg_ok "Created Services" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove From d82f01b5e5fbda32b7e1a09b2ca0bed37603f0a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 11:27:48 -0400 Subject: [PATCH 1590/3335] Update changedetection-install.sh fix dependencies --- install/changedetection-install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 43180ac3..e1673b15 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -22,10 +22,6 @@ $STD apt-get install -y \ build-essential \ dumb-init \ gconf-service \ - ffmpeg \ #can find no need - libappindicator1 \ #can find no need - libappindicator3-1 \ #can find no need - libasound2 \ #can find no need libatk-bridge2.0-0 \ libatk1.0-0 \ libcairo2 \ From 9be893b12dce04384465c98443b9a91abd3b4732 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 11:43:31 -0400 Subject: [PATCH 1591/3335] Update changedetection.sh add storage --- ct/changedetection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index e114edc3..23759e5a 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="Change Detection" -var_disk="2" +var_disk="6" var_cpu="1" var_ram="512" var_os="debian" From 620f135666bf603c4288e902a2032a43b2a29a1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 11:52:17 -0400 Subject: [PATCH 1592/3335] Update changedetection.sh add vCPU --- ct/changedetection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 23759e5a..96068d88 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -20,7 +20,7 @@ header_info echo -e "Loading..." APP="Change Detection" var_disk="6" -var_cpu="1" +var_cpu="2" var_ram="512" var_os="debian" var_version="11" From 1cfc47e519123d44962e828a9baf75f09619375c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 11:54:24 -0400 Subject: [PATCH 1593/3335] Update changedetection.sh add storage --- ct/changedetection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 96068d88..9e7fc982 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="Change Detection" -var_disk="6" +var_disk="8" var_cpu="2" var_ram="512" var_os="debian" From d797b2714a8e1bd4de2c17e3126c39340b007994 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 May 2023 11:58:33 -0400 Subject: [PATCH 1594/3335] Update changedetection.sh add RAM --- ct/changedetection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 9e7fc982..8f938dd5 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="Change Detection" var_disk="8" var_cpu="2" -var_ram="512" +var_ram="1024" var_os="debian" var_version="11" variables From afbbb011d6e7534ed1e4e0f9711d62e873b9e230 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 31 May 2023 16:59:14 -0400 Subject: [PATCH 1595/3335] Update homeassistant-core-install.sh add libpcap-dev --- install/homeassistant-core-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 2cf3b410..daa4d4d2 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y \ libssl-dev \ zlib1g-dev \ libbz2-dev \ + libpcap-dev \ libreadline-dev \ libsqlite3-dev \ libncursesw5-dev \ From e6deb6c79a6048e3f8e52ca68ae87ebf97afb07e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Jun 2023 11:55:20 -0400 Subject: [PATCH 1596/3335] Update post-pve-install.sh give the option to disable high availability in a non-clustered environment --- misc/post-pve-install.sh | 63 +++++++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 5a624b88..ecf8d2de 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -47,7 +47,7 @@ msg_error() { start_routines() { header_info - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -61,7 +61,7 @@ start_routines() { ;; esac - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 7 server.\n \nCorrect Proxmox VE 7 sources?" 14 58 2 \ + CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 7 server.\n \nCorrect Proxmox VE 7 sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -79,7 +79,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ + CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -95,7 +95,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -111,22 +111,45 @@ EOF ;; esac - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Disabling subscription nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script - apt --reinstall install proxmox-widget-toolkit &>/dev/null - msg_ok "Disabled subscription nag (Delete browser cache)" - ;; - no) - msg_error "Selected no to Disabling subscription nag" - ;; - esac + if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then + CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling subscription nag" + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + apt --reinstall install proxmox-widget-toolkit &>/dev/null + msg_ok "Disabled subscription nag (Delete browser cache)" + ;; + no) + msg_error "Selected no to Disabling subscription nag" + ;; + esac + fi - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "\nUpdate Proxmox VE 7 now?" 11 58 2 \ + if systemctl is-active --quiet pve-ha-lrm; then + CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling high availability" + systemctl stop pve-ha-lrm + systemctl disable pve-ha-lrm &>/dev/null + systemctl stop pve-ha-crm + systemctl disable pve-ha-crm &>/dev/null + systemctl stop corosync + systemctl disable corosync &>/dev/null + msg_ok "Disabled high availability" + ;; + no) + msg_error "Selected no to Disabling high availability" + ;; + esac + fi + + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE 7 now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -178,7 +201,7 @@ EOF esac fi - CHOICE=$(whiptail --title "Proxmox VE 7 Post Install" --menu "\nReboot Proxmox VE 7 now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 7 now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 2a80ed71842ddadbbdc98530c069a58704ad986b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Jun 2023 11:57:34 -0400 Subject: [PATCH 1597/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3387a338..b8ea88b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-06-02 + +### Changed + +- **Proxmox VE 7 Post Install** + - In a non-clustered environment, you can choose to disable high availability, which helps save system resources. + ## 2023-05-27 ### Changed From 89e933e85ea40dff377013db78fd86efe4d0ff0d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Jun 2023 06:43:28 -0400 Subject: [PATCH 1598/3335] Update openwrt.sh set network.lan.ipaddr=192.168.2.1 --- vm/openwrt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index c9cf3c3e..f5bae843 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -484,7 +484,7 @@ 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=eth1" send_line_to_vm "uci set network.lan.proto=static" -send_line_to_vm "uci set network.lan.ipaddr=192.0.2.1" +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 firewall.@zone[1].input='ACCEPT'" send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'" From 11e0f3a8edd08f384154fd431dba6c55cfeec0f4 Mon Sep 17 00:00:00 2001 From: Rani Hod <59210462+raenye@users.noreply.github.com> Date: Sat, 3 Jun 2023 18:29:30 +0300 Subject: [PATCH 1599/3335] Changes to openwrt.sh (#1460) * Update openwrt.sh Compactify script and fix text (WAN Vlan). * Update openwrt.sh Switch network devices to match OpenWrt defaults (eth0 is lan, eth1 is wan). --- vm/openwrt.sh | 47 ++++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index f5bae843..e3eee268 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -243,11 +243,10 @@ function advanced_settings() { if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VM_NAME ]; then HN="openwrt" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" else HN=$(echo ${VM_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" else exit-script fi @@ -255,10 +254,8 @@ function advanced_settings() { if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $CORE_COUNT ]; then CORE_COUNT="1" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" fi + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" else exit-script fi @@ -266,10 +263,8 @@ function advanced_settings() { if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $RAM_SIZE ]; then RAM_SIZE="256" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" fi + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" else exit-script fi @@ -277,10 +272,8 @@ function advanced_settings() { if BRG=$(whiptail --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $BRG ]; then BRG="vmbr0" - echo -e "${DGN}Using WAN Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using WAN Bridge: ${BGN}$BRG${CL}" fi + echo -e "${DGN}Using WAN Bridge: ${BGN}$BRG${CL}" else exit-script fi @@ -288,10 +281,8 @@ function advanced_settings() { if LAN_BRG=$(whiptail --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $LAN_BRG ]; then LAN_BRG="vmbr0" - echo -e "${DGN}Using LAN Bridge: ${BGN}$LAN_BRG${CL}" - else - echo -e "${DGN}Using LAN Bridge: ${BGN}$LAN_BRG${CL}" fi + echo -e "${DGN}Using LAN Bridge: ${BGN}$LAN_BRG${CL}" else exit-script fi @@ -299,11 +290,10 @@ function advanced_settings() { 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" - echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC${CL}" else MAC="$MAC1" - echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC1${CL}" fi + echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC${CL}" else exit-script fi @@ -311,24 +301,22 @@ function advanced_settings() { if MAC2=$(whiptail --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MAC2 ]; then LAN_MAC="$GEN_MAC_LAN" - echo -e "${DGN}Using LAN MAC Address: ${BGN}$LAN_MAC${CL}" else LAN_MAC="$MAC2" - echo -e "${DGN}Using LAN MAC Address: ${BGN}$MAC2${CL}" fi + echo -e "${DGN}Using LAN MAC Address: ${BGN}$LAN_MAC${CL}" else exit-script fi - if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VLAN1=$(whiptail --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="" - echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}" else VLAN=",tag=$VLAN1" - echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}" fi + echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}" else exit-script fi @@ -337,11 +325,10 @@ function advanced_settings() { if [ -z $VLAN2 ]; then VLAN2="999" LAN_VLAN=",tag=$VLAN2" - echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}" else LAN_VLAN=",tag=$VLAN2" - echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}" fi + echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}" else exit-script fi @@ -350,22 +337,20 @@ function advanced_settings() { if [ -z $MTU1 ]; then MTU1="Default" MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" else MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" else exit-script fi if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" else - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi + echo -e "${DGN}Start VM when completed: ${BGN}$START_VM${CL}" if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a OpenWrt VM using the above advanced settings${CL}" @@ -478,11 +463,11 @@ msg_ok "Network interfaces are being configured as OpenWrt initiates." send_line_to_vm "" send_line_to_vm "uci delete network.@device[0]" send_line_to_vm "uci set network.wan=interface" -send_line_to_vm "uci set network.wan.device=eth0" +send_line_to_vm "uci set network.wan.device=eth1" send_line_to_vm "uci set network.wan.proto=dhcp" 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=eth1" +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" @@ -496,8 +481,8 @@ until qm status $VMID | grep -q "stopped"; do done msg_info "Bridge interfaces are being added." qm set $VMID \ - -net0 virtio,bridge=${BRG},macaddr=${MAC}${VLAN}${MTU} \ - -net1 virtio,bridge=${LAN_BRG},macaddr=${LAN_MAC}${LAN_VLAN}${MTU} >/dev/null 2>/dev/null + -net0 virtio,bridge=${LAN_BRG},macaddr=${LAN_MAC}${LAN_VLAN}${MTU} \ + -net1 virtio,bridge=${BRG},macaddr=${MAC}${VLAN}${MTU} >/dev/null 2>/dev/null msg_ok "Bridge interfaces have been successfully added." if [ "$START_VM" == "yes" ]; then msg_info "Starting OpenWrt VM" From c735748faaf00134a9eb13b389cbf539ab70ae61 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Jun 2023 04:14:33 -0400 Subject: [PATCH 1600/3335] Update and rename rstptoweb-install.sh to rtsptoweb-install.sh fix spelling --- install/{rstptoweb-install.sh => rtsptoweb-install.sh} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename install/{rstptoweb-install.sh => rtsptoweb-install.sh} (95%) diff --git a/install/rstptoweb-install.sh b/install/rtsptoweb-install.sh similarity index 95% rename from install/rstptoweb-install.sh rename to install/rtsptoweb-install.sh index d345a102..c692c568 100644 --- a/install/rstptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -27,14 +27,14 @@ $STD ln -s /usr/local/go/bin/go /usr/local/bin/go rm -rf go1.20.1.linux-amd64.tar.gz msg_ok "Installed Golang" -msg_info "Installing RSTPtoWEB" +msg_info "Installing RTSPtoWwb" $STD git clone https://github.com/deepch/RTSPtoWeb /opt/rtsptoweb cat <>/opt/rtsptoweb/start #!/bin/bash cd /opt/rtsptoweb && GO111MODULE=on go run *.go EOF chmod +x /opt/rtsptoweb/start -msg_ok "Installed RSTPtoWEB" +msg_ok "Installed RTSPtoWeb" msg_info "Creating Service" service_path="/etc/systemd/system/rtsptoweb.service" From 87ff31bb8de47e7d07225ec6a52d6e94d799ee11 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Jun 2023 04:18:03 -0400 Subject: [PATCH 1601/3335] Update and rename rstptoweb.sh to rtsptoweb.sh fix spelling --- ct/{rstptoweb.sh => rtsptoweb.sh} | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename ct/{rstptoweb.sh => rtsptoweb.sh} (75%) diff --git a/ct/rstptoweb.sh b/ct/rtsptoweb.sh similarity index 75% rename from ct/rstptoweb.sh rename to ct/rtsptoweb.sh index b0e68ab9..ce040eb5 100644 --- a/ct/rstptoweb.sh +++ b/ct/rtsptoweb.sh @@ -8,17 +8,17 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ _______________ __ _ ____________ - / __ \/ ___/_ __/ __ \/ /_____| | / / ____/ __ ) - / /_/ /\__ \ / / / /_/ / __/ __ \ | /| / / __/ / __ | - / _, _/___/ // / / ____/ /_/ /_/ / |/ |/ / /___/ /_/ / -/_/ |_|/____//_/ /_/ \__/\____/|__/|__/_____/_____/ - + ____ ___________ ____ __ _ __ __ + / __ \/_ __/ ___// __ \/ /_____| | / /__ / /_ + / /_/ / / / \__ \/ /_/ / __/ __ \ | /| / / _ \/ __ \ + / _, _/ / / ___/ / ____/ /_/ /_/ / |/ |/ / __/ /_/ / +/_/ |_| /_/ /____/_/ \__/\____/|__/|__/\___/_.___/ + EOF } header_info echo -e "Loading..." -APP="RSTPtoWEB" +APP="RTSPtoWeb" var_disk="4" var_cpu="2" var_ram="2048" From c23de06e363959b92d4c55d43100717f72155589 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Jun 2023 04:24:09 -0400 Subject: [PATCH 1602/3335] Update rtsptoweb-install.sh fix fat finger --- install/rtsptoweb-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/rtsptoweb-install.sh b/install/rtsptoweb-install.sh index c692c568..583137be 100644 --- a/install/rtsptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -27,7 +27,7 @@ $STD ln -s /usr/local/go/bin/go /usr/local/bin/go rm -rf go1.20.1.linux-amd64.tar.gz msg_ok "Installed Golang" -msg_info "Installing RTSPtoWwb" +msg_info "Installing RTSPtoWeb" $STD git clone https://github.com/deepch/RTSPtoWeb /opt/rtsptoweb cat <>/opt/rtsptoweb/start #!/bin/bash From 3f61e0739398de81e017ea7ba5e1a485b38e10b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Jun 2023 15:23:36 -0400 Subject: [PATCH 1603/3335] Update jellyfin-install.sh modify jellyfin source --- install/jellyfin-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 1477ef87..e21e158f 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -37,7 +37,7 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_info "Installing Jellyfin" -VERSION="$( awk -F'=' '/^UBUNTU_CODENAME=/{ print $NF }' /etc/os-release )" +VERSION="$( awk -F'=' '/^(UBUNTU_CODENAME|VERSION_CODENAME)=/{ print $NF }' /etc/os-release )" # If the keyring directory is absent, create it if [[ ! -d /etc/apt/keyrings ]]; then mkdir -p /etc/apt/keyrings From b5eb945f4d4985cb9e8790950d8bd486bb66a42d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Jun 2023 15:58:39 -0400 Subject: [PATCH 1604/3335] Update jellyfin-install.sh tweak --- install/jellyfin-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index e21e158f..787b0ab2 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -37,7 +37,7 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_info "Installing Jellyfin" -VERSION="$( awk -F'=' '/^(UBUNTU_CODENAME|VERSION_CODENAME)=/{ print $NF }' /etc/os-release )" +VERSION="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )" # If the keyring directory is absent, create it if [[ ! -d /etc/apt/keyrings ]]; then mkdir -p /etc/apt/keyrings From c81589ce433454c8a7267e925323fd4f40c8824c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Jun 2023 18:51:04 -0400 Subject: [PATCH 1605/3335] Update homeassistant-core-install.sh Python 3.11.3 --- install/homeassistant-core-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index daa4d4d2..5df4d607 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -56,10 +56,10 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path) msg_ok "Installed pyenv" . ~/.bashrc set -e -msg_info "Installing Python 3.11.2 (Patience)" -$STD pyenv install 3.11.2 -pyenv global 3.11.2 -msg_ok "Installed Python 3.11.2" +msg_info "Installing Python 3.11.3 (Patience)" +$STD pyenv install 3.11.3 +pyenv global 3.11.3 +msg_ok "Installed Python 3.11.3" msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant From d0a0caa55451b5946270eba9acdfdbfe5e60400f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 04:49:11 -0400 Subject: [PATCH 1606/3335] Update alpine-zigbee2mqtt.sh change default settings to privileged --- ct/alpine-zigbee2mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index b7d87edb..f870b965 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -21,7 +21,7 @@ header_info echo -e "Loading..." APP="Alpine-Zigbee2MQTT" var_disk="0.3" -var_cpu="1" +var_cpu="0" var_ram="256" var_os="alpine" var_version="3.17" From db398c3e627a0e5c28cf18d1f43f26d7b0d6ea92 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 04:50:20 -0400 Subject: [PATCH 1607/3335] Update alpine-zigbee2mqtt.sh fix my goof --- ct/alpine-zigbee2mqtt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index f870b965..23561b92 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -21,7 +21,7 @@ header_info echo -e "Loading..." APP="Alpine-Zigbee2MQTT" var_disk="0.3" -var_cpu="0" +var_cpu="1" var_ram="256" var_os="alpine" var_version="3.17" @@ -30,7 +30,7 @@ color catch_errors function default_settings() { - CT_TYPE="1" + CT_TYPE="0" PW="" CT_ID=$NEXTID HN=$NSAPP From 8af136338afa4e6563e1acf04d57ee3c214c5194 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 06:30:37 -0400 Subject: [PATCH 1608/3335] Update build.func Prepare for Proxmox Virtual Environment 8 --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index dce870e0..e7be8ae6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -54,7 +54,7 @@ msg_error() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.0 or higher" echo -e "Exiting..." From f0d066b6ed8157b44c6798555dc4e453bb653d58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 07:27:55 -0400 Subject: [PATCH 1609/3335] Update alpine-docker.sh Alpine 3.18 --- ct/alpine-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index d3d4c8ca..9806f568 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -24,7 +24,7 @@ var_disk="2" var_cpu="1" var_ram="1024" var_os="alpine" -var_version="3.17" +var_version="3.18" variables color catch_errors From 6df18b2bf58a68f8975763688b464738d8ee4695 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 07:31:41 -0400 Subject: [PATCH 1610/3335] Update alpine-grafana.sh Alpine 3.18 --- ct/alpine-grafana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 254cead3..6b82788a 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -24,7 +24,7 @@ var_disk="0.5" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.17" +var_version="3.18" variables color catch_errors From bf96e4b7aa3ccdf0c0831a1eafb571d8e03af33c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 07:32:04 -0400 Subject: [PATCH 1611/3335] Update alpine-vaultwarden.sh Alpine 3.18 --- ct/alpine-vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 525f1404..32b9f946 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -24,7 +24,7 @@ var_disk="0.3" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.17" +var_version="3.18" variables color catch_errors From 36048c4e9157c52f7e36df4c03937cabdb0f14b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 07:32:28 -0400 Subject: [PATCH 1612/3335] Update alpine-zigbee2mqtt.sh Alpine 3.18 --- ct/alpine-zigbee2mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 23561b92..d00fcf4c 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -24,7 +24,7 @@ var_disk="0.3" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.17" +var_version="3.18" variables color catch_errors From 3efff3572ef4f15b8e3cf365b676273f513a45f0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 07:32:50 -0400 Subject: [PATCH 1613/3335] Update alpine.sh Alpine 3.18 --- ct/alpine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine.sh b/ct/alpine.sh index 42c9546a..3be89e7b 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -24,7 +24,7 @@ var_disk="0.1" var_cpu="1" var_ram="512" var_os="alpine" -var_version="3.17" +var_version="3.18" variables color catch_errors From fb3502c0bda6b41a9305c93124e17d93fc52168e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 09:07:03 -0400 Subject: [PATCH 1614/3335] Update build.func add Ubuntu 23.04 remove Ubuntu 22.10 --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index e7be8ae6..06e34b59 100644 --- a/misc/build.func +++ b/misc/build.func @@ -153,7 +153,7 @@ advanced_settings() { if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "20.04" "Focal" OFF \ "22.04" "Jammy" OFF \ - "22.10" "Kinetic" OFF \ + "23.04" "Lunar" OFF \ 3>&1 1>&2 2>&3); then if [ -n "$var_version" ]; then echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" From 7b20f5aef8c44126c55409644734e6a28b396fdc Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 12:43:07 -0400 Subject: [PATCH 1615/3335] Update haos-vm.sh PVE 8 ready --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 8709ebc6..06d15d21 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -85,7 +85,7 @@ function msg_error() { } function pve_check() { - if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.2 or higher" echo -e "Exiting..." From edd2c4100f8634d28d952a51fdaeed07b0b2c578 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 12:50:12 -0400 Subject: [PATCH 1616/3335] Create pve8-post-install.sh --- misc/pve8-post-install.sh | 210 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 misc/pve8-post-install.sh diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh new file mode 100644 index 00000000..d505d980 --- /dev/null +++ b/misc/pve8-post-install.sh @@ -0,0 +1,210 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +header_info() { + clear + cat <<"EOF" + ____ _ ____________ ____ __ ____ __ ____ + / __ \ | / / ____( __ ) / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / __ | / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / + / ____/| |/ / /___/ /_/ / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/\____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + +EOF +} + +RD=$(echo "\033[01;31m") +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + + +start_routines() { + header_info + CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling 'pve-enterprise' repository" + sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list + msg_ok "Disabled 'pve-enterprise' repository" + ;; + no) + msg_error "Selected no to Disabling 'pve-enterprise' repository" + ;; + esac + + CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 8 server.\n \nCorrect Proxmox VE 8 sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Correcting Proxmox VE 8 Sources" + cat </etc/apt/sources.list +deb http://ftp.debian.org/debian bookworm main contrib +deb http://ftp.debian.org/debian bookworm-updates main contrib +deb http://security.debian.org/debian-security bookworm-security main contrib +EOF + msg_ok "Corrected Proxmox VE 8 Sources" + ;; + no) + msg_error "Selected no to Correcting Proxmox VE 8 Sources" + ;; + esac + + CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'pve-no-subscription' repository" + cat <>/etc/apt/sources.list +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +EOF + msg_ok "Enabled 'pve-no-subscription' repository" + ;; + no) + msg_error "Selected no to Enabling 'pve-no-subscription' repository" + ;; + esac + + CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Adding 'pvetest' repository and set disabled" + cat <>/etc/apt/sources.list +# deb http://download.proxmox.com/debian/pve bookworm pvetest +EOF + msg_ok "Added 'pvetest' repository" + ;; + no) + msg_error "Selected no to Adding 'pvetest' repository" + ;; + esac + + if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then + CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling subscription nag" + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + apt --reinstall install proxmox-widget-toolkit &>/dev/null + msg_ok "Disabled subscription nag (Delete browser cache)" + ;; + no) + msg_error "Selected no to Disabling subscription nag" + ;; + esac + fi + + if systemctl is-active --quiet pve-ha-lrm; then + CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling high availability" + systemctl stop pve-ha-lrm + systemctl disable pve-ha-lrm &>/dev/null + systemctl stop pve-ha-crm + systemctl disable pve-ha-crm &>/dev/null + systemctl stop corosync + systemctl disable corosync &>/dev/null + msg_ok "Disabled high availability" + ;; + no) + msg_error "Selected no to Disabling high availability" + ;; + esac + fi + + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE 8 now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Updating Proxmox VE 8 (Patience)" + apt-get update &>/dev/null + apt-get -y dist-upgrade &>/dev/null + msg_ok "Updated Proxmox VE 8" + ;; + no) + msg_error "Selected no to Updating Proxmox VE 8" + ;; + esac + + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Rebooting Proxmox VE 8" + sleep 2 + msg_ok "Completed Post Install Routines" + reboot + ;; + no) + msg_error "Selected no to Rebooting Proxmox VE 8 (Reboot recommended)" + msg_ok "Completed Post Install Routines" + ;; + esac +} + +header_info +echo -e "\nThis script will Perform Post Install Routines.\n" +while true; do + read -p "Start the Proxmox VE 8 Post Install Script (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) clear; exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +if ! command -v pveversion >/dev/null 2>&1; then + header_info + msg_error "\n No PVE Detected!\n" + exit +fi + +if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then + header_info + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e " Requires PVE Version: 8.XX" + echo -e "\nExiting..." + sleep 3 + exit +fi + +start_routines From 53af603acef550ff691d297eb45f3600fb6dd3b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 16:41:41 -0400 Subject: [PATCH 1617/3335] Update pve8-post-install.sh --- misc/pve8-post-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index d505d980..13338466 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -192,12 +192,6 @@ while true; do esac done -if ! command -v pveversion >/dev/null 2>&1; then - header_info - msg_error "\n No PVE Detected!\n" - exit -fi - if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" From 1dcc7df1e875b3225f58d5bf3e6dadcf152e63eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 16:50:13 -0400 Subject: [PATCH 1618/3335] Update pve8-post-install.sh --- misc/pve8-post-install.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index 13338466..2437d19b 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -192,13 +192,4 @@ while true; do esac done -if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - header_info - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e " Requires PVE Version: 8.XX" - echo -e "\nExiting..." - sleep 3 - exit -fi - start_routines From 9d7170d7a25928a6d4592ead5757d9cf8d8de24d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 18:12:13 -0400 Subject: [PATCH 1619/3335] Update pve8-post-install.sh --- misc/pve8-post-install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index 2437d19b..d505d980 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -192,4 +192,19 @@ while true; do esac done +if ! command -v pveversion >/dev/null 2>&1; then + header_info + msg_error "\n No PVE Detected!\n" + exit +fi + +if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then + header_info + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e " Requires PVE Version: 8.XX" + echo -e "\nExiting..." + sleep 3 + exit +fi + start_routines From 34674317b399ba21f04143d1b4b54b99e06d8a6b Mon Sep 17 00:00:00 2001 From: 5olu7ion <113297102+5olu7ion@users.noreply.github.com> Date: Sat, 10 Jun 2023 00:38:17 +0200 Subject: [PATCH 1620/3335] Case insensitive User Input (#1475) * Always lower User input --- install/alpine-docker-install.sh | 4 ++-- misc/alpine-install.func | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 368a4d3f..eacbe6b0 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -34,7 +34,7 @@ PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") read -r -p "Would you like to add Portainer? " prompt -if echo "$prompt" | grep -Eq "^(y|yes)$"; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null $STD docker run -d \ @@ -49,7 +49,7 @@ if echo "$prompt" | grep -Eq "^(y|yes)$"; then fi read -r -p "Would you like to add Docker Compose? " prompt -if echo "$prompt" | grep -Eq "^(y|yes)$"; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins diff --git a/misc/alpine-install.func b/misc/alpine-install.func index ce38abed..96d1f849 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -86,7 +86,7 @@ network_check() { if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then msg_ok "Internet Connected"; else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt - if echo "$prompt" | grep -Eq "^(y|yes)$"; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" From 50621a5dfc3da9095b677068b3cc1e0dd63ad8b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 21:17:17 -0400 Subject: [PATCH 1621/3335] Update pve8-post-install.sh add Ceph Package Repositories --- misc/pve8-post-install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index d505d980..b542867d 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -95,6 +95,23 @@ EOF ;; esac + CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'ceph package repositories'" + cat </etc/apt/sources.list.d/ceph.list +# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise +deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription +EOF + msg_ok "Enabled 'ceph package repositories'" + ;; + no) + msg_error "Selected no to Enabling 'ceph package repositories'" + ;; + esac + CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) From 063b52f804a9529067ef469c7199209f0b042ab1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 21:27:00 -0400 Subject: [PATCH 1622/3335] Update pve8-post-install.sh tweak 'pve-enterprise' repository --- misc/pve8-post-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index b542867d..04ebf134 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -53,7 +53,9 @@ start_routines() { case $CHOICE in yes) msg_info "Disabling 'pve-enterprise' repository" - sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list + cat </etc/apt/sources.list.d/pve-enterprise.list +# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise +EOF msg_ok "Disabled 'pve-enterprise' repository" ;; no) From 773062b743a9a426a1292eed98a81a78a064f26d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 21:36:50 -0400 Subject: [PATCH 1623/3335] Update pve8-post-install.sh more tweaks --- misc/pve8-post-install.sh | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index 04ebf134..ea440ec6 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -47,21 +47,6 @@ msg_error() { start_routines() { header_info - CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Disabling 'pve-enterprise' repository" - cat </etc/apt/sources.list.d/pve-enterprise.list -# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise -EOF - msg_ok "Disabled 'pve-enterprise' repository" - ;; - no) - msg_error "Selected no to Disabling 'pve-enterprise' repository" - ;; - esac CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 8 server.\n \nCorrect Proxmox VE 8 sources?" 14 58 2 \ "yes" " " \ @@ -81,13 +66,29 @@ EOF ;; esac + CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling 'pve-enterprise' repository" + cat </etc/apt/sources.list.d/pve-enterprise.list +# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise +EOF + msg_ok "Disabled 'pve-enterprise' repository" + ;; + no) + msg_error "Selected no to Disabling 'pve-enterprise' repository" + ;; + esac + CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Enabling 'pve-no-subscription' repository" - cat <>/etc/apt/sources.list + cat </etc/apt/sources.list.d/pve-install-repo.list deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" @@ -120,7 +121,7 @@ EOF case $CHOICE in yes) msg_info "Adding 'pvetest' repository and set disabled" - cat <>/etc/apt/sources.list + cat </etc/apt/sources.list.d/pve-test-repo.list # deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" From f38a1afb89ebc322c9cd103640b1d489cd69feae Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Jun 2023 22:08:45 -0400 Subject: [PATCH 1624/3335] Create pve8-install.sh --- misc/pve8-install.sh | 191 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 misc/pve8-install.sh diff --git a/misc/pve8-install.sh b/misc/pve8-install.sh new file mode 100644 index 00000000..d0f032df --- /dev/null +++ b/misc/pve8-install.sh @@ -0,0 +1,191 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +header_info() { + clear + cat <<"EOF" + ____ _ ____________ ____ __ ____ + / __ \ | / / ____( __ ) / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / __ | / // __ \/ ___/ __/ __ `/ / / + / ____/| |/ / /___/ /_/ / _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/\____/ /___/_/ /_/____/\__/\__,_/_/_/ + +EOF +} + +RD=$(echo "\033[01;31m") +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + + +start_routines() { + header_info + + CHOICE=$(whiptail --title "PVE8 SOURCES" --menu "This will set the correct sources to update and install Proxmox VE 8.\n \nChange to Proxmox VE 8 sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Changing to Proxmox VE 8 Sources" + cat </etc/apt/sources.list +deb http://ftp.debian.org/debian bookworm main contrib +deb http://ftp.debian.org/debian bookworm-updates main contrib +deb http://security.debian.org/debian-security bookworm-security main contrib +EOF + msg_ok "Changed to Proxmox VE 8 Sources" + ;; + no) + msg_error "Selected no to Correcting Proxmox VE 8 Sources" + ;; + esac + + CHOICE=$(whiptail --title "PVE8-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling 'pve-enterprise' repository" + cat </etc/apt/sources.list.d/pve-enterprise.list +# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise +EOF + msg_ok "Disabled 'pve-enterprise' repository" + ;; + no) + msg_error "Selected no to Disabling 'pve-enterprise' repository" + ;; + esac + + CHOICE=$(whiptail --title "PVE8-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'pve-no-subscription' repository" + cat </etc/apt/sources.list.d/pve-install-repo.list +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +EOF + msg_ok "Enabled 'pve-no-subscription' repository" + ;; + no) + msg_error "Selected no to Enabling 'pve-no-subscription' repository" + ;; + esac + + CHOICE=$(whiptail --title "PVE8 CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'ceph package repositories'" + cat </etc/apt/sources.list.d/ceph.list +# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise +deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription +EOF + msg_ok "Enabled 'ceph package repositories'" + ;; + no) + msg_error "Selected no to Enabling 'ceph package repositories'" + ;; + esac + + CHOICE=$(whiptail --title "PVE8 TEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Adding 'pvetest' repository and set disabled" + cat </etc/apt/sources.list.d/pve-test-repo.list +# deb http://download.proxmox.com/debian/pve bookworm pvetest +EOF + msg_ok "Added 'pvetest' repository" + ;; + no) + msg_error "Selected no to Adding 'pvetest' repository" + ;; + esac + + CHOICE=$(whiptail --title "PVE8 UPDATE" --menu "\nUpdate to Proxmox VE 8 now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Updating to Proxmox VE 8 (Patience)" + apt-get update &>/dev/null + apt-get -y dist-upgrade &>/dev/null + msg_ok "Updated to Proxmox VE 8" + ;; + no) + msg_error "Selected no to Updating to Proxmox VE 8" + ;; + esac + + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Rebooting Proxmox VE 8" + sleep 2 + msg_ok "Completed Install Routines" + reboot + ;; + no) + msg_error "Selected no to Rebooting Proxmox VE 8 (Reboot recommended)" + msg_ok "Completed Install Routines" + ;; + esac +} + +header_info +while true; do + read -p "Start the Update to Proxmox VE 8 Script (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) clear; exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +if ! command -v pveversion >/dev/null 2>&1; then + header_info + msg_error "\n No PVE Detected!\n" + exit +fi + +if [ $(pveversion | grep "pve-manager/7.4-13" | wc -l) -ne 1 ]; then + header_info + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e " Requires PVE Version: 7.4-13" + echo -e "\nExiting..." + sleep 3 + exit +fi + +start_routines From ed5d4b273938fb9e645db887b2ce2d18984377ca Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Jun 2023 09:50:52 -0400 Subject: [PATCH 1625/3335] Update pve8-post-install.sh add Support Subscriptions --- misc/pve8-post-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index ea440ec6..acc04a21 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -137,12 +137,14 @@ EOF "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) + whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; no) + whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_error "Selected no to Disabling subscription nag" ;; esac From a527849c7e0fdcc8af34642c1eb189dbbe8c2a58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Jun 2023 21:20:01 -0400 Subject: [PATCH 1626/3335] Update pve8-install.sh tweak --- misc/pve8-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/pve8-install.sh b/misc/pve8-install.sh index d0f032df..703abd13 100644 --- a/misc/pve8-install.sh +++ b/misc/pve8-install.sh @@ -89,7 +89,7 @@ EOF yes) msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list -deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +# deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" ;; @@ -121,8 +121,8 @@ EOF case $CHOICE in yes) msg_info "Adding 'pvetest' repository and set disabled" - cat </etc/apt/sources.list.d/pve-test-repo.list -# deb http://download.proxmox.com/debian/pve bookworm pvetest + cat </etc/apt/sources.list.d/pvetest-for-beta.list +deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" ;; From b9c564c01d6ca916ed3c7fa13850858a97b97521 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Jun 2023 21:23:15 -0400 Subject: [PATCH 1627/3335] Update pve8-post-install.sh tweak --- misc/pve8-post-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-post-install.sh b/misc/pve8-post-install.sh index acc04a21..c1913dda 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve8-post-install.sh @@ -121,7 +121,7 @@ EOF case $CHOICE in yes) msg_info "Adding 'pvetest' repository and set disabled" - cat </etc/apt/sources.list.d/pve-test-repo.list + cat </etc/apt/sources.list.d/pvetest-for-beta.list # deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" From 4ca1a73de21a7fad0794dc3327f7bffcfb2d374e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Jun 2023 21:34:31 -0400 Subject: [PATCH 1628/3335] Update pve8-install.sh tweak --- misc/pve8-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pve8-install.sh b/misc/pve8-install.sh index 703abd13..0c45f6ff 100644 --- a/misc/pve8-install.sh +++ b/misc/pve8-install.sh @@ -137,8 +137,8 @@ EOF case $CHOICE in yes) msg_info "Updating to Proxmox VE 8 (Patience)" - apt-get update &>/dev/null - apt-get -y dist-upgrade &>/dev/null + apt-get update + apt-get -y dist-upgrade msg_ok "Updated to Proxmox VE 8" ;; no) From e8ff5b6540b34963f989ac5d12ae337c81f4993f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Jun 2023 21:50:20 -0400 Subject: [PATCH 1629/3335] Update pve8-install.sh tweak --- misc/pve8-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-install.sh b/misc/pve8-install.sh index 0c45f6ff..e2786205 100644 --- a/misc/pve8-install.sh +++ b/misc/pve8-install.sh @@ -115,7 +115,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PVE8 TEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + CHOICE=$(whiptail --title "PVE8 TEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 9e27e197463e69d577abe2a2560f00f78c22f23e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Jun 2023 22:49:42 -0400 Subject: [PATCH 1630/3335] Update and rename pve8-post-install.sh to pve-post-install.sh combine pve7 & pve8 post install scripts --- ...e8-post-install.sh => pve-post-install.sh} | 88 +++++++++---------- 1 file changed, 42 insertions(+), 46 deletions(-) rename misc/{pve8-post-install.sh => pve-post-install.sh} (71%) diff --git a/misc/pve8-post-install.sh b/misc/pve-post-install.sh similarity index 71% rename from misc/pve8-post-install.sh rename to misc/pve-post-install.sh index c1913dda..8e5aa0df 100644 --- a/misc/pve8-post-install.sh +++ b/misc/pve-post-install.sh @@ -8,11 +8,11 @@ header_info() { clear cat <<"EOF" - ____ _ ____________ ____ __ ____ __ ____ - / __ \ | / / ____( __ ) / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / - / /_/ / | / / __/ / __ | / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / - / ____/| |/ / /___/ /_/ / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / -/_/ |___/_____/\____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + ____ _ ________ ____ __ ____ __ ____ + / __ \ | / / ____/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / + / ____/| |/ / /___ / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ EOF } @@ -44,25 +44,28 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } - start_routines() { header_info + VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then + whiptail --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58 + fi - CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 8 server.\n \nCorrect Proxmox VE 8 sources?" 14 58 2 \ + CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - msg_info "Correcting Proxmox VE 8 Sources" + msg_info "Correcting Proxmox VE Sources" cat </etc/apt/sources.list -deb http://ftp.debian.org/debian bookworm main contrib -deb http://ftp.debian.org/debian bookworm-updates main contrib -deb http://security.debian.org/debian-security bookworm-security main contrib +deb http://ftp.debian.org/debian $(VERSION) main contrib +deb http://ftp.debian.org/debian $(VERSION)-updates main contrib +deb http://security.debian.org/debian-security $(VERSION)-security main contrib EOF - msg_ok "Corrected Proxmox VE 8 Sources" + msg_ok "Corrected Proxmox VE Sources" ;; no) - msg_error "Selected no to Correcting Proxmox VE 8 Sources" + msg_error "Selected no to Correcting Proxmox VE Sources" ;; esac @@ -73,7 +76,7 @@ EOF yes) msg_info "Disabling 'pve-enterprise' repository" cat </etc/apt/sources.list.d/pve-enterprise.list -# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise +# deb https://enterprise.proxmox.com/debian/pve $(VERSION) pve-enterprise EOF msg_ok "Disabled 'pve-enterprise' repository" ;; @@ -89,7 +92,7 @@ EOF yes) msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list -deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +deb http://download.proxmox.com/debian/pve $(VERSION) pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" ;; @@ -98,22 +101,24 @@ EOF ;; esac - CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Enabling 'ceph package repositories'" - cat </etc/apt/sources.list.d/ceph.list + if [[ "$(VERSION)" == "bookworm" ]]; then + CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'ceph package repositories'" + cat </etc/apt/sources.list.d/ceph.list # deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription EOF - msg_ok "Enabled 'ceph package repositories'" - ;; - no) - msg_error "Selected no to Enabling 'ceph package repositories'" - ;; - esac + msg_ok "Enabled 'ceph package repositories'" + ;; + no) + msg_error "Selected no to Enabling 'ceph package repositories'" + ;; + esac + fi CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ @@ -122,7 +127,7 @@ EOF yes) msg_info "Adding 'pvetest' repository and set disabled" cat </etc/apt/sources.list.d/pvetest-for-beta.list -# deb http://download.proxmox.com/debian/pve bookworm pvetest +# deb http://download.proxmox.com/debian/pve $(VERSION) pvetest EOF msg_ok "Added 'pvetest' repository" ;; @@ -171,33 +176,33 @@ EOF esac fi - CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE 8 now?" 11 58 2 \ + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - msg_info "Updating Proxmox VE 8 (Patience)" + msg_info "Updating Proxmox VE (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox VE 8" + msg_ok "Updated Proxmox VE" ;; no) - msg_error "Selected no to Updating Proxmox VE 8" + msg_error "Selected no to Updating Proxmox VE" ;; esac - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - msg_info "Rebooting Proxmox VE 8" + msg_info "Rebooting Proxmox VE" sleep 2 msg_ok "Completed Post Install Routines" reboot ;; no) - msg_error "Selected no to Rebooting Proxmox VE 8 (Reboot recommended)" + msg_error "Selected no to Rebooting Proxmox VE (Reboot recommended)" msg_ok "Completed Post Install Routines" ;; esac @@ -206,7 +211,7 @@ EOF header_info echo -e "\nThis script will Perform Post Install Routines.\n" while true; do - read -p "Start the Proxmox VE 8 Post Install Script (y/n)?" yn + read -p "Start the Proxmox VE Post Install Script (y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) clear; exit ;; @@ -220,13 +225,4 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - header_info - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e " Requires PVE Version: 8.XX" - echo -e "\nExiting..." - sleep 3 - exit -fi - start_routines From ac0de26515ff935118378305b7962f4114e25b12 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Jun 2023 22:58:34 -0400 Subject: [PATCH 1631/3335] Update post-pve-install.sh combine pve7 & pve8 post install scripts --- misc/post-pve-install.sh | 147 +++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 83 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index ecf8d2de..8e5aa0df 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -8,11 +8,11 @@ header_info() { clear cat <<"EOF" - ____ _ _____________ ____ __ ____ __ ____ - / __ \ | / / ____/__ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / - / /_/ / | / / __/ / / / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ / / / - / ____/| |/ / /___ / / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / -/_/ |___/_____/ /_/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + ____ _ ________ ____ __ ____ __ ____ + / __ \ | / / ____/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / | / / __/ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / + / ____/| |/ / /___ / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ |___/_____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ EOF } @@ -44,16 +44,40 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } - start_routines() { header_info + VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then + whiptail --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58 + fi + + CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Correcting Proxmox VE Sources" + cat </etc/apt/sources.list +deb http://ftp.debian.org/debian $(VERSION) main contrib +deb http://ftp.debian.org/debian $(VERSION)-updates main contrib +deb http://security.debian.org/debian-security $(VERSION)-security main contrib +EOF + msg_ok "Corrected Proxmox VE Sources" + ;; + no) + msg_error "Selected no to Correcting Proxmox VE Sources" + ;; + esac + CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Disabling 'pve-enterprise' repository" - sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list + cat </etc/apt/sources.list.d/pve-enterprise.list +# deb https://enterprise.proxmox.com/debian/pve $(VERSION) pve-enterprise +EOF msg_ok "Disabled 'pve-enterprise' repository" ;; no) @@ -61,32 +85,14 @@ start_routines() { ;; esac - CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE 7 server.\n \nCorrect Proxmox VE 7 sources?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Correcting Proxmox VE 7 Sources" - cat </etc/apt/sources.list -deb http://ftp.debian.org/debian bullseye main contrib -deb http://ftp.debian.org/debian bullseye-updates main contrib -deb http://security.debian.org/debian-security bullseye-security main contrib -EOF - msg_ok "Corrected Proxmox VE 7 Sources" - ;; - no) - msg_error "Selected no to Correcting Proxmox VE 7 Sources" - ;; - esac - CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Enabling 'pve-no-subscription' repository" - cat <>/etc/apt/sources.list -deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription + cat </etc/apt/sources.list.d/pve-install-repo.list +deb http://download.proxmox.com/debian/pve $(VERSION) pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" ;; @@ -95,14 +101,33 @@ EOF ;; esac + if [[ "$(VERSION)" == "bookworm" ]]; then + CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'ceph package repositories'" + cat </etc/apt/sources.list.d/ceph.list +# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise +deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription +EOF + msg_ok "Enabled 'ceph package repositories'" + ;; + no) + msg_error "Selected no to Enabling 'ceph package repositories'" + ;; + esac + fi + CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) msg_info "Adding 'pvetest' repository and set disabled" - cat <>/etc/apt/sources.list -# deb http://download.proxmox.com/debian/pve bullseye pvetest + cat </etc/apt/sources.list.d/pvetest-for-beta.list +# deb http://download.proxmox.com/debian/pve $(VERSION) pvetest EOF msg_ok "Added 'pvetest' repository" ;; @@ -117,12 +142,14 @@ EOF "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) + whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; no) + whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_error "Selected no to Disabling subscription nag" ;; esac @@ -149,70 +176,33 @@ EOF esac fi - CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE 7 now?" 11 58 2 \ + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - msg_info "Updating Proxmox VE 7 (Patience)" + msg_info "Updating Proxmox VE (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox VE 7" + msg_ok "Updated Proxmox VE" ;; no) - msg_error "Selected no to Updating Proxmox VE 7" + msg_error "Selected no to Updating Proxmox VE" ;; esac - microcode="" - if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N'; then - CHOICE=$(whiptail --title "N-SERIES PROCESSOR DETECTED" --menu "\nTo ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install the Proxmox 6.2 kernel.\n\nInstall the Proxmox 6.2 kernel now?" 16 58 2 \ - "yes" " " \ - "no" " " 3>&1 1>&2 2>&3) - case $CHOICE in - yes) - msg_info "Installing Proxmox 6.2 kernel" - apt-get install -y pve-kernel-6.2 &>/dev/null - microcode="need" - msg_ok "Installed Proxmox 6.2 kernel" - ;; - no) - msg_error "Selected no to Installing the Proxmox 6.2 kernel" - ;; - esac - fi - - if [ "$microcode" == "need" ]; then - CHOICE=$(whiptail --title "INTEL MICROCODE" --menu "\nMicrocode updates can fix hardware bugs, improve performance, and enhance security features of the processor.\n\nInstall the Intel Microcode now?" 16 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Installing Intel Microcode" - apt-get install -y iucode-tool &>/dev/null - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230512.1_amd64.deb - dpkg -i intel-microcode_3.20230512.1_amd64.deb &>/dev/null - rm intel-microcode_3.20230512.1_amd64.deb - msg_ok "Installed Intel Microcode" - ;; - no) - msg_error "Selected no to Installing the Intel Microcode" - ;; - esac - fi - - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 7 now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - msg_info "Rebooting Proxmox VE 7" + msg_info "Rebooting Proxmox VE" sleep 2 msg_ok "Completed Post Install Routines" reboot ;; no) - msg_error "Selected no to Rebooting Proxmox VE 7 (Reboot recommended)" + msg_error "Selected no to Rebooting Proxmox VE (Reboot recommended)" msg_ok "Completed Post Install Routines" ;; esac @@ -221,7 +211,7 @@ EOF header_info echo -e "\nThis script will Perform Post Install Routines.\n" while true; do - read -p "Start the Proxmox VE 7 Post Install Script (y/n)?" yn + read -p "Start the Proxmox VE Post Install Script (y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) clear; exit ;; @@ -235,13 +225,4 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then - header_info - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e " Requires PVE Version: 7.XX" - echo -e "\nExiting..." - sleep 3 - exit -fi - start_routines From 1144c614c2ede8462d400d7eded2fc1b2e8ae5c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Jun 2023 22:58:56 -0400 Subject: [PATCH 1632/3335] Delete pve-post-install.sh --- misc/pve-post-install.sh | 228 --------------------------------------- 1 file changed, 228 deletions(-) delete mode 100644 misc/pve-post-install.sh diff --git a/misc/pve-post-install.sh b/misc/pve-post-install.sh deleted file mode 100644 index 8e5aa0df..00000000 --- a/misc/pve-post-install.sh +++ /dev/null @@ -1,228 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -header_info() { - clear - cat <<"EOF" - ____ _ ________ ____ __ ____ __ ____ - / __ \ | / / ____/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / - / /_/ / | / / __/ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / - / ____/| |/ / /___ / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / -/_/ |___/_____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ - -EOF -} - -RD=$(echo "\033[01;31m") -YW=$(echo "\033[33m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" - -set -euo pipefail -shopt -s inherit_errexit nullglob - -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -start_routines() { - header_info - VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then - whiptail --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58 - fi - - CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Correcting Proxmox VE Sources" - cat </etc/apt/sources.list -deb http://ftp.debian.org/debian $(VERSION) main contrib -deb http://ftp.debian.org/debian $(VERSION)-updates main contrib -deb http://security.debian.org/debian-security $(VERSION)-security main contrib -EOF - msg_ok "Corrected Proxmox VE Sources" - ;; - no) - msg_error "Selected no to Correcting Proxmox VE Sources" - ;; - esac - - CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Disabling 'pve-enterprise' repository" - cat </etc/apt/sources.list.d/pve-enterprise.list -# deb https://enterprise.proxmox.com/debian/pve $(VERSION) pve-enterprise -EOF - msg_ok "Disabled 'pve-enterprise' repository" - ;; - no) - msg_error "Selected no to Disabling 'pve-enterprise' repository" - ;; - esac - - CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Enabling 'pve-no-subscription' repository" - cat </etc/apt/sources.list.d/pve-install-repo.list -deb http://download.proxmox.com/debian/pve $(VERSION) pve-no-subscription -EOF - msg_ok "Enabled 'pve-no-subscription' repository" - ;; - no) - msg_error "Selected no to Enabling 'pve-no-subscription' repository" - ;; - esac - - if [[ "$(VERSION)" == "bookworm" ]]; then - CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Enabling 'ceph package repositories'" - cat </etc/apt/sources.list.d/ceph.list -# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise -deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription -EOF - msg_ok "Enabled 'ceph package repositories'" - ;; - no) - msg_error "Selected no to Enabling 'ceph package repositories'" - ;; - esac - fi - - CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Adding 'pvetest' repository and set disabled" - cat </etc/apt/sources.list.d/pvetest-for-beta.list -# deb http://download.proxmox.com/debian/pve $(VERSION) pvetest -EOF - msg_ok "Added 'pvetest' repository" - ;; - no) - msg_error "Selected no to Adding 'pvetest' repository" - ;; - esac - - if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then - CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 - msg_info "Disabling subscription nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script - apt --reinstall install proxmox-widget-toolkit &>/dev/null - msg_ok "Disabled subscription nag (Delete browser cache)" - ;; - no) - whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 - msg_error "Selected no to Disabling subscription nag" - ;; - esac - fi - - if systemctl is-active --quiet pve-ha-lrm; then - CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Disabling high availability" - systemctl stop pve-ha-lrm - systemctl disable pve-ha-lrm &>/dev/null - systemctl stop pve-ha-crm - systemctl disable pve-ha-crm &>/dev/null - systemctl stop corosync - systemctl disable corosync &>/dev/null - msg_ok "Disabled high availability" - ;; - no) - msg_error "Selected no to Disabling high availability" - ;; - esac - fi - - CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Updating Proxmox VE (Patience)" - apt-get update &>/dev/null - apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox VE" - ;; - no) - msg_error "Selected no to Updating Proxmox VE" - ;; - esac - - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Rebooting Proxmox VE" - sleep 2 - msg_ok "Completed Post Install Routines" - reboot - ;; - no) - msg_error "Selected no to Rebooting Proxmox VE (Reboot recommended)" - msg_ok "Completed Post Install Routines" - ;; - esac -} - -header_info -echo -e "\nThis script will Perform Post Install Routines.\n" -while true; do - read -p "Start the Proxmox VE Post Install Script (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) clear; exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -if ! command -v pveversion >/dev/null 2>&1; then - header_info - msg_error "\n No PVE Detected!\n" - exit -fi - -start_routines From 63f90bd080b938c67dace1e420566c71a4694c63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Jun 2023 23:19:19 -0400 Subject: [PATCH 1633/3335] Update post-pve-install.sh correct code --- misc/post-pve-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 8e5aa0df..fcf634df 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -58,9 +58,9 @@ start_routines() { yes) msg_info "Correcting Proxmox VE Sources" cat </etc/apt/sources.list -deb http://ftp.debian.org/debian $(VERSION) main contrib -deb http://ftp.debian.org/debian $(VERSION)-updates main contrib -deb http://security.debian.org/debian-security $(VERSION)-security main contrib +deb http://ftp.debian.org/debian ${VERSION} main contrib +deb http://ftp.debian.org/debian ${VERSION}-updates main contrib +deb http://security.debian.org/debian-security ${VERSION}-security main contrib EOF msg_ok "Corrected Proxmox VE Sources" ;; @@ -76,7 +76,7 @@ EOF yes) msg_info "Disabling 'pve-enterprise' repository" cat </etc/apt/sources.list.d/pve-enterprise.list -# deb https://enterprise.proxmox.com/debian/pve $(VERSION) pve-enterprise +# deb https://enterprise.proxmox.com/debian/pve ${VERSION} pve-enterprise EOF msg_ok "Disabled 'pve-enterprise' repository" ;; @@ -92,7 +92,7 @@ EOF yes) msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list -deb http://download.proxmox.com/debian/pve $(VERSION) pve-no-subscription +deb http://download.proxmox.com/debian/pve ${VERSION} pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" ;; @@ -101,7 +101,7 @@ EOF ;; esac - if [[ "$(VERSION)" == "bookworm" ]]; then + if [[ "${VERSION}" == "bookworm" ]]; then CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) @@ -127,7 +127,7 @@ EOF yes) msg_info "Adding 'pvetest' repository and set disabled" cat </etc/apt/sources.list.d/pvetest-for-beta.list -# deb http://download.proxmox.com/debian/pve $(VERSION) pvetest +# deb http://download.proxmox.com/debian/pve ${VERSION} pvetest EOF msg_ok "Added 'pvetest' repository" ;; From b8e3af815a2e268d14fe6050646e34151ea05e1f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Jun 2023 23:23:40 -0400 Subject: [PATCH 1634/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ea88b4..c6ec7014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-06-11 + +### Changed + +- **Proxmox VE Post Install** + - The Proxmox VE Post Install script is now compatible with both Proxmox Virtual Environment 7 (PVE7) and Proxmox Virtual Environment 8 (PVE8). + ## 2023-06-02 ### Changed From 5eaf4131713996951af78705b9065415e32b0a27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Jun 2023 23:56:21 -0400 Subject: [PATCH 1635/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6ec7014..933730fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Changed - **Proxmox VE Post Install** - - The Proxmox VE Post Install script is now compatible with both Proxmox Virtual Environment 7 (PVE7) and Proxmox Virtual Environment 8 (PVE8). + - Now compatible with both Proxmox Virtual Environment 7 (PVE7) and Proxmox Virtual Environment 8 (PVE8). ## 2023-06-02 From 5dbac97e7a83ba9f741b3abfa6f7b9854bd2c50e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Jun 2023 11:42:12 -0400 Subject: [PATCH 1636/3335] Update kernel-clean.sh compatible with PVE8 --- misc/kernel-clean.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 30660b67..81bc0e63 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -63,7 +63,9 @@ function check_root() { fi } + VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" function other_kernel() { + if [[ "${VERSION}" == "bullseye" ]]; then if [[ "$current_kernel" == *"edge"* ]]; then echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" @@ -74,6 +76,7 @@ function other_kernel() { echo -e "\nThe script cannot be used when running opt-in kernels. \nProxmox VE's package management relies directly on the current default kernel, which is 5.15. \nTherefore, it is not possible to utilize this script. In this case, you should use autoremove instead. \n`apt-get autoremove`\n" exit 1 fi + fi } function kernel_info() { From 808b748617456f029244802b8bcd2357fcdb5c97 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Jun 2023 12:23:25 -0400 Subject: [PATCH 1637/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 933730fa..8ff803a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-06-12 + +### Changed + +- **Proxmox VE Edge Kernel** + - Removed, with the Proxmox opt-in kernels and the upcoming Proxmox Virtual Environment 8, edge kernels are no longer needed. + ## 2023-06-11 ### Changed From bba46e59973a383ca8c70d92f7c335ce26bba674 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Jun 2023 12:26:26 -0400 Subject: [PATCH 1638/3335] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ff803a2..60a3e0b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ ### Changed - **Proxmox VE Edge Kernel** - - Removed, with the Proxmox opt-in kernels and the upcoming Proxmox Virtual Environment 8, edge kernels are no longer needed. + - Removed, with the Proxmox opt-in kernels and the upcoming Proxmox Virtual Environment 8, edge kernels are no longer needed. +- **Proxmox VE Kernel Clean** + - Now compatible with PVE8. ## 2023-06-11 From ad38e305794593318eeb5c5a6b4a8a6f1a8a9586 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Jun 2023 14:25:01 -0400 Subject: [PATCH 1639/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 6db16420..a08acd7b 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -17,3 +17,5 @@ [Proxmox: Plex LXC with Alder Lake Transcoding](https://www.derekseaman.com/2023/04/proxmox-plex-lxc-with-alder-lake-transcoding.html) [How To Backup Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-backup-home-assistant-in-proxmox/) + +[Frigate VM on Proxmox with PCIe Coral TPU](https://www.derekseaman.com/2023/06/home-assistant-frigate-vm-on-proxmox-with-pcie-coral-tpu.html) From 5d5c8572a6a382689a7bdad46277c3e3ae53edbd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 07:41:48 -0400 Subject: [PATCH 1640/3335] Update esphome-install.sh change command order --- install/esphome-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index ce0224f0..6f2a8c28 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -36,7 +36,7 @@ echo "[Unit] Description=ESPHome Dashboard After=network.target [Service] -ExecStart=/usr/local/bin/esphome /root/config/ dashboard +ExecStart=/usr/local/bin/esphome dashboard /root/config/ Restart=always User=root [Install] From f791577124e50bf59d05afe3a82d5cb3eff353da Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 13:03:40 -0400 Subject: [PATCH 1641/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0098eea6..466cfa26 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Contributing to Proxmox VE Helper Scripts

-These scripts allow for the creation of a Linux container or virtual machine in an interactive manner, with options for both basic and advanced configurations. The basic setup uses default settings, while the advanced setup offers the possibility to modify the default settings. Using the whiptail command, the options are displayed in a dialog box format. The script then gathers and verifies the user's input in order to generate the final configuration of the container or virtual machine. +These scripts enable users to build a Linux container or virtual machine in an interactive manner, offering options for both basic and advanced configurations. The basic setup utilizes default settings, whereas the advanced setup empowers users to alter these default settings. Through the use of the whiptail command, options are presented to users in a dialog box format. After the user makes their selections, the script collects and verifies the user's input in order to generate the final configuration for the container or virtual machine.

Proxmox VE Helper Scripts

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
From 3b7c98b0ce6418394bf003e0da800134113f6206 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 13:12:21 -0400 Subject: [PATCH 1642/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index af213103..736aaed3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -8,7 +8,7 @@ body: - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - Changing Linux distributions without confirming the proper functioning of default settings. - When encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - - For questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) + - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: textarea id: bug attributes: From a7157c64da0ca0074583fd845b9635cd61a40b88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 13:31:55 -0400 Subject: [PATCH 1643/3335] Update alpine-vaultwarden.sh revert to 3.17 --- ct/alpine-vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 32b9f946..525f1404 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -24,7 +24,7 @@ var_disk="0.3" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.18" +var_version="3.17" variables color catch_errors From e1037834d7e5cd02cf599223e2be5ddc95f75ce2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 13:58:00 -0400 Subject: [PATCH 1644/3335] Update alpine-vaultwarden-install.sh https://git.alpinelinux.org/aports/tree/testing/vaultwarden/vaultwarden.post-upgrade --- install/alpine-vaultwarden-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 9d8b628d..74049c3d 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -27,7 +27,7 @@ msg_info "Installing Alpine-Vaultwarden" $STD apk add vaultwarden cat </etc/conf.d/vaultwarden export DATA_FOLDER=/var/lib/vaultwarden -export WEB_VAULT_FOLDER=/var/lib/vaultwarden/web-vault +export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/ export WEB_VAULT_ENABLED=true export ADMIN_TOKEN='' export ROCKET_ADDRESS=0.0.0.0 @@ -37,4 +37,4 @@ $STD rc-update add vaultwarden default msg_ok "Installed Alpine-Vaultwarden" motd_ssh -customize \ No newline at end of file +customize From 46b8a2c529e558e50e93dd34e8fdfea7cd6370d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 13:58:32 -0400 Subject: [PATCH 1645/3335] Update alpine-vaultwarden.sh 3.18 --- ct/alpine-vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 525f1404..32b9f946 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -24,7 +24,7 @@ var_disk="0.3" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.17" +var_version="3.18" variables color catch_errors From 9a99cb682728ee38a1f9dab94d4ec360b4e633aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 14:44:28 -0400 Subject: [PATCH 1646/3335] Update alpine-vaultwarden-install.sh comment `/etc/conf.d/vaultwarden` --- install/alpine-vaultwarden-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 74049c3d..d80655ab 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -25,13 +25,13 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Vaultwarden" $STD apk add vaultwarden -cat </etc/conf.d/vaultwarden -export DATA_FOLDER=/var/lib/vaultwarden -export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/ -export WEB_VAULT_ENABLED=true -export ADMIN_TOKEN='' -export ROCKET_ADDRESS=0.0.0.0 -EOF +#cat </etc/conf.d/vaultwarden +#export DATA_FOLDER=/var/lib/vaultwarden +#export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/ +#export WEB_VAULT_ENABLED=true +#export ADMIN_TOKEN='' +#export ROCKET_ADDRESS=0.0.0.0 +#EOF $STD rc-service vaultwarden start $STD rc-update add vaultwarden default msg_ok "Installed Alpine-Vaultwarden" From 3acae959c660c9ccd1591f686ebe6c2e00e1a14e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 15:01:56 -0400 Subject: [PATCH 1647/3335] Update alpine-vaultwarden-install.sh fix `/etc/conf.d/vaultwarden` --- install/alpine-vaultwarden-install.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index d80655ab..7442a2ab 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -25,12 +25,9 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Vaultwarden" $STD apk add vaultwarden -#cat </etc/conf.d/vaultwarden -#export DATA_FOLDER=/var/lib/vaultwarden -#export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/ -#export WEB_VAULT_ENABLED=true -#export ADMIN_TOKEN='' -#export ROCKET_ADDRESS=0.0.0.0 +cat <>/etc/conf.d/vaultwarden +export ADMIN_TOKEN='' +export ROCKET_ADDRESS=0.0.0.0 #EOF $STD rc-service vaultwarden start $STD rc-update add vaultwarden default From 5e2605526495bf7cd535b030eec62ad2a6a5c883 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 15:04:38 -0400 Subject: [PATCH 1648/3335] Update alpine-vaultwarden-install.sh --- install/alpine-vaultwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 7442a2ab..0c6731fa 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -28,7 +28,7 @@ $STD apk add vaultwarden cat <>/etc/conf.d/vaultwarden export ADMIN_TOKEN='' export ROCKET_ADDRESS=0.0.0.0 -#EOF +EOF $STD rc-service vaultwarden start $STD rc-update add vaultwarden default msg_ok "Installed Alpine-Vaultwarden" From 0442562ce0ba9eddda95bdca2034aa604ad6a120 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 16:33:25 -0400 Subject: [PATCH 1649/3335] Update alpine-vaultwarden-install.sh fix installation --- install/alpine-vaultwarden-install.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 0c6731fa..502720d9 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -25,13 +25,23 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Vaultwarden" $STD apk add vaultwarden -cat <>/etc/conf.d/vaultwarden -export ADMIN_TOKEN='' -export ROCKET_ADDRESS=0.0.0.0 -EOF +sudo sed -i -e 's/# export ADMIN_TOKEN=.*/export ADMIN_TOKEN='\'''\''/' -e '/^# export ROCKET_ADDRESS=0\.0\.0\.0/s/^# //' -e 's|export WEB_VAULT_FOLDER=.*|export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/web-vault/|' -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden +msg_ok "Installed Alpine-Vaultwarden" + +WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz +mkdir -p /usr/share/webapps/vaultwarden-web/ + +msg_info "Downloading Web-Vault ${WEBVAULT}" +$STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz +$STD tar -xzf bw_web_$WEBVAULT.tar.gz -C /usr/share/webapps/vaultwarden-web/ +rm bw_web_$WEBVAULT.tar.gz +msg_ok "Downloaded Web-Vault ${WEBVAULT}" + +msg_info "Starting Alpine-Vaultwarden" $STD rc-service vaultwarden start $STD rc-update add vaultwarden default -msg_ok "Installed Alpine-Vaultwarden" +msg_info "Started Alpine-Vaultwarden" motd_ssh customize From e9069b928c26029ee61b77cd71d24295e5cc6e51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 16:35:38 -0400 Subject: [PATCH 1650/3335] Update alpine-vaultwarden-install.sh tweak --- install/alpine-vaultwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 502720d9..9aba978f 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Vaultwarden" $STD apk add vaultwarden -sudo sed -i -e 's/# export ADMIN_TOKEN=.*/export ADMIN_TOKEN='\'''\''/' -e '/^# export ROCKET_ADDRESS=0\.0\.0\.0/s/^# //' -e 's|export WEB_VAULT_FOLDER=.*|export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/web-vault/|' -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden +sed -i -e 's/# export ADMIN_TOKEN=.*/export ADMIN_TOKEN='\'''\''/' -e '/^# export ROCKET_ADDRESS=0\.0\.0\.0/s/^# //' -e 's|export WEB_VAULT_FOLDER=.*|export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/web-vault/|' -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden msg_ok "Installed Alpine-Vaultwarden" WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 5841b20b1f32b56d11f467c819002a737603edfc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 16:57:01 -0400 Subject: [PATCH 1651/3335] Update alpine-vaultwarden-install.sh Code refactoring --- install/alpine-vaultwarden-install.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index 9aba978f..f62f6b32 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -25,18 +25,12 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Vaultwarden" $STD apk add vaultwarden -sed -i -e 's/# export ADMIN_TOKEN=.*/export ADMIN_TOKEN='\'''\''/' -e '/^# export ROCKET_ADDRESS=0\.0\.0\.0/s/^# //' -e 's|export WEB_VAULT_FOLDER=.*|export WEB_VAULT_FOLDER=/usr/share/webapps/vaultwarden-web/web-vault/|' -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden +sed -i -e 's/# export ADMIN_TOKEN=.*/export ADMIN_TOKEN='\'''\''/' -e '/^# export ROCKET_ADDRESS=0\.0\.0\.0/s/^# //' -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden msg_ok "Installed Alpine-Vaultwarden" -WEBVAULT=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz -mkdir -p /usr/share/webapps/vaultwarden-web/ - -msg_info "Downloading Web-Vault ${WEBVAULT}" -$STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WEBVAULT/bw_web_$WEBVAULT.tar.gz -$STD tar -xzf bw_web_$WEBVAULT.tar.gz -C /usr/share/webapps/vaultwarden-web/ -rm bw_web_$WEBVAULT.tar.gz -msg_ok "Downloaded Web-Vault ${WEBVAULT}" +msg_info "Installing Web-Vault" +$STD apk add vaultwarden-web-vault +msg_ok "Installed Web-Vault" msg_info "Starting Alpine-Vaultwarden" $STD rc-service vaultwarden start From bbb57624579bfc2e7be1cea8a85985d68e2ffe47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Jun 2023 17:24:09 -0400 Subject: [PATCH 1652/3335] Update alpine-vaultwarden-install.sh --- install/alpine-vaultwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index f62f6b32..c66c36b3 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -35,7 +35,7 @@ msg_ok "Installed Web-Vault" msg_info "Starting Alpine-Vaultwarden" $STD rc-service vaultwarden start $STD rc-update add vaultwarden default -msg_info "Started Alpine-Vaultwarden" +msg_ok "Started Alpine-Vaultwarden" motd_ssh customize From 591491d5fb9ba7b48a04eb1ba40985f65efbeed2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Jun 2023 11:31:31 -0400 Subject: [PATCH 1653/3335] Update omada-install.sh - change dependencies to utilize Debian 11 - Ubuntu 20.04 has been removed from the Proxmox VE 8 container template index --- install/omada-install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index adcfe5aa..3acc7c8e 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -18,11 +18,21 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y gnupg -$STD apt-get install -y openjdk-8-jre-headless $STD apt-get install -y jsvc +msg_ok "Installed Dependencies" + +msg_info "Installing Azul Zulu" +$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 +wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb +$STD apt-get install ./zulu-repo_1.0.0-3_all.deb +$STD apt-get update +$STD apt-get -y install zulu8-jdk +msg_ok "Installed Azul Zulu" + +msg_info "Installing MongoDB" wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb -msg_ok "Installed Dependencies" +msg_ok "Installed MongoDB" msg_info "Installing Omada Controller v5.9.31" wget -qL https://static.tp-link.com/upload/software/2023/202303/20230321/Omada_SDN_Controller_v5.9.31_Linux_x64.deb @@ -33,7 +43,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb +rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From e40593c058fd00258e3046c411dac477078a5ec3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Jun 2023 11:32:22 -0400 Subject: [PATCH 1654/3335] Update omada.sh switch to Debian --- ct/omada.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/omada.sh b/ct/omada.sh index c355622e..a5df6f9b 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -22,8 +22,8 @@ APP="Omada" var_disk="8" var_cpu="2" var_ram="2048" -var_os="ubuntu" -var_version="20.04" +var_os="debian" +var_version="11" variables color catch_errors From 557f8dcf463a7058b2143a52732d81b529791216 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Jun 2023 13:12:40 -0400 Subject: [PATCH 1655/3335] Update monitor-all.sh Use the first given IP in a VM --- misc/monitor-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 236016ee..483acd48 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -46,7 +46,7 @@ while true; do else # It is a virtual machine config_cmd="qm config" - IP=$(qm guest cmd $instance network-get-interfaces | egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -E "192\.|10\.") + IP=$(qm guest cmd $instance network-get-interfaces | egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -E "192\.|10\." | head -n 1)) fi # Skip instances based on templates From 72f3648730de3db97a0b564942b80321d85a0222 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Jun 2023 13:52:07 -0400 Subject: [PATCH 1656/3335] Update monitor-all.sh --- misc/monitor-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 483acd48..9eec0d1a 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -46,7 +46,7 @@ while true; do else # It is a virtual machine config_cmd="qm config" - IP=$(qm guest cmd $instance network-get-interfaces | egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -E "192\.|10\." | head -n 1)) + IP=$(qm guest cmd $instance network-get-interfaces | egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -E "192\.|10\." | head -n 1) fi # Skip instances based on templates From ca4a3ecef281590b6fac3c98339f7ac91e57f27c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Jun 2023 07:48:54 -0400 Subject: [PATCH 1657/3335] Update build.func add option to choose Debian version --- misc/build.func | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 06e34b59..9d59ada1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -143,8 +143,19 @@ advanced_settings() { fi if [ "$var_os" == "debian" ]; then - var_version="11" - echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" + var_version="" + while [ -z "$var_version" ]; do + if var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + "11" "Bullseye" OFF \ + "12" "Bookworm" OFF \ + 3>&1 1>&2 2>&3); then + if [ -n "$var_version" ]; then + echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" + fi + else + exit-script + fi + done fi if [ "$var_os" == "ubuntu" ]; then From 0d5754de1249cc509087863bb1db22f448993c63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Jun 2023 08:17:07 -0400 Subject: [PATCH 1658/3335] Update pve8-install.sh tweak --- misc/pve8-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-install.sh b/misc/pve8-install.sh index e2786205..b9ff380b 100644 --- a/misc/pve8-install.sh +++ b/misc/pve8-install.sh @@ -138,7 +138,7 @@ EOF yes) msg_info "Updating to Proxmox VE 8 (Patience)" apt-get update - apt-get -y dist-upgrade + DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y msg_ok "Updated to Proxmox VE 8" ;; no) From 8c2a3cc4d774fa13d17f695d6bdf9a4deedb1372 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Jun 2023 14:11:38 -0400 Subject: [PATCH 1659/3335] Update monitor-all.sh Skip instances based on onboot and templates --- misc/monitor-all.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 9eec0d1a..65dbca92 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -49,9 +49,14 @@ while true; do IP=$(qm guest cmd $instance network-get-interfaces | egrep -o "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -E "192\.|10\." | head -n 1) fi - # Skip instances based on templates + # Skip instances based on onboot and templates + onboot=$($config_cmd $instance | grep onboot | grep -q "onboot: 0" && echo "true" || echo "false") template=$($config_cmd $instance | grep template | grep -q "template:" && echo "true" || echo "false") - if [ "$template" == "true" ]; then + + if [ "$onboot" == "true" ]; then + echo "Skipping $instance because it is set not to boot" + continue + elif [ "$template" == "true" ]; then echo "Skipping $instance because it is a template" continue fi From 61118ab83b0f91d9fb267e3878c537cd11bb860a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Jun 2023 14:33:58 -0400 Subject: [PATCH 1660/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60a3e0b7..6595c4ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-06-16 + +### Changed + +- **Proxmox VE Monitor-All** + - Skip instances based on onboot and templates. [8c2a3cc](https://github.com/tteck/Proxmox/commit/8c2a3cc4d774fa13d17f695d6bdf9a4deedb1372). + ## 2023-06-12 ### Changed From e80dbb4aade8467995a108dc8c80e8359deca584 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Jun 2023 16:42:46 -0400 Subject: [PATCH 1661/3335] Update homeassistant-core-install.sh add bookworm --- install/homeassistant-core-install.sh | 125 ++++++++++++++++---------- 1 file changed, 76 insertions(+), 49 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 5df4d607..f260b76c 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -13,53 +13,82 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y \ - git \ - curl \ - sudo \ - mc \ - build-essential \ - libssl-dev \ - zlib1g-dev \ - libbz2-dev \ - libpcap-dev \ - libreadline-dev \ - libsqlite3-dev \ - libncursesw5-dev \ - xz-utils \ - tk-dev \ - llvm \ - libxml2-dev \ - libxmlsec1-dev \ - libffi-dev \ - liblzma-dev \ - dbus-broker \ - bluez \ - libmariadb-dev-compat \ - libjpeg-dev \ - autoconf \ - libopenjp2-7 \ - libtiff5 \ - libturbojpeg0-dev \ - liblapack3 \ - liblapack-dev \ - libatlas-base-dev -msg_ok "Installed Dependencies" +if [[ "$PCT_OSVERSION" == "12" ]]; then + msg_info "Installing Dependencies, Bookworm (Patience)" + $STD apt-get install -y \ + git \ + curl \ + sudo \ + mc \ + python3 \ + python3-dev \ + python3-venv \ + python3-pip \ + bluez \ + libffi-dev \ + libssl-dev \ + libjpeg-dev \ + zlib1g-dev \ + autoconf \ + build-essential \ + libopenjp2-7 \ + libturbojpeg0-dev \ + tzdata \ + ffmpeg \ + liblapack3 \ + liblapack-dev \ + libatlas-base-dev + $STD systemctl disable systemd-networkd-wait-online.service + msg_ok "Installed Dependencies" +else + msg_info "Installing Dependencies, Bullseye (Patience)" + $STD apt-get install -y \ + git \ + curl \ + sudo \ + mc \ + build-essential \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + libpcap-dev \ + libreadline-dev \ + libsqlite3-dev \ + libncursesw5-dev \ + xz-utils \ + tk-dev \ + llvm \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ + liblzma-dev \ + dbus-broker \ + bluez \ + libmariadb-dev-compat \ + libjpeg-dev \ + autoconf \ + libopenjp2-7 \ + libtiff5 \ + libturbojpeg0-dev \ + liblapack3 \ + liblapack-dev \ + libatlas-base-dev + msg_ok "Installed Dependencies" -msg_info "Installing pyenv" -$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv -set +e -echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc -msg_ok "Installed pyenv" -. ~/.bashrc -set -e -msg_info "Installing Python 3.11.3 (Patience)" -$STD pyenv install 3.11.3 -pyenv global 3.11.3 -msg_ok "Installed Python 3.11.3" + msg_info "Installing pyenv" + $STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv + set +e + echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc + echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc + echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc + msg_ok "Installed pyenv" + . ~/.bashrc + set -e + msg_info "Installing Python 3.11.3 (Patience)" + $STD pyenv install 3.11.3 + pyenv global 3.11.3 + msg_ok "Installed Python 3.11.3" +fi msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant @@ -68,8 +97,6 @@ python3 -m venv . source bin/activate $STD pip install --upgrade pip $STD python3 -m pip install wheel -$STD pip install mysqlclient -$STD pip install psycopg2-binary $STD pip install homeassistant mkdir -p /root/.homeassistant msg_ok "Installed Home Assistant-Core" From 4c752c9d5001583694ea3bc8d0c944dc5d739ec6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 05:52:43 -0400 Subject: [PATCH 1662/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6595c4ee..18dcaed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ ### Changed - **Proxmox VE 7 Post Install** - - If an Intel N-series processor is detected, the script provides options to install both the Proxmox 6.2 kernel and the Intel microcode. + - If an Intel N-series processor is detected, ~the script provides options to install both the Proxmox 6.2 kernel and the Intel microcode.~ and using PVE7, recommend using PVE8 ## 2023-05-23 From 2101583d1a07f3a22eced4b41d95b2b0139e68dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 10:42:01 -0400 Subject: [PATCH 1663/3335] Update mqtt-install.sh use standard Debian packages --- install/mqtt-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 71e0ef9a..9534db5a 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -17,15 +17,9 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" -$STD wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key -$STD apt-key add mosquitto-repo.gpg.key -cd /etc/apt/sources.list.d/ -$STD wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list -$STD apt-get update $STD apt-get -y install mosquitto $STD apt-get -y install mosquitto-clients msg_ok "Installed Mosquitto MQTT Broker" From 9ef8a4ae4fe9c9d59fc8af06a48e3670ccadcd6f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 18:22:23 -0400 Subject: [PATCH 1664/3335] Update unifi-install.sh Debian 12 compatible --- install/unifi-install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 11515d90..4ce0e417 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -20,12 +20,19 @@ $STD apt-get install -y mc $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" +if [[ "$PCT_OSVERSION" == "12" ]]; then + echo -e "deb http://ftp.debian.org/debian bullseye main" >/etc/apt/sources.list.d/openjdk-11-jre-headless.list + $STD apt-get update +fi + msg_info "Installing OpenJDK" $STD apt-get install -y openjdk-11-jre-headless $STD apt-mark hold openjdk-11-* msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" @@ -41,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf mongodb-org-server_3.6.23_amd64.deb +rm -rf mongodb-org-server_3.6.23_amd64.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 28f5363737e96155e2758071091ce5dd6d91ae15 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 18:23:50 -0400 Subject: [PATCH 1665/3335] Update omada-install.sh Debian 12 compatible --- install/omada-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index 3acc7c8e..f6bb625d 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -30,6 +30,8 @@ $STD apt-get -y install zulu8-jdk msg_ok "Installed Azul Zulu" msg_info "Installing MongoDB" +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" @@ -43,7 +45,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb +rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 59110997d51a2d4d1bd3ba0605da841ceb52fdcf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 18:30:05 -0400 Subject: [PATCH 1666/3335] Update install.func Tweak for Debian 12 --- misc/install.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/install.func b/misc/install.func index ca112b9e..34b3d07d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -124,6 +124,9 @@ motd_ssh() { sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config systemctl restart sshd fi + if [[ "$PCT_OSVERSION" == "12" ]]; then + $STD systemctl disable systemd-networkd-wait-online.service + fi } # This function customizes the container by modifying the getty service and enabling auto-login for the root user From a66326f613795223c4db0783987e7ac84333db70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 19:01:38 -0400 Subject: [PATCH 1667/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18dcaed8..d47c4a7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ - 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-06-17 + +### Changed + +- **UniFi Network Application LXC** + - Now distribution agnostic. +- **Omada Controller LXC** + - Now distribution agnostic. ## 2023-06-16 ### Changed From 86c04bfe22ba9af54c0a1ab72c6c56d222c1659b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 19:22:15 -0400 Subject: [PATCH 1668/3335] Update homeassistant-core-install.sh moved to install.func --- install/homeassistant-core-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index f260b76c..fca134f3 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -38,7 +38,6 @@ if [[ "$PCT_OSVERSION" == "12" ]]; then liblapack3 \ liblapack-dev \ libatlas-base-dev - $STD systemctl disable systemd-networkd-wait-online.service msg_ok "Installed Dependencies" else msg_info "Installing Dependencies, Bullseye (Patience)" From 9520eebb349eff0b20e66feef898efe15fad34b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Jun 2023 22:51:19 -0400 Subject: [PATCH 1669/3335] Update grocy-install.sh Debian 12 compatible --- install/grocy-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 47da262c..19146413 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -17,14 +17,13 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y apache2 $STD apt-get install -y apt-transport-https -$STD apt-get install -y lsb-release msg_ok "Installed Dependencies" msg_info "Installing PHP 8.1" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg -sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update $STD apt-get install -y php8.1 $STD apt-get install -y libapache2-mod-php8.1 From 0273034e2880a4bb715104f875659f75e7ec2e38 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 07:35:55 -0400 Subject: [PATCH 1670/3335] Update pihole-install.sh distribution agnostic fixes https://github.com/tteck/Proxmox/issues/1505 --- install/pihole-install.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 9006ae2f..881cb233 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -22,9 +22,6 @@ $STD apt-get install -y ntp msg_ok "Installed Dependencies" msg_info "Installing Pi-hole" -systemctl stop systemd-resolved -echo "DNSStubListener=no" >>/etc/systemd/resolved.conf -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf mkdir -p /etc/pihole/ cat </etc/pihole/setupVars.conf PIHOLE_INTERFACE=eth0 @@ -41,8 +38,8 @@ DNSMASQ_LISTENING=local WEBPASSWORD=$(openssl rand -base64 48) BLOCKING_ENABLED=true EOF - -$STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended +# View script https://install.pi-hole.net +$STD bash <(curl -fsSL https://install.pi-hole.net) --unattended msg_ok "Installed Pi-hole" motd_ssh From 5e3e3efe5697c6967fbb21c801a86152d95140a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 09:52:04 -0400 Subject: [PATCH 1671/3335] Update homeassistant-core-install.sh add libpcap-dev dependency, Debian 12 fixes https://github.com/tteck/Proxmox/issues/1506 --- install/homeassistant-core-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index fca134f3..7b0dd835 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -37,6 +37,7 @@ if [[ "$PCT_OSVERSION" == "12" ]]; then ffmpeg \ liblapack3 \ liblapack-dev \ + libpcap-dev \ libatlas-base-dev msg_ok "Installed Dependencies" else From e9b18f88a56d0c7de8ba8c4e1285b6937df5acde Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 16:44:29 -0400 Subject: [PATCH 1672/3335] Update nginxproxymanager-install.sh Debian 12 compatible fixes https://github.com/tteck/Proxmox/issues/1507 --- install/nginxproxymanager-install.sh | 41 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 1300266d..980902eb 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -21,41 +21,41 @@ $STD apt-get -y install \ curl \ gnupg \ make \ - g++ \ gcc \ + g++ \ ca-certificates \ apache2-utils \ logrotate \ build-essential \ - python3-dev \ - git \ - lsb-release + git msg_ok "Installed Dependencies" msg_info "Installing Python" -$STD apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv -$STD pip3 install --upgrade setuptools -$STD pip3 install --upgrade pip +$STD apt-get install -y \ +python3 \ +python3-dev \ +python3-pip \ +python3-venv \ +python3-cffi \ +python3-certbot \ +python3-certbot-dns-cloudflare $STD python3 -m venv /opt/certbot/ -if [ "$(getconf LONG_BIT)" = "32" ]; then - $STD python3 -m pip install --no-cache-dir -U cryptography==3.3.2 -fi -$STD python3 -m pip install --no-cache-dir cffi certbot certbot-dns-cloudflare msg_ok "Installed Python" +VERSION="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )" + msg_info "Installing Openresty" -$STD apt-key add <(curl -fsSL https://openresty.org/package/pubkey.gpg) -sh -c 'echo "deb http://openresty.org/package/debian $(lsb_release -cs) openresty" > /etc/apt/sources.list.d/openresty.list' -$STD apt-get -y update -$STD apt-get -y install --no-install-recommends openresty +wget -qO - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg +echo -e "deb http://openresty.org/package/debian bullseye openresty" >/etc/apt/sources.list.d/openresty.list +$STD apt-get update +$STD apt-get -y install openresty msg_ok "Installed Openresty" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh) +source ~/.bashrc +$STD nvm install 16 +ln -sf /root/.nvm/versions/node/v16.20.0/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" @@ -117,7 +117,6 @@ chown root /tmp/nginx echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -en "${GN} Generating dummy SSL Certificate... " openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null fi From 12b51b866f4189cfaff2d328c6dae63b2af27222 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 17:39:04 -0400 Subject: [PATCH 1673/3335] Update homeassistant-core-install.sh cleanup --- install/homeassistant-core-install.sh | 43 ++++++++------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 7b0dd835..85e9393d 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -13,8 +13,7 @@ setting_up_container network_check update_os -if [[ "$PCT_OSVERSION" == "12" ]]; then - msg_info "Installing Dependencies, Bookworm (Patience)" + msg_info "Installing Dependencies, (Patience)" $STD apt-get install -y \ git \ curl \ @@ -33,49 +32,30 @@ if [[ "$PCT_OSVERSION" == "12" ]]; then build-essential \ libopenjp2-7 \ libturbojpeg0-dev \ - tzdata \ ffmpeg \ liblapack3 \ liblapack-dev \ + dbus-broker \ libpcap-dev \ + libmariadb-dev-compat \ libatlas-base-dev msg_ok "Installed Dependencies" -else - msg_info "Installing Dependencies, Bullseye (Patience)" + +if [[ "$PCT_OSVERSION" == "11" ]]; then + msg_info "Installing pyenv" $STD apt-get install -y \ - git \ - curl \ - sudo \ - mc \ - build-essential \ - libssl-dev \ - zlib1g-dev \ - libbz2-dev \ - libpcap-dev \ + make \ libreadline-dev \ libsqlite3-dev \ + libncurses5-dev \ libncursesw5-dev \ xz-utils \ tk-dev \ llvm \ + libbz2-dev \ libxml2-dev \ libxmlsec1-dev \ - libffi-dev \ - liblzma-dev \ - dbus-broker \ - bluez \ - libmariadb-dev-compat \ - libjpeg-dev \ - autoconf \ - libopenjp2-7 \ - libtiff5 \ - libturbojpeg0-dev \ - liblapack3 \ - liblapack-dev \ - libatlas-base-dev - msg_ok "Installed Dependencies" - - msg_info "Installing pyenv" + liblzma-dev $STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv set +e echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc @@ -83,6 +63,7 @@ else echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc msg_ok "Installed pyenv" . ~/.bashrc + set -e msg_info "Installing Python 3.11.3 (Patience)" $STD pyenv install 3.11.3 @@ -98,6 +79,8 @@ source bin/activate $STD pip install --upgrade pip $STD python3 -m pip install wheel $STD pip install homeassistant +$STD pip install mysqlclient +$STD pip install psycopg2-binary mkdir -p /root/.homeassistant msg_ok "Installed Home Assistant-Core" From 4110e60f1b691aa7a670da7bdc088224b536d85c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 17:52:51 -0400 Subject: [PATCH 1674/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 980902eb..ab1e760e 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -53,7 +53,7 @@ msg_ok "Installed Openresty" msg_info "Installing Node.js" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh) -source ~/.bashrc +. ~/.bashrc $STD nvm install 16 ln -sf /root/.nvm/versions/node/v16.20.0/bin/node /usr/bin/node msg_ok "Installed Node.js" From 61017e13cec7fb72c55b7638a8cb0630243bd6f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 21:38:27 -0400 Subject: [PATCH 1675/3335] Create openobserve-install.sh --- install/openobserve-install.sh | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 install/openobserve-install.sh diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh new file mode 100644 index 00000000..487864b4 --- /dev/null +++ b/install/openobserve-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing OpenObserve" +mkdir -p /opt/openserve/data +LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +$STD tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve + +cat </opt/openobserve/data/.env +ZO_ROOT_USER_EMAIL = "admin@example.com" +ZO_ROOT_USER_PASSWORD = "$(openssl rand -base64 18 | cut -c1-13)" +ZO_DATA_DIR = "/opt/openobserve/data" +ZO_HTTP_PORT = "5080" +EOF +msg_ok "Installed OpenObserve" + +msg_info "Creating Service" +cat </etc/systemd/system/openobserve.service +[Unit] +Description=OpenObserve +After=syslog.target network-online.target remote-fs.target nss-lookup.target +Wants=network-online.target + +[Service] +Type=simple +EnvironmentFile=/opt/openobserve/data/.env +ExecStart=/opt/openobserve/openobserve +ExecStop=killall -QUIT openobserve +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From c6e3cd1e6544698c6dfb7b33f2dee96a265cbfb3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 21:41:09 -0400 Subject: [PATCH 1676/3335] Create openobserve.sh --- ct/openobserve.sh | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ct/openobserve.sh diff --git a/ct/openobserve.sh b/ct/openobserve.sh new file mode 100644 index 00000000..7cdd431e --- /dev/null +++ b/ct/openobserve.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + + ____ ____ __ + / __ \____ ___ ____ / __ \/ /_ ________ ______ _____ + / / / / __ \/ _ \/ __ \/ / / / __ \/ ___/ _ \/ ___/ | / / _ \ +/ /_/ / /_/ / __/ / / / /_/ / /_/ (__ ) __/ / | |/ / __/ +\____/ .___/\___/_/ /_/\____/_.___/____/\___/_/ |___/\___/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="OpenObserve" +var_disk="3" +var_cpu="1" +var_ram="512" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/openobserve/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop openobsecure +LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve +systemctl start openobsecure +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5080${CL} \n" From fb8620bab1c1fae6ac72b6900746198bcfd6e287 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 21:57:54 -0400 Subject: [PATCH 1677/3335] Add files via upload --- misc/images/openobsecure.svg | Bin 0 -> 45295 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/openobsecure.svg diff --git a/misc/images/openobsecure.svg b/misc/images/openobsecure.svg new file mode 100644 index 0000000000000000000000000000000000000000..52bbc9707d2eff299bf0c03c5f5a76ab51d3d8dc GIT binary patch literal 45295 zcmdSBbzED~wk{f6iUujAxF@)4aSa}%cyV_rP@qtXYjA=V3l7D-rG;X_-6`(HDc1JU zv+q88pLg$h@4nyt>&;~&bIvs-Yh|o&d}FNqng8=0Km<`#Q3Rl%001bD3*gTN%Djr4 z+$$}prlN|P!aoWI0FMcs2LNz!_4b4+$r}I?%t1ewEoJT zx=^`C+4@mtv->yM^50}DchA4|;~wisxH$X#?dxy)J7PQ=S3RA_BlhD)1@Hnu0ZIVb zzw>|m{FvMd0RWLJ000g4uRKdQ0MHT+08lLcE05^|06-W905p&NEAL<5iMxfT#eX!1 z{aptIK zD1gWHp9u>S2Ll@y9Tn}#-wIkp000IG1{%)eiiL`X^LTww(aQ2d^N#qoay6N>3Q)jqO`DMSZZ!ifld-@0ni&%O4hBh=lwn+1M+oNFo zozFje1Yn|LU}57tjsy3xT$A{*3v@JeEKD>^Gz?4(jK4hs&@mqSlfeXfyu%{Vwn+MN zicQKOTTsWyH$lb^^;|!bvkb){XA=C%EZ~(~SpQU5$Js?yB{e z4T(NB?2|N=Fmwcf%R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Gsq$CQbc1KoeOE6QAo&fXfi(w*c%fB(_aC`Pv{0}8y!n|Vb``xN< z;k;4ov(CR6%XNNYChvY#E|0?ozlrS`)@fG{_aS*RV2E+VH__97RkM^4_2r_RBKQTf z+)1Wi_@bBTGi8)fqgE($Nd+)^9F%UhS!zTuQ`OI$YD3OCb?8N}$>y(o%;h+|*Og)_ zz51KWj?I`#=#5>Q_3lsBY%lxB*k_Vg0FXD~r$&ov4rHip)-R#zk-=dtRD~0BQf|T) zdRl_fz^1~{H<8OxANM*LRxN2q1bSo{!u{SY<`1B=xe*;QY&PjV4E_P!NAq&LIOYpq=Q?I8 z$*k-B1Morq0Ze`jzbAIP+q^XozgbIqxEQ~WPiS69x_18Zdm6owP(Wos_|}7XfAF)M zkdVk%Tul$|Q<9P>|383uEi~uui2ln_k^7EG5$S`WE7Kpq8{0pC!yw57^x8iF$;-1p zfZ>)ufa_C(O5z*at+QtE2f0V)yJ#dG8cUZRzN|Y7D(LzhTZUG+vq*F^!jVlX@9}LS t`lAs{%lxHo4=TSC{wYRp!tvtw-H1B>kwEgl2N3+*nff1rdD5T7{{cd&t55&{ literal 0 HcmV?d00001 From 0b904a8d7a533503831a15a5fe2f8c95a6400387 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 22:00:06 -0400 Subject: [PATCH 1678/3335] Add files via upload --- misc/images/openobsecure.png | Bin 0 -> 45295 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/openobsecure.png diff --git a/misc/images/openobsecure.png b/misc/images/openobsecure.png new file mode 100644 index 0000000000000000000000000000000000000000..52bbc9707d2eff299bf0c03c5f5a76ab51d3d8dc GIT binary patch literal 45295 zcmdSBbzED~wk{f6iUujAxF@)4aSa}%cyV_rP@qtXYjA=V3l7D-rG;X_-6`(HDc1JU zv+q88pLg$h@4nyt>&;~&bIvs-Yh|o&d}FNqng8=0Km<`#Q3Rl%001bD3*gTN%Djr4 z+$$}prlN|P!aoWI0FMcs2LNz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:00 2001 From: tteckster Date: Sun, 18 Jun 2023 22:00:34 -0400 Subject: [PATCH 1679/3335] Delete openobsecure.svg --- misc/images/openobsecure.svg | Bin 45295 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/openobsecure.svg diff --git a/misc/images/openobsecure.svg b/misc/images/openobsecure.svg deleted file mode 100644 index 52bbc9707d2eff299bf0c03c5f5a76ab51d3d8dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45295 zcmdSBbzED~wk{f6iUujAxF@)4aSa}%cyV_rP@qtXYjA=V3l7D-rG;X_-6`(HDc1JU zv+q88pLg$h@4nyt>&;~&bIvs-Yh|o&d}FNqng8=0Km<`#Q3Rl%001bD3*gTN%Djr4 z+$$}prlN|P!aoWI0FMcs2LNz!_4b4+$r}I?%t1ewEoJT zx=^`C+4@mtv->yM^50}DchA4|;~wisxH$X#?dxy)J7PQ=S3RA_BlhD)1@Hnu0ZIVb zzw>|m{FvMd0RWLJ000g4uRKdQ0MHT+08lLcE05^|06-W905p&NEAL<5iMxfT#eX!1 z{aptIK zD1gWHp9u>S2Ll@y9Tn}#-wIkp000IG1{%)eiiL`X^LTww(aQ2d^N#qoay6N>3Q)jqO`DMSZZ!ifld-@0ni&%O4hBh=lwn+1M+oNFo zozFje1Yn|LU}57tjsy3xT$A{*3v@JeEKD>^Gz?4(jK4hs&@mqSlfeXfyu%{Vwn+MN zicQKOTTsWyH$lb^^;|!bvkb){XA=C%EZ~(~SpQU5$Js?yB{e z4T(NB?2|N=Fmwcf%RkyPoc6;=O&KZIhbytTiRL@Az)^LU>p?irCVK1!nb1mnq)Q23 zz>}Amb(toOSv;*qce@Ig*w&zW#SfjCK1xT=<&+TlOEV>UT;D^e$_vM1-a8j`^Adx( zj5Vs{`_dfUJkmebSU)jgA60su(P;~c{nnGkq$@5ys;eXF;b;2NgV|4Y z0U8GqE^j=wZD*SIm&Pq`Ac=X#1R^C`SD z`1ebywk=w-n2(}fG}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XD~r$&ov4rHip)-R#zk-=dtRD~0BQf|T) zdRl_fz^1~{H<8OxANM*LRxN2q1bSo{!u{SY<`1B=xe*;QY&PjV4E_P!NAq&LIOYpq=Q?I8 z$*k-B1Morq0Ze`jzbAIP+q^XozgbIqxEQ~WPiS69x_18Zdm6owP(Wos_|}7XfAF)M zkdVk%Tul$|Q<9P>|383uEi~uui2ln_k^7EG5$S`WE7Kpq8{0pC!yw57^x8iF$;-1p zfZ>)ufa_C(O5z*at+QtE2f0V)yJ#dG8cUZRzN|Y7D(LzhTZUG+vq*F^!jVlX@9}LS t`lAs{%lxHo4=TSC{wYRp!tvtw-H1B>kwEgl2N3+*nff1rdD5T7{{cd&t55&{ From 03836684db36656d2953a485a8ab74e225e208f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 22:06:08 -0400 Subject: [PATCH 1680/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d47c4a7a..1b363e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-06-18 + +### Changed + +- **OpenObserve LXC** + - NEW Script + ## 2023-06-17 ### Changed From 57531c1d0a46c3d8ff410d258e4dfcfd3ea1e8c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 22:15:31 -0400 Subject: [PATCH 1681/3335] Update openobserve-install.sh tweak --- install/openobserve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index 487864b4..2e2552a7 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing OpenObserve" mkdir -p /opt/openserve/data LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -$STD tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve +tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve &>/dev/null cat </opt/openobserve/data/.env ZO_ROOT_USER_EMAIL = "admin@example.com" From cb2d5b20d66cdf49c26b9fec6e0d646d7845a986 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 22:18:10 -0400 Subject: [PATCH 1682/3335] Update openobserve-install.sh spelling --- install/openobserve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index 2e2552a7..b62e1c07 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing OpenObserve" -mkdir -p /opt/openserve/data +mkdir -p /opt/openobserve/data LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve &>/dev/null From 463a5e3698f6c7614df2a04debc43585884b908a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 22:24:00 -0400 Subject: [PATCH 1683/3335] Update openobserve-install.sh start service --- install/openobserve-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index b62e1c07..8da292bf 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -49,6 +49,7 @@ Restart=on-failure [Install] WantedBy=multi-user.target EOF +systemctl enable -q --now openobserve msg_ok "Created Service" motd_ssh From e924af362f5103d05cdd09f780b2cab3afaf9f7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Jun 2023 23:06:44 -0400 Subject: [PATCH 1684/3335] Update openobserve-install.sh tweak --- install/openobserve-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index 8da292bf..f00ad8ea 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -36,8 +36,7 @@ msg_info "Creating Service" cat </etc/systemd/system/openobserve.service [Unit] Description=OpenObserve -After=syslog.target network-online.target remote-fs.target nss-lookup.target -Wants=network-online.target +After=network.target [Service] Type=simple From c335d393503551a9e20870edbc2e0108bfa69bfd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Jun 2023 18:06:08 -0400 Subject: [PATCH 1685/3335] Update homeassistant-install.sh Debian 12 compatible fixes https://github.com/tteck/Proxmox/issues/1514 --- install/homeassistant-install.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 789ec5ea..40eb9ba3 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -20,8 +20,17 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing runlike" -$STD apt-get install -y python3-pip -$STD pip3 install runlike +$STD apt-get install -y \ +python3 \ +python3-dev \ +python3-pip \ +python3-venv +if [[ "$PCT_OSVERSION" == "12" ]]; then + $STD apt-get install -y pipx + $STD pipx install runlike +else + $STD pip3 install runlike +fi msg_ok "Installed runlike" get_latest_release() { From 46a2b14b09f8fbde6d888c78d019da75805fc48e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Jun 2023 19:16:29 -0400 Subject: [PATCH 1686/3335] Update and rename pve8-install.sh to pve8-upgrade.sh --- misc/{pve8-install.sh => pve8-upgrade.sh} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename misc/{pve8-install.sh => pve8-upgrade.sh} (93%) diff --git a/misc/pve8-install.sh b/misc/pve8-upgrade.sh similarity index 93% rename from misc/pve8-install.sh rename to misc/pve8-upgrade.sh index b9ff380b..c1afc29b 100644 --- a/misc/pve8-install.sh +++ b/misc/pve8-upgrade.sh @@ -8,11 +8,11 @@ header_info() { clear cat <<"EOF" - ____ _ ____________ ____ __ ____ - / __ \ | / / ____( __ ) / _/___ _____/ /_____ _/ / / - / /_/ / | / / __/ / __ | / // __ \/ ___/ __/ __ `/ / / - / ____/| |/ / /___/ /_/ / _/ // / / (__ ) /_/ /_/ / / / -/_/ |___/_____/\____/ /___/_/ /_/____/\__/\__,_/_/_/ + ____ _ ____________ __ ______ __________ ___ ____ ______ + / __ \ | / / ____( __ ) / / / / __ \/ ____/ __ \/ | / __ \/ ____/ + / /_/ / | / / __/ / __ | / / / / /_/ / / __/ /_/ / /| | / / / / __/ + / ____/| |/ / /___/ /_/ / / /_/ / ____/ /_/ / _, _/ ___ |/ /_/ / /___ +/_/ |___/_____/\____/ \____/_/ \____/_/ |_/_/ |_/_____/_____/ EOF } From bbd7ad39f6e6f74b2410725f90bf85aa764d715a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 09:06:25 -0400 Subject: [PATCH 1687/3335] Update esphome-install.sh Debian 12 compatible --- install/esphome-install.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 6f2a8c28..f1997067 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -20,17 +20,25 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" +msg_info "Updating Python3" +$STD apt-get install -y \ +python3 \ +python3-dev \ +python3-pip \ +python3-venv +msg_ok "Updated Python3" msg_info "Installing ESPHome" -$STD pip3 install esphome +if [[ "$PCT_OSVERSION" == "12" ]]; then + $STD pip install esphome --break-system-packages + $STD pip install tornado esptool --break-system-packages +else + $STD pip install esphome + $STD pip install tornado esptool +fi msg_ok "Installed ESPHome" -msg_info "Installing ESPHome Dashboard" -$STD pip3 install tornado esptool - +msg_info "Creating Service" service_path="/etc/systemd/system/esphomeDashboard.service" echo "[Unit] Description=ESPHome Dashboard @@ -41,9 +49,8 @@ Restart=always User=root [Install] WantedBy=multi-user.target" >$service_path -$STD systemctl enable esphomeDashboard.service -systemctl start esphomeDashboard -msg_ok "Installed ESPHome Dashboard" +systemctl enable -q --now esphomeDashboard.service +msg_ok "Created Service" motd_ssh customize From ddd5b89be467cbbcdf0a07357537d6272e41dd72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 09:09:09 -0400 Subject: [PATCH 1688/3335] Update homeassistant-install.sh tweak --- install/homeassistant-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 40eb9ba3..7df28ffb 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -26,10 +26,9 @@ python3-dev \ python3-pip \ python3-venv if [[ "$PCT_OSVERSION" == "12" ]]; then - $STD apt-get install -y pipx - $STD pipx install runlike + $STD pip install runlike --break-system-packages else - $STD pip3 install runlike + $STD pip install runlike fi msg_ok "Installed runlike" From 551a9a708cf309d659ed86234ce568760ea77357 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 09:44:48 -0400 Subject: [PATCH 1689/3335] Update homeassistant-install.sh tweak --- install/homeassistant-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 7df28ffb..35c15466 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -19,17 +19,17 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing runlike" +msg_info "Updating Python3" $STD apt-get install -y \ python3 \ python3-dev \ python3-pip \ python3-venv -if [[ "$PCT_OSVERSION" == "12" ]]; then - $STD pip install runlike --break-system-packages -else - $STD pip install runlike -fi +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" + +msg_info "Installing runlike" +$STD pip install runlike msg_ok "Installed runlike" get_latest_release() { From 8ff4c713bee283722bafb04a8daf27617b8a4e49 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 09:46:16 -0400 Subject: [PATCH 1690/3335] Update esphome-install.sh tweak --- install/esphome-install.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index f1997067..b7ea34c6 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -26,16 +26,11 @@ python3 \ python3-dev \ python3-pip \ python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing ESPHome" -if [[ "$PCT_OSVERSION" == "12" ]]; then - $STD pip install esphome --break-system-packages - $STD pip install tornado esptool --break-system-packages -else - $STD pip install esphome - $STD pip install tornado esptool -fi + $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" msg_info "Creating Service" From b90925f5537d2eef9859f8f83ba858ea710d7c2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 10:02:58 -0400 Subject: [PATCH 1691/3335] Update homeassistant-core-install.sh tweak --- install/homeassistant-core-install.sh | 61 +++++++++++++++------------ 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 85e9393d..e72a47e1 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -13,33 +13,38 @@ setting_up_container network_check update_os - msg_info "Installing Dependencies, (Patience)" - $STD apt-get install -y \ - git \ - curl \ - sudo \ - mc \ - python3 \ - python3-dev \ - python3-venv \ - python3-pip \ - bluez \ - libffi-dev \ - libssl-dev \ - libjpeg-dev \ - zlib1g-dev \ - autoconf \ - build-essential \ - libopenjp2-7 \ - libturbojpeg0-dev \ - ffmpeg \ - liblapack3 \ - liblapack-dev \ - dbus-broker \ - libpcap-dev \ - libmariadb-dev-compat \ - libatlas-base-dev - msg_ok "Installed Dependencies" +msg_info "Installing Dependencies, (Patience)" +$STD apt-get install -y \ + git \ + curl \ + sudo \ + mc \ + bluez \ + libffi-dev \ + libssl-dev \ + libjpeg-dev \ + zlib1g-dev \ + autoconf \ + build-essential \ + libopenjp2-7 \ + libturbojpeg0-dev \ + ffmpeg \ + liblapack3 \ + liblapack-dev \ + dbus-broker \ + libpcap-dev \ + libmariadb-dev-compat \ + libatlas-base-dev +msg_ok "Installed Dependencies" + +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip \ + python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" if [[ "$PCT_OSVERSION" == "11" ]]; then msg_info "Installing pyenv" @@ -63,7 +68,7 @@ if [[ "$PCT_OSVERSION" == "11" ]]; then echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc msg_ok "Installed pyenv" . ~/.bashrc - + set -e msg_info "Installing Python 3.11.3 (Patience)" $STD pyenv install 3.11.3 From c853c24a96a68ae6a59e703d26b9c392333565dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 10:07:02 -0400 Subject: [PATCH 1692/3335] Update homeassistant-install.sh shfmt --- install/homeassistant-install.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 35c15466..0d341e9e 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -21,10 +21,10 @@ msg_ok "Installed Dependencies" msg_info "Updating Python3" $STD apt-get install -y \ -python3 \ -python3-dev \ -python3-pip \ -python3-venv + python3 \ + python3-dev \ + python3-pip \ + python3-venv rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" @@ -44,14 +44,14 @@ msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + cd /usr/local/bin + curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 + chmod 755 /usr/local/bin/fuse-overlayfs + cd ~ + echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json fi $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" @@ -88,7 +88,7 @@ $STD docker run -d \ -v /etc/localtime:/etc/localtime:ro \ --net=host \ homeassistant/home-assistant:stable - mkdir /root/hass_config +mkdir /root/hass_config msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" motd_ssh From 68e3b934ab5e1cc46a2e9117576208493b70f711 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 10:12:16 -0400 Subject: [PATCH 1693/3335] Update esphome-install.sh shfmt --- install/esphome-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index b7ea34c6..c9a67ba4 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -22,15 +22,15 @@ msg_ok "Installed Dependencies" msg_info "Updating Python3" $STD apt-get install -y \ -python3 \ -python3-dev \ -python3-pip \ -python3-venv + python3 \ + python3-dev \ + python3-pip \ + python3-venv rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing ESPHome" - $STD pip install esphome tornado esptool +$STD pip install esphome tornado esptool msg_ok "Installed ESPHome" msg_info "Creating Service" From 5bf0944dd986919908736ef780b8bfead8c01b2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 10:36:49 -0400 Subject: [PATCH 1694/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index ab1e760e..187c6a94 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -30,19 +30,20 @@ $STD apt-get -y install \ git msg_ok "Installed Dependencies" -msg_info "Installing Python" +msg_info "Updating Python" $STD apt-get install -y \ -python3 \ -python3-dev \ -python3-pip \ -python3-venv \ -python3-cffi \ -python3-certbot \ -python3-certbot-dns-cloudflare + python3 \ + python3-dev \ + python3-pip \ + python3-venv \ + python3-cffi \ + python3-certbot \ + python3-certbot-dns-cloudflare +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD python3 -m venv /opt/certbot/ -msg_ok "Installed Python" +msg_ok "Updated Python" -VERSION="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" msg_info "Installing Openresty" wget -qO - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg From bfd51941185dc965652e3b58280e8a1e0d866b7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 15:54:38 -0400 Subject: [PATCH 1695/3335] Update microcode.sh PVE8 compatible --- misc/microcode.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 5d799b81..c31d88d9 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -86,13 +86,11 @@ amd() { echo -e "\n To apply the changes, the system will need to be rebooted.\n" } -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} Proxmox Virtual Environment Not Detected" - echo -e "Exiting..." - sleep 2 +if ! command -v pveversion >/dev/null 2>&1; then + header_info + msg_error "\n No PVE Detected!\n" exit fi - msg_info "Checking CPU Vendor" cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') if [ "$cpu" == "GenuineIntel" ]; then From 7eba5494eaadec7fecf7e1c73d0643fc0411aff4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 16:08:58 -0400 Subject: [PATCH 1696/3335] Update microcode.sh tweak --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index c31d88d9..9c399dbc 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -92,7 +92,7 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi msg_info "Checking CPU Vendor" -cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+') +cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1) if [ "$cpu" == "GenuineIntel" ]; then msg_ok "${cpu} was detected" intel From 4fc26a08d8bdb23e65b433bcbf2e31b19cd7a4d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 19:37:22 -0400 Subject: [PATCH 1697/3335] Update pve8-upgrade.sh work with 7.4-14 --- misc/pve8-upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index c1afc29b..e7a1625d 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -179,7 +179,7 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [ $(pveversion | grep "pve-manager/7.4-13" | wc -l) -ne 1 ]; then +if [ $(pveversion | grep -E "pve-manager/(7.4-13|7.4-14)" | wc -l) -ne 1 ]; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" echo -e " Requires PVE Version: 7.4-13" From 64ace368f1f4ebec7f7514cb3934c78ae1d716da Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 19:49:43 -0400 Subject: [PATCH 1698/3335] Update pve8-upgrade.sh tweak --- misc/pve8-upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index e7a1625d..eee49f87 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -179,10 +179,10 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [ $(pveversion | grep -E "pve-manager/(7.4-13|7.4-14)" | wc -l) -ne 1 ]; then +if [ $(pveversion | grep -E "pve-manager/(7.4-13|7.4-14|7.4-15)" | wc -l) -ne 1 ]; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e " Requires PVE Version: 7.4-13" + echo -e " PVE Version 7.4-13 or higher is required." echo -e "\nExiting..." sleep 3 exit From ef46c15f670b31e985e63506435fbaac928f2df8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 20:01:43 -0400 Subject: [PATCH 1699/3335] Update pve8-upgrade.sh remove -E option --- misc/pve8-upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index eee49f87..db15e016 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -179,7 +179,7 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [ $(pveversion | grep -E "pve-manager/(7.4-13|7.4-14|7.4-15)" | wc -l) -ne 1 ]; then +if [ $(pveversion | grep "pve-manager/(7.4-13|7.4-14|7.4-15)" | wc -l) -ne 1 ]; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" echo -e " PVE Version 7.4-13 or higher is required." From 6cb81290303a4ebfd6c501705037fc438dd14656 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Jun 2023 20:10:25 -0400 Subject: [PATCH 1700/3335] Update pve8-upgrade.sh fix version check --- misc/pve8-upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index db15e016..9e26ec02 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -179,7 +179,7 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [ $(pveversion | grep "pve-manager/(7.4-13|7.4-14|7.4-15)" | wc -l) -ne 1 ]; then +if [[ $(pveversion | grep -E "pve-manager/(7.4-13|7.4-14|7.4-15)") ]]; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" echo -e " PVE Version 7.4-13 or higher is required." From a6f8036cf66b7c046c5d8204f8641a30d00721c3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Jun 2023 05:15:42 -0400 Subject: [PATCH 1701/3335] Update pve8-upgrade.sh remove pveversion check --- misc/pve8-upgrade.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index 9e26ec02..eaf41ca5 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -179,13 +179,4 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if [[ $(pveversion | grep -E "pve-manager/(7.4-13|7.4-14|7.4-15)") ]]; then - header_info - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e " PVE Version 7.4-13 or higher is required." - echo -e "\nExiting..." - sleep 3 - exit -fi - start_routines From 63dd46bb2d3e666722002cd2a9a2074019f49559 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Jun 2023 06:18:13 -0400 Subject: [PATCH 1702/3335] Update nginxproxymanager-install.sh set node version --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 187c6a94..89eada70 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -55,7 +55,7 @@ msg_ok "Installed Openresty" msg_info "Installing Node.js" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh) . ~/.bashrc -$STD nvm install 16 +$STD nvm install 16.20.0 ln -sf /root/.nvm/versions/node/v16.20.0/bin/node /usr/bin/node msg_ok "Installed Node.js" From d8b78777752f8727bc64b0f256b62633934741fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Jun 2023 10:02:07 -0400 Subject: [PATCH 1703/3335] Update sabnzbd-install.sh Debian 12 compatible --- install/sabnzbd-install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 6c53de93..f70c23a5 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -24,10 +24,14 @@ $STD dpkg -i unrar_6.0.3-1+deb11u1_amd64.deb rm unrar_6.0.3-1+deb11u1_amd64.deb msg_ok "Installed Dependencies" -msg_info "Installing Python3-pip" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD apt-get install -y python3-setuptools -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" +msg_ok "Updated Python3" msg_info "Installing SABnzbd" RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 1e1a69e3f11416d0146004fa9b494b39cb9d144b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Jun 2023 10:43:49 -0400 Subject: [PATCH 1704/3335] Code refactoring --- install/bazarr-install.sh | 9 ++++++++- install/changedetection-install.sh | 6 ++++-- install/deluge-install.sh | 10 +++++++--- install/motioneye-install.sh | 16 ++++++++++------ install/octoprint-install.sh | 16 +++++++++------- install/scrypted-install.sh | 15 ++++++++++----- install/tautulli-install.sh | 8 ++++++++ install/whoogle-install.sh | 10 +++++++--- 8 files changed, 63 insertions(+), 27 deletions(-) diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index 9e847172..1b8beeea 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -17,9 +17,16 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y python3-pip msg_ok "Installed Dependencies" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" + msg_info "Installing Bazarr" mkdir -p /var/lib/bazarr/ wget -q https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index e1673b15..42d79ba5 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -43,11 +43,13 @@ $STD apt-get install -y \ xvfb msg_ok "Installed Dependencies" -msg_info "Installing Python3" +msg_info "Updating Python3" $STD apt-get install -y \ + python3 \ python3-dev \ python3-pip -msg_ok "Installed Python3" +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" $STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) diff --git a/install/deluge-install.sh b/install/deluge-install.sh index b42e24f6..5dda4f3c 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -19,9 +19,13 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" msg_info "Installing Deluge" $STD pip install deluge[all] diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index 5ebe8fc7..f7364e65 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -21,6 +21,14 @@ $STD apt-get install -y git $STD apt-get install -y cifs-utils msg_ok "Installed Dependencies" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" + msg_info "Installing Motion" $STD apt-get install -y motion systemctl stop motion @@ -31,22 +39,18 @@ msg_info "Installing FFmpeg" $STD apt-get install -y ffmpeg v4l-utils msg_ok "Installed FFmpeg" -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" - msg_info "Installing MotionEye" $STD apt-get update $STD pip install git+https://github.com/motioneye-project/motioneye.git@dev mkdir -p /etc/motioneye chown -R root:root /etc/motioneye chmod -R 777 /etc/motioneye -cp /usr/local/lib/python3.9/dist-packages/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf +wget -qO /etc/motioneye/motioneye.conf https://raw.githubusercontent.com/motioneye-project/motioneye/dev/motioneye/extra/motioneye.conf.sample mkdir -p /var/lib/motioneye msg_ok "Installed MotionEye" msg_info "Creating Service" -cp /usr/local/lib/python3.9/dist-packages/motioneye/extra/motioneye.systemd /etc/systemd/system/motioneye.service +wget -qO /etc/systemd/system/motioneye.service https://raw.githubusercontent.com/motioneye-project/motioneye/dev/motioneye/extra/motioneye.systemd systemctl enable -q --now motioneye msg_ok "Created Service" diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index 132eedd1..f6db1393 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -21,14 +21,16 @@ $STD apt-get install -y git $STD apt-get install -y libyaml-dev $STD apt-get install -y build-essential msg_ok "Installed Dependencies" - -msg_info "Installing Python3" + +msg_info "Updating Python3" $STD apt-get install -y \ - python3-pip \ - python3-dev \ - python3-setuptools \ - python3-venv -msg_ok "Installed Python3" + python3 \ + python3-dev \ + python3-pip \ + python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +$STD apt-get install -y python3-setuptools +msg_ok "Updated Python3" msg_info "Creating user octoprint" useradd -m -s /bin/bash -p $(openssl passwd -1 octoprint) octoprint diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index b1df07e1..e0015615 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -58,23 +58,28 @@ msg_info "Installing Node.js" $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing Python3" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" + +msg_info "Installing Python3 Dependencies" $STD apt-get -y install \ - python3 \ - python3-dev \ python3-gi \ python3-gst-1.0 \ python3-matplotlib \ python3-numpy \ python3-opencv \ python3-pil \ - python3-pip \ python3-setuptools \ python3-skimage \ python3-wheel $STD python3 -m pip install --upgrade pip $STD python3 -m pip install aiofiles debugpy typing_extensions typing -msg_ok "Installed Python3" +msg_ok "Installed Python3 Dependencies" read -r -p "Would you like to add Coral Edge TPU support? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index 502e4536..f0eb77b3 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -21,6 +21,14 @@ $STD apt-get install -y git $STD apt-get install -y pip msg_ok "Installed Dependencies" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" + msg_info "Installing Tautulli" cd /opt $STD git clone https://github.com/Tautulli/Tautulli.git diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index 1eb492f2..1381f662 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -19,9 +19,13 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing Python3-pip" -$STD apt-get install -y python3-pip -msg_ok "Installed Python3-pip" +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Updated Python3" msg_info "Installing Whoogle" $STD pip install brotli From 4c8a31f48547ccea08dee58675fd91b83092c096 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Jun 2023 10:37:22 -0400 Subject: [PATCH 1705/3335] Update pve8-upgrade.sh out of beta --- misc/pve8-upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index eaf41ca5..7442c799 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -89,7 +89,7 @@ EOF yes) msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list -# deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" ;; @@ -122,7 +122,7 @@ EOF yes) msg_info "Adding 'pvetest' repository and set disabled" cat </etc/apt/sources.list.d/pvetest-for-beta.list -deb http://download.proxmox.com/debian/pve bookworm pvetest +# deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" ;; From f1319f44fe7c603e9a8938911d3eaf58899386dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Jun 2023 15:55:39 -0400 Subject: [PATCH 1706/3335] Update openwrt.sh add pve 8 fixes https://github.com/tteck/Proxmox/issues/1528 --- vm/openwrt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index e3eee268..3b9952af 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -157,7 +157,7 @@ function msg_error() { } function pve_check() { - if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.2 or higher" echo -e "Exiting..." From 3624b67302001f29d7284e7ee9cd87412caf4134 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Jun 2023 16:32:58 -0400 Subject: [PATCH 1707/3335] Update pve8-upgrade.sh add check for PVE Version 7.4-13 or higher --- misc/pve8-upgrade.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index 7442c799..cca0f041 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -179,4 +179,13 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi +if ! pveversion | grep -Eq "pve-manager/(7\.4-(13|14|15|16))"; then + header_info + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e " PVE Version 7.4-13 or higher is required." + echo -e "\nExiting..." + sleep 3 + exit +fi + start_routines From c2738aa83fac36b2cf777bb5f2e8fefc6de7a033 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 07:23:20 -0400 Subject: [PATCH 1708/3335] Update omv-install.sh apt-key - Deprecated --- install/omv-install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install/omv-install.sh b/install/omv-install.sh index 90911799..872e9c28 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -21,10 +21,9 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Installing OpenMediaVault (Patience)" -wget -q -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key -$STD apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" &>/dev/null +wget -qO- https://packages.openmediavault.org/public/archive.key | gpg --dearmor >"/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.gpg" -cat <>/etc/apt/sources.list.d/openmediavault.list +cat </etc/apt/sources.list.d/openmediavault.list deb https://packages.openmediavault.org/public shaitan main # deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main ## Uncomment the following line to add software from the proposed repository. @@ -35,9 +34,12 @@ deb https://packages.openmediavault.org/public shaitan main # deb https://packages.openmediavault.org/public shaitan partner # deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner EOF + +export LANG=C.UTF-8 +export DEBIAN_FRONTEND=noninteractive +export APT_LISTCHANGES_FRONTEND=none $STD apt-get update -apt-get -y install openmediavault-keyring &>/dev/null -DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy openmediavault &>/dev/null +apt-get -y --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends --option DPkg::Options::="--force-confdef" --option DPkg::Options::="--force-confold" install openmediavault-keyring openmediavault &>/dev/null omv-confdbadm populate msg_ok "Installed OpenMediaVault" From 63ed687b2c46cc359672f76f406e29067226a1c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 07:43:40 -0400 Subject: [PATCH 1709/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index a08acd7b..af7843ed 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -19,3 +19,5 @@ [How To Backup Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-backup-home-assistant-in-proxmox/) [Frigate VM on Proxmox with PCIe Coral TPU](https://www.derekseaman.com/2023/06/home-assistant-frigate-vm-on-proxmox-with-pcie-coral-tpu.html) + +[Moving Home Assistant’s Database To MariaDB On Proxmox](https://smarthomescene.com/guides/moving-home-assistants-database-to-mariadb-on-proxmox/) From 22b77fdb768c30e15ac6722e737ea722df9a342d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 13:12:18 -0400 Subject: [PATCH 1710/3335] Update esphome.sh update the installation of either standard or venv --- ct/esphome.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/esphome.sh b/ct/esphome.sh index d7d4f753..f858d198 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -52,13 +52,16 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /usr/local/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ESPHome" systemctl stop esphomeDashboard msg_ok "Stopped ESPHome" msg_info "Updating ESPHome" -pip3 install esphome --upgrade &>/dev/null +if [[ -d /srv/esphome ]]; then + source /srv/esphome/bin/activate &>/dev/null +fi +pip3 install -U esphome &>/dev/null msg_ok "Updated ESPHome" msg_info "Starting ESPHome" From 46518271512ba46236a20ad666214a5f7136ba07 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 13:17:03 -0400 Subject: [PATCH 1711/3335] Update esphome-install.sh install esphome in a python virtual environment --- install/esphome-install.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index c9a67ba4..5b6cb0b7 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -30,20 +30,27 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing ESPHome" +mkdir /srv/esphome +cd /srv/esphome +python3 -m venv . +source bin/activate $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" msg_info "Creating Service" -service_path="/etc/systemd/system/esphomeDashboard.service" -echo "[Unit] +cat </etc/systemd/system/esphomeDashboard.service +[Unit] Description=ESPHome Dashboard After=network.target + [Service] -ExecStart=/usr/local/bin/esphome dashboard /root/config/ +ExecStart=/srv/esphome/bin/esphome dashboard /root/config/ Restart=always User=root + [Install] -WantedBy=multi-user.target" >$service_path +WantedBy=multi-user.target +EOF systemctl enable -q --now esphomeDashboard.service msg_ok "Created Service" From dfb79fbc4efa3ea109c843edcabbf061cd5fe449 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 13:20:55 -0400 Subject: [PATCH 1712/3335] Update esphome.sh default Debian 12 --- ct/esphome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/esphome.sh b/ct/esphome.sh index f858d198..a752b0d3 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 53e5964633f4460870457d8ed005fe089c7447ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 13:34:16 -0400 Subject: [PATCH 1713/3335] Update changedetection-install.sh add libasound2 fixes https://github.com/tteck/Proxmox/issues/1535 --- install/changedetection-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 42d79ba5..a23a0fca 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y \ dumb-init \ gconf-service \ libatk-bridge2.0-0 \ + libasound2 \ libatk1.0-0 \ libcairo2 \ libcups2 \ From 697b40960036ee39075296a6e0c979f9647732ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 21:33:35 -0400 Subject: [PATCH 1714/3335] Update esphome-install.sh revert to standard install --- install/esphome-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 5b6cb0b7..67e0e137 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -30,10 +30,10 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing ESPHome" -mkdir /srv/esphome -cd /srv/esphome -python3 -m venv . -source bin/activate +#mkdir /srv/esphome +#cd /srv/esphome +#python3 -m venv . +#source bin/activate $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" @@ -44,7 +44,8 @@ Description=ESPHome Dashboard After=network.target [Service] -ExecStart=/srv/esphome/bin/esphome dashboard /root/config/ +#ExecStart=/srv/esphome/bin/esphome dashboard /root/config/ +ExecStart=/usr/local/bin/esphome dashboard /root/config/ Restart=always User=root From 01975a17a2b83230d3f03dd0743b0100597dc9ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Jun 2023 21:34:16 -0400 Subject: [PATCH 1715/3335] Update esphome.sh revert to Debian 11 --- ct/esphome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/esphome.sh b/ct/esphome.sh index a752b0d3..f858d198 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="12" +var_version="11" variables color catch_errors From 5cad663da23f647ce397bc0423324614960a93d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Jun 2023 09:05:06 -0400 Subject: [PATCH 1716/3335] Update pve8-upgrade.sh tweak --- misc/pve8-upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index cca0f041..a65cb302 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -115,7 +115,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PVE8 TEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd 'pvetest' repository?" 14 58 2 \ + CHOICE=$(whiptail --title "PVE8 TEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 7c6e700eafbcf8643668afd0fafd605bd88b47ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Jun 2023 13:56:53 -0400 Subject: [PATCH 1717/3335] Update USER_SUBMITTED_GUIDES.md How-to: Proxmox VE 7.4 to 8.0 Upgrade --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index af7843ed..ab1eed2e 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -21,3 +21,5 @@ [Frigate VM on Proxmox with PCIe Coral TPU](https://www.derekseaman.com/2023/06/home-assistant-frigate-vm-on-proxmox-with-pcie-coral-tpu.html) [Moving Home Assistant’s Database To MariaDB On Proxmox](https://smarthomescene.com/guides/moving-home-assistants-database-to-mariadb-on-proxmox/) + +[How-to: Proxmox VE 7.4 to 8.0 Upgrade](https://www.derekseaman.com/2023/06/how-to-proxmox-7-4-to-8-0-upgrade.html) From 4e6c68f164df284a9789b4eb8f0f118ad994df6f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Jun 2023 16:39:55 -0400 Subject: [PATCH 1718/3335] Update adguard-install.sh Code refactoring --- install/adguard-install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/install/adguard-install.sh b/install/adguard-install.sh index 124f2e68..eb262cf0 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -20,12 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" -systemctl stop systemd-resolved -echo "DNSStubListener=no" >>/etc/systemd/resolved.conf -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -wget -qL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh -$STD bash install.sh -rm install.sh +$STD bash <(curl -fsSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh) msg_ok "Installed AdGuard Home" motd_ssh From 7450250f03108745ed888857c1839b31b36cd225 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Jun 2023 16:40:59 -0400 Subject: [PATCH 1719/3335] Update adguard.sh default Debian 12 fixes https://github.com/tteck/Proxmox/issues/1538 --- ct/adguard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index a0cab6e7..807800c3 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -24,7 +24,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 606634b25a95a0ae42ddd9172790863acd77f1cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Jun 2023 16:44:10 -0400 Subject: [PATCH 1720/3335] Update homeassistant-core.sh default Debian 12 --- ct/homeassistant-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 8f612cb5..48065814 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From f0a8502c96a2f11d024d011e5ec271b0b7c80860 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:00:32 -0400 Subject: [PATCH 1721/3335] Update install.func tweak --- misc/install.func | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/misc/install.func b/misc/install.func index 34b3d07d..4d044af3 100644 --- a/misc/install.func +++ b/misc/install.func @@ -83,6 +83,7 @@ setting_up_container() { echo -e " 🖧 Check Network Settings" exit 1 fi + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" } @@ -132,16 +133,16 @@ motd_ssh() { # This function customizes the container by modifying the getty service and enabling auto-login for the root user customize() { if [[ "$PASSWORD" == "" ]]; then - msg_info "Customizing Container" - GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p $(dirname $GETTY_OVERRIDE) - cat <$GETTY_OVERRIDE + msg_info "Customizing Container" + GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF - systemctl daemon-reload - systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') - msg_ok "Customized Container" + systemctl daemon-reload + systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') + msg_ok "Customized Container" fi } From 5ceda0657550f954b6b67c84e9c047373cad0164 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:13:23 -0400 Subject: [PATCH 1722/3335] Code refactoring --- install/bazarr-install.sh | 2 +- install/changedetection-install.sh | 2 +- install/deluge-install.sh | 2 +- install/esphome-install.sh | 2 +- install/homeassistant-core-install.sh | 2 +- install/homeassistant-install.sh | 2 +- install/motioneye-install.sh | 2 +- install/nginxproxymanager-install.sh | 2 +- install/octoprint-install.sh | 2 +- install/sabnzbd-install.sh | 2 +- install/scrypted-install.sh | 2 +- install/tautulli-install.sh | 2 +- install/whoogle-install.sh | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index 1b8beeea..b5d3f921 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing Bazarr" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index a23a0fca..46a70f05 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -49,7 +49,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" diff --git a/install/deluge-install.sh b/install/deluge-install.sh index 5dda4f3c..1aac5a84 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing Deluge" diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 67e0e137..7dbbbc18 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -26,7 +26,7 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing ESPHome" diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index e72a47e1..cbb10ed5 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -43,7 +43,7 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" if [[ "$PCT_OSVERSION" == "11" ]]; then diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 0d341e9e..309f6bd3 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -25,7 +25,7 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing runlike" diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index f7364e65..fe3e5d23 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -26,7 +26,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing Motion" diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 89eada70..6a13f95f 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -39,7 +39,7 @@ $STD apt-get install -y \ python3-cffi \ python3-certbot \ python3-certbot-dns-cloudflare -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + $STD python3 -m venv /opt/certbot/ msg_ok "Updated Python" diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index f6db1393..3121387c 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -28,7 +28,7 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + $STD apt-get install -y python3-setuptools msg_ok "Updated Python3" diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index f70c23a5..5cf49ea7 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -29,7 +29,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + $STD apt-get install -y python3-setuptools msg_ok "Updated Python3" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index e0015615..0c39a396 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -63,7 +63,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing Python3 Dependencies" diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index f0eb77b3..8674c1da 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -26,7 +26,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing Tautulli" diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index 1381f662..24455125 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Python3" msg_info "Installing Whoogle" From e9c7ec22e58d0df9ab7901ed659719064803bb62 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:18:40 -0400 Subject: [PATCH 1723/3335] Update sabnzbd.sh default Debian 12 --- ct/sabnzbd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 1b198e99..be10fb72 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From c72b91a4ad274a94a6263eae79c4808ececf36f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:23:30 -0400 Subject: [PATCH 1724/3335] tweak --- install/bazarr-install.sh | 1 - install/changedetection-install.sh | 1 - install/deluge-install.sh | 1 - install/motioneye-install.sh | 1 - install/sabnzbd-install.sh | 1 - install/scrypted-install.sh | 1 - install/tautulli-install.sh | 1 - install/whoogle-install.sh | 1 - 8 files changed, 8 deletions(-) diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index b5d3f921..a8f07da9 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -24,7 +24,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Installing Bazarr" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 46a70f05..7bae8084 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -49,7 +49,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" diff --git a/install/deluge-install.sh b/install/deluge-install.sh index 1aac5a84..1fde3caa 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -24,7 +24,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Installing Deluge" diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index fe3e5d23..227cffd0 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -26,7 +26,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Installing Motion" diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 5cf49ea7..6c97bd07 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -29,7 +29,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - $STD apt-get install -y python3-setuptools msg_ok "Updated Python3" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 0c39a396..78a4638d 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -63,7 +63,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Installing Python3 Dependencies" diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index 8674c1da..da91ab84 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -26,7 +26,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Installing Tautulli" diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index 24455125..e513288d 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -24,7 +24,6 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip - msg_ok "Updated Python3" msg_info "Installing Whoogle" From ad8d7fce242d520f8a85765bb07ad4fc858b6692 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:31:16 -0400 Subject: [PATCH 1725/3335] Update install.func tweak --- misc/install.func | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/install.func b/misc/install.func index 4d044af3..11fc647c 100644 --- a/misc/install.func +++ b/misc/install.func @@ -84,6 +84,7 @@ setting_up_container() { exit 1 fi rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + $STD systemctl disable systemd-networkd-wait-online.service msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" } @@ -125,9 +126,6 @@ motd_ssh() { sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config systemctl restart sshd fi - if [[ "$PCT_OSVERSION" == "12" ]]; then - $STD systemctl disable systemd-networkd-wait-online.service - fi } # This function customizes the container by modifying the getty service and enabling auto-login for the root user From 2caee65b10ddd0f0f7fae4818738d04d2029313d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:44:22 -0400 Subject: [PATCH 1726/3335] Update install.func tweak --- misc/install.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/install.func b/misc/install.func index 11fc647c..9841ca1e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -84,6 +84,7 @@ setting_up_container() { exit 1 fi rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + systemctl stop systemd-networkd-wait-online.service $STD systemctl disable systemd-networkd-wait-online.service msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" From 4d50c275524679a993fca90dc4589c078829c2dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 00:45:40 -0400 Subject: [PATCH 1727/3335] Update debian.sh default Debian 12 --- ct/debian.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/debian.sh b/ct/debian.sh index ee23d6c5..f684369d 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -64,4 +64,4 @@ start build_container description -msg_ok "Completed Successfully!\n" \ No newline at end of file +msg_ok "Completed Successfully!\n" From 87f537981194eb8acbbd169b68df934ee8ca07e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 01:19:56 -0400 Subject: [PATCH 1728/3335] Update esphome.sh default Debian 12 --- ct/esphome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/esphome.sh b/ct/esphome.sh index f858d198..a752b0d3 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From e5d5c86c76be5a98554e7c530fa47f8739a26dab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 01:25:34 -0400 Subject: [PATCH 1729/3335] Update docker.sh default Debian 12 --- ct/docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/docker.sh b/ct/docker.sh index ecbc4892..db176aec 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 0b76e1fadc64f19a14ebe81482de23d9644fc4d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 04:37:39 -0400 Subject: [PATCH 1730/3335] Update homeassistant.sh default Debian 12 --- ct/homeassistant.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 3a67b1fc..759eca18 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -23,7 +23,7 @@ var_disk="16" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 0b4104441d0984922fa49f67a5c8c438a488eb70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 04:39:11 -0400 Subject: [PATCH 1731/3335] Update homeassistant-install.sh tweak --- install/homeassistant-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 309f6bd3..715f8a4f 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -25,7 +25,6 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv - msg_ok "Updated Python3" msg_info "Installing runlike" From 92eb05c8364fa8949dc9cabfcff954d60f3162a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 13:06:10 -0400 Subject: [PATCH 1732/3335] Update nginxproxymanager.sh default Debian 12 --- ct/nginxproxymanager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 72bffcac..5a5dd685 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -24,7 +24,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 049806d703d94c13f2e08d871f17269023ca96a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 13:15:05 -0400 Subject: [PATCH 1733/3335] Update mqtt.sh default Debian 12 --- ct/mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/mqtt.sh b/ct/mqtt.sh index f4f0bed7..79273287 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From d6d1b86ad19bba595a631d515125da43b319ab1c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 13:18:05 -0400 Subject: [PATCH 1734/3335] Update unifi.sh default Debian 12 --- ct/unifi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/unifi.sh b/ct/unifi.sh index c44b0182..5f20a0ed 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 1e8add89e2f84614e4d33d5cd238c0310007cebc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 13:23:26 -0400 Subject: [PATCH 1735/3335] Update omada.sh default Debian 12 --- ct/omada.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omada.sh b/ct/omada.sh index a5df6f9b..f8d485aa 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From b733b451d83c91ca8be58d16ea2a476941f03159 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 18:11:35 -0400 Subject: [PATCH 1736/3335] Update postgresql-install.sh distribution agnostic --- install/postgresql-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 5f455031..309b2d50 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -21,8 +21,9 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up PostgreSQL Repository" -sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list' -$STD apt-key add <(curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc) +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list +curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg msg_ok "Setup PostgreSQL Repository" msg_info "Installing PostgreSQL" @@ -136,8 +137,8 @@ read -r -p "Would you like to add Adminer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Adminer" $STD apt install -y adminer - $STD sudo a2enconf adminer - $STD systemctl reload apache2 + $STD a2enconf adminer + systemctl reload apache2 msg_ok "Installed Adminer" fi From 45c2641a36f969524ea28ca9781288a025f83658 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 25 Jun 2023 18:12:49 -0400 Subject: [PATCH 1737/3335] Update postgresql.sh default Debian 12 fixes https://github.com/tteck/Proxmox/issues/1542 --- ct/postgresql.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 06212e1a..b3b9106e 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From c06b861971b96fa4de2e5c965b6561e3970e956f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Jun 2023 05:05:51 -0400 Subject: [PATCH 1738/3335] Update nginxproxymanager-install.sh nvm v0.39.3 node v16.20.1 --- install/nginxproxymanager-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 6a13f95f..e9ee8df0 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -53,10 +53,10 @@ $STD apt-get -y install openresty msg_ok "Installed Openresty" msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh) +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) . ~/.bashrc -$STD nvm install 16.20.0 -ln -sf /root/.nvm/versions/node/v16.20.0/bin/node /usr/bin/node +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" From 0101449dda7cb46c2f936a96798980f3e99d9b24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Jun 2023 13:11:20 -0400 Subject: [PATCH 1739/3335] Code refactoring --- install/cronicle-install.sh | 9 ++++----- install/magicmirror-install.sh | 9 ++++----- install/meshcentral-install.sh | 9 ++++----- install/n8n-install.sh | 9 ++++----- install/wikijs-install.sh | 9 ++++----- 5 files changed, 20 insertions(+), 25 deletions(-) diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index 9f9073c3..a38bcf06 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -23,12 +23,11 @@ $STD apt-get install -y g++ $STD apt-get install -y gcc msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Cronicle Primary Server" diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index f262b885..52d480b0 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -20,12 +20,11 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Setting up MagicMirror Repository" diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index bd76b239..ec191bdc 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -19,12 +19,11 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing MeshCentral" diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 0c2c1cd2..95a86e73 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -19,12 +19,11 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing n8n (Patience)" diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 32152da6..f6a93f50 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -20,12 +20,11 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Wiki.js" From eea2d7e9ac2d8e2a2e6dae31d5776c4437a0ae83 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Jun 2023 13:19:53 -0400 Subject: [PATCH 1740/3335] Code refactoring --- install/dashy-install.sh | 12 +++++++----- install/homepage-install.sh | 9 ++++----- install/nocodb-install.sh | 12 +++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 6bb812f7..50078550 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -18,14 +18,16 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs git make g++ gcc +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 3f5c85d9..129195e4 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -20,12 +20,11 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node $STD npm install -g pnpm msg_ok "Installed Node.js" diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 8435fc06..23713d69 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -18,14 +18,16 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - msg_info "Installing Node.js" -$STD sudo apt-get install -y nodejs git make g++ gcc +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing NocoDB" From fcfd9a77c8259de2b88d95ee69e464c1f7625e2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Jun 2023 10:29:50 -0400 Subject: [PATCH 1741/3335] Update node-red.sh default Debian 12 --- ct/node-red.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/node-red.sh b/ct/node-red.sh index 0555b6b4..f95388a1 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From b6cba4f64216980bfd2da7707360482e98d58c89 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 06:07:29 -0400 Subject: [PATCH 1742/3335] Update pihole.sh default Debian 12 --- ct/pihole.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pihole.sh b/ct/pihole.sh index b6ba11a6..9417013d 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 2f798b24f2a3c33138e340c56bf2498d5867cc87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 06:08:12 -0400 Subject: [PATCH 1743/3335] Update grocy.sh default Debian 12 --- ct/grocy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/grocy.sh b/ct/grocy.sh index cfe213d5..020971cb 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 7525666f6bfd7467fbc4eb4ddb4bbd6d12985e6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 09:09:49 -0400 Subject: [PATCH 1744/3335] Update build.func add Proxmox VE 7 warning regarding Debian 12 LXCs --- misc/build.func | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/build.func b/misc/build.func index 9d59ada1..b77cd463 100644 --- a/misc/build.func +++ b/misc/build.func @@ -437,6 +437,10 @@ install_script() { } start() { + if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then + whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters." 10 58 + fi + if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear From 72051ef30c758106e8b6b021eaef719590a0f23e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 09:32:14 -0400 Subject: [PATCH 1745/3335] Update build.func fix indent --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index b77cd463..4d7dca0e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -437,7 +437,7 @@ install_script() { } start() { - if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then + if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters." 10 58 fi From 94c9d4a3315e23b77bfb239ff8c9d863d1feece7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 09:54:46 -0400 Subject: [PATCH 1746/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 4d7dca0e..e8478a7f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -438,7 +438,7 @@ install_script() { start() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters." 10 58 + whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58 fi if command -v pveversion >/dev/null 2>&1; then From da0a6524fbe0d1205a890e884520ea3975b47d24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 10:45:39 -0400 Subject: [PATCH 1747/3335] Create pbs3-upgrade.sh --- misc/pbs3-upgrade.sh | 172 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 misc/pbs3-upgrade.sh diff --git a/misc/pbs3-upgrade.sh b/misc/pbs3-upgrade.sh new file mode 100644 index 00000000..eb519ab9 --- /dev/null +++ b/misc/pbs3-upgrade.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +header_info() { + clear + cat <<"EOF" + ____ ____ __________ __ ______ __________ ___ ____ ______ + / __ \/ __ ) ___/__ / / / / / __ \/ ____/ __ \/ | / __ \/ ____/ + / /_/ / __ \__ \ /_ < / / / / /_/ / / __/ /_/ / /| | / / / / __/ + / ____/ /_/ /__/ /__/ / / /_/ / ____/ /_/ / _, _/ ___ |/ /_/ / /___ +/_/ /_____/____/____/ \____/_/ \____/_/ |_/_/ |_/_____/_____/ + +EOF +} + +RD=$(echo "\033[01;31m") +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + + +start_routines() { + header_info + CHOICE=$(whiptail --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Backing up Proxmox Backup Server 2" + tar czf "pbs2-etc-backup-$(date -I).tar.gz" -C "/etc" "proxmox-backup" + msg_ok "Backed up to Proxmox Backup Server" + ;; + no) + msg_error "Selected no to Backing up Proxmox Backup Server 2" + ;; + esac + + CHOICE=$(whiptail --title "PBS 3 SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server 3.\n \nChange to Proxmox Backup Server 3 sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Changing to Proxmox Backup Server 3 Sources" + cat </etc/apt/sources.list +deb http://deb.debian.org/debian bookworm main contrib +deb http://deb.debian.org/debian bookworm-updates main contrib +deb http://security.debian.org/debian-security bookworm-security main contrib +EOF + msg_ok "Changed to Proxmox Backup Server 3 Sources" + ;; + no) + msg_error "Selected no to Correcting Proxmox Backup Server 3 Sources" + ;; + esac + + CHOICE=$(whiptail --title "PBS3-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling 'pbs-enterprise' repository" + cat </etc/apt/sources.list.d/pbs-enterprise.list +# deb https://enterprise.proxmox.com/debian/pbs bookworm pbs-enterprise +EOF + msg_ok "Disabled 'pbs-enterprise' repository" + ;; + no) + msg_error "Selected no to Disabling 'pbs-enterprise' repository" + ;; + esac + + CHOICE=$(whiptail --title "PBS3-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'pbs-no-subscription' repository" + cat </etc/apt/sources.list.d/pbs-install-repo.list +deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription +EOF + msg_ok "Enabled 'pbs-no-subscription' repository" + ;; + no) + msg_error "Selected no to Enabling 'pbs-no-subscription' repository" + ;; + esac + + CHOICE=$(whiptail --title "PBS3 TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Adding 'pbstest' repository and set disabled" + cat </etc/apt/sources.list.d/pbstest-for-beta.list +# deb http://download.proxmox.com/debian/pbs bookworm pbstest +EOF + msg_ok "Added 'pbstest' repository" + ;; + no) + msg_error "Selected no to Adding 'pbstest' repository" + ;; + esac + + CHOICE=$(whiptail --title "PBS 3 UPDATE" --menu "\nUpdate to Proxmox Backup Server 3 now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Updating to Proxmox Backup Server 3 (Patience)" + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y + msg_ok "Updated to Proxmox Backup Server 3" + ;; + no) + msg_error "Selected no to Updating to Proxmox Backup Server 3" + ;; + esac + + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox Backup Server 3 now? (recommended)" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Rebooting Proxmox Backup Server 3" + sleep 2 + msg_ok "Completed Install Routines" + reboot + ;; + no) + msg_error "Selected no to Rebooting Proxmox Backup Server 3 (Reboot recommended)" + msg_ok "Completed Install Routines" + ;; + esac +} + +header_info +while true; do + read -p "Start the Update to Proxmox Backup Server 3 Script (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) clear; exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +start_routines From 7f388de17a050dd13f975002e8132ec50e6979c8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 10:53:33 -0400 Subject: [PATCH 1748/3335] Update pbs3-upgrade.sh tweak --- misc/pbs3-upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pbs3-upgrade.sh b/misc/pbs3-upgrade.sh index eb519ab9..83da6e95 100644 --- a/misc/pbs3-upgrade.sh +++ b/misc/pbs3-upgrade.sh @@ -54,7 +54,7 @@ start_routines() { yes) msg_info "Backing up Proxmox Backup Server 2" tar czf "pbs2-etc-backup-$(date -I).tar.gz" -C "/etc" "proxmox-backup" - msg_ok "Backed up to Proxmox Backup Server" + msg_ok "Backed up Proxmox Backup Server 2" ;; no) msg_error "Selected no to Backing up Proxmox Backup Server 2" From f7b56041b359ff6b7e5f252b253904c252431f7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 10:58:04 -0400 Subject: [PATCH 1749/3335] Update pbs3-upgrade.sh tweak --- misc/pbs3-upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/pbs3-upgrade.sh b/misc/pbs3-upgrade.sh index 83da6e95..6b389e97 100644 --- a/misc/pbs3-upgrade.sh +++ b/misc/pbs3-upgrade.sh @@ -47,7 +47,7 @@ msg_error() { start_routines() { header_info - CHOICE=$(whiptail --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 11 58 2 \ + CHOICE=$(whiptail --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 2c5da2e770c94e1a62705d023e90c13ce6ea8301 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 16:41:46 -0400 Subject: [PATCH 1750/3335] Update build.func tweak --- misc/build.func | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index e8478a7f..fced35ed 100644 --- a/misc/build.func +++ b/misc/build.func @@ -54,6 +54,9 @@ msg_error() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { + if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then + whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58 + fi if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.0 or higher" @@ -437,10 +440,6 @@ install_script() { } start() { - if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58 - fi - if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear From 825070b914e42f91255e9f5182cb87577cecd342 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 19:55:52 -0400 Subject: [PATCH 1751/3335] Update homepage-install.sh Fix install Debian 12 compatible --- install/homepage-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 129195e4..f0c221e5 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -20,11 +20,12 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD apt-get install -y nodejs git make g++ gcc $STD npm install -g pnpm msg_ok "Installed Node.js" From b18a844c9835b6682ba5cf1e786bc427a410e7aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Jun 2023 19:56:23 -0400 Subject: [PATCH 1752/3335] Update homepage.sh default Debian 12 --- ct/homepage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homepage.sh b/ct/homepage.sh index d133e7a8..eba11d3c 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -23,7 +23,7 @@ var_disk="3" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 9487e5930365f732e1dd80113d027377be371a89 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 02:35:15 -0400 Subject: [PATCH 1753/3335] Update photoprism.sh default Dwbian 12 --- ct/photoprism.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 31dd6735..0fffa7f2 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="4" var_ram="4096" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 4c9a67a40a0903338316da5a66a8b14fbd2a22aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 09:29:54 -0400 Subject: [PATCH 1754/3335] Update tautulli.sh default Debian 12 --- ct/tautulli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/tautulli.sh b/ct/tautulli.sh index b8d052c4..5baf342d 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From d67160437aa1e56b479ec358055bb271db141636 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 09:31:21 -0400 Subject: [PATCH 1755/3335] Update radarr.sh default Debian 12 --- ct/radarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/radarr.sh b/ct/radarr.sh index 6282e685..8a1d5972 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From c6902c2ab4d869ae5d62aac00741ff43ac00c96a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 09:32:07 -0400 Subject: [PATCH 1756/3335] Update readarr.sh default Debian 12 --- ct/readarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/readarr.sh b/ct/readarr.sh index eb6466e5..1a1eb7c2 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From c48420acfc3f113afc94443e2068b690e38fe809 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 09:32:54 -0400 Subject: [PATCH 1757/3335] Update prowlarr.sh default Debian 12 --- ct/prowlarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index c53b162b..09c3bdd5 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 2e64312114d09cf4b2651f73cf6ecf1a860221f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 09:33:25 -0400 Subject: [PATCH 1758/3335] Update bazarr.sh default Debian 12 --- ct/bazarr.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/bazarr.sh b/ct/bazarr.sh index cf85c64c..be9cc53a 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -66,4 +66,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:6767${CL} \n" \ No newline at end of file + ${BL}http://${IP}:6767${CL} \n" From f13b111c5600a8ba47b646aa3928fc9c53b2a871 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 09:39:16 -0400 Subject: [PATCH 1759/3335] Update qbittorrent.sh default Debian 12 --- ct/qbittorrent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 8615ae2d..40cfa24d 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -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 From fced2347fde033c98c8ed19858d7aad1a3c057f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 10:11:46 -0400 Subject: [PATCH 1760/3335] Update dashy-install.sh fix install Debian 12 compatible --- install/dashy-install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 50078550..c83907fb 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -23,11 +23,13 @@ $STD apt-get install -y g++ $STD apt-get install -y gcc msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD apt-get install -y nodejs +$STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Installing Yarn" From c2c4ac8f0319bfe479c89665ab896f4de50a091e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 10:20:55 -0400 Subject: [PATCH 1761/3335] Update dashy-install.sh node 17 --- install/dashy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index c83907fb..602146af 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y gcc msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_17.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From eb9f50901ca56a94a026c98d435408f58be35aca Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 10:27:01 -0400 Subject: [PATCH 1762/3335] Update dashy-install.sh node 16.20.1 --- install/dashy-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 602146af..8bab8c27 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -24,11 +24,11 @@ $STD apt-get install -y gcc msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_17.x) +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" -$STD apt-get install -y nodejs +$STD apt-get install -y nodejs 16.20.1 $STD npm install -g pnpm msg_ok "Installed Node.js" From d9b9e7a851a76dd0ad07e2d0d18e08e1d425e904 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 10:35:00 -0400 Subject: [PATCH 1763/3335] Update dashy-install.sh tweak --- install/dashy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 8bab8c27..f8fa07c4 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -28,7 +28,7 @@ $STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" -$STD apt-get install -y nodejs 16.20.1 +$STD apt-get install -y nodejs=16.20.1 $STD npm install -g pnpm msg_ok "Installed Node.js" From 6b02a5ec0c3e0576b15d390d4169b2a654446657 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 11:23:39 -0400 Subject: [PATCH 1764/3335] Update dashy-install.sh fixed install closes https://github.com/tteck/Proxmox/issues/1564 --- install/dashy-install.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index f8fa07c4..44d85f86 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -18,22 +18,20 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs=16.20.1 +msg_info "Installing Node.js (Patience)" +$STD apt-get install -y npm +$STD npm cache clean -f +$STD npm install -g n +$STD n 16.20.1 $STD npm install -g pnpm +ln -sf /usr/local/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" $STD npm install --global yarn +ln -sf /usr/local/bin/yarn /usr/bin/yarn msg_ok "Installed Yarn" msg_info "Installing Dashy (Patience)" From bc103fa66d686429fc293893852f432c345617cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 11:24:13 -0400 Subject: [PATCH 1765/3335] Update dashy.sh default Debian 12 --- ct/dashy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index 3bd3284d..64016d38 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -23,7 +23,7 @@ var_disk="6" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From e4dff2c808035b5a8ea787b06e7b1c6a923527d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 12:55:10 -0400 Subject: [PATCH 1766/3335] Update paperless-ngx-install.sh Debian 12 compatible --- install/paperless-ngx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 87db1282..50f749f5 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -81,6 +81,7 @@ $STD tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ mv paperless-ngx paperless rm paperless-ngx-$Paperlessngx.tar.xz cd /opt/paperless +sed -i 's/scipy==1.8.1/scipy==1.10.1/g' requirements.txt ## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt $STD pip install --upgrade pip From 834b9002a5819b22eb63703eecefc988fc52d7d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 12:55:55 -0400 Subject: [PATCH 1767/3335] Update paperless-ngx.sh default Debian 12 --- ct/paperless-ngx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 7a5483f4..a5c91a83 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -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 From d5ac9ed5b7f0de3b8148043dc4cb8c8f07b712e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Jun 2023 13:01:34 -0400 Subject: [PATCH 1768/3335] Update paperless-ngx.sh fix update --- ct/paperless-ngx.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index a5c91a83..c58a3004 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -80,6 +80,7 @@ function update_script() { cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless + sed -i 's/scipy==1.8.1/scipy==1.10.1/g' requirements.txt sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt pip install -r requirements.txt &>/dev/null cd /opt/paperless/src From 34e22223f51efb9409e73696777f104516527edc Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 06:04:35 -0400 Subject: [PATCH 1769/3335] Update nginxproxymanager-install.sh Code refactoring --- install/nginxproxymanager-install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index e9ee8df0..9a79ea4d 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -52,15 +52,17 @@ $STD apt-get update $STD apt-get -y install openresty msg_ok "Installed Openresty" -msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +msg_info "Installing Node.js (Patience)" +$STD apt-get install -y npm +$STD npm cache clean -f +$STD npm install -g n +$STD n 16.20.1 +ln -sf /usr/local/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" -$STD npm install --global yarn +$STD npm install -g yarn +ln -sf /usr/local/bin/yarn /usr/bin/yarn msg_ok "Installed Yarn" RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | From ecfb57a91937278a654632597b24a394028ab3c4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 06:51:35 -0400 Subject: [PATCH 1770/3335] Update yunohost-install.sh apt-key is deprecated --- install/yunohost-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index aaeadc1b..80fd97c4 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -18,14 +18,13 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y gnupg -$STD apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" -wget -q -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg +curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" From 43ed3ffcaa6d6cf106ac9ca73cf00346845f05fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 07:28:34 -0400 Subject: [PATCH 1771/3335] Update nginxproxymanager-install.sh revert --- install/nginxproxymanager-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 9a79ea4d..418962d3 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -53,16 +53,14 @@ $STD apt-get -y install openresty msg_ok "Installed Openresty" msg_info "Installing Node.js (Patience)" -$STD apt-get install -y npm -$STD npm cache clean -f -$STD npm install -g n -$STD n 16.20.1 -ln -sf /usr/local/bin/node /usr/bin/node +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +. ~/.bashrc +$STD nvm install 16.20.1 +ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" $STD npm install -g yarn -ln -sf /usr/local/bin/yarn /usr/bin/yarn msg_ok "Installed Yarn" RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | From de76bf329dacb14a9fce7461a741138af61aa71c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 08:08:16 -0400 Subject: [PATCH 1772/3335] Update sonarr-install.sh change repo --- install/sonarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 099257b0..1b11b265 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -23,7 +23,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Sonarr" $STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 -sh -c 'echo "deb https://apt.sonarr.tv/debian buster-develop main" > /etc/apt/sources.list.d/sonarr.list' +sh -c 'echo "deb https://apt.sonarr.tv/debian testing-main main" > /etc/apt/sources.list.d/sonarr.list' $STD apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null msg_ok "Installed Sonarr" From 341405cf61b5d9e48180e87cb9287e808cc0821a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 08:15:00 -0400 Subject: [PATCH 1773/3335] Update sonarr.sh default Debian 12 --- ct/sonarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/sonarr.sh b/ct/sonarr.sh index 0ed45a21..cbcf3e34 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 41f44f4c284c54d8c35621b4b0c007d77f695cf5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 08:23:27 -0400 Subject: [PATCH 1774/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 418962d3..640227d9 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -52,7 +52,7 @@ $STD apt-get update $STD apt-get -y install openresty msg_ok "Installed Openresty" -msg_info "Installing Node.js (Patience)" +msg_info "Installing Node.js" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) . ~/.bashrc $STD nvm install 16.20.1 From 54347d6ffd512865687eaafc1118289f306545e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 08:30:05 -0400 Subject: [PATCH 1775/3335] Update lidarr.sh default Debian 12 --- ct/lidarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 17114c71..9f2bbb5d 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From f5267a7e432755e2a0711345e48407b16fac2619 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 30 Jun 2023 21:25:52 -0400 Subject: [PATCH 1776/3335] Update wikijs-install.sh fix to work with Debian 11 --- install/wikijs-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index f6a93f50..32152da6 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -20,11 +20,12 @@ $STD apt-get install -y mc $STD apt-get install -y git msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +msg_ok "Set up Node.js Repository" + msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Wiki.js" From d027e36d844874464e8ce202dffea215220c8b3a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 13:05:09 -0400 Subject: [PATCH 1777/3335] Update mariadb.sh default Debian 12 --- ct/mariadb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/mariadb.sh b/ct/mariadb.sh index b955a589..dcf59e0d 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 301058696b73216733a92bac2b46729bc93c14ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 16:43:35 -0400 Subject: [PATCH 1778/3335] Update n8n-install.sh fix node --- install/n8n-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 95a86e73..6f36c40b 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -19,11 +19,12 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing n8n (Patience)" From fa696474d539126e1157e002ab394502e8e48e68 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 16:47:58 -0400 Subject: [PATCH 1779/3335] Update n8n.sh default Debian 12 --- ct/n8n.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/n8n.sh b/ct/n8n.sh index 906d46c1..fbf697a8 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -24,7 +24,7 @@ var_disk="3" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 2cd7e87f0c4e9da9fab9db4021cd8888ef4d7244 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 17:19:01 -0400 Subject: [PATCH 1780/3335] Update zigbee2mqtt.sh default Debian 12 --- ct/zigbee2mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index a9634918..14b75066 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -24,7 +24,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From d8521347eb28553a96cd2e25b1e19e42ba18a2fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 17:26:59 -0400 Subject: [PATCH 1781/3335] Update cloudflared-install.sh Debian 12 compatible --- install/cloudflared-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index 921da7cd..d19fa2b7 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -21,8 +21,9 @@ msg_ok "Installed Dependencies" msg_info "Installing Cloudflared" mkdir -p --mode=0755 /usr/share/keyrings +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null -echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared bullseye main' | tee /etc/apt/sources.list.d/cloudflared.list >/dev/null +echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $VERSION main' | tee /etc/apt/sources.list.d/cloudflared.list >/dev/null $STD apt-get update $STD apt-get install -y cloudflared msg_ok "Installed Cloudflared" From 8e3af578e85de6fc7c85649501f254e47c281ff4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 17:27:40 -0400 Subject: [PATCH 1782/3335] Update cloudflared.sh default Debian 12 --- ct/cloudflared.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index fafb6595..59634450 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 4544974c7301073cc4b851385c3f364eeed7ffe4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 17:41:24 -0400 Subject: [PATCH 1783/3335] Update uptimekuma.sh default Debian 12 --- ct/uptimekuma.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 2f82fc3b..108a004a 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -24,7 +24,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 04638c27ada9cb3aa7679fe6bb7296c767f033ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 18:12:17 -0400 Subject: [PATCH 1784/3335] Update adguard-install.sh eliminate outside bash script --- install/adguard-install.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/install/adguard-install.sh b/install/adguard-install.sh index eb262cf0..ae016e90 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -20,9 +20,33 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh) +tar zxvf <(curl -fsSL https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_amd64.tar.gz) -C /opt &>/dev/null msg_ok "Installed AdGuard Home" +msg_info "Creating Service" +cat </etc/systemd/system/AdGuardHome.service +[Unit] +Description=AdGuard Home: Network-level blocker +ConditionFileIsExecutable=/opt/AdGuardHome/AdGuardHome +After=syslog.target network-online.target + +[Service] +StartLimitInterval=5 +StartLimitBurst=10 +ExecStart=/opt/AdGuardHome/AdGuardHome "-s" "run" +WorkingDirectory=/opt/AdGuardHome +StandardOutput=file:/var/log/AdGuardHome.out +StandardError=file:/var/log/AdGuardHome.err +Restart=always +RestartSec=10 +EnvironmentFile=-/etc/sysconfig/AdGuardHome + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now AdGuardHome.service +msg_ok "Created Service" + motd_ssh customize From 173e132e39846b46034f3323996eb3a2aa63a0a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 21:25:15 -0400 Subject: [PATCH 1785/3335] Update cloudflared-install.sh tweak --- install/cloudflared-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index d19fa2b7..3d41a7b9 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -22,8 +22,8 @@ msg_ok "Installed Dependencies" msg_info "Installing Cloudflared" mkdir -p --mode=0755 /usr/share/keyrings VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" -curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null -echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $VERSION main' | tee /etc/apt/sources.list.d/cloudflared.list >/dev/null +curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg >/usr/share/keyrings/cloudflare-main.gpg +echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $VERSION main" >/etc/apt/sources.list.d/cloudflared.list $STD apt-get update $STD apt-get install -y cloudflared msg_ok "Installed Cloudflared" From 3d22cec8814529dd464110d81a0b09af77c28f31 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 21:26:22 -0400 Subject: [PATCH 1786/3335] Update openobserve-install.sh tweak --- install/openobserve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index f00ad8ea..48a03e31 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing OpenObserve" mkdir -p /opt/openobserve/data LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve &>/dev/null +$STD tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve cat </opt/openobserve/data/.env ZO_ROOT_USER_EMAIL = "admin@example.com" From 563c9f41e8b4e08c23b3ac5aeb1532dcb270b931 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 1 Jul 2023 21:27:32 -0400 Subject: [PATCH 1787/3335] Update adguard-install.sh tweak --- install/adguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/adguard-install.sh b/install/adguard-install.sh index ae016e90..4b03cb71 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing AdGuard Home" -tar zxvf <(curl -fsSL https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_amd64.tar.gz) -C /opt &>/dev/null +$STD tar zxvf <(curl -fsSL https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_amd64.tar.gz) -C /opt msg_ok "Installed AdGuard Home" msg_info "Creating Service" From 0cbc4751a08d13e67d767942ac6f7e5363532f84 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 02:19:36 -0400 Subject: [PATCH 1788/3335] Update sonarr-install.sh tweak --- install/sonarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 1b11b265..fb18ab3a 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -23,7 +23,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Sonarr" $STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 -sh -c 'echo "deb https://apt.sonarr.tv/debian testing-main main" > /etc/apt/sources.list.d/sonarr.list' +echo "deb https://apt.sonarr.tv/debian testing-main main" >/etc/apt/sources.list.d/sonarr.list $STD apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null msg_ok "Installed Sonarr" From 4133d38062af6ac39c8b4b0c2f212bc27107fc7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 02:54:37 -0400 Subject: [PATCH 1789/3335] Update post-pve-install.sh add Enable high availability --- misc/post-pve-install.sh | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index fcf634df..b3fb1bf6 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -162,12 +162,9 @@ EOF case $CHOICE in yes) msg_info "Disabling high availability" - systemctl stop pve-ha-lrm - systemctl disable pve-ha-lrm &>/dev/null - systemctl stop pve-ha-crm - systemctl disable pve-ha-crm &>/dev/null - systemctl stop corosync - systemctl disable corosync &>/dev/null + systemctl disable -q --now pve-ha-lrm + systemctl disable -q --now pve-ha-crm + systemctl disable -q --now corosync msg_ok "Disabled high availability" ;; no) @@ -176,6 +173,24 @@ EOF esac fi + if ! systemctl is-active --quiet pve-ha-lrm; then + CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling high availability" + systemctl enable -q --now pve-ha-lrm + systemctl enable -q --now pve-ha-crm + systemctl enable -q --now corosync + msg_ok "Enabled high availability" + ;; + no) + msg_error "Selected no to Enabling high availability" + ;; + esac + fi + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) From 2fbac0383af2d249d546e49aeef091adf2a5edf2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 03:51:07 -0400 Subject: [PATCH 1790/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index b3fb1bf6..7b1fcf7c 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -155,24 +155,6 @@ EOF esac fi - if systemctl is-active --quiet pve-ha-lrm; then - CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) - msg_info "Disabling high availability" - systemctl disable -q --now pve-ha-lrm - systemctl disable -q --now pve-ha-crm - systemctl disable -q --now corosync - msg_ok "Disabled high availability" - ;; - no) - msg_error "Selected no to Disabling high availability" - ;; - esac - fi - if ! systemctl is-active --quiet pve-ha-lrm; then CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ "yes" " " \ @@ -191,6 +173,24 @@ EOF esac fi + if systemctl is-active --quiet pve-ha-lrm; then + CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling high availability" + systemctl disable -q --now pve-ha-lrm + systemctl disable -q --now pve-ha-crm + systemctl disable -q --now corosync + msg_ok "Disabled high availability" + ;; + no) + msg_error "Selected no to Disabling high availability" + ;; + esac + fi + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) From 4d6a9b777d7d3321f85aad908f4d9a9698a86959 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 10:33:51 -0400 Subject: [PATCH 1791/3335] Update mariadb-install.sh fix Debian 12 install closes https://github.com/tteck/Proxmox/issues/1580 --- install/mariadb-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 3fefa9b1..e7af61e1 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -20,8 +20,6 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing MariaDB" -$STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup) -$STD apt-get update $STD apt-get install -y mariadb-server msg_ok "Installed MariaDB" From 345ba6932db3e2dd0ee11f445e99d7d06f07a71f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 10:49:58 -0400 Subject: [PATCH 1792/3335] Update trilium.sh default Debian 12 --- ct/trilium.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/trilium.sh b/ct/trilium.sh index a54e36a4..7216f249 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 5f6478e0dd600dd1936f9d1fcfee7e4b521d6f6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 11:15:52 -0400 Subject: [PATCH 1793/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index ab1eed2e..de4685ae 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -2,7 +2,7 @@ In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. -[Installing Home Assistant OS using Proxmox 7](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-7/201835) +[Installing Home Assistant OS using Proxmox 8](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-7/201835) [How To Separate Zigbee2MQTT From Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-separate-zigbee2mqtt-from-home-assistant-in-proxmox/) From aabaa091ad85535ac07af5baeea71bfa169d7972 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jul 2023 11:17:25 -0400 Subject: [PATCH 1794/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index de4685ae..cd680d1a 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -2,7 +2,7 @@ In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. -[Installing Home Assistant OS using Proxmox 8](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-7/201835) +[Installing Home Assistant OS using Proxmox 8](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-8/201835) [How To Separate Zigbee2MQTT From Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-separate-zigbee2mqtt-from-home-assistant-in-proxmox/) From 6acacbf8c875ee2c765d30c9d7b2ae93a8ae35f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 3 Jul 2023 13:12:11 -0400 Subject: [PATCH 1795/3335] Update technitiumdns-install.sh Debian 12 compatible --- install/technitiumdns-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index 4f3f6c98..f2b67d39 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -28,9 +28,6 @@ $STD apt-get install -y aspnetcore-runtime-7.0 msg_ok "Installed ASP.NET Core Runtime" msg_info "Installing Technitium DNS" -systemctl stop systemd-resolved -echo "DNSStubListener=no" >>/etc/systemd/resolved.conf -ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" From 7a9f9c0c2eb9c1efe1e9182427d071d7d97d2e80 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 3 Jul 2023 13:17:17 -0400 Subject: [PATCH 1796/3335] Update technitiumdns.sh default Debian 12 --- ct/technitiumdns.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index 6b538f6a..c43d54e4 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -62,10 +62,7 @@ if ! dpkg -s aspnetcore-runtime-7.0 > /dev/null 2>&1; then apt-get install -y aspnetcore-runtime-7.0 rm packages-microsoft-prod.deb fi -wget -q https://download.technitium.com/dns/DnsServerPortable.tar.gz -tar -zxf DnsServerPortable.tar.gz -C /etc/dns/ &>/dev/null -rm -rf DnsServerPortable.tar.gz -systemctl restart dns.service +$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Updated Successfully" exit } From 77cb0b356d9606380ecae9b1f52b274d7a9a8ad2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 3 Jul 2023 15:20:57 -0400 Subject: [PATCH 1797/3335] Update post-pbs-install.sh compatible with both PBS 2 and PBS 3 --- misc/post-pbs-install.sh | 265 ++++++++++++++++++++++++--------------- 1 file changed, 162 insertions(+), 103 deletions(-) diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index 39a0a320..aebddb14 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -5,28 +5,175 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -set -euo pipefail -shopt -s inherit_errexit nullglob -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") +header_info() { + clear + cat <<"EOF" + ____ ____ _____ ____ __ ____ __ ____ + / __ \/ __ ) ___/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / + / /_/ / __ \__ \ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / + / ____/ /_/ /__/ / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / +/_/ /_____/____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ + +EOF +} + RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") +YW=$(echo "\033[33m") GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -clear -echo -e "${BL}This script will Perform Post Install Routines.${CL}" -while true; do - read -p "Start the PBS Post Install Script (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; + +set -euo pipefail +shopt -s inherit_errexit nullglob + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + + +start_routines() { + header_info + VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + CHOICE=$(whiptail --title "PBS SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server.\n \nChange to Proxmox Backup Server sources?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Changing to Proxmox Backup Server Sources" + cat </etc/apt/sources.list +deb http://deb.debian.org/debian ${VERSION} main contrib +deb http://deb.debian.org/debian ${VERSION}-updates main contrib +deb http://security.debian.org/debian-security ${VERSION}-security main contrib +EOF + msg_ok "Changed to Proxmox Backup Server Sources" + ;; + no) + msg_error "Selected no to Correcting Proxmox Backup Server Sources" + ;; + esac + + CHOICE=$(whiptail --title "PBS-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Disabling 'pbs-enterprise' repository" + cat </etc/apt/sources.list.d/pbs-enterprise.list +# deb https://enterprise.proxmox.com/debian/pbs ${VERSION} pbs-enterprise +EOF + msg_ok "Disabled 'pbs-enterprise' repository" + ;; + no) + msg_error "Selected no to Disabling 'pbs-enterprise' repository" + ;; + esac + + CHOICE=$(whiptail --title "PBS-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Enabling 'pbs-no-subscription' repository" + cat </etc/apt/sources.list.d/pbs-install-repo.list +deb http://download.proxmox.com/debian/pbs ${VERSION} pbs-no-subscription +EOF + msg_ok "Enabled 'pbs-no-subscription' repository" + ;; + no) + msg_error "Selected no to Enabling 'pbs-no-subscription' repository" + ;; + esac + + CHOICE=$(whiptail --title "PBS TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Adding 'pbstest' repository and set disabled" + cat </etc/apt/sources.list.d/pbstest-for-beta.list +# deb http://download.proxmox.com/debian/pbs ${VERSION} pbstest +EOF + msg_ok "Added 'pbstest' repository" + ;; + no) + msg_error "Selected no to Adding 'pbstest' repository" + ;; + esac + + if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then + CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + msg_info "Disabling subscription nag" + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + apt --reinstall install proxmox-widget-toolkit &>/dev/null + msg_ok "Disabled subscription nag (Delete browser cache)" + ;; + no) + whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + msg_error "Selected no to Disabling subscription nag" + ;; esac + fi + + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox Backup Server now?" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Updating Proxmox Backup Server (Patience)" + apt-get update &>/dev/null + apt-get -y dist-upgrade &>/dev/null + msg_ok "Updated Proxmox Backup Server" + ;; + no) + msg_error "Selected no to Updating Proxmox Backup Server" + ;; + esac + + CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox Backup Server now? (recommended)" 11 58 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + case $CHOICE in + yes) + msg_info "Rebooting Proxmox Backup Server" + sleep 2 + msg_ok "Completed Post Install Routines" + reboot + ;; + no) + msg_error "Selected no to Rebooting Proxmox Backup Server (Reboot recommended)" + msg_ok "Completed Post Install Routines" + ;; + esac +} + +header_info +echo -e "\nThis script will Perform Post Install Routines.\n" +while true; do + read -p "Start the Proxmox Backup Server Post Install Script (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) clear; exit ;; + *) echo "Please answer yes or no." ;; + esac done if command -v pveversion >/dev/null 2>&1; then @@ -34,92 +181,4 @@ if command -v pveversion >/dev/null 2>&1; then exit 1 fi -function header_info { - cat <<"EOF" - ____ ____ _____ ____ __ ____ __ ____ - / __ \/ __ ) ___/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / / - / /_/ / __ \__ \ / /_/ / __ \/ ___/ __/ / // __ \/ ___/ __/ __ `/ / / - / ____/ /_/ /__/ / / ____/ /_/ (__ ) /_ _/ // / / (__ ) /_/ /_/ / / / -/_/ /_____/____/ /_/ \____/____/\__/ /___/_/ /_/____/\__/\__,_/_/_/ - -EOF -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -clear -header_info -read -r -p "Disable Enterprise Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Disabling Enterprise Repository" - sleep 2 - sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list - msg_ok "Disabled Enterprise Repository" -fi - -read -r -p "Add/Correct PBS Sources (sources.list)? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Adding or Correcting PBS Sources" - cat </etc/apt/sources.list -deb http://ftp.debian.org/debian bullseye main contrib -deb http://ftp.debian.org/debian bullseye-updates main contrib -deb http://security.debian.org/debian-security bullseye-security main contrib -EOF - sleep 2 - msg_ok "Added or Corrected PBS Sources" -fi - -read -r -p "Enable No-Subscription Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Enabling No-Subscription Repository" - cat <>/etc/apt/sources.list -deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription -EOF - sleep 2 - msg_ok "Enabled No-Subscription Repository" -fi - -read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Adding Beta/Test Repository and set disabled" - cat <>/etc/apt/sources.list -# deb http://download.proxmox.com/debian/pbs bullseye pbstest -EOF - sleep 2 - msg_ok "Added Beta/Test Repository" -fi - -read -r -p "Disable Subscription Nag? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Disabling Subscription Nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script - apt --reinstall install proxmox-widget-toolkit &>/dev/null - msg_ok "Disabled Subscription Nag" -fi - -read -r -p "Update Proxmox Backup Server now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Updating Proxmox Backup Server (Patience)" - apt-get update &>/dev/null - apt-get -y dist-upgrade &>/dev/null - msg_ok "Updated Proxmox Backup Server (⚠ Reboot Recommended)" -fi - -read -r -p "Reboot Proxmox Backup Server now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Rebooting Proxmox Backup Server" - sleep 2 - msg_ok "Completed Post Install Routines" - reboot -fi - -sleep 2 -msg_ok "Completed Post Install Routines" +start_routines From 0b5d71b8411a626911f37a1adb8842d620997fdd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jul 2023 04:34:53 -0400 Subject: [PATCH 1798/3335] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b363e6c..7f295bbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ - 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-05 + +### Changed + +- There have been more than 110 commits since June 18th, although not all of them are significant, with a majority focused on ensuring compatibility with Proxmox VE 8 and Debian 12. + ## 2023-06-18 ### Changed From bc98c1ed80bbc3cccb9f5f744a352e15928ebcf6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jul 2023 06:17:21 -0400 Subject: [PATCH 1799/3335] Update webmin.sh version 2.021 --- misc/webmin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/webmin.sh b/misc/webmin.sh index 0095a911..b4375267 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -27,16 +27,16 @@ apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl unzip sh echo -e "${CM}${CL} \r" echo -en "${GN} Downloading Webmin... " -wget http://prdownloads.sourceforge.net/webadmin/webmin_2.000_all.deb &>/dev/null +wget http://prdownloads.sourceforge.net/webadmin/webmin_2.021_all.deb &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Installing Webmin... " -dpkg --install webmin_2.000_all.deb &>/dev/null +dpkg --install webmin_2.021_all.deb &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Setting Default Webmin usermame & password to root... " /usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null -rm -rf /root/webmin_2.000_all.deb +rm -rf /root/webmin_2.021_all.deb echo -e "${CM}${CL} \r" IP=$(hostname -I | cut -f1 -d ' ') echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000" From b03bb8c1fc5f49874f4c76cf0cf2a18fe0952750 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jul 2023 18:35:38 -0400 Subject: [PATCH 1800/3335] Update fhem.sh default Debian 12 --- ct/fhem.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/fhem.sh b/ct/fhem.sh index 075d4b45..7f9c8ecf 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From e2257ed9d7e6046e76e4a64c83fd3059588a8399 Mon Sep 17 00:00:00 2001 From: Michel R Date: Thu, 6 Jul 2023 01:35:43 +0200 Subject: [PATCH 1801/3335] Change homeassistant container url (#1594) As of https://www.home-assistant.io/blog/2023/07/05/release-20237/#breaking-changes the image from ghcr.io should be used --- install/homeassistant-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 715f8a4f..0c19ca6c 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -72,7 +72,7 @@ $STD docker run -d \ msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image" -$STD docker pull homeassistant/home-assistant:stable +$STD docker pull ghcr.io/home-assistant/home-assistant:stable msg_ok "Pulled Home Assistant $CORE_LATEST_VERSION Image" msg_info "Installing Home Assistant $CORE_LATEST_VERSION" @@ -86,7 +86,7 @@ $STD docker run -d \ -v hass_config:/config \ -v /etc/localtime:/etc/localtime:ro \ --net=host \ - homeassistant/home-assistant:stable + ghcr.io/home-assistant/home-assistant:stable mkdir /root/hass_config msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" From 5e75bba028edcf09dd4fec490f0a781f2cc00b77 Mon Sep 17 00:00:00 2001 From: crawlingcity Date: Fri, 7 Jul 2023 04:49:28 +0100 Subject: [PATCH 1802/3335] Add rdtclient LXC script (#1595) * add rdtclient (https://github.com/rogerfar/rdt-client) LXC --- ct/rdtclient.sh | 69 ++++++++++++++++++++++++++++++++++++ install/rdtclient-install.sh | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100755 ct/rdtclient.sh create mode 100644 install/rdtclient-install.sh diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh new file mode 100755 index 00000000..3b500549 --- /dev/null +++ b/ct/rdtclient.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ___ __ + _________/ / /______/ (_)__ ____ / /_ + / ___/ __ / __/ ___/ / / _ \/ __ \/ __/ + / / / /_/ / /_/ /__/ / / __/ / / / /_ +/_/ \__,_/\__/\___/_/_/\___/_/ /_/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="RdtClient" +var_disk="4" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/rdtclient/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6500${CL} \n" diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh new file mode 100644 index 00000000..5d9cc1a8 --- /dev/null +++ b/install/rdtclient-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +msg_ok "Installed Dependencies" + +msg_info "Installing ASP.NET Core Runtime" +wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb +$STD dpkg -i packages-microsoft-prod.deb +rm packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y dotnet-sdk-6.0 +msg_ok "Installed ASP.NET Core Runtime" +msg_info "Installing rdtclient" +wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip +unzip -qq RealDebridClient.zip -d /opt/rdtc +rm RealDebridClient.zip +mkdir -p /data/db/ # defaults for rdtclient +mkdir -p /data/downloads # defaults for rdtclient +msg_info "Installed rdtclient" +msg_info "Creating Service" +cat </etc/systemd/system/rdtc.service +[Unit] +Description=RdtClient Service + +[Service] + +WorkingDirectory=/opt/rdtc +ExecStart=/usr/bin/dotnet RdtClient.Web.dll +SyslogIdentifier=RdtClient +User=root + +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl daemon-reload +$STD systemctl enable -q --now rdtc +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 12952cb399fca77f632f0bad5d8070594f96ad96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Jul 2023 23:53:23 -0400 Subject: [PATCH 1803/3335] Update rdtclient-install.sh --- install/rdtclient-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index 5d9cc1a8..b0d7122a 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -27,20 +27,21 @@ rm packages-microsoft-prod.deb $STD apt-get update $STD apt-get install -y dotnet-sdk-6.0 msg_ok "Installed ASP.NET Core Runtime" + msg_info "Installing rdtclient" wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip unzip -qq RealDebridClient.zip -d /opt/rdtc rm RealDebridClient.zip -mkdir -p /data/db/ # defaults for rdtclient -mkdir -p /data/downloads # defaults for rdtclient +mkdir -p /data/db/ +mkdir -p /data/downloads msg_info "Installed rdtclient" + msg_info "Creating Service" cat </etc/systemd/system/rdtc.service [Unit] Description=RdtClient Service [Service] - WorkingDirectory=/opt/rdtc ExecStart=/usr/bin/dotnet RdtClient.Web.dll SyslogIdentifier=RdtClient @@ -49,7 +50,6 @@ User=root [Install] WantedBy=multi-user.target EOF -$STD systemctl daemon-reload $STD systemctl enable -q --now rdtc msg_ok "Created Service" From 37eff0eb6a122f681665b9cff8e6985296be9947 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Jul 2023 00:43:15 -0400 Subject: [PATCH 1804/3335] Update rdtclient-install.sh tweak --- install/rdtclient-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index b0d7122a..67eac42a 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -32,9 +32,10 @@ msg_info "Installing rdtclient" wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip unzip -qq RealDebridClient.zip -d /opt/rdtc rm RealDebridClient.zip -mkdir -p /data/db/ -mkdir -p /data/downloads -msg_info "Installed rdtclient" +cd /opt/rdtc +mkdir -p /data/db/ /data/downloads +sed -i 's#/data/db/#/opt/rdtc&#g' /opt/rdtc/appsettings.json +msg_ok "Installed rdtclient" msg_info "Creating Service" cat </etc/systemd/system/rdtc.service From e71384153267fe1957d311138317442eba5ffaf8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Jul 2023 01:02:55 -0400 Subject: [PATCH 1805/3335] Update rdtclient-install.sh tweak --- install/rdtclient-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index 67eac42a..8de86327 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -33,7 +33,7 @@ wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebr unzip -qq RealDebridClient.zip -d /opt/rdtc rm RealDebridClient.zip cd /opt/rdtc -mkdir -p /data/db/ /data/downloads +mkdir -p data/db/ data/downloads sed -i 's#/data/db/#/opt/rdtc&#g' /opt/rdtc/appsettings.json msg_ok "Installed rdtclient" From d8c71d9ca83071ac4e50eba932bd8e6c32636e5b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Jul 2023 01:39:45 -0400 Subject: [PATCH 1806/3335] Update rdtclient.sh tweak --- ct/rdtclient.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 3b500549..3e70c3dd 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -8,17 +8,17 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ____ ___ __ - _________/ / /______/ (_)__ ____ / /_ - / ___/ __ / __/ ___/ / / _ \/ __ \/ __/ - / / / /_/ / /_/ /__/ / / __/ / / / /_ -/_/ \__,_/\__/\___/_/_/\___/_/ /_/\__/ + ____ __ ____ __ _ __ ______ __ _________ __ + / __ \___ ____ / / / __ \___ / /_ _____(_)___/ / /_ __/___ _____________ ____ / /_ / ____/ (_)__ ____ / /_ + / /_/ / _ \/ __ `/ /___/ / / / _ \/ __ \/ ___/ / __ / / / / __ \/ ___/ ___/ _ \/ __ \/ __/ / / / / / _ \/ __ \/ __/ + / _, _/ __/ /_/ / /___/ /_/ / __/ /_/ / / / / /_/ / / / / /_/ / / / / / __/ / / / /_ / /___/ / / __/ / / / /_ +/_/ |_|\___/\__,_/_/ /_____/\___/_.___/_/ /_/\__,_/ /_/ \____/_/ /_/ \___/_/ /_/\__/ \____/_/_/\___/_/ /_/\__/ EOF } header_info echo -e "Loading..." -APP="RdtClient" +APP="RDTClient" var_disk="4" var_cpu="1" var_ram="1024" From be3f2328609913e6f89852f78a3067077e20ed2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Jul 2023 08:48:26 -0400 Subject: [PATCH 1807/3335] Update CHANGELOG.md Real-Debrid Torrent Client LXC --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f295bbc..90fc8ee7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-07 + +### Changed + +- **Real-Debrid Torrent Client LXC** + - NEW Script + ## 2023-07-05 ### Changed From 1da852ca43ae8d49abf13f658432e2810d54b9c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 09:48:03 -0400 Subject: [PATCH 1808/3335] Update audiobookshelf-install.sh apt-key is deprecated --- install/audiobookshelf-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index 0de9f082..b0abeca6 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -21,8 +21,8 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing audiobookshelf" -$STD apt-key add <(curl -s --compressed "https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg") -sh -c 'echo "deb https://advplyr.github.io/audiobookshelf-ppa ./" > /etc/apt/sources.list.d/audiobookshelf.list' +curl -fsSL https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg >/etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc +echo "deb [signed-by=/etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc] https://advplyr.github.io/audiobookshelf-ppa ./" >/etc/apt/sources.list.d/audiobookshelf.list $STD apt-get update $STD apt install audiobookshelf msg_ok "Installed audiobookshelf" From 1342aa36d89c45aab9c9914a4f050745924d547c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 09:48:38 -0400 Subject: [PATCH 1809/3335] Update audiobookshelf.sh default Debian 12 --- ct/audiobookshelf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 86d51e68..8c1de6f2 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 296f07388d6d4a758dfef4ca5da619685a2e9807 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 10:56:20 -0400 Subject: [PATCH 1810/3335] Update deconz-install.sh code refactoring --- install/deconz-install.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/install/deconz-install.sh b/install/deconz-install.sh index eab4d521..4338b1cc 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -17,22 +17,24 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting Phoscon Repository" -$STD apt-key add <(curl -fsSL http://phoscon.de/apt/deconz.pub.key) -sh -c "echo 'deb [arch=amd64] http://phoscon.de/apt/deconz $(lsb_release -cs) main' > /etc/apt/sources.list.d/deconz.list" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +curl -fsSL http://phoscon.de/apt/deconz.pub.key >/etc/apt/trusted.gpg.d/deconz.pub.asc +echo "deb [arch=amd64] http://phoscon.de/apt/deconz $VERSION main" >/etc/apt/sources.list.d/deconz.list msg_ok "Setup Phoscon Repository" msg_info "Installing deConz" +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get update $STD apt-get install -y deconz msg_ok "Installed deConz" msg_info "Creating Service" -service_path="/lib/systemd/system/deconz.service" -echo "[Unit] +cat </lib/systemd/system/deconz.service +[Unit] Description=deCONZ: ZigBee gateway -- REST API Wants=deconz-init.service deconz-update.service StartLimitIntervalSec=0 @@ -45,8 +47,9 @@ RestartSec=30 AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now deconz +WantedBy=multi-user.target +EOF +systemctl enable -q --now deconz msg_ok "Created Service" motd_ssh From 8317090c16ae0c0b050691e8385550cc02b55713 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 10:57:17 -0400 Subject: [PATCH 1811/3335] Update deconz.sh default Debian 12 --- ct/deconz.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/deconz.sh b/ct/deconz.sh index ccf279d1..2c59fa20 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -22,8 +22,8 @@ APP="deCONZ" var_disk="4" var_cpu="2" var_ram="1024" -var_os="ubuntu" -var_version="20.04" +var_os="debian" +var_version="12" variables color catch_errors From dc3c0356ba410a1aa53b62c353b6a10b02b7692c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 11:06:25 -0400 Subject: [PATCH 1812/3335] Update deconz-install.sh tweak --- install/deconz-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 4338b1cc..54631139 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -56,6 +56,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -rf libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 1ca0522bceefb17c5eccc7c61d953b688e3bd7a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 12:19:45 -0400 Subject: [PATCH 1813/3335] Update sonarr-install.sh apt-key is deprecated --- install/sonarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index fb18ab3a..e2857b87 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -22,7 +22,7 @@ $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" msg_info "Installing Sonarr" -$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 +wget -qO /etc/apt/trusted.gpg.d/sonarr-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2009837cbffd68f45bc180471f4f90de2a9b4bf8" echo "deb https://apt.sonarr.tv/debian testing-main main" >/etc/apt/sources.list.d/sonarr.list $STD apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null From f0ae6a89d1d25558f2f75d19029cc5c48fe839ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 12:21:50 -0400 Subject: [PATCH 1814/3335] Update omada-install.sh apt-key is deprecated --- install/omada-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index f6bb625d..dc05b709 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -22,9 +22,9 @@ $STD apt-get install -y jsvc msg_ok "Installed Dependencies" msg_info "Installing Azul Zulu" -$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 +wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb -$STD apt-get install ./zulu-repo_1.0.0-3_all.deb +$STD dpkg -i zulu-repo_1.0.0-3_all.deb $STD apt-get update $STD apt-get -y install zulu8-jdk msg_ok "Installed Azul Zulu" @@ -45,7 +45,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +rm -rf Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 006b29fc552f59df701c23f47ef4b97857823149 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 12:24:25 -0400 Subject: [PATCH 1815/3335] Update openhab-install.sh apt-key is deprecated --- install/openhab-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/openhab-install.sh b/install/openhab-install.sh index f87848f3..d856c13f 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -22,9 +22,9 @@ $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" msg_info "Installing Azul Zulu" -$STD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 +wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb -$STD apt-get install ./zulu-repo_1.0.0-3_all.deb +$STD dpkg -i zulu-repo_1.0.0-3_all.deb $STD apt-get update $STD apt-get -y install zulu11-jdk msg_ok "Installed Azul Zulu" From 7797589a7eacdde9ac49e35a32c66596cfc5e49d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 12:28:52 -0400 Subject: [PATCH 1816/3335] Update openhab-install.sh --- install/openhab-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/openhab-install.sh b/install/openhab-install.sh index d856c13f..1f52572a 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -33,11 +33,11 @@ msg_info "Installing openHAB" curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg mv openhab.gpg /usr/share/keyrings chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg -sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list' +echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list $STD apt update $STD apt-get -y install openhab systemctl daemon-reload -$STD systemctl enable --now openhab.service +systemctl enable -q --now openhab.service msg_ok "Installed openHAB" motd_ssh From 9e2a5129e835180a6d26348396a57f1c1bd5e910 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 8 Jul 2023 12:35:52 -0400 Subject: [PATCH 1817/3335] Update scrypted-install.sh apt-key is deprecated --- install/scrypted-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 78a4638d..e03f71e3 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -83,8 +83,8 @@ msg_ok "Installed Python3 Dependencies" read -r -p "Would you like to add Coral Edge TPU support? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Adding Coral Edge TPU Support" -$STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) -sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list' +wget -qO /etc/apt/trusted.gpg.d/coral-repo.asc "https://packages.cloud.google.com/apt/doc/apt-key.gpg" +echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" >/etc/apt/sources.list.d/coral-edgetpu.list $STD apt-get -y update $STD apt-get -y install libedgetpu1-std msg_ok "Coral Edge TPU Support Added" From c495bdd5c40bef5f7324c350cc714afc4865e666 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 9 Jul 2023 08:51:10 -0400 Subject: [PATCH 1818/3335] Update pimox-haos-vm.sh PVE 8 compatible --- vm/pimox-haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index fff2fa52..9fc13f2c 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -79,7 +79,7 @@ else exit fi function PVE_CHECK() { - if [ $(pveversion | grep -c "pve-manager/7\.[2-9]") -eq 0 ]; then + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.2 or higher" echo -e "Exiting..." From 3fc897f887989d3ac1cc2c710d584223deb4f513 Mon Sep 17 00:00:00 2001 From: slaclau <77557628+slaclau@users.noreply.github.com> Date: Mon, 10 Jul 2023 21:14:53 +0100 Subject: [PATCH 1819/3335] Update docker-install.sh (#1602) Add Portainer agent --- install/docker-install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install/docker-install.sh b/install/docker-install.sh index 8240ed8f..fb62433d 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -25,6 +25,7 @@ get_latest_release() { DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent") DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") msg_info "Installing Docker $DOCKER_LATEST_VERSION" @@ -58,6 +59,19 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" fi +read -r -p "Would you like to add the Portainer Agent? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" + $STD docker run -d \ + -p 9001:9001 \ + --name portainer_agent \ + --restart=always + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /var/lib/docker/volumes:/var/lib/docker/volumes \ + portainer/agent + msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" +fi + read -r -p "Would you like to add Docker Compose? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" From 39ebf79a6dc2fbacef9e0113298c981b6694525b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 10 Jul 2023 16:18:49 -0400 Subject: [PATCH 1820/3335] Update docker-install.sh restrict the installation to either portainer-ce or the portainer-agent --- install/docker-install.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/install/docker-install.sh b/install/docker-install.sh index fb62433d..810def23 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -48,7 +48,7 @@ read -r -p "Would you like to add Portainer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null - $STD docker run -d \ + $STD docker run -d \ -p 8000:8000 \ -p 9000:9000 \ --name=portainer \ @@ -57,21 +57,20 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -v portainer_data:/data \ portainer/portainer-ce:latest msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +else + read -r -p "Would you like to add the Portainer Agent? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" + $STD docker run -d \ + -p 9001:9001 \ + --name portainer_agent \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /var/lib/docker/volumes:/var/lib/docker/volumes \ + portainer/agent + msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" + fi fi - -read -r -p "Would you like to add the Portainer Agent? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" - $STD docker run -d \ - -p 9001:9001 \ - --name portainer_agent \ - --restart=always - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /var/lib/docker/volumes:/var/lib/docker/volumes \ - portainer/agent - msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" -fi - read -r -p "Would you like to add Docker Compose? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" From 9189e12e48462093e08825d0c4df319fcce060ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 10 Jul 2023 19:17:30 -0400 Subject: [PATCH 1821/3335] Update docker-install.sh shfmt --- install/docker-install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install/docker-install.sh b/install/docker-install.sh index 810def23..37575f46 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -32,20 +32,20 @@ msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + cd /usr/local/bin + curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 + chmod 755 /usr/local/bin/fuse-overlayfs + cd ~ + echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json fi $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" read -r -p "Would you like to add Portainer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null $STD docker run -d \ @@ -59,7 +59,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" else read -r -p "Would you like to add the Portainer Agent? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" $STD docker run -d \ -p 9001:9001 \ @@ -72,7 +72,7 @@ else fi fi read -r -p "Would you like to add Docker Compose? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins From 6501d0f43f81516ee78eb0a0af1ee9d3197f9dbb Mon Sep 17 00:00:00 2001 From: Victor Caldas Date: Tue, 11 Jul 2023 12:16:46 +0200 Subject: [PATCH 1822/3335] Make IP and NETMASK configurable (#1605) * Make IP and NETMASK configurable Users can now customize IP and Netmask of the router --- vm/openwrt.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 3b9952af..66bccd19 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -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" From 231f02ca018188cbce70f667a6902bb1e0b6dcc3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jul 2023 17:38:19 -0400 Subject: [PATCH 1823/3335] Update build.func Code refactoring --- misc/build.func | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index fced35ed..ee0ff47d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -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 <>$LXC_CONFIG + cat <>$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 <>$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 -install.sh + # This starts the container and executes -install.sh msg_info "Starting LXC Container" pct start "$CTID" msg_ok "Started LXC Container" From 40725a0451cf92a1f982d186d2ccae570744aaae Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jul 2023 17:41:23 -0400 Subject: [PATCH 1824/3335] Update scrypted-install.sh VAAPI hardware transcoding + USB passthrough --- install/scrypted-install.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index e03f71e3..b8707308 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -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" From a1ccf3987eb38fbd8953249ca7321d12e64c7a3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jul 2023 17:42:12 -0400 Subject: [PATCH 1825/3335] Update scrypted.sh default Debian 12 --- ct/scrypted.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/scrypted.sh b/ct/scrypted.sh index 474f3af3..e3c15644 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -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 From e62958f1c52b246b71c7c5d567cba1a8730aa753 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jul 2023 17:48:21 -0400 Subject: [PATCH 1826/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90fc8ee7..a3ecfd9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From cf20993b8601904bf625ca851385f4f16e575af6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Jul 2023 13:28:53 -0400 Subject: [PATCH 1827/3335] Update technitiumdns.sh fix unbound variable fixes https://github.com/tteck/Proxmox/issues/1608 --- ct/technitiumdns.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index c43d54e4..fa139dc1 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -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 } From 4f154a2bf12cc955dd313e61e7017aa6b4778a0e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Jul 2023 01:11:03 -0400 Subject: [PATCH 1828/3335] Update keycloak-install.sh openjdk 17 closes https://github.com/tteck/Proxmox/issues/1618 --- install/keycloak-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index ba9d4198..e5081b8e 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -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) }') From 96a40997ca4487ad2c13e763da9c3846502bf4ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 15 Jul 2023 01:11:37 -0400 Subject: [PATCH 1829/3335] Update keycloak.sh default Debian 12 --- ct/keycloak.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 83895ba7..5d9215b8 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -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 From 3d4804241ae6ee43c9fb2eacd5df54df0a7ae912 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 16 Jul 2023 16:38:53 -0400 Subject: [PATCH 1830/3335] Update pve8-upgrade.sh replace the yes/no box with a message box in the menus. --- misc/pve8-upgrade.sh | 69 +++++--------------------------------------- 1 file changed, 7 insertions(+), 62 deletions(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index a65cb302..53eff2cc 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -44,15 +44,10 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } - start_routines() { header_info - CHOICE=$(whiptail --title "PVE8 SOURCES" --menu "This will set the correct sources to update and install Proxmox VE 8.\n \nChange to Proxmox VE 8 sources?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) + whiptail --msgbox --title "PVE8 SOURCES" "This will set the correct sources to update and install Proxmox VE 8." 10 58 msg_info "Changing to Proxmox VE 8 Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bookworm main contrib @@ -60,91 +55,41 @@ deb http://ftp.debian.org/debian bookworm-updates main contrib deb http://security.debian.org/debian-security bookworm-security main contrib EOF msg_ok "Changed to Proxmox VE 8 Sources" - ;; - no) - msg_error "Selected no to Correcting Proxmox VE 8 Sources" - ;; - esac - CHOICE=$(whiptail --title "PVE8-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) + whiptail --msgbox --title "PVE8-ENTERPRISE" "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription." 10 58 msg_info "Disabling 'pve-enterprise' repository" cat </etc/apt/sources.list.d/pve-enterprise.list # deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise EOF msg_ok "Disabled 'pve-enterprise' repository" - ;; - no) - msg_error "Selected no to Disabling 'pve-enterprise' repository" - ;; - esac - CHOICE=$(whiptail --title "PVE8-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) + whiptail --msgbox --title "PVE8-NO-SUBSCRIPTION" "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE." 10 58 msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" - ;; - no) - msg_error "Selected no to Enabling 'pve-no-subscription' repository" - ;; - esac - CHOICE=$(whiptail --title "PVE8 CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) + whiptail --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58 msg_info "Enabling 'ceph package repositories'" cat </etc/apt/sources.list.d/ceph.list # deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription EOF msg_ok "Enabled 'ceph package repositories'" - ;; - no) - msg_error "Selected no to Enabling 'ceph package repositories'" - ;; - esac - CHOICE=$(whiptail --title "PVE8 TEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) + whiptail --msgbox --title "PVE8 TEST" "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released (Disabled)." 10 58 msg_info "Adding 'pvetest' repository and set disabled" cat </etc/apt/sources.list.d/pvetest-for-beta.list # deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" - ;; - no) - msg_error "Selected no to Adding 'pvetest' repository" - ;; - esac - CHOICE=$(whiptail --title "PVE8 UPDATE" --menu "\nUpdate to Proxmox VE 8 now?" 11 58 2 \ - "yes" " " \ - "no" " " 3>&2 2>&1 1>&3) - case $CHOICE in - yes) + whiptail --msgbox --title "PVE8 UPDATE" "Updating to Proxmox VE 8" 10 58 msg_info "Updating to Proxmox VE 8 (Patience)" apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y msg_ok "Updated to Proxmox VE 8" - ;; - no) - msg_error "Selected no to Updating to Proxmox VE 8" - ;; - esac CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ "yes" " " \ @@ -179,7 +124,7 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if ! pveversion | grep -Eq "pve-manager/(7\.4-(13|14|15|16))"; then +if ! pveversion | grep -Eq "pve-manager/(7\.4-(13|14|15|16|17))"; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" echo -e " PVE Version 7.4-13 or higher is required." From 12dc7162a95023be71262f0c4b8ffe8221fee944 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 17:37:35 -0400 Subject: [PATCH 1831/3335] Create update-lxcs-cron.sh --- misc/update-lxcs-cron.sh | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 misc/update-lxcs-cron.sh diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh new file mode 100644 index 00000000..f3d4a499 --- /dev/null +++ b/misc/update-lxcs-cron.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +echo "$(date)" +excluded_containers=("$@") +function update_container() { + container=$1 + name=$(pct exec "$container" hostname) + os=$(pct config "$container" | awk '/^ostype/ {print $2}') + if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then + disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') + read -ra disk_info_array <<< "$disk_info" + echo -e "\n[Info] Updating $container : $name - Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]" + else + echo -e "\n[Info] Updating $container : $name - [No disk info for ${os}]" + fi + case "$os" in + alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; + archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; + fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; + ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; + esac +} + +for container in $(pct list | awk '{if(NR>1) print $1}'); do + excluded=false + for excluded_container in "${excluded_containers[@]}"; do + if [ "$container" == "$excluded_container" ]; then + excluded=true + break + fi + done + if [ "$excluded" == true ]; then + header_info + echo -e "[Info] Skipping $container" + sleep 1 + else + status=$(pct status $container) + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then + echo -e "[Info] Starting $container" + pct start $container + echo -e "[Info] Waiting For $container To Start" + sleep 5 + update_container $container + echo -e "[Info] Shutting down $container" + pct shutdown $container & + elif [ "$status" == "status: running" ]; then + update_container $container + fi + fi +done +wait + +echo -e "Finished, All Containers Updated. \n" From abee2dfb1b016564065383de0bbb1414454321e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 17:39:22 -0400 Subject: [PATCH 1832/3335] Create cron-update-lxcs.sh --- misc/cron-update-lxcs.sh | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 misc/cron-update-lxcs.sh diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh new file mode 100644 index 00000000..9fbdb54a --- /dev/null +++ b/misc/cron-update-lxcs.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +clear +cat <<"EOF" + __ __ __ __ __ _ ________ ______ + / / / /___ ____/ /___ _/ /____ / / | |/ / ____/____ / ____/________ ____ + / / / / __ \/ __ / __ `/ __/ _ \ / / | / / / ___/ / / / ___/ __ \/ __ \ +/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___(__ ) / /___/ / / /_/ / / / / +\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/____/ \____/_/ \____/_/ /_/ + /_/ + +EOF + +add() { +while true; do + read -p "This script will add a cron job to update all LXCs at midnight. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +(crontab -l 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed '$!N; /^\(.*\)\n\1$/!P; D' >>/var/log/update-lxcs-cron.log +clear +echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" +} + +remove() { + (crontab -l | grep -v "github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh") | crontab - + rm /var/log/update-lxcs-cron.log + echo "Removed Update LXCs Cron from Proxmox VE" +} + +# Define options for the whiptail menu +OPTIONS=(Add "Add Update LXCs Cron to Proxmox VE" \ + Remove "Remove Update LXCs Cron from Proxmox VE") + +# Show the whiptail menu and save the user's choice +CHOICE=$(whiptail --title "Update LXCs Cron for Proxmox VE" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + +# Check the user's choice and perform the corresponding action +case $CHOICE in + "Add") + add + ;; + "Remove") + remove + ;; + *) + echo "Exiting..." + exit 0 + ;; +esac From f0742abb2e6febe407015d90a9c63d8988765a2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 17:48:39 -0400 Subject: [PATCH 1833/3335] Update cron-update-lxcs.sh tweak --- misc/cron-update-lxcs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 9fbdb54a..0a3c98b9 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -26,7 +26,8 @@ while true; do esac done -(crontab -l 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed '$!N; /^\(.*\)\n\1$/!P; D' >>/var/log/update-lxcs-cron.log +sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | crontab -u root -' >>/var/log/update-lxcs.log + clear echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" } From 71bece9d276d41ae8144cf7f29e8af6dea7f2058 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 17:58:06 -0400 Subject: [PATCH 1834/3335] Update cron-update-lxcs.sh tweak --- misc/cron-update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 0a3c98b9..f7f8377f 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -26,7 +26,7 @@ while true; do esac done -sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | crontab -u root -' >>/var/log/update-lxcs.log +sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | crontab -u root -' >>/var/log/update-lxcs-cron.log clear echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" From 86bb11f25f5001e94b2cd8a5cd7b589e0cec475c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 18:16:54 -0400 Subject: [PATCH 1835/3335] Update cron-update-lxcs.sh tweak --- misc/cron-update-lxcs.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index f7f8377f..63fb34bd 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -26,8 +26,7 @@ while true; do esac done -sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | crontab -u root -' >>/var/log/update-lxcs-cron.log - +sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh >>/var/log/update-lxcs-cron.log 2>&1)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | crontab -u root -' clear echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" } From 3d8d8fc867cac8c619638ad0e6b102653b0782c7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 18:41:44 -0400 Subject: [PATCH 1836/3335] Update cron-update-lxcs.sh tweak --- misc/cron-update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 63fb34bd..9a1f3b7b 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -26,7 +26,7 @@ while true; do esac done -sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh >>/var/log/update-lxcs-cron.log 2>&1)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | crontab -u root -' +sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | sudo crontab -u root - >> /var/log/update-lxcs.log' clear echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" } From 054a4b89207aa88b6f9a40bfc9e73963d15161c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 18:50:19 -0400 Subject: [PATCH 1837/3335] Delete cron-update-lxcs.sh --- misc/cron-update-lxcs.sh | 60 ---------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 misc/cron-update-lxcs.sh diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh deleted file mode 100644 index 9a1f3b7b..00000000 --- a/misc/cron-update-lxcs.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -clear -cat <<"EOF" - __ __ __ __ __ _ ________ ______ - / / / /___ ____/ /___ _/ /____ / / | |/ / ____/____ / ____/________ ____ - / / / / __ \/ __ / __ `/ __/ _ \ / / | / / / ___/ / / / ___/ __ \/ __ \ -/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___(__ ) / /___/ / / /_/ / / / / -\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/____/ \____/_/ \____/_/ /_/ - /_/ - -EOF - -add() { -while true; do - read -p "This script will add a cron job to update all LXCs at midnight. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\"") | sed "$!N; /^\(.*\)\n\1$/!P; D" | sudo crontab -u root - >> /var/log/update-lxcs.log' -clear -echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" -} - -remove() { - (crontab -l | grep -v "github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh") | crontab - - rm /var/log/update-lxcs-cron.log - echo "Removed Update LXCs Cron from Proxmox VE" -} - -# Define options for the whiptail menu -OPTIONS=(Add "Add Update LXCs Cron to Proxmox VE" \ - Remove "Remove Update LXCs Cron from Proxmox VE") - -# Show the whiptail menu and save the user's choice -CHOICE=$(whiptail --title "Update LXCs Cron for Proxmox VE" --menu "Select an option:" 10 58 2 \ - "${OPTIONS[@]}" 3>&1 1>&2 2>&3) - -# Check the user's choice and perform the corresponding action -case $CHOICE in - "Add") - add - ;; - "Remove") - remove - ;; - *) - echo "Exiting..." - exit 0 - ;; -esac From 891bf6fe9f801a45877f05a5c8f65a2c499dd5db Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 21:09:55 -0400 Subject: [PATCH 1838/3335] Create cron-update-lxcs.sh --- misc/cron-update-lxcs.sh | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 misc/cron-update-lxcs.sh diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh new file mode 100644 index 00000000..38ea40ca --- /dev/null +++ b/misc/cron-update-lxcs.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +clear +cat <<"EOF" + __ __ __ __ __ _ ________ ______ + / / / /___ ____/ /___ _/ /____ / / | |/ / ____/____ / ____/________ ____ + / / / / __ \/ __ / __ `/ __/ _ \ / / | / / / ___/ / / / ___/ __ \/ __ \ +/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___(__ ) / /___/ / / /_/ / / / / +\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/____/ \____/_/ \____/_/ /_/ + /_/ + +EOF + +add() { +while true; do + read -p "This script will add a cron job to update all LXCs at midnight. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -' +clear +echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" +} + +remove() { + (crontab -l | grep -v "github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh") | crontab - + rm /var/log/update-lxcs-cron.log + echo "Removed Update LXCs Cron from Proxmox VE" +} + +# Define options for the whiptail menu +OPTIONS=(Add "Add Update LXCs Cron to Proxmox VE" \ + Remove "Remove Update LXCs Cron from Proxmox VE") + +# Show the whiptail menu and save the user's choice +CHOICE=$(whiptail --title "Update LXCs Cron for Proxmox VE" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + +# Check the user's choice and perform the corresponding action +case $CHOICE in + "Add") + add + ;; + "Remove") + remove + ;; + *) + echo "Exiting..." + exit 0 + ;; +esac From ba966fdff88d15938920cc06441403fb420744f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 17 Jul 2023 22:03:18 -0400 Subject: [PATCH 1839/3335] Update cron-update-lxcs.sh This script is designed to schedule a cron job that updates all LXCs every Sunday at midnight. --- misc/cron-update-lxcs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 38ea40ca..1e9221a9 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -18,14 +18,14 @@ EOF add() { while true; do - read -p "This script will add a cron job to update all LXCs at midnight. Proceed(y/n)?" yn + read -p "This script will schedule a cron job that updates all LXCs every Sunday at midnight. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; *) echo "Please answer yes or no." ;; esac done -sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * * PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -' +sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -' clear echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" } From 3a920bbcebb759513ed96f8c3345e6494f2df13a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Jul 2023 04:28:46 -0400 Subject: [PATCH 1840/3335] Update update-lxcs-cron.sh shfmt --- misc/update-lxcs-cron.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index f3d4a499..fc245a04 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -13,16 +13,16 @@ function update_container() { os=$(pct config "$container" | awk '/^ostype/ {print $2}') if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') - read -ra disk_info_array <<< "$disk_info" + read -ra disk_info_array <<<"$disk_info" echo -e "\n[Info] Updating $container : $name - Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]" else echo -e "\n[Info] Updating $container : $name - [No disk info for ${os}]" fi case "$os" in - alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; - archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; - fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; + alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; + archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; + fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; esac } From a5b70669c5181413001f38f0f63afa6e91eba8ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Jul 2023 04:38:50 -0400 Subject: [PATCH 1841/3335] Update cron-update-lxcs.sh tweak --- misc/cron-update-lxcs.sh | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 1e9221a9..0c471c2c 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -4,56 +4,56 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/cron-update-lxcs.sh)" clear cat <<"EOF" - __ __ __ __ __ _ ________ ______ - / / / /___ ____/ /___ _/ /____ / / | |/ / ____/____ / ____/________ ____ - / / / / __ \/ __ / __ `/ __/ _ \ / / | / / / ___/ / / / ___/ __ \/ __ \ -/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___(__ ) / /___/ / / /_/ / / / / -\____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/____/ \____/_/ \____/_/ /_/ - /_/ - + ______ __ __ __ __ __ _ ________ + / ____/________ ____ / / / /___ ____/ /___ _/ /____ / / | |/ / ____/____ + / / / ___/ __ \/ __ \ / / / / __ \/ __ / __ `/ __/ _ \ / / | / / / ___/ +/ /___/ / / /_/ / / / / / /_/ / /_/ / /_/ / /_/ / /_/ __/ / /___/ / /___(__ ) +\____/_/ \____/_/ /_/ \____/ .___/\__,_/\__,_/\__/\___/ /_____/_/|_\____/____/ + /_/ EOF +set -euo pipefail +shopt -s inherit_errexit nullglob + add() { -while true; do - read -p "This script will schedule a cron job that updates all LXCs every Sunday at midnight. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -' -clear -echo -e "\n To view Update LXCs Cron logs: cat /var/log/update-lxcs-cron.log" + while true; do + read -p "This script will add a crontab schedule that updates all LXCs every Sunday at midnight. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -' + clear + echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log" } remove() { (crontab -l | grep -v "github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh") | crontab - rm /var/log/update-lxcs-cron.log - echo "Removed Update LXCs Cron from Proxmox VE" + echo "Removed Crontab Schedule from Proxmox VE" } -# Define options for the whiptail menu -OPTIONS=(Add "Add Update LXCs Cron to Proxmox VE" \ - Remove "Remove Update LXCs Cron from Proxmox VE") +OPTIONS=(Add "Add Crontab Schedule" + Remove "Remove Crontab Schedule") -# Show the whiptail menu and save the user's choice -CHOICE=$(whiptail --title "Update LXCs Cron for Proxmox VE" --menu "Select an option:" 10 58 2 \ - "${OPTIONS[@]}" 3>&1 1>&2 2>&3) +CHOICE=$(whiptail --title "Cron Update LXCs" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) -# Check the user's choice and perform the corresponding action case $CHOICE in - "Add") - add - ;; - "Remove") - remove - ;; - *) - echo "Exiting..." - exit 0 - ;; +"Add") + add + ;; +"Remove") + remove + ;; +*) + echo "Exiting..." + exit 0 + ;; esac From 991b0c1c695ff8228f655cecd84714f8a315539c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Jul 2023 04:54:43 -0400 Subject: [PATCH 1842/3335] Update cron-update-lxcs.sh tweak --- misc/cron-update-lxcs.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 0c471c2c..3cd4d9be 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -16,9 +16,6 @@ cat <<"EOF" /_/ EOF -set -euo pipefail -shopt -s inherit_errexit nullglob - add() { while true; do read -p "This script will add a crontab schedule that updates all LXCs every Sunday at midnight. Proceed(y/n)?" yn @@ -35,7 +32,7 @@ add() { remove() { (crontab -l | grep -v "github.com/tteck/Proxmox/raw/main/misc/update-lxcs-cron.sh") | crontab - - rm /var/log/update-lxcs-cron.log + rm -rf /var/log/update-lxcs-cron.log echo "Removed Crontab Schedule from Proxmox VE" } From 5da67255d6eb99af601770f6903c2a83729fe2e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Jul 2023 06:28:30 -0400 Subject: [PATCH 1843/3335] Update archlinux.sh update PVE_CHECK fixes https://github.com/tteck/Proxmox/issues/1625 --- ct/archlinux.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/archlinux.sh b/ct/archlinux.sh index 55067dab..f7b8e6cc 100644 --- a/ct/archlinux.sh +++ b/ct/archlinux.sh @@ -65,13 +65,13 @@ function msg_error() { } function PVE_CHECK() { -if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" - echo -e "Exiting..." - sleep 2 -exit -fi + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi } function ARCH_CHECK() { if [ "$(dpkg --print-architecture)" != "amd64" ]; then From c7e46be613b221b4908c39c44fe705b512340a8e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 18 Jul 2023 11:07:03 -0400 Subject: [PATCH 1844/3335] Update CHANGELOG.md Proxmox VE Cron LXC Updater --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ecfd9f..603b74ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-18 + +### Changed + +- **Proxmox VE Cron LXC Updater** + - NEW Script + ## 2023-07-11 ### Changed From 954beef6bf4615c50d40cd82e396506d23deee28 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 20 Jul 2023 08:42:41 -0400 Subject: [PATCH 1845/3335] Update grocy-install.sh download from GitHub instead of an unreliable website (https://releases.grocy.info/latest ) fixes https://github.com/tteck/Proxmox/issues/1629 https://github.com/tteck/Proxmox/issues/1634 --- install/grocy-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 19146413..33f2e31d 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -34,8 +34,9 @@ $STD apt-get install -y php8.1-mbstring msg_ok "Installed PHP 8.1" msg_info "Installing grocy" -wget -q https://releases.grocy.info/latest -$STD unzip latest -d /var/www/html +latest=$(curl -s https://api.github.com/repos/grocy/grocy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/grocy/grocy/releases/download/v${latest}/grocy_${latest}.zip +$STD unzip grocy_${latest}.zip -d /var/www/html chown -R www-data:www-data /var/www/html cp /var/www/html/config-dist.php /var/www/html/data/config.php chmod +x /var/www/html/update.sh @@ -66,5 +67,5 @@ customize msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean -rm -rf /root/latest +rm -rf /root/grocy_${latest}.zip msg_ok "Cleaned" From 4e6e6f66b371e8dbc083220b9514695a9d902f56 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Jul 2023 13:45:33 -0400 Subject: [PATCH 1846/3335] Update update-lxcs-cron.sh non interactive --- misc/update-lxcs-cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index fc245a04..82184365 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -22,7 +22,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y" ;; esac } From 9948c7c410225283218e9191e5f64ecbbaeed5e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jul 2023 08:34:20 -0400 Subject: [PATCH 1847/3335] Update install.func tweak --- misc/install.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/install.func b/misc/install.func index 9841ca1e..24fd8533 100644 --- a/misc/install.func +++ b/misc/install.func @@ -84,8 +84,7 @@ setting_up_container() { exit 1 fi rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED - systemctl stop systemd-networkd-wait-online.service - $STD systemctl disable systemd-networkd-wait-online.service + systemctl disable -q --now systemd-networkd-wait-online.service msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(hostname -I)" } From 7e6d35f0ce654521e8c36e4732aa42772b42cf8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jul 2023 19:47:24 -0400 Subject: [PATCH 1848/3335] Create zoraxy-install.sh --- install/zoraxy-install.sh | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 install/zoraxy-install.sh diff --git a/install/zoraxy-install.sh b/install/zoraxy-install.sh new file mode 100644 index 00000000..5e23e065 --- /dev/null +++ b/install/zoraxy-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing Golang" +set +o pipefail +RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) +wget -q https://golang.org/dl/$RELEASE +$STD tar -xzf $RELEASE -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +set -o pipefail +msg_ok "Installed Golang" + +msg_info "Installing Zoraxy (Patience)" +$STD git clone https://github.com/tobychui/zoraxy /opt/zoraxy +cd /opt/zoraxy/src +$STD go mod tidy +$STD go build +msg_ok "Installed Zoraxy" + +msg_info "Creating Service" +cat </etc/systemd/system/zoraxy.service +[Unit] +Description=General purpose request proxy and forwarding tool +After=syslog.target network-online.target + +[Service] +ExecStart=/opt/zoraxy/src/./zoraxy +WorkingDirectory=/opt/zoraxy/src/ +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now zoraxy.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $RELEASE +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From f79b88b8cfa6baaa1a0c8e434cf7f252953e7ec3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jul 2023 19:49:16 -0400 Subject: [PATCH 1849/3335] Create zoraxy.sh --- ct/zoraxy.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/zoraxy.sh diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh new file mode 100644 index 00000000..b0b0f358 --- /dev/null +++ b/ct/zoraxy.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ +/__ / ____ _________ __ ____ __ + / / / __ \/ ___/ __ `/ |/_/ / / / + / /__/ /_/ / / / /_/ /> /dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL} \n" From 2eaeac823f7390040282edcdf9f2418f575add04 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jul 2023 20:06:33 -0400 Subject: [PATCH 1850/3335] Update CHANGELOG.md Zoraxy LXC --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 603b74ca..f8db50c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-23 + +### Changed + +- **Zoraxy LXC** + - NEW Script + ## 2023-07-18 ### Changed From ede93f7c31ea396a69ee7e2a38357f8218ab3303 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Jul 2023 13:21:05 -0400 Subject: [PATCH 1851/3335] Update zoraxy.sh tweak --- ct/zoraxy.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index b0b0f358..354a4434 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -53,10 +53,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_error "There is currently no update path available." exit } From 73bf8379be9210bfa477de00025eaf8c89c17e58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Jul 2023 14:13:36 -0400 Subject: [PATCH 1852/3335] Create ombi-install.sh --- install/ombi-install.sh | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 install/ombi-install.sh diff --git a/install/ombi-install.sh b/install/ombi-install.sh new file mode 100644 index 00000000..99a0a554 --- /dev/null +++ b/install/ombi-install.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Ombi" +LATEST=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +# wget -q https://github.com/Ombi-app/Ombi/releases/download/${LATEST}/linux-x64.tar.gz +wget -q https://github.com/Ombi-app/Ombi/releases/download/v4.43.2/linux-x64.tar.gz +mkdir -p /opt/ombi +tar -xzf linux-x64.tar.gz -C /opt/ombi +msg_ok "Installed Ombi" + +msg_info "Creating Service" +cat </etc/systemd/system/ombi.service +[Unit] +Description=Ombi +After=syslog.target network-online.target + +[Service] +ExecStart=/opt/ombi/./Ombi +WorkingDirectory=/opt/ombi +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ombi.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 19a060355b24d9f717987574663f9a725d0afd8f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Jul 2023 14:14:52 -0400 Subject: [PATCH 1853/3335] Create ombi.sh --- ct/ombi.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/ombi.sh diff --git a/ct/ombi.sh b/ct/ombi.sh new file mode 100644 index 00000000..156d7507 --- /dev/null +++ b/ct/ombi.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ _ + / __ \____ ___ / /_ (_) + / / / / __ `__ \/ __ \/ / +/ /_/ / / / / / / /_/ / / +\____/_/ /_/ /_/_.___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Ombi" +var_disk="4" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/ombi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" From 75635418d2393c7bad714f639cc42d699d3eb211 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 24 Jul 2023 14:23:24 -0400 Subject: [PATCH 1854/3335] Update CHANGELOG.md Ombi LXC --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8db50c7..9add39e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-24 + +### Changed + +- **Ombi LXC** + - NEW Script + ## 2023-07-23 ### Changed From dfb6ca572b7655ced6433e9e0d059537ab78c0e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Jul 2023 06:57:00 -0400 Subject: [PATCH 1855/3335] Update mikrotik-routeros.sh version 7.10.2 PVE 8 --- vm/mikrotik-routeros.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 62930234..3db68ab8 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -62,9 +62,9 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo "Requires PVE Version: 7.XX" + echo -e "Requires PVE Version 7.2 or higher" echo "Exiting..." sleep 3 exit @@ -234,7 +234,7 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Mikrotik RouterOS Disk Image" -URL=https://download.mikrotik.com/routeros/7.7/install-image-7.7.zip +URL=https://download.mikrotik.com/routeros/7.10.2/install-image-7.10.2.zip sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From 14bf09bed3772e0f726eb252eb5182a71ac88a28 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Jul 2023 13:57:31 -0400 Subject: [PATCH 1856/3335] Update microcode.sh update AMD microcode to 3.20230719.1 --- misc/microcode.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 9c399dbc..fa427cb0 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -72,15 +72,15 @@ intel() { amd() { msg_info "Downloading the latest AMD Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230414.1_amd64.deb + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230719.1_amd64.deb msg_ok "Downloaded the latest AMD Processor Microcode Package" msg_info "Installing the AMD Processor Microcode (Patience)" - dpkg -i amd64-microcode_3.20230414.1_amd64.deb &>/dev/null + dpkg -i amd64-microcode_3.20230719.1_amd64.deb &>/dev/null msg_ok "Installed the AMD Processor Microcode" msg_info "Cleaning up" - rm amd64-microcode_3.20230414.1_amd64.deb + rm amd64-microcode_3.20230719.1_amd64.deb msg_ok "Cleaned" echo -e "\n To apply the changes, the system will need to be rebooted.\n" From 96d88e3b2e97538f8a7d6aafc82afa4718c5c0e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Jul 2023 20:38:05 -0400 Subject: [PATCH 1857/3335] Create alpine-install.sh --- install/alpine-install.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 install/alpine-install.sh diff --git a/install/alpine-install.sh b/install/alpine-install.sh new file mode 100644 index 00000000..72830ebb --- /dev/null +++ b/install/alpine-install.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +motd_ssh +customize From 0aa9ffee332aaa081b26f4b5ac6cf1ad278fecf3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 12:08:09 -0400 Subject: [PATCH 1858/3335] Update filebrowser.sh New release issues, revert to 2.23.0 --- misc/filebrowser.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index 02545b48..81958d23 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -67,7 +67,8 @@ function msg_ok() { } msg_info "Installing ${APP}" -bash <(curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh) &>/dev/null +RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') +curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null From b3db1a3e1c123934bb341cebd79db90b3c9fcf0a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 15:01:54 -0400 Subject: [PATCH 1859/3335] Create overseerr-install.sh --- install/overseerr-install.sh | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 install/overseerr-install.sh diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh new file mode 100644 index 00000000..67c03a79 --- /dev/null +++ b/install/overseerr-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Yarn" +$STD npm install -g yarn +msg_ok "Installed Yarn" + +msg_info "Installing overseerr (Patience)" +git clone -q https://github.com/sct/overseerr.git /opt/overseerr +cd /opt/overseerr +$STD yarn install +$STD yarn build +msg_ok "Installed overseerr" + +msg_info "Creating Service" +cat </etc/systemd/system/overseerr.service +[Unit] +Description=Overseerr Service +After=network.target + +[Service] +Type=exec +WorkingDirectory=/opt/overseerr +ExecStart=/usr/bin/yarn start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now overseerr.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 2f06e4df336bd9f2d23529c04ba43dd314943035 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 15:03:16 -0400 Subject: [PATCH 1860/3335] Create overseerr.sh --- ct/overseerr.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/overseerr.sh diff --git a/ct/overseerr.sh b/ct/overseerr.sh new file mode 100644 index 00000000..bec9f790 --- /dev/null +++ b/ct/overseerr.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ + / __ \_ _____ _____________ ___ __________ + / / / / | / / _ \/ ___/ ___/ _ \/ _ \/ ___/ ___/ +/ /_/ /| |/ / __/ / (__ ) __/ __/ / / / +\____/ |___/\___/_/ /____/\___/\___/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Overseerr" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5055${CL} \n" From 80e4f96d25d8779cf1a33a66c99651c54a3bdfe2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 15:33:33 -0400 Subject: [PATCH 1861/3335] Create jellyseerr-install.sh --- install/jellyseerr-install.sh | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 install/jellyseerr-install.sh diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh new file mode 100644 index 00000000..e81c682e --- /dev/null +++ b/install/jellyseerr-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Yarn" +$STD npm install -g yarn +msg_ok "Installed Yarn" + +msg_info "Installing Jellyseerr (Patience)" +git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr +cd /opt/lellyseerr +$STD yarn install +$STD yarn build +msg_ok "Installed Jellyseerr" + +msg_info "Creating Service" +cat </etc/systemd/system/jellyseerr.service +[Unit] +Description=jellyseerr Service +After=network.target + +[Service] +Type=exec +WorkingDirectory=/opt/jellyseerr +ExecStart=/usr/bin/yarn start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now jellyseerr.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d041785691de2704fa9f4bdf5e689e7540094cfa Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 15:34:40 -0400 Subject: [PATCH 1862/3335] Create jellyseerr.sh --- ct/jellyseerr.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/jellyseerr.sh diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh new file mode 100644 index 00000000..a05b82bf --- /dev/null +++ b/ct/jellyseerr.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ____ + / /__ / / /_ __________ ___ __________ + __ / / _ \/ / / / / / ___/ _ \/ _ \/ ___/ ___/ +/ /_/ / __/ / / /_/ (__ ) __/ __/ / / / +\____/\___/_/_/\__, /____/\___/\___/_/ /_/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Jellyseerr" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5055${CL} \n" From 671a99da40214ef9f9b26cc7d7c1e801c4b5a34e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 15:54:29 -0400 Subject: [PATCH 1863/3335] Update CHANGELOG.md Overseerr LXC Jellyseerr LXC --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9add39e1..a7418e19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ - 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-08-01 + +### Changed + +- **Overseerr LXC** + - NEW Script +- **Jellyseerr LXC** + - NEW Script + ## 2023-07-24 ### Changed From ed4b2ef2376ecdf8b7031ec63bc048ca20f928cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 16:30:07 -0400 Subject: [PATCH 1864/3335] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index a05b82bf..9f8bdf70 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -d /opt/jellyseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit } From b0543ab8ae6f0482a86487692c10fc994aa6769f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 1 Aug 2023 16:31:06 -0400 Subject: [PATCH 1865/3335] Update overseerr-install.sh tweak --- install/overseerr-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index 67c03a79..bb62febe 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -32,12 +32,12 @@ msg_info "Installing Yarn" $STD npm install -g yarn msg_ok "Installed Yarn" -msg_info "Installing overseerr (Patience)" +msg_info "Installing Overseerr (Patience)" git clone -q https://github.com/sct/overseerr.git /opt/overseerr cd /opt/overseerr $STD yarn install $STD yarn build -msg_ok "Installed overseerr" +msg_ok "Installed Overseerr" msg_info "Creating Service" cat </etc/systemd/system/overseerr.service From 9b9a56bf92890570bf39308a461662a03ba194b7 Mon Sep 17 00:00:00 2001 From: Jackson Holle Date: Wed, 2 Aug 2023 03:53:47 -0500 Subject: [PATCH 1866/3335] Update jellyseerr-install.sh (#1658) fix typo --- install/jellyseerr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index e81c682e..c5b5e646 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -34,7 +34,7 @@ msg_ok "Installed Yarn" msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr -cd /opt/lellyseerr +cd /opt/jellyseerr $STD yarn install $STD yarn build msg_ok "Installed Jellyseerr" From 117023984e2073a07908c613240a3903afb1ec26 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Aug 2023 20:10:12 -0400 Subject: [PATCH 1867/3335] Update homeassistant.sh New release issues, revert to 2.23.0 --- ct/homeassistant.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 759eca18..51a46299 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -100,7 +100,8 @@ function update_script() { if [ "$UPD" == "4" ]; then IP=$(hostname -I | awk '{print $1}') msg_info "Installing FileBrowser" - curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null + RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') + curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null From 34b16c861e8714ae6795bd8ac4b895506942a5cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 2 Aug 2023 20:11:58 -0400 Subject: [PATCH 1868/3335] Update homeassistant-core.sh New release issues, revert to 2.23.0 fixes https://github.com/tteck/Proxmox/issues/1660 --- ct/homeassistant-core.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 48065814..ed069489 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -107,7 +107,8 @@ function update_script() { fi if [ "$UPD" == "3" ]; then msg_info "Installing FileBrowser" - curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null + RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') + curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null From 79fb2c309811e3d4fdb25d0f9194e7d9176e4c55 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 3 Aug 2023 11:59:39 -0400 Subject: [PATCH 1869/3335] Update overseerr.sh add update path --- ct/overseerr.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/overseerr.sh b/ct/overseerr.sh index bec9f790..7efeab1b 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -53,7 +53,21 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating $APP" +systemctl stop overseerr +cd /opt/overseerr +output=$(git pull) +git pull &>/dev/null +if echo "$output" | grep -q "Already up to date." +then + msg_info " $APP is already up to date." + systemctl start overseerr + exit +fi +yarn install &>/dev/null +yarn build &>/dev/null +systemctl start overseerr +msg_ok "Updated $APP" exit } From 1ae673692e5eb6919a3be5f4ff364e2366d76764 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 3 Aug 2023 12:03:02 -0400 Subject: [PATCH 1870/3335] Update jellyseerr.sh add update path --- ct/jellyseerr.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 9f8bdf70..721d0ae9 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -53,7 +53,21 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/jellyseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating $APP" +systemctl stop jellyseerr +cd /opt/jellyseerr +output=$(git pull) +git pull &>/dev/null +if echo "$output" | grep -q "Already up to date." +then + msg_info " $APP is already up to date." + systemctl start jellyseerr + exit +fi +yarn install &>/dev/null +yarn build &>/dev/null +systemctl start jellyseerr +msg_ok "Updated $APP" exit } From 26bbc9a18d4fd09531a50775879055bcfdb16a71 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 3 Aug 2023 12:07:15 -0400 Subject: [PATCH 1871/3335] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 721d0ae9..ef320216 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -60,7 +60,7 @@ output=$(git pull) git pull &>/dev/null if echo "$output" | grep -q "Already up to date." then - msg_info " $APP is already up to date." + msg_ok " $APP is already up to date." systemctl start jellyseerr exit fi From 0d9316ae06662d5d58ad66d5392ef20974a7cd42 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 3 Aug 2023 12:07:46 -0400 Subject: [PATCH 1872/3335] Update overseerr.sh tweak --- ct/overseerr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 7efeab1b..8f3ce0a1 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -60,7 +60,7 @@ output=$(git pull) git pull &>/dev/null if echo "$output" | grep -q "Already up to date." then - msg_info " $APP is already up to date." + msg_ok " $APP is already up to date." systemctl start overseerr exit fi From cf6d9bf20078b836da7ff14ee168dc3e1761b193 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 3 Aug 2023 19:54:48 -0400 Subject: [PATCH 1873/3335] Update jellyseerr-install.sh add `jellyseerr.conf` --- install/jellyseerr-install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index c5b5e646..15711368 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -37,6 +37,12 @@ git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr $STD yarn install $STD yarn build +mkdir -p /etc/jellyseerr/ +cat </etc/jellyseerr/jellyseerr.conf +PORT=5055 +HOST=0.0.0.0 +# JELLYFIN_TYPE=emby +EOF msg_ok "Installed Jellyseerr" msg_info "Creating Service" @@ -46,6 +52,8 @@ Description=jellyseerr Service After=network.target [Service] +EnvironmentFile=/etc/jellyseerr/jellyseerr.conf +Environment=NODE_ENV=production Type=exec WorkingDirectory=/opt/jellyseerr ExecStart=/usr/bin/yarn start From 2408e02425f827b02f2b80619cf23a53b729e153 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Aug 2023 13:08:59 -0400 Subject: [PATCH 1874/3335] Update emqx.sh default Debian 12 --- ct/emqx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/emqx.sh b/ct/emqx.sh index fb198fce..ccfbd747 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 4da3ef9bfda42be39d7e49f0c4d0e56272faabb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 5 Aug 2023 21:17:09 -0400 Subject: [PATCH 1875/3335] Update jellyseerr-install.sh tweak --- install/jellyseerr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 15711368..06803fc0 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -40,7 +40,7 @@ $STD yarn build mkdir -p /etc/jellyseerr/ cat </etc/jellyseerr/jellyseerr.conf PORT=5055 -HOST=0.0.0.0 +# HOST=0.0.0.0 # JELLYFIN_TYPE=emby EOF msg_ok "Installed Jellyseerr" From 80ad523a248138b3067b78bf6b8a57eb4c41ba21 Mon Sep 17 00:00:00 2001 From: spooknik <40317809+spooknik@users.noreply.github.com> Date: Mon, 7 Aug 2023 14:52:42 +0200 Subject: [PATCH 1876/3335] Auto Rebuilt (#1670) Create a systemd service that triggers the rebuilding of Dashy whenever changes are made to the configuration file. --- install/dashy-install.sh | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 44d85f86..ef8106be 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -42,7 +42,7 @@ export NODE_OPTIONS=--max-old-space-size=1000 $STD yarn build msg_ok "Installed Dashy" -msg_info "Creating Service" +msg_info "Creating Services" cat </etc/systemd/system/dashy.service [Unit] Description=dashy @@ -56,7 +56,30 @@ WantedBy=multi-user.target EOF $STD systemctl enable dashy systemctl start dashy -msg_ok "Created Service" + +cat > /etc/systemd/system/dashy-rebuild.service << EOF +[Unit] +Description=Rebuild Dashy on Config Changes + +[Service] +Type=oneshot +ExecStart=/usr/bin/yarn --cwd=/dashy build +EOF + +cat > /etc/systemd/system/dashy-rebuild.path << EOF +[Unit] +Description=Monitor Dashy Config for Changes + +[Path] +PathChanged=/dashy/public/conf.yml + +[Install] +WantedBy=multi-user.target +EOF + +$STD systemctl enable dashy-rebuild +systemctl start dashy-rebuild +msg_ok "Created Services" motd_ssh customize From 7add9d891d36cadc68e4633298468e68aefd06a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 7 Aug 2023 08:56:46 -0400 Subject: [PATCH 1877/3335] Update dashy-install.sh tweak --- install/dashy-install.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index ef8106be..e7de0462 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -54,10 +54,8 @@ ExecStart=/usr/bin/yarn start [Install] WantedBy=multi-user.target EOF -$STD systemctl enable dashy -systemctl start dashy -cat > /etc/systemd/system/dashy-rebuild.service << EOF +cat </etc/systemd/system/dashy-rebuild.service [Unit] Description=Rebuild Dashy on Config Changes @@ -66,7 +64,7 @@ Type=oneshot ExecStart=/usr/bin/yarn --cwd=/dashy build EOF -cat > /etc/systemd/system/dashy-rebuild.path << EOF +cat </etc/systemd/system/dashy-rebuild.path [Unit] Description=Monitor Dashy Config for Changes @@ -76,9 +74,8 @@ PathChanged=/dashy/public/conf.yml [Install] WantedBy=multi-user.target EOF - -$STD systemctl enable dashy-rebuild -systemctl start dashy-rebuild +systemctl -q --now enable dashy +systemctl -q --now enable dashy-rebuild msg_ok "Created Services" motd_ssh From f796767e06dbe7d89a6d3a877dab106fb27dc238 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 7 Aug 2023 14:00:26 -0400 Subject: [PATCH 1878/3335] Update mqtt-install.sh create `/etc/mosquitto/conf.d/default.conf` --- install/mqtt-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 9534db5a..5f66caa7 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -22,6 +22,12 @@ msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" $STD apt-get -y install mosquitto $STD apt-get -y install mosquitto-clients +cat </etc/mosquitto/conf.d/default.conf +allow_anonymous false +persistence true +password_file /etc/mosquitto/passwd +listener 1883 +EOF msg_ok "Installed Mosquitto MQTT Broker" motd_ssh From daeefafdf9896fb3544cd4a1667a822ef69e6e04 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 7 Aug 2023 14:42:51 -0400 Subject: [PATCH 1879/3335] Update mariadb-install.sh tweak --- install/mariadb-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index e7af61e1..ef154ed0 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -21,6 +21,8 @@ msg_ok "Installed Dependencies" msg_info "Installing MariaDB" $STD apt-get install -y mariadb-server +sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf +sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf msg_ok "Installed MariaDB" read -r -p "Would you like to add Adminer? " prompt From 9cd58e5589485c90613e460afe9eaef13d92d51d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 05:18:30 -0400 Subject: [PATCH 1880/3335] Update omada-install.sh get the latest version --- install/omada-install.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index dc05b709..d6029734 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -36,16 +36,19 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" -msg_info "Installing Omada Controller v5.9.31" -wget -qL https://static.tp-link.com/upload/software/2023/202303/20230321/Omada_SDN_Controller_v5.9.31_Linux_x64.deb -$STD dpkg -i Omada_SDN_Controller_v5.9.31_Linux_x64.deb -msg_ok "Installed Omada Controller" +latesturl=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) +latestversion=$(basename "$latesturl" | sed -e 's/.*ller_v//;s/_Li.*//') + +msg_info "Installing Omada Controller v${latestversion}" +wget -qL ${latesturl} +$STD dpkg -i Omada_SDN_Controller_v${latestversion}_Linux_x64.deb +msg_ok "Installed Omada Controller v${latestversion}" motd_ssh customize msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +rm -rf Omada_SDN_Controller_v${latestversion}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 582088fc90b41476128d94035cba857429ab3e24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 05:20:42 -0400 Subject: [PATCH 1881/3335] Update omada.sh add update path --- ct/omada.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ct/omada.sh b/ct/omada.sh index f8d485aa..0096f435 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -53,11 +53,22 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" +latesturl=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) +latestversion=$(basename "$latesturl" | sed -e 's/.*ller_v//;s/_Li.*//') +installed_version=$(dpkg -l | grep omada | awk '{print $3}') + +if [ "$installed_version" = "$latestversion" ]; then + echo "Installed version ($installed_version) is the same as the latest version ($latestversion)." + echo "Omada is already up to date" + exit +else + echo -e "Updating Omada Controller to v${latestversion}" + wget -qL ${latesturl} + dpkg -i Omada_SDN_Controller_v${latestversion}_Linux_x64.deb + rm -rf Omada_SDN_Controller_v${latestversion}_Linux_x64.deb + echo -e "Updated Omada Controller to v${latestversion}" exit +fi } start From 60ebfe406e9e0cedf410fbfe125afddff0b3111c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 07:45:13 -0400 Subject: [PATCH 1882/3335] Update omada-install.sh tweak --- install/omada-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index d6029734..03e2b418 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -36,19 +36,19 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" -latesturl=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) -latestversion=$(basename "$latesturl" | sed -e 's/.*ller_v//;s/_Li.*//') +latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) +latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//') -msg_info "Installing Omada Controller v${latestversion}" -wget -qL ${latesturl} -$STD dpkg -i Omada_SDN_Controller_v${latestversion}_Linux_x64.deb -msg_ok "Installed Omada Controller v${latestversion}" +msg_info "Installing Omada Controller ${latest_version}" +wget -qL ${latest_url} +$STD dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb +msg_ok "Installed Omada Controller ${latest_version}" motd_ssh customize msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_v${latestversion}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From b1f28071ef17d02a729895a7ae17ddb7dd9d90b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 07:48:14 -0400 Subject: [PATCH 1883/3335] Update omada.sh tweak --- ct/omada.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ct/omada.sh b/ct/omada.sh index 0096f435..a4312278 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -53,20 +53,20 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -latesturl=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) -latestversion=$(basename "$latesturl" | sed -e 's/.*ller_v//;s/_Li.*//') +latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) +latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//') installed_version=$(dpkg -l | grep omada | awk '{print $3}') -if [ "$installed_version" = "$latestversion" ]; then - echo "Installed version ($installed_version) is the same as the latest version ($latestversion)." - echo "Omada is already up to date" +if [ "v${installed_version}" = "${latest_version}" ]; then + echo "Installed version (v${installed_version}) is the same as the latest version (${latest_version})." + echo "Omada Controller is already up to date" exit else - echo -e "Updating Omada Controller to v${latestversion}" - wget -qL ${latesturl} - dpkg -i Omada_SDN_Controller_v${latestversion}_Linux_x64.deb - rm -rf Omada_SDN_Controller_v${latestversion}_Linux_x64.deb - echo -e "Updated Omada Controller to v${latestversion}" + echo -e "Updating Omada Controller to ${latest_version}" + wget -qL ${latest_url} + dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb + rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb + echo -e "Updated Omada Controller to ${latest_version}" exit fi } From 45455cb169d4a2935b02b8e06bf875742b146c3e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 08:01:15 -0400 Subject: [PATCH 1884/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7418e19..2df7ef2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-08-09 + +### Changed + +- **Omada Controller LXC** + - Update via script + ## 2023-08-01 ### Changed From 4613129d28d263e6d8ebaa7a13454c1046573250 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 12:02:56 -0400 Subject: [PATCH 1885/3335] Update omada.sh tweak --- ct/omada.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/omada.sh b/ct/omada.sh index a4312278..31d1e3dd 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -54,7 +54,11 @@ function update_script() { header_info if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) -latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//') +latest_version=$(basename "${latest_url}" | sed -e 's/.*ller_//;s/_Li.*//') +if [ -z "${latest_version}" ]; then + echo "It seems that the server (tp-link.com) might be down. Please try again at a later time." + exit +fi installed_version=$(dpkg -l | grep omada | awk '{print $3}') if [ "v${installed_version}" = "${latest_version}" ]; then From 6112e4ae33841f42bbbe90c3f8e2cda8763de1c3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 12:26:07 -0400 Subject: [PATCH 1886/3335] Update omada.sh more tweaks --- ct/omada.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/omada.sh b/ct/omada.sh index 31d1e3dd..3d41116a 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -56,14 +56,15 @@ if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) latest_version=$(basename "${latest_url}" | sed -e 's/.*ller_//;s/_Li.*//') if [ -z "${latest_version}" ]; then - echo "It seems that the server (tp-link.com) might be down. Please try again at a later time." + msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time." exit fi installed_version=$(dpkg -l | grep omada | awk '{print $3}') if [ "v${installed_version}" = "${latest_version}" ]; then - echo "Installed version (v${installed_version}) is the same as the latest version (${latest_version})." - echo "Omada Controller is already up to date" + msg_info "Installed version (v${installed_version}) is the same as the latest version (${latest_version})" + sleep 2 + msg_ok "Omada Controller is already up to date" exit else echo -e "Updating Omada Controller to ${latest_version}" From 143f1f8518699a62aceadc9be74ebc1aacf84e03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 20:08:56 -0400 Subject: [PATCH 1887/3335] Update microcode.sh update Intel microcode --- misc/microcode.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index fa427cb0..05ae3f7b 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -56,15 +56,15 @@ intel() { msg_ok "Installed iucode-tool" msg_info "Downloading the latest Intel Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230512.1_amd64.deb + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230808.1_amd64.deb msg_ok "Downloaded the latest Intel Processor Microcode Package" msg_info "Installing the Intel Processor Microcode (Patience)" - dpkg -i intel-microcode_3.20230512.1_amd64.deb &>/dev/null + dpkg -i intel-microcode_3.20230808.1_amd64.deb &>/dev/null msg_ok "Installed the Intel Processor Microcode" msg_info "Cleaning up" - rm intel-microcode_3.20230512.1_amd64.deb + rm intel-microcode_3.20230808.1_amd64.deb msg_ok "Cleaned" echo -e "\n To apply the changes, the system will need to be rebooted.\n" From 06229bedb6ab86e25c4c85c00fbc78d528cb4521 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 9 Aug 2023 20:16:36 -0400 Subject: [PATCH 1888/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df7ef2c..4e3e0c9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - **Omada Controller LXC** - Update via script +- **Proxmox VE Processor Microcode** + - [Intel microcode-20230808 Release](https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/tag/microcode-20230808) ## 2023-08-01 From a4c45beffb404f24bb18ca286fe35e6c7952feba Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 10 Aug 2023 06:11:06 -0400 Subject: [PATCH 1889/3335] Update microcode.sh check for Intel iucode-tool --- misc/microcode.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 05ae3f7b..3227ce77 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -51,9 +51,13 @@ msg_error() { } intel() { - msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" - apt-get install -y iucode-tool &>/dev/null - msg_ok "Installed iucode-tool" + if ! apt -qq list iucode-tool >/dev/null 2>&1; then + msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" + apt-get install -y iucode-tool &>/dev/null + msg_ok "Installed iucode-tool" + else + msg_ok "Intel iucode-tool is already installed" + fi msg_info "Downloading the latest Intel Processor Microcode Package for Linux" wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230808.1_amd64.deb From 0d6aac12018539798ac7c98df750f58e874655ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 10 Aug 2023 06:51:20 -0400 Subject: [PATCH 1890/3335] Update microcode.sh Code refactoring --- misc/microcode.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 3227ce77..4c8cd4a3 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -4,15 +4,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -clear -while true; do - read -p "Install the latest Processor Microcode (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done +function header_info { clear cat <<"EOF" ____ __ ____ __ @@ -22,6 +14,7 @@ cat <<"EOF" /_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ EOF +} RD=$(echo "\033[01;31m") YW=$(echo "\033[33m") @@ -50,6 +43,23 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +header_info +current_microcode=$(dmesg | grep -o 'microcode updated early to revision [^,]*, date = [0-9\-]*') +while true; do + if [ -z "${current_microcode}" ]; then + msg_error "Microcode update information not found." + else + msg_ok "Current ${current_microcode}" + fi + read -p "Install the latest Processor Microcode (y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +header_info + intel() { if ! apt -qq list iucode-tool >/dev/null 2>&1; then msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" From 315312c051835f1e426a9a36c7c3751e217d92a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 10 Aug 2023 11:04:33 -0400 Subject: [PATCH 1891/3335] Update audiobookshelf.sh tweak --- ct/audiobookshelf.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 8c1de6f2..4df74961 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -52,11 +52,8 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +if [[ ! -f /etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +echo "This application receives updates through the APT package manager." exit } From e6ce819428dd3886487e6c638648b4a2fca4c9fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 10 Aug 2023 17:33:46 -0400 Subject: [PATCH 1892/3335] Update microcode.sh update AMD microcode --- misc/microcode.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 4c8cd4a3..ad2cdb4e 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -86,15 +86,15 @@ intel() { amd() { msg_info "Downloading the latest AMD Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230719.1_amd64.deb + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230808.1.1_amd64.deb msg_ok "Downloaded the latest AMD Processor Microcode Package" msg_info "Installing the AMD Processor Microcode (Patience)" - dpkg -i amd64-microcode_3.20230719.1_amd64.deb &>/dev/null + dpkg -i amd64-microcode_3.20230808.1.1_amd64.deb &>/dev/null msg_ok "Installed the AMD Processor Microcode" msg_info "Cleaning up" - rm amd64-microcode_3.20230719.1_amd64.deb + rm amd64-microcode_3.20230808.1.1_amd64.deb msg_ok "Cleaned" echo -e "\n To apply the changes, the system will need to be rebooted.\n" From d226b7a2f368abc550127038e8b2928c8187c576 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 10 Aug 2023 17:38:26 -0400 Subject: [PATCH 1893/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3e0c9b..98ce5cd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-08-10 + +### Changed + +- **Proxmox VE Processor Microcode** + - AMD microcode-20230808 Release + ## 2023-08-09 ### Changed From f38378b79ea9c26cdd6f717a5a2345d25221c3b8 Mon Sep 17 00:00:00 2001 From: iveilleux <57638344+iveilleux@users.noreply.github.com> Date: Fri, 11 Aug 2023 08:22:01 -0400 Subject: [PATCH 1894/3335] Update microcode.sh (#1679) Verify iucode-tool is installed --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index ad2cdb4e..7eceee7d 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -61,7 +61,7 @@ done header_info intel() { - if ! apt -qq list iucode-tool >/dev/null 2>&1; then + if ! apt -qq list --installed iucode-tool >/dev/null 2>&1; then msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" apt-get install -y iucode-tool &>/dev/null msg_ok "Installed iucode-tool" From d9147b073bd118ae403e9b1187fcefbd4d33328e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Aug 2023 11:46:54 -0400 Subject: [PATCH 1895/3335] Update microcode.sh Code refactoring --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 7eceee7d..e0434ea1 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -61,7 +61,7 @@ done header_info intel() { - if ! apt -qq list --installed iucode-tool >/dev/null 2>&1; then + if ! dpkg -s iucode-tool >/dev/null 2>&1; then msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" apt-get install -y iucode-tool &>/dev/null msg_ok "Installed iucode-tool" From dd495b66095e75c4b6d8f7cbb67f836c82859629 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Aug 2023 21:17:51 -0400 Subject: [PATCH 1896/3335] Update microcode.sh test --- misc/microcode.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index e0434ea1..06f7e381 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -25,8 +25,8 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -euo pipefail -shopt -s inherit_errexit nullglob +#set -euo pipefail +#shopt -s inherit_errexit nullglob msg_info() { local msg="$1" From 4fb6313bec93a926f5644fe7d31aacffd764c0e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Aug 2023 21:38:41 -0400 Subject: [PATCH 1897/3335] Update microcode.sh tweak fixes https://github.com/tteck/Proxmox/issues/1680 --- misc/microcode.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 06f7e381..6b3bb5fc 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -25,9 +25,6 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -#set -euo pipefail -#shopt -s inherit_errexit nullglob - msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." From 0ea26d6caec621761b0c1f72d0d9097d1243e1e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 14 Aug 2023 05:25:12 -0400 Subject: [PATCH 1898/3335] Update homeassistant-core.sh update python message --- ct/homeassistant-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index ed069489..024b0be5 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -76,7 +76,7 @@ function update_script() { echo -e "${GN}Updating to Stable Version${CL}" BR="" fi - if [[ "$PY" == "python3.9" ]]; then echo -e "⚠️ Python 3.9 is deprecated and will be removed in Home Assistant 2023.2"; fi + if [[ "$PY" == "python3.10" ]]; then echo -e "⚠️ Home Assistant now requires Python 3.11 to run."; fi msg_info "Stopping Home Assistant" systemctl stop homeassistant From f79d31fdcdc50136faddd51c953747f5a4a9289d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 14 Aug 2023 11:56:48 -0400 Subject: [PATCH 1899/3335] Update photoprism.sh tweak --- ct/photoprism.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 0fffa7f2..ae29e486 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -62,6 +62,7 @@ function update_script() { msg_ok "Stopped PhotoPrism" msg_info "Cloning PhotoPrism" + cd ~ git clone https://github.com/photoprism/photoprism.git &>/dev/null cd photoprism git checkout release &>/dev/null From 59b4e28413e638ae57782d6f5c502f7bda8ab726 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 14 Aug 2023 15:12:51 -0400 Subject: [PATCH 1900/3335] Update alpine-install.func add `sysctl -p` command fixes https://github.com/tteck/Proxmox/issues/1688 --- misc/alpine-install.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 96d1f849..d1eb439d 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -117,9 +117,10 @@ motd_ssh() { } customize() { + $STD sysctl -p if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" bash -c "passwd -d root" >/dev/null 2>&1 msg_ok "Customized Container" fi -} \ No newline at end of file +} From 88092fa6132dba4d2b94db826220437fb9cc8b2a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 14 Aug 2023 21:23:58 -0400 Subject: [PATCH 1901/3335] Update alpine-install.func tweak disable_ipv6 --- misc/alpine-install.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index d1eb439d..3fd39278 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -22,8 +22,9 @@ verb_ip6() { else STD="silent"; fi silent() { "$@" >/dev/null 2>&1; } if [ "$DISABLEIPV6" == "yes" ]; then + $STD sysctl -w net.ipv6.conf.all.disable_ipv6=1 echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf - $STD sysctl -p + $STD rc-update add sysctl default fi } @@ -117,7 +118,6 @@ motd_ssh() { } customize() { - $STD sysctl -p if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" bash -c "passwd -d root" >/dev/null 2>&1 From 276252772e3de4069bb395ef195087c5e23c2a32 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 15 Aug 2023 15:16:20 -0400 Subject: [PATCH 1902/3335] Update mikrotik-routeros.sh version 7.11 --- vm/mikrotik-routeros.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 3db68ab8..39a07919 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -234,7 +234,7 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Mikrotik RouterOS Disk Image" -URL=https://download.mikrotik.com/routeros/7.10.2/install-image-7.10.2.zip +URL=https://download.mikrotik.com/routeros/7.11/install-image-7.11.zip sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From c1011b5a9337b795ef37ab138ea1982eb7e4ef1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Aug 2023 06:26:18 -0400 Subject: [PATCH 1903/3335] Update heimdalldashboard.sh default Debian 12 --- ct/heimdalldashboard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 1a2b701a..8dd31293 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 783c0c37f4533569e3376ae150418a0b74a5d0ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Aug 2023 08:56:17 -0400 Subject: [PATCH 1904/3335] Create homarr-install.sh --- install/homarr-install.sh | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 install/homarr-install.sh diff --git a/install/homarr-install.sh b/install/homarr-install.sh new file mode 100644 index 00000000..54725ee5 --- /dev/null +++ b/install/homarr-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Yarn" +$STD npm install -g yarn +msg_ok "Installed Yarn" + +msg_info "Installing Homarr (Patience)" +git clone -q https://github.com/ajnart/homarr.git /opt/homarr +cd /opt/homarr +$STD yarn install +$STD yarn build +msg_ok "Installed Homarr" + +msg_info "Creating Service" +cat </etc/systemd/system/homarr.service +[Unit] +Description=Homarr Service +After=network.target + +[Service] +Type=exec +WorkingDirectory=/opt/homarr +ExecStart=/usr/bin/yarn start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now homarr.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9dbd0a9f40d48c0ab49737e0bf6c2883e7e4b510 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Aug 2023 08:57:18 -0400 Subject: [PATCH 1905/3335] Create homarr.sh --- ct/homarr.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 ct/homarr.sh diff --git a/ct/homarr.sh b/ct/homarr.sh new file mode 100644 index 00000000..dd06a8ff --- /dev/null +++ b/ct/homarr.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ + / / / /___ ____ ___ ____ ___________ + / /_/ / __ \/ __ `__ \/ __ `/ ___/ ___/ + / __ / /_/ / / / / / / /_/ / / / / +/_/ /_/\____/_/ /_/ /_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Homarr" +var_disk="4" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop homarr +cd /opt/homarr +output=$(git pull) +git pull &>/dev/null +if echo "$output" | grep -q "Already up to date." +then + msg_ok " $APP is already up to date." + systemctl start homarr + exit +fi +yarn install &>/dev/null +yarn build &>/dev/null +systemctl start homarr +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 28205fbd03a4eb26d7866d6ca71712cd6cc21a1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Aug 2023 09:11:06 -0400 Subject: [PATCH 1906/3335] Update CHANGELOG.md Homarr LXC --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ce5cd5..1d153f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-08-16 + +### Changed + +- **Homarr LXC** + - NEW Script + ## 2023-08-10 ### Changed From 25c18fbf9e6e2cc2d9c20addd7ba658cd352e2a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Aug 2023 10:21:13 -0400 Subject: [PATCH 1907/3335] Update nocodb-install.sh create symlink for npm fixes https://github.com/tteck/Proxmox/issues/1699 --- install/nocodb-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 23713d69..509bd282 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -28,6 +28,7 @@ $STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/inst . ~/.bashrc $STD nvm install 16.20.1 ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +ln -sf /root/.nvm/versions/node/v16.20.1/bin/npm /usr/bin/npm msg_ok "Installed Node.js" msg_info "Installing NocoDB" From 984d8fc249431aac1735b1926a3ca97f4724a67b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Aug 2023 05:21:36 -0400 Subject: [PATCH 1908/3335] Update node-red-install.sh add `node-red-start`, `node-red-stop`, `node-red-restart` and `node-red-log` commands --- install/node-red-install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 8e4d803b..22909483 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -30,6 +30,14 @@ msg_ok "Installed Node.js" msg_info "Installing Node-Red" $STD npm install -g --unsafe-perm node-red +echo "journalctl -f -n 100 -u nodered -o cat" >/usr/bin/node-red-log +chmod +x /usr/bin/node-red-log +echo "systemctl stop nodered" >/usr/bin/node-red-stop +chmod +x /usr/bin/node-red-stop +echo "systemctl start nodered" >/usr/bin/node-red-start +chmod +x /usr/bin/node-red-start +echo "systemctl restart nodered" >/usr/bin/node-red-restart +chmod +x /usr/bin/node-red-restart msg_ok "Installed Node-Red" msg_info "Creating Service" From 58ecabe0ea1c6ef0b030292bcc86180b159ed2dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Aug 2023 09:26:44 -0400 Subject: [PATCH 1909/3335] Update build.func tweak --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index ee0ff47d..43925d1b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -491,6 +491,7 @@ build_container() { fi export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" + export app="$NSAPP" export PASSWORD="$PW" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" From cb4097e74c409d6b4b79608280d826c881c75242 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Aug 2023 10:53:23 -0400 Subject: [PATCH 1910/3335] integrate the `update` command --- install/esphome-install.sh | 2 ++ install/homeassistant-core-install.sh | 2 ++ install/homeassistant-install.sh | 2 ++ install/node-red-install.sh | 2 ++ install/omada-install.sh | 4 +++- install/zigbee2mqtt-install.sh | 2 ++ 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 7dbbbc18..5cb2cb59 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -35,6 +35,8 @@ msg_info "Installing ESPHome" #python3 -m venv . #source bin/activate $STD pip install esphome tornado esptool +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed ESPHome" msg_info "Creating Service" diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index cbb10ed5..0c3a8cff 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -87,6 +87,8 @@ $STD pip install homeassistant $STD pip install mysqlclient $STD pip install psycopg2-binary mkdir -p /root/.homeassistant +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed Home Assistant-Core" msg_info "Creating Service" diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 0c19ca6c..5bfe63d2 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -88,6 +88,8 @@ $STD docker run -d \ --net=host \ ghcr.io/home-assistant/home-assistant:stable mkdir /root/hass_config +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" motd_ssh diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 22909483..b9ca4fd3 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -38,6 +38,8 @@ echo "systemctl start nodered" >/usr/bin/node-red-start chmod +x /usr/bin/node-red-start echo "systemctl restart nodered" >/usr/bin/node-red-restart chmod +x /usr/bin/node-red-restart +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed Node-Red" msg_info "Creating Service" diff --git a/install/omada-install.sh b/install/omada-install.sh index 03e2b418..f2f7a3e5 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -41,7 +41,9 @@ latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//') msg_info "Installing Omada Controller ${latest_version}" wget -qL ${latest_url} -$STD dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb +$STD dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed Omada Controller ${latest_version}" motd_ssh diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index eb10fdd6..151d028b 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -48,6 +48,8 @@ if [[ $DEV == "y" ]]; then $STD git checkout dev fi $STD npm ci +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed Zigbee2MQTT" msg_info "Creating Service" From 76d7cc6f71d1123bb637dbad5090fa47514134fc Mon Sep 17 00:00:00 2001 From: Csaba Kos Date: Fri, 18 Aug 2023 19:14:48 -0500 Subject: [PATCH 1911/3335] Update monitor-all.sh to restart virtual machines instead of resetting (#1704) If a virtual machine is not responding or has become unresponsive, perform a forceful restart instead of a soft reset --- misc/monitor-all.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 65dbca92..a60f8dd5 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -73,12 +73,13 @@ while true; do else # It is a virtual machine if qm status $instance | grep -q "status: running"; then - echo "$(date): VM $instance is not responding, resetting..." - qm reset $instance >/dev/null 2>&1 + echo "$(date): VM $instance is not responding, restarting..." + qm stop $instance >/dev/null 2>&1 + sleep 5 else - qm start $instance >/dev/null 2>&1 echo "$(date): VM $instance is not running, starting..." fi + qm start $instance >/dev/null 2>&1 fi fi done From 8db5f6fedff6209978775a03c38468dba60c2fbf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Aug 2023 06:22:12 -0400 Subject: [PATCH 1912/3335] Update create_lxc.sh correct storage menu message --- ct/create_lxc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 4cf41103..557d88eb 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -95,15 +95,15 @@ function select_storage() { done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 1 ]; then + if [ $((${#MENU[@]}/3)) -eq 1 ]; then printf ${MENU[0]} else local STORAGE while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for ${APPLICATION}?\nTo make a selection, use the Spacebar.\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." done printf $STORAGE fi From 748b16426cb77a2c7aecadaa89fd610cc6331ef2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 21 Aug 2023 06:04:56 -0400 Subject: [PATCH 1913/3335] Update USER_SUBMITTED_GUIDES.md Running Frigate on Proxmox --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index cd680d1a..57ec2294 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -18,6 +18,8 @@ [How To Backup Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-backup-home-assistant-in-proxmox/) +[Running Frigate on Proxmox](https://www.homeautomationguy.io/blog/running-frigate-on-proxmox) + [Frigate VM on Proxmox with PCIe Coral TPU](https://www.derekseaman.com/2023/06/home-assistant-frigate-vm-on-proxmox-with-pcie-coral-tpu.html) [Moving Home Assistant’s Database To MariaDB On Proxmox](https://smarthomescene.com/guides/moving-home-assistants-database-to-mariadb-on-proxmox/) From b81ef061615a4388f20ae198c787363503f7e69f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 21 Aug 2023 21:06:31 -0400 Subject: [PATCH 1914/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 7b1fcf7c..e8bc2567 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -102,7 +102,7 @@ EOF esac if [[ "${VERSION}" == "bookworm" ]]; then - CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ + CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 27d1e0af35ab7d3929e72be2db8d42f85d10558a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 21 Aug 2023 21:14:16 -0400 Subject: [PATCH 1915/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index e8bc2567..ca076582 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -102,7 +102,7 @@ EOF esac if [[ "${VERSION}" == "bookworm" ]]; then - CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nEnable 'ceph package repositories?" 14 58 2 \ + CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nAdd 'ceph package repositories?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 9b9facf773e6a3c8d4a6a39072399745fe3096e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 05:51:24 -0400 Subject: [PATCH 1916/3335] Update photoprism-install.sh add `HEIF` support --- install/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index df63bd6e..64f303b6 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -25,6 +25,7 @@ $STD apt-get install -y make $STD apt-get install -y zip $STD apt-get install -y exiftool $STD apt-get install -y ffmpeg +$STD apt-get install -y libheif1 msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" From c6e909e73198e41083d39e4c60ad62ae98e76ae2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 06:34:26 -0400 Subject: [PATCH 1917/3335] Update grafana.sh default Debian 12 --- ct/grafana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/grafana.sh b/ct/grafana.sh index bb50c557..9b61620b 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 9a7973f92f9c3f2f9487a350426cfeed5a35d675 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 06:47:29 -0400 Subject: [PATCH 1918/3335] Update bug_report.yaml Linux distribution --- .github/ISSUE_TEMPLATE/bug_report.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 736aaed3..59b3587c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -15,6 +15,13 @@ body: label: A clear and concise description of the issue. validations: required: true + - type: input + id: distribution + attributes: + label: Which Linux distribution are you employing? + placeholder: 'Debian 11' + validations: + required: true - type: textarea id: screenshot attributes: From d5a4a33f87ee453a1eabc89e8ba3593d51b8fa69 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 06:55:25 -0400 Subject: [PATCH 1919/3335] Update bug_report.yaml verify guidelines --- .github/ISSUE_TEMPLATE/bug_report.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 59b3587c..ff003fe8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -9,19 +9,19 @@ body: - Changing Linux distributions without confirming the proper functioning of default settings. - When encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) + - type: input + id: guidelines + attributes: + label: Please verify that you have read and understood the guidelines. + placeholder: 'yes' + validations: + required: true - type: textarea id: bug attributes: label: A clear and concise description of the issue. validations: required: true - - type: input - id: distribution - attributes: - label: Which Linux distribution are you employing? - placeholder: 'Debian 11' - validations: - required: true - type: textarea id: screenshot attributes: From b6a3e822b1b7903f59c77742b5c3b4f80098386f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 06:58:10 -0400 Subject: [PATCH 1920/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index ff003fe8..e8140933 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -22,6 +22,13 @@ body: label: A clear and concise description of the issue. validations: required: true + - type: input + id: distribution + attributes: + label: Which Linux distribution are you employing? + placeholder: 'Debian 11' + validations: + required: true - type: textarea id: screenshot attributes: From d55d44bc9b3ba7354307f37ecdfbb1ee3c52a3b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 13:25:19 -0400 Subject: [PATCH 1921/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index e8140933..a87207c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -22,13 +22,19 @@ body: label: A clear and concise description of the issue. validations: required: true - - type: input + - type: dropdown id: distribution - attributes: - label: Which Linux distribution are you employing? - placeholder: 'Debian 11' validations: required: true + attributes: + label: Which Linux distribution are you employing? + options: + - Default Settings + - Debian 11 + - Debian 12 + - Ubuntu 20.04 + - Ubuntu 22.04 + - Ubuntu 23.04 - type: textarea id: screenshot attributes: From 54d791f5c1937b81a54e3e946b215e9d127be560 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 13:28:29 -0400 Subject: [PATCH 1922/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index a87207c9..b9a2964e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -29,6 +29,7 @@ body: attributes: label: Which Linux distribution are you employing? options: + - - Default Settings - Debian 11 - Debian 12 From d56a46bc478b14225195087e707593ddbb67a492 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 13:44:59 -0400 Subject: [PATCH 1923/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index b9a2964e..42fbf591 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -40,6 +40,7 @@ body: id: screenshot attributes: label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. + placeholder: Code blocks commence and conclude with three backticks (```). validations: required: false - type: textarea From 9ce770dec2ec97df29f5f5a5076a87b6ae32ae73 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Aug 2023 13:55:02 -0400 Subject: [PATCH 1924/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 42fbf591..7c8d7a5a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -40,7 +40,7 @@ body: id: screenshot attributes: label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. - placeholder: Code blocks commence and conclude with three backticks (```). + placeholder: Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it. validations: required: false - type: textarea From c102780df6eede6781854e778e96659d81b85be0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 11:25:10 -0400 Subject: [PATCH 1925/3335] Update CHANGELOG.md remove qBittorrent LXC --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d153f81..4ba9d7cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-08-24 + +### Changed + +- **qBittorrent LXC** + - Removed from this repository for malicious hidden code https://github.com/tteck/Proxmox/discussions/1725 + ## 2023-08-16 ### Changed From 6f121b91924f5bc8c1269da4a3c005034aaf19b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 11:32:49 -0400 Subject: [PATCH 1926/3335] Delete qbittorrent.sh malicious hidden code --- ct/qbittorrent.sh | 70 ----------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 ct/qbittorrent.sh diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh deleted file mode 100644 index 40cfa24d..00000000 --- a/ct/qbittorrent.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ____ _ __ __ __ - ____ _/ __ )(_) /_/ /_____ _____________ ____ / /_ - / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ -/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_ -\__, /_____/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ - /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="qBittorrent" -var_disk="8" -var_cpu="2" -var_ram="2048" -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="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - echo_default -} - -function update_script() { -header_info -if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8090${CL}\n" From 2339505cd4b559334ef7822eb171974ff18b47ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 11:34:07 -0400 Subject: [PATCH 1927/3335] Delete qbittorrent-install.sh malicious hidden code --- install/qbittorrent-install.sh | 46 ---------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 install/qbittorrent-install.sh diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh deleted file mode 100644 index 1a6147d2..00000000 --- a/install/qbittorrent-install.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/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" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing qbittorrent-nox" -$STD apt-get install -y qbittorrent-nox -msg_ok "qbittorrent-nox" - -msg_info "Creating Service" -cat </etc/systemd/system/qbittorrent-nox.service -[Unit] -Description=qBittorrent client -After=network.target -[Service] -ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090 -Restart=always -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now qbittorrent-nox -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" From 8cb72b808ab21adf5e870380caa374371031737e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 13:23:09 -0400 Subject: [PATCH 1928/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ba9d7cd..9eecd6d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Changed - **qBittorrent LXC** - - Removed from this repository for malicious hidden code https://github.com/tteck/Proxmox/discussions/1725 + - Removed from this repository for potential malicious hidden code https://github.com/tteck/Proxmox/discussions/1725 ## 2023-08-16 From 55576e712d58fe7addd8cf3b4158976683d672d1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 14:56:24 -0400 Subject: [PATCH 1929/3335] Create qbittorrent-install.sh Disable UPnP Password changeme --- install/qbittorrent-install.sh | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/qbittorrent-install.sh diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh new file mode 100644 index 00000000..64c63001 --- /dev/null +++ b/install/qbittorrent-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing qbittorrent-nox" +$STD apt-get install -y qbittorrent-nox +mkdir -p /.config/qBittorrent/ +cat </.config/qBittorrent/qBittorrent.conf +[Preferences] +WebUI\Password_PBKDF2="@ByteArray(amjeuVrF3xRbgzqWQmes5A==:XK3/Ra9jUmqUc4RwzCtrhrkQIcYczBl90DJw2rT8DFVTss4nxpoRhvyxhCf87ahVE3SzD8K9lyPdpyUCfmVsUg==)" +WebUI\Port=8090 +WebUI\UseUPnP=false +WebUI\Username=admin +EOF +msg_ok "qbittorrent-nox" + +msg_info "Creating Service" +cat </etc/systemd/system/qbittorrent-nox.service +[Unit] +Description=qBittorrent client +After=network.target +[Service] +ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090 +Restart=always +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now qbittorrent-nox +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 2e3642dc5b73818297271db5c4b82fc889efca59 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 14:57:42 -0400 Subject: [PATCH 1930/3335] Create qbittorrent.sh --- ct/qbittorrent.sh | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 ct/qbittorrent.sh diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh new file mode 100644 index 00000000..40cfa24d --- /dev/null +++ b/ct/qbittorrent.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _ __ __ __ + ____ _/ __ )(_) /_/ /_____ _____________ ____ / /_ + / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ +/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_ +\__, /_____/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="qBittorrent" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL}\n" From e1668068e9fbea308c034a8bac4a296e6503757a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Aug 2023 15:11:16 -0400 Subject: [PATCH 1931/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eecd6d8..5f545c36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ ### Changed +- **qBittorrent LXC** + - Added back to repository with UPnP disabled and password changed. + +## 2023-08-24 + +### Changed + - **qBittorrent LXC** - Removed from this repository for potential malicious hidden code https://github.com/tteck/Proxmox/discussions/1725 From b3f21d9eea6047eeab836abffb1da62ca0f69b83 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 26 Aug 2023 12:36:55 -0400 Subject: [PATCH 1932/3335] Update openhab-install.sh Java 17 --- install/openhab-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openhab-install.sh b/install/openhab-install.sh index 1f52572a..532a6506 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -26,7 +26,7 @@ wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/ wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb $STD dpkg -i zulu-repo_1.0.0-3_all.deb $STD apt-get update -$STD apt-get -y install zulu11-jdk +$STD apt-get -y install zulu17-jdk msg_ok "Installed Azul Zulu" msg_info "Installing openHAB" From 09e21f33e1e646a66b891d0fc926d191612358d1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 26 Aug 2023 12:46:41 -0400 Subject: [PATCH 1933/3335] Update openhab.sh default Debian 12 --- ct/openhab.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/openhab.sh b/ct/openhab.sh index 7841d610..168785b8 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -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 From 86d1a388f9287984459bd736bb36796dc3cc8941 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Aug 2023 10:09:11 -0400 Subject: [PATCH 1934/3335] Update mqtt-install.sh reintroduce Mosquitto repositories --- install/mqtt-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 5f66caa7..04ea968a 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -20,6 +20,12 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" +if [ "$PCT_OSTYPE" == "debian" ]; then + VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" + wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc + wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list + $STD apt-get update +fi $STD apt-get -y install mosquitto $STD apt-get -y install mosquitto-clients cat </etc/mosquitto/conf.d/default.conf From f5b629de5175e1669d2376ecb4357410aeaac6b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Aug 2023 10:10:40 -0400 Subject: [PATCH 1935/3335] Update mariadb-install.sh reintroduce MariaDB repositories --- install/mariadb-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index ef154ed0..19787d93 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -20,6 +20,8 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing MariaDB" +$STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup) +$STD apt-get update $STD apt-get install -y mariadb-server sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf From 98b7b8cb80db34b26f0166ef11c1549ee08c3819 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 08:10:03 -0400 Subject: [PATCH 1936/3335] Create turnkey-fileserver.sh --- misc/turnkey-fileserver.sh | 171 +++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 misc/turnkey-fileserver.sh diff --git a/misc/turnkey-fileserver.sh b/misc/turnkey-fileserver.sh new file mode 100644 index 00000000..b4695144 --- /dev/null +++ b/misc/turnkey-fileserver.sh @@ -0,0 +1,171 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/turnkey-fileserver.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-fileserver_17.1-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-fileserver + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ _____ __ ____ +/_ __/_ _________ / //_/__ __ __ / __(_) /__ / __/__ _____ _____ ____ + / / / // / __/ _ \/ ,< / -_) // / / _// / / -_) _\ \/ -_) __/ |/ / -_) __/ +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/ /_/_/\__/ /___/\__/_/ |___/\__/_/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +CTID=$(pvesh get /cluster/nextid) +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-4} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey File Server Password" >>~/turnkey-fileserver.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-fileserver.creds #run `cat turnkey-fileserver.creds` in the Proxmox root directory +info "Proceed to the console to complete the setup." +info "login: root" +info "password: $PASS" From 4bf7a1f743bf6822fa9d1bc39a84d14d38d95726 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 09:34:47 -0400 Subject: [PATCH 1937/3335] create turnkey folder --- {misc => turnkey}/turnkey-fileserver.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename {misc => turnkey}/turnkey-fileserver.sh (95%) diff --git a/misc/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh similarity index 95% rename from misc/turnkey-fileserver.sh rename to turnkey/turnkey-fileserver.sh index b4695144..410ef9ec 100644 --- a/misc/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/turnkey-fileserver.sh)" +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-fileserver.sh)" # Setup script environment PASS="$(openssl rand -base64 8)" @@ -147,7 +148,7 @@ TEMPLATE="${TEMPLATES[-1]}" # Download LXC template if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template..." + msg "Downloading LXC template (Patience)..." pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || die "A problem occured while downloading the LXC template." fi @@ -165,7 +166,7 @@ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." echo "TurnKey File Server Password" >>~/turnkey-fileserver.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-fileserver.creds #run `cat turnkey-fileserver.creds` in the Proxmox root directory -info "Proceed to the console to complete the setup." +echo $PASS >>~/turnkey-fileserver.creds #run `cat turnkey-fileserver.creds` in the Proxmox shell +info "Proceed to the LXC console to complete the setup." info "login: root" info "password: $PASS" From be78b108f290864bbab90058e777c7a4ea2d88e9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 09:36:44 -0400 Subject: [PATCH 1938/3335] Create turnkey-gitlab.sh --- turnkey/turnkey-gitlab.sh | 172 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 turnkey/turnkey-gitlab.sh diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh new file mode 100644 index 00000000..e1614f9b --- /dev/null +++ b/turnkey/turnkey-gitlab.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-gitlab.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-gitlab_17.1-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-gitlab + -tags proxmox-helper-scripts + -onboot 1 + -cores 4 + -memory 4096 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ ______ __ __ __ +/_ __/_ _________ / //_/__ __ __ / ___(_) /_/ / ___ _/ / + / / / // / __/ _ \/ ,< / -_) // / / (_ / / __/ /__/ _ `/ _ \ +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/_/\__/____/\_,_/_.__/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +CTID=$(pvesh get /cluster/nextid) +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey GitLab Password" >>~/turnkey-gitlab.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-gitlab.creds #run `cat turnkey-gitlab.creds` in the Proxmox shell +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From 3c0e25adeb2205515ef892a0ecdb826f7ff8785a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 09:43:15 -0400 Subject: [PATCH 1939/3335] Create turnkey-core.sh --- turnkey/turnkey-core.sh | 172 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 turnkey/turnkey-core.sh diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh new file mode 100644 index 00000000..a1039114 --- /dev/null +++ b/turnkey/turnkey-core.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-core.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-core_17.1-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-core + -tags proxmox-helper-scripts + -onboot 1 + -cores 4 + -memory 4096 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ _____ +/_ __/_ _________ / //_/__ __ __ / ___/__ _______ + / / / // / __/ _ \/ ,< / -_) // / / /__/ _ \/ __/ -_) +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/\___/_/ \__/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +CTID=$(pvesh get /cluster/nextid) +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey Core Password" >>~/turnkey-core.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-core.creds #run `cat turnkey-core.creds` in the Proxmox shell +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From e1953beca4fb5b662dbfcc96e74d9477722b4983 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 09:46:16 -0400 Subject: [PATCH 1940/3335] Update turnkey-core.sh adjust resources --- turnkey/turnkey-core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index a1039114..494af647 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -14,8 +14,8 @@ PCT_OPTIONS=" -hostname turnkey-core -tags proxmox-helper-scripts -onboot 1 - -cores 4 - -memory 4096 + -cores 2 + -memory 2048 -password $PASS -net0 name=eth0,bridge=vmbr0,ip=dhcp -unprivileged 1 From 12fec28eb7c4782cd79dd93ea5e9b986a512c3e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 14:02:49 -0400 Subject: [PATCH 1941/3335] Create turnkey-owncloud.sh --- turnkey/turnkey-owncloud.sh | 172 ++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 turnkey/turnkey-owncloud.sh diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh new file mode 100644 index 00000000..fd3455ff --- /dev/null +++ b/turnkey/turnkey-owncloud.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-owncloud.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-owncloud_17.1-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-owncloud + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ _______ __ +/_ __/_ _________ / //_/__ __ __ ___ _ _____ / ___/ /__ __ _____/ / + / / / // / __/ _ \/ ,< / -_) // / / _ \ |/|/ / _ \/ /__/ / _ \/ // / _ / +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/__,__/_//_/\___/_/\___/\_,_/\_,_/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +CTID=$(pvesh get /cluster/nextid) +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey ownCloud Password" >>~/turnkey-owncloud.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-owncloud.creds #run `cat turnkey-owncloud.creds` in the Proxmox shell +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From 90917966022e293a3aa6c1570d1a68efb7b64337 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 14:13:05 -0400 Subject: [PATCH 1942/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f545c36..17e33791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-08-29 + +### Changed + +- **TurnKey LXC Template Scripts** + - Primitive [scripts](https://github.com/tteck/Proxmox/tree/main/turnkey) to install [TurnKey LXC templates](https://www.turnkeylinux.org/) using basic settings. + ## 2023-08-24 ### Changed From c927e1737ce70544367bdcbce4f3f322f238e20a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 14:15:05 -0400 Subject: [PATCH 1943/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e33791..26d95595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Changed - **TurnKey LXC Template Scripts** - - Primitive [scripts](https://github.com/tteck/Proxmox/tree/main/turnkey) to install [TurnKey LXC templates](https://www.turnkeylinux.org/) using basic settings. + - Primitive [scripts](https://github.com/tteck/Proxmox/tree/main/turnkey) to install [TurnKey LXC templates](https://www.turnkeylinux.org/) using basic settings. [More info](https://github.com/tteck/Proxmox/discussions/1742#discussion-5571966) ## 2023-08-24 From 071984d133002406a981d5215d5ce329510d50eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 15:00:03 -0400 Subject: [PATCH 1944/3335] tweaks --- turnkey/turnkey-core.sh | 8 +++++++- turnkey/turnkey-fileserver.sh | 8 +++++++- turnkey/turnkey-gitlab.sh | 8 +++++++- turnkey/turnkey-owncloud.sh | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index 494af647..d850eabe 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -73,7 +73,9 @@ function cleanup_ctid() { pct destroy $CTID fi } -CTID=$(pvesh get /cluster/nextid) +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi function select_storage() { local CLASS=$1 local CONTENT @@ -117,6 +119,7 @@ function select_storage() { } # Test if required variables are set +CTID=$(pvesh get /cluster/nextid) [[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." # Test if ID is valid @@ -167,6 +170,9 @@ pct start "$CTID" info "LXC container '$CTID' was successfully created." echo "TurnKey Core Password" >>~/turnkey-core.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-core.creds #run `cat turnkey-core.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi info "Proceed to the LXC console to complete the setup." info "login: root" info "password: $PASS" diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 410ef9ec..fea4aa0b 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -73,7 +73,9 @@ function cleanup_ctid() { pct destroy $CTID fi } -CTID=$(pvesh get /cluster/nextid) +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi function select_storage() { local CLASS=$1 local CONTENT @@ -117,6 +119,7 @@ function select_storage() { } # Test if required variables are set +CTID=$(pvesh get /cluster/nextid) [[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." # Test if ID is valid @@ -167,6 +170,9 @@ pct start "$CTID" info "LXC container '$CTID' was successfully created." echo "TurnKey File Server Password" >>~/turnkey-fileserver.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-fileserver.creds #run `cat turnkey-fileserver.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi info "Proceed to the LXC console to complete the setup." info "login: root" info "password: $PASS" diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index e1614f9b..ffdd3e58 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -73,7 +73,9 @@ function cleanup_ctid() { pct destroy $CTID fi } -CTID=$(pvesh get /cluster/nextid) +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi function select_storage() { local CLASS=$1 local CONTENT @@ -117,6 +119,7 @@ function select_storage() { } # Test if required variables are set +CTID=$(pvesh get /cluster/nextid) [[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." # Test if ID is valid @@ -167,6 +170,9 @@ pct start "$CTID" info "LXC container '$CTID' was successfully created." echo "TurnKey GitLab Password" >>~/turnkey-gitlab.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-gitlab.creds #run `cat turnkey-gitlab.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi info "Proceed to the LXC console to complete the setup." info "login: root" info "password: $PASS" diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index fd3455ff..56ea54f9 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -73,7 +73,9 @@ function cleanup_ctid() { pct destroy $CTID fi } -CTID=$(pvesh get /cluster/nextid) +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi function select_storage() { local CLASS=$1 local CONTENT @@ -117,6 +119,7 @@ function select_storage() { } # Test if required variables are set +CTID=$(pvesh get /cluster/nextid) [[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." # Test if ID is valid @@ -167,6 +170,9 @@ pct start "$CTID" info "LXC container '$CTID' was successfully created." echo "TurnKey ownCloud Password" >>~/turnkey-owncloud.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-owncloud.creds #run `cat turnkey-owncloud.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi info "Proceed to the LXC console to complete the setup." info "login: root" info "password: $PASS" From ab4afab8bca7c434fce75ee72a4ef68ed90782b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 15:39:34 -0400 Subject: [PATCH 1945/3335] Create turnkey-wordpress.sh --- turnkey/turnkey-wordpress.sh | 178 +++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 turnkey/turnkey-wordpress.sh diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh new file mode 100644 index 00000000..9d9b5620 --- /dev/null +++ b/turnkey/turnkey-wordpress.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-wordpress.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-wordpress_17.1-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-wordpress + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ _ __ _____ +/_ __/_ _________ / //_/__ __ __ | | /| / /__ _______/ / _ \_______ ___ ___ + / / / // / __/ _ \/ ,< / -_) // / | |/ |/ / _ \/ __/ _ / ___/ __/ -_|_-<(_-< +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / |__/|__/\___/_/ \_,_/_/ /_/ \__/___/___/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +CTID=$(pvesh get /cluster/nextid) +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey WordPress Password" >>~/turnkey-wordpress.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-wordpress.creds #run `cat turnkey-wordpress.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From 7d87c278bee9a9aed65a70999a9673a15919d5b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 16:07:38 -0400 Subject: [PATCH 1946/3335] Create turnkey-observium.sh --- turnkey/turnkey-observium.sh | 178 +++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 turnkey/turnkey-observium.sh diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh new file mode 100644 index 00000000..52ae0971 --- /dev/null +++ b/turnkey/turnkey-observium.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-observium.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-observium_17.2-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-observium + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ ____ __ _ +/_ __/_ _________ / //_/__ __ __ / __ \/ / ___ ___ _____ __(_)_ ____ _ + / / / // / __/ _ \/ ,< / -_) // / / /_/ / _ \(_-&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +CTID=$(pvesh get /cluster/nextid) +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey Observium Password" >>~/turnkey-observium.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-observium.creds #run `cat turnkey-observium.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From 8feaf1ef848c80c8f2fb70344595b47d7c883b1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 17:01:59 -0400 Subject: [PATCH 1947/3335] Create turnkey-nextcloud.sh --- turnkey/turnkey-nextcloud.sh | 178 +++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 turnkey/turnkey-nextcloud.sh diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh new file mode 100644 index 00000000..ebd2b5cd --- /dev/null +++ b/turnkey/turnkey-nextcloud.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-nextcloud.sh)" + +# Setup script environment +PASS="$(openssl rand -base64 8)" +TEMPLATE_SEARCH="debian-11-turnkey-nextcloud_17.2-1_amd64.tar.gz" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-nextcloud + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ _ __ __ __ __ +/_ __/_ _________ / //_/__ __ __ / |/ /____ __/ /_____/ /__ __ _____/ / + / / / // / __/ _ \/ ,< / -_) // / / / -_) \ / __/ __/ / _ \/ // / _ / +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/|_/\__/_\_\\__/\__/_/\___/\_,_/\_,_/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Test if required variables are set +CTID=$(pvesh get /cluster/nextid) +[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." + +# Test if ID is valid +[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." + +# Test if ID is in use +if pct status $CTID &>/dev/null; then + warn "ID '$CTID' is already in use." + unset CTID + die "Cannot use ID that is already in use." +fi + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey Nextcloud Password" >>~/turnkey-nextcloud.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-nextcloud.creds #run `cat turnkey-nextcloud.creds` in the Proxmox shell +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From 604c20df17d37253cfd044a525f23e65517dca71 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 19:17:30 -0400 Subject: [PATCH 1948/3335] turnkey code refactoring --- turnkey/turnkey-core.sh | 25 +++++++------------------ turnkey/turnkey-fileserver.sh | 25 +++++++------------------ turnkey/turnkey-gitlab.sh | 25 +++++++------------------ turnkey/turnkey-nextcloud.sh | 25 +++++++------------------ turnkey/turnkey-observium.sh | 25 +++++++------------------ turnkey/turnkey-owncloud.sh | 25 +++++++------------------ turnkey/turnkey-wordpress.sh | 25 +++++++------------------ 7 files changed, 49 insertions(+), 126 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index d850eabe..6739424b 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-core.sh)" # Setup script environment +NAME="core" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-core_17.1-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +PCT_DISK_SIZE="4" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-core + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 2 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey Core Password" >>~/turnkey-core.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-core.creds #run `cat turnkey-core.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index fea4aa0b..859c9f7b 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-fileserver.sh)" # Setup script environment +NAME="fileserver" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-fileserver_17.1-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +PCT_DISK_SIZE="8" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-fileserver + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 2 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey File Server Password" >>~/turnkey-fileserver.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-fileserver.creds #run `cat turnkey-fileserver.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index ffdd3e58..1feddb3a 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-gitlab.sh)" # Setup script environment +NAME="gitlab" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-gitlab_17.1-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +PCT_DISK_SIZE="8" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-gitlab + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 4 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey GitLab Password" >>~/turnkey-gitlab.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-gitlab.creds #run `cat turnkey-gitlab.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index ebd2b5cd..dfbd2247 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-nextcloud.sh)" # Setup script environment +NAME="nextcloud" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-nextcloud_17.2-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.2-1_amd64.tar.gz" +PCT_DISK_SIZE="10" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-nextcloud + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 2 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey Nextcloud Password" >>~/turnkey-nextcloud.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-nextcloud.creds #run `cat turnkey-nextcloud.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index 52ae0971..bbde4f62 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-observium.sh)" # Setup script environment +NAME="observium" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-observium_17.2-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.2-1_amd64.tar.gz" +PCT_DISK_SIZE="4" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-observium + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 2 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey Observium Password" >>~/turnkey-observium.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-observium.creds #run `cat turnkey-observium.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 56ea54f9..74f4b5e6 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-owncloud.sh)" # Setup script environment +NAME="owncloud" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-owncloud_17.1-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +PCT_DISK_SIZE="10" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-owncloud + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 2 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey ownCloud Password" >>~/turnkey-owncloud.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-owncloud.creds #run `cat turnkey-owncloud.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 9d9b5620..39039884 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -7,11 +7,14 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-wordpress.sh)" # Setup script environment +NAME="wordpress" PASS="$(openssl rand -base64 8)" -TEMPLATE_SEARCH="debian-11-turnkey-wordpress_17.1-1_amd64.tar.gz" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +PCT_DISK_SIZE="8" PCT_OPTIONS=" -features keyctl=1,nesting=1 - -hostname turnkey-wordpress + -hostname turnkey-${NAME} -tags proxmox-helper-scripts -onboot 1 -cores 2 @@ -118,20 +121,6 @@ function select_storage() { fi } -# Test if required variables are set -CTID=$(pvesh get /cluster/nextid) -[[ "${CTID:-}" ]] || die "You need to set 'CTID' variable." - -# Test if ID is valid -[ "$CTID" -ge "100" ] || die "ID cannot be less than 100." - -# Test if ID is in use -if pct status $CTID &>/dev/null; then - warn "ID '$CTID' is already in use." - unset CTID - die "Cannot use ID that is already in use." -fi - # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." @@ -168,8 +157,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ msg "Starting LXC Container..." pct start "$CTID" info "LXC container '$CTID' was successfully created." -echo "TurnKey WordPress Password" >>~/turnkey-wordpress.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-wordpress.creds #run `cat turnkey-wordpress.creds` in the Proxmox shell +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi From 4f40e110575dd80d024405122248138bdd01728d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Aug 2023 20:33:41 -0400 Subject: [PATCH 1949/3335] Create turnkey-torrentserver.sh --- turnkey/turnkey-torrentserver.sh | 167 +++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 turnkey/turnkey-torrentserver.sh diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh new file mode 100644 index 00000000..ba2cad0c --- /dev/null +++ b/turnkey/turnkey-torrentserver.sh @@ -0,0 +1,167 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-torrentserver.sh)" + +# Setup script environment +NAME="torrentserver" +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +PCT_DISK_SIZE="10" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${NAME} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ ______ __ ____ +/_ __/_ _________ / //_/__ __ __ /_ __/__ ___________ ___ / /_ / __/__ _____ _____ ____ + / / / // / __/ _ \/ ,< / -_) // / / / / _ \/ __/ __/ -_) _ \/ __/ _\ \/ -_) __/ |/ / -_) __/ +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/ \___/_/ /_/ \__/_//_/\__/ /___/\__/_/ |___/\__/_/ + /___/ +EOF +} +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From dd2202695fa7c9f8ae713082694a352f1e07580a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 05:33:03 -0400 Subject: [PATCH 1950/3335] tweak turnkey scripts --- turnkey/turnkey-core.sh | 1 + turnkey/turnkey-fileserver.sh | 1 + turnkey/turnkey-gitlab.sh | 1 + turnkey/turnkey-nextcloud.sh | 1 + turnkey/turnkey-observium.sh | 1 + turnkey/turnkey-owncloud.sh | 1 + turnkey/turnkey-torrentserver.sh | 1 + turnkey/turnkey-wordpress.sh | 1 + 8 files changed, 8 insertions(+) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index 6739424b..d55506eb 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 859c9f7b..721bb1c0 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index 1feddb3a..a80cdc9a 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index dfbd2247..fbb52549 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index bbde4f62..7bcaa888 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 74f4b5e6..32cf68e4 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index ba2cad0c..5e58db77 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 39039884..3d553549 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -37,6 +37,7 @@ cat <<"EOF" EOF } header_info +read -p "Press ENTER to continue..." set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error From 0af714731d3544093a040f98ec2bbb0b9ac73d20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 05:57:45 -0400 Subject: [PATCH 1951/3335] Create turnkey-gitea.sh --- turnkey/turnkey-gitea.sh | 168 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 turnkey/turnkey-gitea.sh diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh new file mode 100644 index 00000000..33a8ec2b --- /dev/null +++ b/turnkey/turnkey-gitea.sh @@ -0,0 +1,168 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-gitea.sh)" + +# Setup script environment +NAME="gitea" +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.2-1_amd64.tar.gz" +PCT_DISK_SIZE="4" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${NAME} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ ______ __ +/_ __/_ _________ / //_/__ __ __ / ___(_) /____ ___ _ + / / / // / __/ _ \/ ,< / -_) // / / (_ / / __/ -_) _ `/ +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/_/\__/\__/\_,_/ + /___/ +EOF +} +header_info +read -p "Press ENTER to continue..." +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +info "LXC container '$CTID' was successfully created." +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi +info "Proceed to the LXC console to complete the setup." +info "login: root" +info "password: $PASS" From 4bc2a87189ffd961a329ab7a4b0f17b6068f861f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 13:02:57 -0400 Subject: [PATCH 1952/3335] Update CHANGELOG.md --- CHANGELOG.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d95595..6e05acf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,30 @@ - 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-08-29 +## 2023-08-30 ### Changed -- **TurnKey LXC Template Scripts** - - Primitive [scripts](https://github.com/tteck/Proxmox/tree/main/turnkey) to install [TurnKey LXC templates](https://www.turnkeylinux.org/) using basic settings. [More info](https://github.com/tteck/Proxmox/discussions/1742#discussion-5571966) +- **TurnKey** + - Introducing a **NEW** Category on the Site. +- **TurnKey Core LXC** + - NEW Script +- **TurnKey File Server LXC** + - NEW Script +- **TurnKey Gitea LXC** + - NEW Script +- **TurnKey GitLab LXC** + - NEW Script +- **TurnKey Nextcloud LXC** + - NEW Script +- **TurnKey Observium LXC** + - NEW Script +- **TurnKey ownCloud LXC** + - NEW Script +- **TurnKey Torrent Server LXC** + - NEW Script +- **TurnKey Wordpress LXC** + - NEW Script ## 2023-08-24 From ac469960bc56e533d94311a5ead955a5931860ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 13:09:59 -0400 Subject: [PATCH 1953/3335] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e05acf2..afde7a56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - **TurnKey** - Introducing a **NEW** Category on the Site. + - My intention is to maintain the TurnKey scripts in their simplest form, contained within a single file, and with minimal options, if any. - **TurnKey Core LXC** - NEW Script - **TurnKey File Server LXC** From 4b076f8c1999825e7904370bff4740dbfe89e15a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 14:04:52 -0400 Subject: [PATCH 1954/3335] tweak turnkey scripts --- turnkey/turnkey-core.sh | 2 +- turnkey/turnkey-fileserver.sh | 2 +- turnkey/turnkey-gitea.sh | 2 +- turnkey/turnkey-gitlab.sh | 2 +- turnkey/turnkey-nextcloud.sh | 2 +- turnkey/turnkey-observium.sh | 2 +- turnkey/turnkey-owncloud.sh | 2 +- turnkey/turnkey-torrentserver.sh | 2 +- turnkey/turnkey-wordpress.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index d55506eb..cd2377f7 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -10,7 +10,7 @@ NAME="core" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="4" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 721bb1c0..fb6c4924 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -10,7 +10,7 @@ NAME="fileserver" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="8" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 33a8ec2b..71266831 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -10,7 +10,7 @@ NAME="gitea" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.2-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="4" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index a80cdc9a..9e827139 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -10,7 +10,7 @@ NAME="gitlab" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="8" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index fbb52549..587a261b 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -10,7 +10,7 @@ NAME="nextcloud" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.2-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="10" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index 7bcaa888..999c8e63 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -10,7 +10,7 @@ NAME="observium" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.2-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="4" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 32cf68e4..9283f4b6 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -10,7 +10,7 @@ NAME="owncloud" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="10" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index 5e58db77..d40b30d8 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -10,7 +10,7 @@ NAME="torrentserver" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="10" PCT_OPTIONS=" -features keyctl=1,nesting=1 diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 3d553549..e1f07047 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -10,7 +10,7 @@ NAME="wordpress" PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}_17.1-1_amd64.tar.gz" +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" PCT_DISK_SIZE="8" PCT_OPTIONS=" -features keyctl=1,nesting=1 From 19a33639dc8c795847870262b04f7ed6b3cb536a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 16:00:13 -0400 Subject: [PATCH 1955/3335] tweak turnkey scripts --- turnkey/turnkey-core.sh | 10 +++++++++- turnkey/turnkey-fileserver.sh | 10 +++++++++- turnkey/turnkey-gitea.sh | 10 +++++++++- turnkey/turnkey-gitlab.sh | 10 +++++++++- turnkey/turnkey-nextcloud.sh | 10 +++++++++- turnkey/turnkey-observium.sh | 10 +++++++++- turnkey/turnkey-owncloud.sh | 10 +++++++++- turnkey/turnkey-torrentserver.sh | 10 +++++++++- turnkey/turnkey-wordpress.sh | 10 +++++++++- 9 files changed, 81 insertions(+), 9 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index cd2377f7..9db74e64 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index fb6c4924..66efe4b1 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 71266831..16838fb5 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index 9e827139..9b8127f3 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index 587a261b..8dc8f673 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index 999c8e63..6aaf7af4 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 9283f4b6..2a263a79 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index d40b30d8..ce74f19e 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index e1f07047..5e953343 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -38,6 +38,7 @@ EOF } header_info read -p "Press ENTER to continue..." +header_info set -o errexit #Exit immediately if a pipeline returns a non-zero status set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell set -o nounset #Treat unset variables as an error @@ -157,12 +158,19 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -info "LXC container '$CTID' was successfully created." +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo info "Proceed to the LXC console to complete the setup." +echo info "login: root" info "password: $PASS" +echo From a00a0a0ef36195ce778db34156568d12f045b1b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 16:54:55 -0400 Subject: [PATCH 1956/3335] Update turnkey-fileserver.sh test --- turnkey/turnkey-fileserver.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 66efe4b1..da0f3240 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -158,8 +158,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') +#sleep 5 +#IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then @@ -167,7 +167,7 @@ if [[ -f /etc/systemd/system/ping-instances.service ]]; then fi header_info echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +info "LXC container '$CTID' was successfully created." echo info "Proceed to the LXC console to complete the setup." echo From d5ea1be5a602cd6d3a1858839e54662ae7fc3941 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Aug 2023 18:24:58 -0400 Subject: [PATCH 1957/3335] Update turnkey-fileserver.sh revert test --- turnkey/turnkey-fileserver.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index da0f3240..66efe4b1 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -158,8 +158,8 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/ # Success message msg "Starting LXC Container..." pct start "$CTID" -#sleep 5 -#IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory echo $PASS >>~/turnkey-${NAME}.creds if [[ -f /etc/systemd/system/ping-instances.service ]]; then @@ -167,7 +167,7 @@ if [[ -f /etc/systemd/system/ping-instances.service ]]; then fi header_info echo -info "LXC container '$CTID' was successfully created." +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." echo info "Proceed to the LXC console to complete the setup." echo From 0e08ce5c9c0171b1a843f995bcf465cefcdc8690 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Aug 2023 06:57:01 -0400 Subject: [PATCH 1958/3335] Create turnkey-zoneminder.sh --- turnkey/turnkey-zoneminder.sh | 175 ++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 turnkey/turnkey-zoneminder.sh diff --git a/turnkey/turnkey-zoneminder.sh b/turnkey/turnkey-zoneminder.sh new file mode 100644 index 00000000..300c6d30 --- /dev/null +++ b/turnkey/turnkey-zoneminder.sh @@ -0,0 +1,175 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +# Setup script environment +NAME="zoneminder" +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" +PCT_DISK_SIZE="8" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${NAME} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ ____ __ ____ __ +/_ __/_ _________ / //_/__ __ __ /_ / ___ ___ ___ / |/ (_)__ ___/ /__ ____ + / / / // / __/ _ \/ ,< / -_) // / / /_/ _ \/ _ \/ -_) /|_/ / / _ \/ _ / -_) __/ +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /___/\___/_//_/\__/_/ /_/_/_//_/\_,_/\__/_/ + /___/ +EOF +} +header_info +read -p "Press ENTER to continue..." +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Success message +msg "Starting LXC Container..." +pct start "$CTID" +sleep 5 +IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') +echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory +echo $PASS >>~/turnkey-${NAME}.creds +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo +info "Proceed to the LXC console to complete the setup." +echo +info "login: root" +info "password: $PASS" +echo From 573caa7a7751ee3a73c5027d86b30f630c8546b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Aug 2023 06:59:34 -0400 Subject: [PATCH 1959/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index afde7a56..79bab7e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-08-31 + +### Changed + +- **TurnKey ZoneMinder LXC** + - NEW Script + ## 2023-08-30 ### Changed From 21ad01113ba40615f4a5e9ce9e2b5962ab297f67 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Aug 2023 08:48:11 -0400 Subject: [PATCH 1960/3335] testing new get ip code in turnkey-observium.sh --- turnkey/turnkey-observium.sh | 37 +++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index 6aaf7af4..89e93204 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -4,7 +4,6 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-observium.sh)" # Setup script environment NAME="observium" @@ -78,6 +77,8 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi @@ -147,6 +148,7 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi +# Create variable for 'pct' options PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) [[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) @@ -155,16 +157,41 @@ msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=6 +attempt=1 +IP="" + +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." From 55a2fa2ac80fbdcf4403804c60643065ddfc96d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Aug 2023 11:14:42 -0400 Subject: [PATCH 1961/3335] Create turnkey-openvpn.sh --- turnkey/turnkey-openvpn.sh | 204 +++++++++++++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 turnkey/turnkey-openvpn.sh diff --git a/turnkey/turnkey-openvpn.sh b/turnkey/turnkey-openvpn.sh new file mode 100644 index 00000000..8a7edab0 --- /dev/null +++ b/turnkey/turnkey-openvpn.sh @@ -0,0 +1,204 @@ +#!/usr/bin/env bash +# A primitive script to install TurnKey LXC templates using basic settings. +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +# Setup script environment +NAME="openvpn" +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" +PCT_DISK_SIZE="4" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${NAME} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ ____ _ _____ _ __ +/_ __/_ _________ / //_/__ __ __ / __ \___ ___ ___| | / / _ \/ |/ / + / / / // / __/ _ \/ ,< / -_) // / / /_/ / _ \/ -_) _ \ |/ / ___/ / +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \____/ .__/\__/_//_/___/_/ /_/|_/ + /___/ /_/ +EOF +} +header_info +read -p "Press ENTER to continue..." +header_info +set -o errexit #Exit immediately if a pipeline returns a non-zero status +set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell +set -o nounset #Treat unset variables as an error +set -o pipefail #Pipe will exit with last non-zero status if applicable +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} + +# Start Proxmox VE Monitor-All if running +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi + +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=( "$TAG" "$ITEM" "OFF" ) + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + printf ${MENU[0]} + else # More than one storage location is detected + local STORAGE + while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +# Create variable for 'pct' options +PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container +msg "Starting LXC Container..." +pct start "$CTID" +sleep 5 + +# Get container IP +max_attempts=6 +attempt=1 +IP="" + +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi + +# Success message +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo +info "Proceed to the LXC console to complete the setup." +echo +info "login: root" +info "password: $PASS" +echo From e073c01895ee3b8ad35b9ab7861da9bf55ed6721 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Aug 2023 11:23:20 -0400 Subject: [PATCH 1962/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79bab7e9..3d8985b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - **TurnKey ZoneMinder LXC** - NEW Script +- **TurnKey OpenVPN LXC** + - NEW Script ## 2023-08-30 From 9c44b26add7f23b0f78d7c752c6b1259f7a319b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Aug 2023 14:21:31 -0400 Subject: [PATCH 1963/3335] turnkey scripts code refactoring --- turnkey/turnkey-core.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-fileserver.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-gitea.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-gitlab.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-nextcloud.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-observium.sh | 53 ++++++++++++------------- turnkey/turnkey-openvpn.sh | 54 ++++++++++++-------------- turnkey/turnkey-owncloud.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-torrentserver.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-wordpress.sh | 66 ++++++++++++++++++++++---------- turnkey/turnkey-zoneminder.sh | 65 +++++++++++++++++++++---------- 11 files changed, 455 insertions(+), 245 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index 9db74e64..2294896d 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-core.sh)" # Setup script environment NAME="core" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 66efe4b1..88bbd21d 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-fileserver.sh)" # Setup script environment NAME="fileserver" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-4} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 16838fb5..85ef344b 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-gitea.sh)" # Setup script environment NAME="gitea" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index 9b8127f3..a85c609a 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-gitlab.sh)" # Setup script environment NAME="gitlab" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index 8dc8f673..cdbc41d9 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-nextcloud.sh)" # Setup script environment NAME="nextcloud" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index 89e93204..da16c7ae 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT @@ -38,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -82,6 +78,8 @@ function cleanup_ctid() { if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -103,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -149,8 +147,8 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then fi # Create variable for 'pct' options -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." @@ -166,24 +164,23 @@ pct start "$CTID" sleep 5 # Get container IP -max_attempts=6 +max_attempts=5 attempt=1 IP="" - while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi done if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" fi # Start Proxmox VE Monitor-All if available @@ -200,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-openvpn.sh b/turnkey/turnkey-openvpn.sh index 8a7edab0..c1548cab 100644 --- a/turnkey/turnkey-openvpn.sh +++ b/turnkey/turnkey-openvpn.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT @@ -38,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,11 +74,12 @@ function cleanup_ctid() { fi } -# Start Proxmox VE Monitor-All if running +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -104,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -150,8 +147,8 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then fi # Create variable for 'pct' options -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." @@ -167,24 +164,23 @@ pct start "$CTID" sleep 5 # Get container IP -max_attempts=6 +max_attempts=5 attempt=1 IP="" - while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi done if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" fi # Start Proxmox VE Monitor-All if available @@ -201,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 2a263a79..a71630b9 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-owncloud.sh)" # Setup script environment NAME="owncloud" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index ce74f19e..549a7786 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-torrentserver.sh)" # Setup script environment NAME="torrentserver" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 5e953343..63858486 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey-wordpress.sh)" # Setup script environment NAME="wordpress" @@ -39,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -78,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -102,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -147,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -173,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file diff --git a/turnkey/turnkey-zoneminder.sh b/turnkey/turnkey-zoneminder.sh index 300c6d30..ba90bd4f 100644 --- a/turnkey/turnkey-zoneminder.sh +++ b/turnkey/turnkey-zoneminder.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# A primitive script to install TurnKey LXC templates using basic settings. # Copyright (c) 2021-2023 tteck # Author: tteck (tteckster) # License: MIT @@ -38,10 +37,7 @@ EOF header_info read -p "Press ENTER to continue..." header_info -set -o errexit #Exit immediately if a pipeline returns a non-zero status -set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell -set -o nounset #Treat unset variables as an error -set -o pipefail #Pipe will exit with last non-zero status if applicable +set -eEuo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR @@ -77,9 +73,13 @@ function cleanup_ctid() { pct destroy $CTID fi } + +# Stop Proxmox VE Monitor-All if running if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi + +# Set the CONTENT and CONTENT_LABEL variables function select_storage() { local CLASS=$1 local CONTENT @@ -101,22 +101,22 @@ function select_storage() { if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi - MENU+=( "$TAG" "$ITEM" "OFF" ) + MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') # Select storage location - if [ $((${#MENU[@]}/3)) -eq 0 ]; then # No storage locations are detected + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." die "Unable to detect valid storage location." - elif [ $((${#MENU[@]}/3)) -eq 1 ]; then # Only one storage location is detected + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} - else # More than one storage location is detected + else local STORAGE - while [ -z "${STORAGE:+x}" ]; do # Generate graphical menu + while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." done printf $STORAGE fi @@ -146,24 +146,49 @@ if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then die "A problem occured while downloading the LXC template." fi -PCT_OPTIONS=( ${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}} ) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=( -rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8} ) +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) # Create LXC msg "Creating LXC container..." pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || die "A problem occured while trying to create container." -# Success message +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container msg "Starting LXC Container..." pct start "$CTID" sleep 5 -IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') -echo "TurnKey ${NAME} Password" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory -echo $PASS >>~/turnkey-${NAME}.creds + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + +# Success message header_info echo info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." @@ -172,4 +197,4 @@ info "Proceed to the LXC console to complete the setup." echo info "login: root" info "password: $PASS" -echo +echo \ No newline at end of file From 57b320f6642c9d3798981df10d46094b040b768f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Sep 2023 05:46:11 -0400 Subject: [PATCH 1964/3335] Create turnkey-mediaserver.sh --- turnkey/turnkey-mediaserver.sh | 200 +++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 turnkey/turnkey-mediaserver.sh diff --git a/turnkey/turnkey-mediaserver.sh b/turnkey/turnkey-mediaserver.sh new file mode 100644 index 00000000..2ce0209c --- /dev/null +++ b/turnkey/turnkey-mediaserver.sh @@ -0,0 +1,200 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +# Setup script environment +NAME="mediaserver" +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" +PCT_DISK_SIZE="8" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${NAME} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + ______ __ __ __ ___ ___ ____ +/_ __/_ _________ / //_/__ __ __ / |/ /__ ___/ (_)__ _ / __/__ _____ _____ ____ + / / / // / __/ _ \/ ,< / -_) // / / /|_/ / -_) _ / / _ `/ _\ \/ -_) __/ |/ / -_) __/ +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/ /_/\__/\_,_/_/\_,_/ /___/\__/_/ |___/\__/_/ + /___/ +EOF +} +header_info +read -p "Press ENTER to continue..." +header_info +set -eEuo pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} + +# Stop Proxmox VE Monitor-All if running +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi + +# Set the CONTENT and CONTENT_LABEL variables +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=("$TAG" "$ITEM" "OFF") + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then + printf ${MENU[0]} + else + local STORAGE + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container +msg "Starting LXC Container..." +pct start "$CTID" +sleep 5 + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi + +# Success message +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo +info "Proceed to the LXC console to complete the setup." +echo +info "login: root" +info "password: $PASS" +echo From a70b14072e9d9fcc039e989b0eb5b2f60a34a459 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Sep 2023 05:52:38 -0400 Subject: [PATCH 1965/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d8985b1..aca2b545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-01 + +### Changed + +- **TurnKey Media Server LXC** + - NEW Script + ## 2023-08-31 ### Changed From 49662ddd3dc6d89504484a0b59b4a7ef20ff219b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Sep 2023 06:44:41 -0400 Subject: [PATCH 1966/3335] Update changedetection-install.sh new nodejs install method fixes https://github.com/tteck/Proxmox/issues/1748 --- install/changedetection-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 7bae8084..1ff0af91 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -41,7 +41,9 @@ $STD apt-get install -y \ libpangocairo-1.0-0 \ qpdf \ xdg-utils \ - xvfb + xvfb \ + ca-certificates \ + gnupg msg_ok "Installed Dependencies" msg_info "Updating Python3" @@ -52,10 +54,12 @@ $STD apt-get install -y \ msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" From c17e8d4fc48b28cac2e6b503f639e1fb4cb23abf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Sep 2023 07:19:05 -0400 Subject: [PATCH 1967/3335] new nodejs install method --- ct/cronicle.sh | 6 +++++- install/homarr-install.sh | 6 +++++- install/homepage-install.sh | 11 +++++++++-- install/jellyseerr-install.sh | 6 +++++- install/n8n-install.sh | 6 +++++- install/node-red-install.sh | 6 +++++- install/overseerr-install.sh | 6 +++++- install/photoprism-install.sh | 9 ++++++--- install/scrypted-install.sh | 8 ++++++-- install/shinobi-install.sh | 6 +++++- install/uptimekuma-install.sh | 8 ++++++-- install/wikijs-install.sh | 6 +++++- install/zigbee2mqtt-install.sh | 6 +++++- 13 files changed, 72 insertions(+), 18 deletions(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index f5227c32..65ee9e8f 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -73,13 +73,17 @@ apt-get install -y git &>/dev/null apt-get install -y make &>/dev/null apt-get install -y g++ &>/dev/null apt-get install -y gcc &>/dev/null +apt-get install -y ca-certificates &>/dev/null +apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) &>/dev/null +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +apt-get update &>/dev/null apt-get install -y nodejs &>/dev/null msg_ok "Installed Node.js" diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 54725ee5..16348ea6 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -18,13 +18,17 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index f0c221e5..264aa2ce 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -18,14 +18,21 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" -$STD apt-get install -y nodejs git make g++ gcc +$STD apt-get update +$STD apt-get install -y nodejs $STD npm install -g pnpm msg_ok "Installed Node.js" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 06803fc0..e310dda6 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -18,13 +18,17 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 6f36c40b..2ee84d21 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -17,13 +17,17 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/node-red-install.sh b/install/node-red-install.sh index b9ca4fd3..d5985427 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -18,13 +18,17 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index bb62febe..f3d47f23 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -18,13 +18,17 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 64f303b6..4ff708fd 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -20,20 +20,23 @@ $STD apt-get install -y mc $STD apt-get install -y gcc $STD apt-get install -y g++ $STD apt-get install -y git -$STD apt-get install -y gnupg $STD apt-get install -y make $STD apt-get install -y zip $STD apt-get install -y exiftool $STD apt-get install -y ffmpeg $STD apt-get install -y libheif1 +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" -$STD apt-get -y install nodejs +$STD apt-get update +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Golang" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index b8707308..89fa9d5b 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -33,7 +33,9 @@ $STD apt-get -y install \ pkg-config \ curl \ sudo \ - mc + mc \ + ca-certificates \ + gnupg msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then @@ -63,10 +65,12 @@ $STD apt-get -y install \ msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 3d8801dd..357025b6 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -26,13 +26,17 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl sudo git mc $STD apt-get install -y make zip net-tools $STD apt-get install -y gcc g++ cmake +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index c78a890e..44631596 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -18,14 +18,18 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" -$STD sudo apt-get install -y nodejs +$STD apt-get update +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Uptime Kuma" diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 32152da6..71171f54 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -18,13 +18,17 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 151d028b..0c3ed43b 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -21,13 +21,17 @@ $STD apt-get install -y git $STD apt-get install -y make $STD apt-get install -y g++ $STD apt-get install -y gcc +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" -$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x) +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" +$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" From 9a62e3ceeaae4b0ddbee4e490df78e06c3eeb180 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Sep 2023 08:27:13 -0400 Subject: [PATCH 1968/3335] Update wikijs.sh default Debian 12 --- ct/wikijs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/wikijs.sh b/ct/wikijs.sh index a8f58ce8..341c251d 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -20,11 +20,11 @@ EOF header_info echo -e "Loading..." APP="Wikijs" -var_disk="2" +var_disk="3" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From faf3bb8dd74b63fd7253d5ee5a8a18a6c29bcb31 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Sep 2023 08:28:55 -0400 Subject: [PATCH 1969/3335] Update wikijs-install.sh node v18 fixes https://github.com/tteck/Proxmox/issues/1752 --- install/wikijs-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 71171f54..7ad7e3f3 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 145123220d450221e64c0e51344b0718853d4153 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Sep 2023 08:36:54 -0400 Subject: [PATCH 1970/3335] create /etc/apt/keyrings for Debian 11 --- ct/cronicle.sh | 3 ++- install/changedetection-install.sh | 1 + install/homarr-install.sh | 1 + install/homepage-install.sh | 1 + install/jellyseerr-install.sh | 1 + install/n8n-install.sh | 1 + install/node-red-install.sh | 1 + install/overseerr-install.sh | 1 + install/photoprism-install.sh | 1 + install/scrypted-install.sh | 1 + install/shinobi-install.sh | 1 + install/uptimekuma-install.sh | 1 + install/wikijs-install.sh | 1 + install/zigbee2mqtt-install.sh | 1 + 14 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 65ee9e8f..5421eef4 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -78,8 +78,9 @@ apt-get install -y gnupg &>/dev/null msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 1ff0af91..7ad0e307 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -54,6 +54,7 @@ $STD apt-get install -y \ msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 16348ea6..8ef64f09 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 264aa2ce..52dbd17e 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -26,6 +26,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index e310dda6..45e29472 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 2ee84d21..6a250703 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -22,6 +22,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/node-red-install.sh b/install/node-red-install.sh index d5985427..5b673133 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index f3d47f23..86a4defa 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 4ff708fd..8a4e3da2 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -30,6 +30,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 89fa9d5b..348f0368 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -65,6 +65,7 @@ $STD apt-get -y install \ msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 357025b6..94fe7bc2 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -31,6 +31,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index 44631596..47f9ca24 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 7ad7e3f3..cc2697c4 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 0c3ed43b..1e8b5089 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -26,6 +26,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" From 421ba29201836d8d5f1eb8fb4e7b574538219255 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Sep 2023 11:29:50 -0400 Subject: [PATCH 1971/3335] Update dashy-install.sh revert https://github.com/tteck/Proxmox/pull/1670 --- install/dashy-install.sh | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index e7de0462..f4819a83 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -42,7 +42,7 @@ export NODE_OPTIONS=--max-old-space-size=1000 $STD yarn build msg_ok "Installed Dashy" -msg_info "Creating Services" +msg_info "Creating Service" cat </etc/systemd/system/dashy.service [Unit] Description=dashy @@ -51,32 +51,11 @@ Description=dashy Type=simple WorkingDirectory=/dashy ExecStart=/usr/bin/yarn start -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/dashy-rebuild.service -[Unit] -Description=Rebuild Dashy on Config Changes - -[Service] -Type=oneshot -ExecStart=/usr/bin/yarn --cwd=/dashy build -EOF - -cat </etc/systemd/system/dashy-rebuild.path -[Unit] -Description=Monitor Dashy Config for Changes - -[Path] -PathChanged=/dashy/public/conf.yml - [Install] WantedBy=multi-user.target EOF systemctl -q --now enable dashy -systemctl -q --now enable dashy-rebuild -msg_ok "Created Services" +msg_ok "Created Service" motd_ssh customize From 966c08a0618c4e5ac4681dab38cb6d177dd0f215 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 4 Sep 2023 09:37:56 -0400 Subject: [PATCH 1972/3335] Update wikijs.sh Fix backup directory path fixes https://github.com/tteck/Proxmox/issues/1760 --- ct/wikijs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 341c251d..44027900 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -59,7 +59,7 @@ systemctl stop wikijs msg_ok "Stopped ${APP}" msg_info "Backing up Data" -mkdir -p data-backup +mkdir -p ~/data-backup cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup msg_ok "Backed up Data" From a85593afa43095c4bd527748af7090e3e4840311 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Sep 2023 05:24:29 -0400 Subject: [PATCH 1973/3335] Update mikrotik-routeros.sh version 7.11.2 --- vm/mikrotik-routeros.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 39a07919..78f7208a 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -234,7 +234,7 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Mikrotik RouterOS Disk Image" -URL=https://download.mikrotik.com/routeros/7.11/install-image-7.11.zip +URL=https://download.mikrotik.com/routeros/7.11.2/install-image-7.11.2.zip sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From 347d8310e4af4214aa9f81ed115c5454891893c4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Sep 2023 11:39:29 -0400 Subject: [PATCH 1974/3335] fix copy-data file paths --- ...-assistant-container-copy-data-home-assistant-container.sh | 2 +- .../home-assistant-container-copy-data-home-assistant-core.sh | 2 +- ...ome-assistant-container-copy-data-podman-home-assistant.sh | 2 +- .../home-assistant-core-copy-data-home-assistant-container.sh | 2 +- .../home-assistant-core-copy-data-home-assistant-core.sh | 2 +- misc/copy-data/plex-copy-data-plex.sh | 2 +- ...odman-home-assistant-copy-data-home-assistant-container.sh | 2 +- misc/copy-data/z2m-copy-data-z2m.sh | 2 +- misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh | 4 ++++ 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh index 0ff1828e..83ef60bd 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh @@ -125,4 +125,4 @@ info "Successfully Transferred Data." # Use to copy all data from one Home Assistant LXC to another # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh)" diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh index f278911a..ff42886a 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh @@ -121,4 +121,4 @@ info "Successfully Transferred Data." # Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacontainer2hacore-data.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh)" diff --git a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh index 62f9ed8b..ef003eb2 100644 --- a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh +++ b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh @@ -126,4 +126,4 @@ info "Successfully Transferred Data." # Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/ha-copy-data-podman.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh)" diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh index 3a451f17..c36c18cb 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh @@ -121,4 +121,4 @@ info "Successfully Transferred Data." # Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacore2hacontainer-data.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh)" diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index 5244c284..8589e367 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -116,4 +116,4 @@ info "Successfully Transferred Data." # Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/hacore2hacore-data.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh)" diff --git a/misc/copy-data/plex-copy-data-plex.sh b/misc/copy-data/plex-copy-data-plex.sh index 35e43bea..851a8b6f 100644 --- a/misc/copy-data/plex-copy-data-plex.sh +++ b/misc/copy-data/plex-copy-data-plex.sh @@ -125,4 +125,4 @@ info "Successfully Transferred Data." # Use to copy all data from one Plex Media Server LXC to another # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/pms-copy-data.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/plex-copy-data-plex.sh)" diff --git a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh index 8db36359..1b159d10 100644 --- a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh +++ b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh @@ -126,4 +126,4 @@ info "Successfully Transferred Data." # Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/podman-copy-data-docker.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh)" diff --git a/misc/copy-data/z2m-copy-data-z2m.sh b/misc/copy-data/z2m-copy-data-z2m.sh index 69a3573a..1fa6841e 100644 --- a/misc/copy-data/z2m-copy-data-z2m.sh +++ b/misc/copy-data/z2m-copy-data-z2m.sh @@ -125,4 +125,4 @@ info "Successfully Transferred Data." # Use to copy all data from one Zigbee2MQTT LXC to another # run from the Proxmox Shell -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/z2m-copy-data.sh)" +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/z2m-copy-data-z2m.sh)" diff --git a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh index 9f58fc5b..dd038ed7 100644 --- a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh +++ b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh @@ -124,3 +124,7 @@ rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DATA_PATH} ${CTID_TO_PATH}${DATA_PA echo -en "\e[1A\e[0K\e[1A\e[0K" info "Successfully Transferred Data." + +# Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC +# run from the Proxmox Shell +# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh)" From d580ef30c00d53f974742d14807d13943a57b1a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Sep 2023 17:19:13 -0400 Subject: [PATCH 1975/3335] Update update-lxcs.sh new menu that allows you to choose which containers you want to exclude from the update process --- misc/update-lxcs.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 4c293179..b8176b46 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info while true; do - read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn + read -p "This Will Update Selected LXC Containers. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -34,7 +34,20 @@ while true; do esac done clear -excluded_containers=("$@") +TITLE="Containers on node" +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') +excluded_containers=$(whiptail --title "$TITLE" --checklist \ + "\nSelect containers to skip from updates:\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit function update_container() { container=$1 header_info @@ -56,14 +69,7 @@ function update_container() { } header_info for container in $(pct list | awk '{if(NR>1) print $1}'); do - excluded=false - for excluded_container in "${excluded_containers[@]}"; do - if [ "$container" == "$excluded_container" ]; then - excluded=true - break - fi - done - if [ "$excluded" == true ]; then + if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then header_info echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}" sleep 1 @@ -85,4 +91,4 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do done wait header_info -echo -e "${GN} Finished, All Containers Updated. ${CL} \n" +echo -e "${GN} Finished, Selected Containers Updated. ${CL} \n" From 858a00176db77c18d0f6bdf336ffd2d3f77c3719 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Sep 2023 17:21:43 -0400 Subject: [PATCH 1976/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca2b545..4a1d16af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-05 + +### Changed + +- **Proxmox VE LXC Updater** + - Added a new menu that allows you to choose which containers you want to exclude from the update process. + ## 2023-09-01 ### Changed From fb572342634ca251aa73387b9de4b43255e2a1a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 00:34:31 -0400 Subject: [PATCH 1977/3335] Update clean-lxcs.sh add a new menu that allows you to choose which containers you want to exclude from the cleaning process. --- misc/clean-lxcs.sh | 66 ++++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 447d8076..38bffa21 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -10,10 +10,10 @@ function header_info() { cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ - / / / / _ \/ __ `/ __ \ / / | / / -/ /___/ / __/ /_/ / / / / / /___/ / /___ -\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ - + / / / / _ \/ __ `/ __ \ / / | / / +/ /___/ / __/ /_/ / / / / / /___/ / /___ +\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ + EOF } set -e @@ -33,6 +33,21 @@ while true; do esac done clear +TITLE="Containers on node" +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') +excluded_containers=$(whiptail --title "$TITLE" --checklist \ + "\nSelect containers to skip from cleaning:\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + function clean_container() { container=$1 header_info @@ -40,29 +55,36 @@ function clean_container() { echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://github.com/tteck/Proxmox/raw/main/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" } - for container in $(pct list | awk '{if(NR>1) print $1}'); do - os=$(pct config "$container" | awk '/^ostype/ {print $2}') - if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ]; then + if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then header_info - echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL} \n" + echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}" sleep 1 - continue - fi - status=$(pct status $container) - template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") - if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then - echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" - pct start $container - echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" - sleep 5 - clean_container $container - echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" - pct shutdown $container & - elif [ "$status" == "status: running" ]; then - clean_container $container + else + os=$(pct config "$container" | awk '/^ostype/ {print $2}') + if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ]; then + header_info + echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL} \n" + sleep 1 + continue + fi + + status=$(pct status $container) + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then + echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" + pct start $container + echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" + sleep 5 + clean_container $container + echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" + pct shutdown $container & + elif [ "$status" == "status: running" ]; then + clean_container $container + fi fi done + wait header_info echo -e "${GN} Finished, Containers Cleaned. ${CL} \n" From 4362b74a340e57a4ec4d791f7b33c737ee455417 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 00:40:27 -0400 Subject: [PATCH 1978/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a1d16af..150f0d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - **Proxmox VE LXC Updater** - Added a new menu that allows you to choose which containers you want to exclude from the update process. +- **Proxmox VE LXC Cleaner** + - Added a new menu that allows you to choose which containers you want to exclude from the clean process. ## 2023-09-01 From 9cfa05170024d731e4a5ceb8d74709d575a14f94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 00:52:15 -0400 Subject: [PATCH 1979/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 150f0d25..7d8b4a79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,19 @@ - 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-09-06 + +### Changed + +- **Proxmox VE LXC Cleaner** + - Added a new menu that allows you to choose which containers you want to exclude from the clean process. + ## 2023-09-05 ### Changed - **Proxmox VE LXC Updater** - Added a new menu that allows you to choose which containers you want to exclude from the update process. -- **Proxmox VE LXC Cleaner** - - Added a new menu that allows you to choose which containers you want to exclude from the clean process. ## 2023-09-01 From b8ebc36c511273b87238b1c29d5c1780cfb55f4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 02:59:48 -0400 Subject: [PATCH 1980/3335] Update clean-lxcs.sh tweak --- misc/clean-lxcs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 38bffa21..a595f1f3 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -25,7 +25,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info while true; do - read -p "This Will Clean logs, cache and update apt lists on all LXC Containers. Proceed(y/n)?" yn + read -p "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -33,7 +33,7 @@ while true; do esac done clear -TITLE="Containers on node" +NODE=$(hostname) while read -r line; do TAG=$(echo "$line" | awk '{print $1}') ITEM=$(echo "$line" | awk '{print substr($0,36)}') @@ -43,7 +43,7 @@ while read -r line; do fi CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --title "$TITLE" --checklist \ +excluded_containers=$(whiptail --title "Containers on $NODE" --checklist \ "\nSelect containers to skip from cleaning:\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit From 544f163e1598ebfa147d85d4f72890263083e9a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 03:01:10 -0400 Subject: [PATCH 1981/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index b8176b46..5bc0f978 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -34,7 +34,7 @@ while true; do esac done clear -TITLE="Containers on node" +NODE=$(hostname) while read -r line; do TAG=$(echo "$line" | awk '{print $1}') ITEM=$(echo "$line" | awk '{print substr($0,36)}') @@ -44,7 +44,7 @@ while read -r line; do fi CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --title "$TITLE" --checklist \ +excluded_containers=$(whiptail --title "Containers on $NODE" --checklist \ "\nSelect containers to skip from updates:\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit From b3777abadca5a49a5d355ffeb4fdd9bde36cedf4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 03:28:41 -0400 Subject: [PATCH 1982/3335] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 466cfa26..c27d9e2b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@

Contributing to Proxmox VE Helper Scripts

-These scripts enable users to build a Linux container or virtual machine in an interactive manner, offering options for both basic and advanced configurations. The basic setup utilizes default settings, whereas the advanced setup empowers users to alter these default settings. Through the use of the whiptail command, options are presented to users in a dialog box format. After the user makes their selections, the script collects and verifies the user's input in order to generate the final configuration for the container or virtual machine. +These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. Utilizing the whiptail command, options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine.

Proxmox VE Helper Scripts

-
Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.
-

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources.

+

Exercise caution and conduct a comprehensive assessment of scripts and automation tasks acquired from external sources.

Proxmox® is a registered trademark of Proxmox Server Solutions GmbH.
From 186230591ba9da31100ac986411c2ce4dc4299da Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 14:24:44 -0400 Subject: [PATCH 1983/3335] Update add-tailscale-lxc.sh added a menu that enables you to choose the specific container where you want to install Tailscale. --- misc/add-tailscale-lxc.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 52de7c9f..4020ac43 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -17,9 +17,8 @@ EOF } clear header_info -echo -e "\e[1;33mThis script will add Tailscale to an existing LXC Container ONLY\e[0m" while true; do - read -p "Did you replace 106 with your LXC ID? Proceed(y/n)?" yn + read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -48,7 +47,24 @@ function msg() { echo -e "$TEXT" } -CTID=$1 +NODE=$(hostname) +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') + +while [ -z "${CTID:+x}" ]; do + CTID=$(whiptail --title "Containers on $NODE" --radiolist \ + "\nSelect a container to add Tailscale to:\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done + CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf cat <>$CTID_CONFIG_PATH lxc.cgroup2.devices.allow: c 10:200 rwm From 4d32c6eda67137567bcc3f24aaa7b6909416937f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 14:31:22 -0400 Subject: [PATCH 1984/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d8b4a79..27516c62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - **Proxmox VE LXC Cleaner** - Added a new menu that allows you to choose which containers you want to exclude from the clean process. +- **Tailscale** + - Added a menu that enables you to choose the specific container where you want to install Tailscale.. ## 2023-09-05 From 56c946abf4f875d737eccb39f269eb78c44b4c24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 18:45:37 -0400 Subject: [PATCH 1985/3335] tweaks --- misc/frigate-support.sh | 90 +++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/misc/frigate-support.sh b/misc/frigate-support.sh index 21b641d5..849052f1 100644 --- a/misc/frigate-support.sh +++ b/misc/frigate-support.sh @@ -5,55 +5,43 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -echo -e "\e[1;33m This script will Prepare a LXC Container for Frigate \e[0m" +function header_info { + clear +cat <<"EOF" + ____ _ __ ____ __ + / __/___(_)__ ____ _/ /____ / __/_ _____ ___ ___ ____/ /_ + / _// __/ / _ `/ _ `/ __/ -_) _\ \/ // / _ \/ _ \/ _ \/ __/ __/ +/_/ /_/ /_/\_, /\_,_/\__/\__/ /___/\_,_/ .__/ .__/\___/_/ \__/ + /___/ /_/ /_/ +EOF +} +header_info while true; do - read -p "Did you replace 106 with your LXC ID? Proceed (y/n)?" yn + read -p "This will Prepare a LXC Container for Frigate. Proceed (y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; *) echo "Please answer yes or no." ;; esac done -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR -trap cleanup EXIT +header_info -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" - exit $EXIT -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null - -CHAR_DEVS+=("1:1") -CHAR_DEVS+=("29:0") -CHAR_DEVS+=("188:.*") -CHAR_DEVS+=("189:.*") -CHAR_DEVS+=("226:0") -CHAR_DEVS+=("226:128") +# The array of device types +# CHAR_DEVS+=(major:minor) +CHAR_DEVS+=("1:1") # mem +CHAR_DEVS+=("29:0") # fb0 +CHAR_DEVS+=("188:.*") # ttyUSB* +CHAR_DEVS+=("189:.*") # bus/usb/* +CHAR_DEVS+=("226:0") # card0 +CHAR_DEVS+=("226:128") # renderD128 +# Proccess char device string for char_dev in ${CHAR_DEVS[@]}; do [ ! -z "${CHAR_DEV_STRING-}" ] && CHAR_DEV_STRING+=" -o" CHAR_DEV_STRING+=" -regex \".*/${char_dev}\"" done +# Store autodev hook script in a variable read -r -d '' HOOK_SCRIPT <<-EOF || true for char_dev in \$(find /sys/dev/char -regextype sed $CHAR_DEV_STRING); do dev="/dev/\$(sed -n "/DEVNAME/ s/^.*=\(.*\)$/\1/p" \${char_dev}/uevent)"; @@ -65,9 +53,31 @@ for char_dev in \$(find /sys/dev/char -regextype sed $CHAR_DEV_STRING); do cp -dpR \$dev \${LXC_ROOTFS_MOUNT}\${dev}; done; EOF + +# Remove newline char from the variable HOOK_SCRIPT=${HOOK_SCRIPT//$'\n'/} -CTID=$1 +# Generate menu of LXC containers in current node +NODE=$(hostname) +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') + +# Selection menu for LXC containers +while [ -z "${CTID:+x}" ]; do + CTID=$(whiptail --title "Containers on $NODE" --radiolist \ + "\nSelect a container to add support:\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done + +# Add autodev settings CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf sed '/autodev/d' $CTID_CONFIG_PATH >CTID.conf cat CTID.conf >$CTID_CONFIG_PATH @@ -76,8 +86,8 @@ cat <>$CTID_CONFIG_PATH lxc.autodev: 1 lxc.hook.autodev: bash -c '$HOOK_SCRIPT' EOF -echo -e "\e[1;33m Finished....Reboot ${CTID} LXC to apply the changes \e[0m" +echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m" -# In the Proxmox web shell run (replace 106 with your LXC ID) -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/frigate-support.sh)" -s 106 -# Reboot the LXC to apply the changes +# In the Proxmox web shell run +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/frigate-support.sh)" +# Reboot the LXC to apply the changes \ No newline at end of file From 8e75d8cb1f53c5cf2a8dacb389e2f72d8348876d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Sep 2023 18:58:18 -0400 Subject: [PATCH 1986/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27516c62..500c1b91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ - **Proxmox VE LXC Cleaner** - Added a new menu that allows you to choose which containers you want to exclude from the clean process. - **Tailscale** - - Added a menu that enables you to choose the specific container where you want to install Tailscale.. + - Added a menu that enables you to choose the specific container where you want to install Tailscale. ## 2023-09-05 From 1e372141f1de277b980cad0096efa80a4bec2874 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Sep 2023 16:06:51 -0400 Subject: [PATCH 1987/3335] Create host-backup.sh --- misc/host-backup.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 misc/host-backup.sh diff --git a/misc/host-backup.sh b/misc/host-backup.sh new file mode 100644 index 00000000..9a681d7a --- /dev/null +++ b/misc/host-backup.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear +cat <<"EOF" + __ __ __ ___ __ + / // /__ ___ / /_ / _ )___ _____/ /____ _____ + / _ / _ \(_-&1 1>&2 2>&3) || exit + + for selected_dir in ${HOST_BACKUP//\"}; do + selected_directories+=("/etc/$selected_dir") + done +done + +selected_directories_string=$(printf "%s " "${selected_directories[@]}") +header_info +echo -e "This will create backups for the directories \e[1;33m ${selected_directories_string% } \e[0m" +read -p "Press ENTER to continue..." +header_info +tar -czf $BACKUP_PATH$BACKUP_FILE-$(date +%Y_%m_%d).tar.gz --absolute-names ${selected_directories_string% } + +echo -e "\nFinished" +echo -e "\e[1;33m \nA backup is rendered ineffective when it remains stored on the host.\n \e[0m" From 9d96fae50bbfd485b5eae47d01eb91ff068be641 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Sep 2023 16:40:14 -0400 Subject: [PATCH 1988/3335] Update host-backup.sh tweak --- misc/host-backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index 9a681d7a..b1c82510 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -37,12 +37,12 @@ while read -r dir; do MSG_MAX_LENGTH=$((${#DIRNAME} + $OFFSET)) fi CTID_MENU+=("$DIRNAME" "$dir " "OFF") -done < <(ls -d /etc/*/) +done < <(ls -d /etc/*) while [ -z "${HOST_BACKUP:+x}" ]; do HOST_BACKUP=$(whiptail --title "Select Directories" --checklist \ "\nSelect what directories to backup:\n" \ - 16 $(($MSG_MAX_LENGTH + 38)) 6 \ + 16 $(($MSG_MAX_LENGTH + 58)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit for selected_dir in ${HOST_BACKUP//\"}; do From 1e04051b673a4bd114eaa4e52e2a530a44790676 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Sep 2023 16:51:29 -0400 Subject: [PATCH 1989/3335] Update host-backup.sh tweak --- misc/host-backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index b1c82510..d24779e8 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -17,7 +17,7 @@ EOF } header_info while true; do - read -p "This will Backup Selected Directories. Proceed (y/n)?" yn + read -p "This will backup specific files and directories within the 'etc' directory. Proceed (y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -40,8 +40,8 @@ while read -r dir; do done < <(ls -d /etc/*) while [ -z "${HOST_BACKUP:+x}" ]; do - HOST_BACKUP=$(whiptail --title "Select Directories" --checklist \ - "\nSelect what directories to backup:\n" \ + HOST_BACKUP=$(whiptail --title "SELECTIONS" --checklist \ + "\nSelect what files/directories to backup:\n" \ 16 $(($MSG_MAX_LENGTH + 58)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit From c8f73eb38fd24a7a2b7961b156d62c26e08e2f1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Sep 2023 17:52:30 -0400 Subject: [PATCH 1990/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 500c1b91..abc22ed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-07 + +### Changed + +- **Host Backup** + - NEW Script + ## 2023-09-06 ### Changed From 5fecbd44e9cfefdb8628bded91f61609ca22a94d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 7 Sep 2023 19:04:21 -0400 Subject: [PATCH 1991/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abc22ed1..c624dda2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Changed -- **Host Backup** +- **Proxmox VE Host Backup** - NEW Script ## 2023-09-06 From ab394e04aba4696e205e20306a99bf940f4bd296 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Sep 2023 06:02:47 -0400 Subject: [PATCH 1992/3335] Update filebrowser.sh use latest --- misc/filebrowser.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index 81958d23..b4e40fd1 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -68,7 +68,7 @@ function msg_ok() { msg_info "Installing ${APP}" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') -curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null +curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null From e48b2bd0dfdd64ea0b4a4d44cb9689a5e6a6e55f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Sep 2023 14:40:53 -0400 Subject: [PATCH 1993/3335] Update homarr.sh modify git update --- ct/homarr.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index dd06a8ff..514d49c0 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -56,13 +56,19 @@ if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; msg_info "Updating $APP" systemctl stop homarr cd /opt/homarr -output=$(git pull) -git pull &>/dev/null +output=$(git pull 2>&1) if echo "$output" | grep -q "Already up to date." then - msg_ok " $APP is already up to date." + msg_ok "$APP is already up to date." systemctl start homarr - exit +else + if ! git pull; then + echo "Update failed, temporarily storing changes and trying again." + git stash && git pull || ( + echo "Update failed even after storing changes. Aborting." + exit 1 + ) + fi fi yarn install &>/dev/null yarn build &>/dev/null From 8c0155e64bbf163712fbe49305cd06879ce71ce4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Sep 2023 15:00:34 -0400 Subject: [PATCH 1994/3335] Update homarr.sh modify git update --- ct/homarr.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 514d49c0..3816ca6d 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -58,22 +58,22 @@ systemctl stop homarr cd /opt/homarr output=$(git pull 2>&1) if echo "$output" | grep -q "Already up to date." -then - msg_ok "$APP is already up to date." - systemctl start homarr -else - if ! git pull; then - echo "Update failed, temporarily storing changes and trying again." - git stash && git pull || ( + then + msg_ok "$APP is already up to date." + systemctl start homarr + else + if ! git pull; then + echo "Update failed, temporarily storing changes and trying again." + git stash && git pull || ( echo "Update failed even after storing changes. Aborting." exit 1 ) - fi + yarn install &>/dev/null + yarn build &>/dev/null + systemctl start homarr + msg_ok "Updated $APP" + fi fi -yarn install &>/dev/null -yarn build &>/dev/null -systemctl start homarr -msg_ok "Updated $APP" exit } From e52b7872d27b68d283abfc05a222dd7134528059 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Sep 2023 21:43:08 -0400 Subject: [PATCH 1995/3335] Update homarr.sh redo update fixes https://github.com/tteck/Proxmox/issues/1774 --- ct/homarr.sh | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 3816ca6d..4f327ec7 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -56,24 +56,15 @@ if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; msg_info "Updating $APP" systemctl stop homarr cd /opt/homarr -output=$(git pull 2>&1) -if echo "$output" | grep -q "Already up to date." - then - msg_ok "$APP is already up to date." - systemctl start homarr - else - if ! git pull; then - echo "Update failed, temporarily storing changes and trying again." - git stash && git pull || ( - echo "Update failed even after storing changes. Aborting." - exit 1 - ) - yarn install &>/dev/null - yarn build &>/dev/null - systemctl start homarr - msg_ok "Updated $APP" - fi -fi +cp -R data data-backup +git stash &>/dev/null +git pull &>/dev/null +yarn install &>/dev/null +yarn build &>/dev/null +cp -R data-backup/* data +rm -rf data-backup +systemctl start homarr +msg_ok "Updated $APP" exit } From 6fae1fc557508c42ab18bc9beaff42e4a9955a77 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 05:13:17 -0400 Subject: [PATCH 1996/3335] add backtitle --- ct/alpine-docker.sh | 2 +- ct/alpine-grafana.sh | 2 +- ct/alpine-vaultwarden.sh | 4 +- ct/alpine-zigbee2mqtt.sh | 2 +- ct/alpine.sh | 2 +- ct/archlinux.sh | 44 ++++++------- ct/create_lxc.sh | 2 +- ct/cronicle.sh | 2 +- ct/homeassistant-core.sh | 4 +- ct/homeassistant.sh | 2 +- ct/node-red.sh | 4 +- ct/paperless-ngx.sh | 2 +- ct/plex.sh | 2 +- ct/podman-homeassistant.sh | 2 +- ct/vaultwarden.sh | 4 +- ct/wireguard.sh | 2 +- misc/add-tailscale-lxc.sh | 2 +- misc/build.func | 66 +++++++++---------- misc/clean-lxcs.sh | 2 +- ...iner-copy-data-home-assistant-container.sh | 6 +- ...container-copy-data-home-assistant-core.sh | 6 +- ...ntainer-copy-data-podman-home-assistant.sh | 6 +- ...core-copy-data-home-assistant-container.sh | 6 +- ...tant-core-copy-data-home-assistant-core.sh | 6 +- misc/copy-data/plex-copy-data-plex.sh | 6 +- ...tant-copy-data-home-assistant-container.sh | 6 +- misc/copy-data/z2m-copy-data-z2m.sh | 6 +- .../zwavejs2mqtt-copy-data-zwavejsui.sh | 6 +- misc/cron-update-lxcs.sh | 2 +- misc/frigate-support.sh | 2 +- misc/host-backup.sh | 2 +- misc/monitor-all.sh | 2 +- misc/pbs3-upgrade.sh | 14 ++-- misc/post-pbs-install.sh | 18 ++--- misc/post-pve-install.sh | 26 ++++---- misc/pve8-upgrade.sh | 14 ++-- misc/update-lxcs.sh | 2 +- turnkey/turnkey-core.sh | 2 +- turnkey/turnkey-fileserver.sh | 2 +- turnkey/turnkey-gitea.sh | 2 +- turnkey/turnkey-gitlab.sh | 2 +- turnkey/turnkey-mediaserver.sh | 2 +- turnkey/turnkey-nextcloud.sh | 2 +- turnkey/turnkey-observium.sh | 2 +- turnkey/turnkey-openvpn.sh | 2 +- turnkey/turnkey-owncloud.sh | 2 +- turnkey/turnkey-torrentserver.sh | 2 +- turnkey/turnkey-wordpress.sh | 2 +- turnkey/turnkey-zoneminder.sh | 2 +- vm/haos-vm.sh | 36 +++++----- vm/mikrotik-routeros.sh | 26 ++++---- vm/openwrt.sh | 38 +++++------ vm/pimox-haos-vm.sh | 28 ++++---- 53 files changed, 220 insertions(+), 220 deletions(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 9806f568..2a0c46eb 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -57,7 +57,7 @@ function update_script() { fi while true; do CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \ "1" "Check for Docker Updates" 3>&2 2>&1 1>&3 ) exit_status=$? diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 6b82788a..f891e48d 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -58,7 +58,7 @@ function update_script() { LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) while true; do CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 3 \ + whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 3 \ "1" "Check for Grafana Updates" \ "2" "Allow 0.0.0.0 for listening" \ "3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3 diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 32b9f946..6add4976 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -57,7 +57,7 @@ function update_script() { fi while true; do CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \ + whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \ "1" "Update Vaultwarden" \ "2" "Reset ADMIN_TOKEN" 3>&2 2>&1 1>&3 ) @@ -73,7 +73,7 @@ function update_script() { exit ;; 2) - if NEWTOKEN=$(whiptail --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then + if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then if [[ -z "$NEWTOKEN" ]]; then exit-script; fi if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1) diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index d00fcf4c..1a0f92b4 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -57,7 +57,7 @@ function update_script() { fi while true; do CHOICE=$( - whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \ "1" "Check for Zigbee2MQTT Updates" 3>&2 2>&1 1>&3 ) exit_status=$? diff --git a/ct/alpine.sh b/ct/alpine.sh index 3be89e7b..f134cac0 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -52,7 +52,7 @@ function default_settings() { } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ +UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ "1" "Check for Alpine Updates" ON \ 3>&1 1>&2 2>&3) diff --git a/ct/archlinux.sh b/ct/archlinux.sh index f7b8e6cc..75e4119d 100644 --- a/ct/archlinux.sh +++ b/ct/archlinux.sh @@ -129,7 +129,7 @@ function exit-script() { } function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ +if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" ON \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3); then @@ -138,7 +138,7 @@ else exit-script fi -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then +if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then PW1="Automatic Login" PW=" " @@ -150,7 +150,7 @@ else exit-script fi -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then +if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if [ -z "$CT_ID" ]; then CT_ID="$NEXTID" echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" @@ -161,7 +161,7 @@ else exit fi -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then +if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then if [ -z "$CT_NAME" ]; then HN="$NSAPP" else @@ -172,7 +172,7 @@ else exit-script fi -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then +if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then if [ -z "$DISK_SIZE" ]; then DISK_SIZE="$var_disk" echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" @@ -187,7 +187,7 @@ else exit-script fi -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then +if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then if [ -z "$CORE_COUNT" ]; then CORE_COUNT="$var_cpu" echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" @@ -198,7 +198,7 @@ else exit-script fi -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then +if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then if [ -z "$RAM_SIZE" ]; then RAM_SIZE="$var_ram" echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" @@ -209,7 +209,7 @@ else exit-script fi -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then +if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then if [ -z "$BRG" ]; then BRG="vmbr0" echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" @@ -220,7 +220,7 @@ else exit-script fi -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then +if NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $NET ]; then NET="dhcp" echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" @@ -230,7 +230,7 @@ if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --t else exit-script fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then +if GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then if [ -z $GATE1 ]; then GATE1="Default" GATE="" @@ -242,14 +242,14 @@ else exit-script fi -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" else DISABLEIP6="no" fi echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then +if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then MTU1="Default" MTU="" @@ -261,7 +261,7 @@ else exit-script fi -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then +if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then SX=Host SD="" @@ -274,7 +274,7 @@ else exit-script fi -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then +if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then if [ -z $NX ]; then NX=Host NS="" @@ -286,7 +286,7 @@ else exit-script fi -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then +if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then MAC1="Default" MAC="" @@ -298,7 +298,7 @@ else exit-script fi -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then +if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="" @@ -310,21 +310,21 @@ else exit-script fi -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then SSH="yes" else SSH="no" fi echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else VERB="no" fi echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -339,7 +339,7 @@ ARCH_CHECK PVE_CHECK NEXTID=$(pvesh get /cluster/nextid) header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings @@ -361,7 +361,7 @@ exit } if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit @@ -370,7 +370,7 @@ if command -v pveversion >/dev/null 2>&1; then fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 557d88eb..1cd31ba0 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -100,7 +100,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 5421eef4..4d59253a 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -51,7 +51,7 @@ function default_settings() { } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ +UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install ${APP} Worker" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 024b0be5..7b14b802 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -57,7 +57,7 @@ function update_script() { fi PY=$(ls /srv/homeassistant/lib/) IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update Core" ON \ "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ @@ -65,7 +65,7 @@ function update_script() { 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then - if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then clear header_info echo -e "${GN}Updating to Beta Version${CL}" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 51a46299..3c1abf63 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -56,7 +56,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update ALL Containers" ON \ "2" "Remove ALL Unused Images" OFF \ "3" "Install HACS" OFF \ diff --git a/ct/node-red.sh b/ct/node-red.sh index f95388a1..029bbae8 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ +UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install Themes" OFF \ 3>&1 1>&2 2>&3) @@ -73,7 +73,7 @@ msg_ok "Update Successful" exit fi if [ "$UPD" == "2" ]; then -THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ +THEME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ "dark" "" OFF \ "dracula" "" OFF \ "midnight-red" "" ON \ diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index c58a3004..31277348 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -59,7 +59,7 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') SER=/etc/systemd/system/paperless-task-queue.service - UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update Paperless-ngx to $RELEASE" ON \ "2" "Paperless-ngx Credentials" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/plex.sh b/ct/plex.sh index ac09683a..77cf02a7 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ +UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ "1" "Update LXC" ON \ "2" "Install plexupdate" OFF \ 3>&1 1>&2 2>&3) diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index a1c8c4fc..14c2ed98 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -56,7 +56,7 @@ function default_settings() { function update_script() { if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update system and containers" ON \ "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 2d326b6c..b804f195 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -62,7 +62,7 @@ function update_script() { grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ "1" "VaultWarden $VAULT" ON \ "2" "Web-Vault $WVRELEASE" OFF \ "3" "Set Admin Token" OFF \ @@ -121,7 +121,7 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then - if NEWTOKEN=$(whiptail --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then + if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then if [[ -z "$NEWTOKEN" ]]; then exit; fi if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 60156f2e..828697d9 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ +UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP} LXC" ON \ "2" "Install WGDashboard" OFF \ 3>&1 1>&2 2>&3) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 4020ac43..a4661001 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -59,7 +59,7 @@ while read -r line; do done < <(pct list | awk 'NR>1') while [ -z "${CTID:+x}" ]; do - CTID=$(whiptail --title "Containers on $NODE" --radiolist \ + CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \ "\nSelect a container to add Tailscale to:\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit diff --git a/misc/build.func b/misc/build.func index 43925d1b..c1c9394f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -55,7 +55,7 @@ msg_error() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58 fi if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" @@ -80,7 +80,7 @@ arch_check() { ssh_check() { if command -v pveversion >/dev/null 2>&1; then if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then echo "you've been warned" else clear @@ -127,12 +127,12 @@ exit-script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { - whiptail --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58 if [ "$var_os" != "alpine" ]; then var_os="" while [ -z "$var_os" ]; do - if var_os=$(whiptail --title "DISTRIBUTION" --radiolist "Choose Distribution:" 10 58 2 \ + if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution:" 10 58 2 \ "debian" "" OFF \ "ubuntu" "" OFF \ 3>&1 1>&2 2>&3); then @@ -148,7 +148,7 @@ advanced_settings() { if [ "$var_os" == "debian" ]; then var_version="" while [ -z "$var_version" ]; do - if var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ + if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \ "11" "Bullseye" OFF \ "12" "Bookworm" OFF \ 3>&1 1>&2 2>&3); then @@ -164,7 +164,7 @@ advanced_settings() { if [ "$var_os" == "ubuntu" ]; then var_version="" while [ -z "$var_version" ]; do - if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ + if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "20.04" "Focal" OFF \ "22.04" "Jammy" OFF \ "23.04" "Lunar" OFF \ @@ -180,7 +180,7 @@ advanced_settings() { CT_TYPE="" while [ -z "$CT_TYPE" ]; do - if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ "1" "Unprivileged" OFF \ "0" "Privileged" OFF \ 3>&1 1>&2 2>&3); then @@ -192,7 +192,7 @@ advanced_settings() { fi done - if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then PW1="Automatic Login" PW="" @@ -204,7 +204,7 @@ advanced_settings() { exit-script fi - if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if [ -z "$CT_ID" ]; then CT_ID="$NEXTID" echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" @@ -215,7 +215,7 @@ advanced_settings() { exit fi - if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then if [ -z "$CT_NAME" ]; then HN="$NSAPP" else @@ -226,7 +226,7 @@ advanced_settings() { exit-script fi - if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then if [ -z "$DISK_SIZE" ]; then DISK_SIZE="$var_disk" echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" @@ -241,7 +241,7 @@ advanced_settings() { exit-script fi - if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then if [ -z "$CORE_COUNT" ]; then CORE_COUNT="$var_cpu" echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" @@ -252,7 +252,7 @@ advanced_settings() { exit-script fi - if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then if [ -z "$RAM_SIZE" ]; then RAM_SIZE="$var_ram" echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" @@ -263,7 +263,7 @@ advanced_settings() { exit-script fi - if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then if [ -z "$BRG" ]; then BRG="vmbr0" echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" @@ -275,7 +275,7 @@ advanced_settings() { fi while true; do - NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) + NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3) exit_status=$? if [ $exit_status -eq 0 ]; then if [ "$NET" = "dhcp" ]; then @@ -286,7 +286,7 @@ advanced_settings() { echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" break else - whiptail --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58 fi fi else @@ -296,11 +296,11 @@ advanced_settings() { if [ "$NET" != "dhcp" ]; then while true; do - GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) + GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) if [ -z "$GATE1" ]; then - whiptail --msgbox "Gateway IP address cannot be empty" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --msgbox "Invalid IP address format" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 else GATE=",gw=$GATE1" echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" @@ -312,14 +312,14 @@ advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" fi - if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" else DISABLEIP6="no" fi echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then MTU1="Default" MTU="" @@ -331,7 +331,7 @@ advanced_settings() { exit-script fi - if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if [ -z $SD ]; then SX=Host SD="" @@ -344,7 +344,7 @@ advanced_settings() { exit-script fi - if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then if [ -z $NX ]; then NX=Host NS="" @@ -356,7 +356,7 @@ advanced_settings() { exit-script fi - if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then MAC1="Default" MAC="" @@ -368,7 +368,7 @@ advanced_settings() { exit-script fi - if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="" @@ -381,7 +381,7 @@ advanced_settings() { fi if [[ "$PW" == -password* ]]; then - if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then SSH="yes" else SSH="no" @@ -393,7 +393,7 @@ advanced_settings() { fi if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then FUSE="yes" else FUSE="no" @@ -401,14 +401,14 @@ advanced_settings() { echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" fi - if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else VERB="no" fi echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" else clear @@ -428,7 +428,7 @@ install_script() { NEXTID=$(pvesh get /cluster/nextid) timezone=$(cat /etc/timezone) header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings @@ -441,7 +441,7 @@ install_script() { start() { if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit @@ -450,7 +450,7 @@ start() { fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index a595f1f3..2614846b 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -43,7 +43,7 @@ while read -r line; do fi CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --title "Containers on $NODE" --checklist \ +excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \ "\nSelect containers to skip from cleaning:\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh index 83ef60bd..9da8f68a 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh @@ -68,13 +68,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.23" 13 50 || exit diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh index ff42886a..19a0975c 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh @@ -66,13 +66,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Container LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Core LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -83,7 +83,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.02" 13 50 || exit diff --git a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh index ef003eb2..01ac7b82 100644 --- a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh +++ b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh @@ -68,13 +68,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Podman LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.02.12" 13 50 || exit diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh index c36c18cb..e2ae0eec 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh @@ -66,13 +66,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Core LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Container LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -83,7 +83,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.02" 13 50 || exit diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index 8589e367..7603e8a1 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -61,13 +61,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Core LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Core LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -78,7 +78,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.03" 13 50 || exit diff --git a/misc/copy-data/plex-copy-data-plex.sh b/misc/copy-data/plex-copy-data-plex.sh index 851a8b6f..58ef49f0 100644 --- a/misc/copy-data/plex-copy-data-plex.sh +++ b/misc/copy-data/plex-copy-data-plex.sh @@ -68,13 +68,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich Plex Media Server LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich Plex Media Server LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.24" 13 50 || exit diff --git a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh index 1b159d10..0d8a6542 100644 --- a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh +++ b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh @@ -68,13 +68,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA Podman LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich HA LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.03.31" 13 50 || exit diff --git a/misc/copy-data/z2m-copy-data-z2m.sh b/misc/copy-data/z2m-copy-data-z2m.sh index 1fa6841e..ee69da79 100644 --- a/misc/copy-data/z2m-copy-data-z2m.sh +++ b/misc/copy-data/z2m-copy-data-z2m.sh @@ -68,13 +68,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.01.23" 13 50 || exit diff --git a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh index dd038ed7..c4375761 100644 --- a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh +++ b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh @@ -69,13 +69,13 @@ while read -r line; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') while [ -z "${CTID_FROM:+x}" ]; do - CTID_FROM=$(whiptail --title "$TITLE" --radiolist \ + CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit done while [ -z "${CTID_TO:+x}" ]; do - CTID_TO=$(whiptail --title "$TITLE" --radiolist \ + CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \ "\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit @@ -86,7 +86,7 @@ for i in ${!CTID_MENU[@]}; do [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]}) done -whiptail --defaultno --title "$TITLE" --yesno \ +whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \ "Are you sure you want to copy data between the following LXCs? $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.09.21" 13 50 || exit diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 3cd4d9be..9fa9b549 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -39,7 +39,7 @@ remove() { OPTIONS=(Add "Add Crontab Schedule" Remove "Remove Crontab Schedule") -CHOICE=$(whiptail --title "Cron Update LXCs" --menu "Select an option:" 10 58 2 \ +CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Cron Update LXCs" --menu "Select an option:" 10 58 2 \ "${OPTIONS[@]}" 3>&1 1>&2 2>&3) case $CHOICE in diff --git a/misc/frigate-support.sh b/misc/frigate-support.sh index 849052f1..88e43ea1 100644 --- a/misc/frigate-support.sh +++ b/misc/frigate-support.sh @@ -71,7 +71,7 @@ done < <(pct list | awk 'NR>1') # Selection menu for LXC containers while [ -z "${CTID:+x}" ]; do - CTID=$(whiptail --title "Containers on $NODE" --radiolist \ + CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \ "\nSelect a container to add support:\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit diff --git a/misc/host-backup.sh b/misc/host-backup.sh index d24779e8..0fbe9a41 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -40,7 +40,7 @@ while read -r dir; do done < <(ls -d /etc/*) while [ -z "${HOST_BACKUP:+x}" ]; do - HOST_BACKUP=$(whiptail --title "SELECTIONS" --checklist \ + HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECTIONS" --checklist \ "\nSelect what files/directories to backup:\n" \ 16 $(($MSG_MAX_LENGTH + 58)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index a60f8dd5..7e6f15c7 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -130,7 +130,7 @@ OPTIONS=(Add "Add Monitor-All to Proxmox VE" \ Remove "Remove Monitor-All from Proxmox VE") # Show the whiptail menu and save the user's choice -CHOICE=$(whiptail --title "Monitor-All for Proxmox VE" --menu "Select an option:" 10 58 2 \ +CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Monitor-All for Proxmox VE" --menu "Select an option:" 10 58 2 \ "${OPTIONS[@]}" 3>&1 1>&2 2>&3) # Check the user's choice and perform the corresponding action diff --git a/misc/pbs3-upgrade.sh b/misc/pbs3-upgrade.sh index 6b389e97..942154df 100644 --- a/misc/pbs3-upgrade.sh +++ b/misc/pbs3-upgrade.sh @@ -47,7 +47,7 @@ msg_error() { start_routines() { header_info - CHOICE=$(whiptail --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -61,7 +61,7 @@ start_routines() { ;; esac - CHOICE=$(whiptail --title "PBS 3 SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server 3.\n \nChange to Proxmox Backup Server 3 sources?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 3 SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server 3.\n \nChange to Proxmox Backup Server 3 sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -79,7 +79,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS3-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS3-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -95,7 +95,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS3-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS3-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -111,7 +111,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS3 TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS3 TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -127,7 +127,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS 3 UPDATE" --menu "\nUpdate to Proxmox Backup Server 3 now?" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 3 UPDATE" --menu "\nUpdate to Proxmox Backup Server 3 now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -142,7 +142,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox Backup Server 3 now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox Backup Server 3 now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index aebddb14..9f53edc3 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -48,7 +48,7 @@ msg_error() { start_routines() { header_info VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - CHOICE=$(whiptail --title "PBS SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server.\n \nChange to Proxmox Backup Server sources?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server.\n \nChange to Proxmox Backup Server sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -66,7 +66,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -82,7 +82,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -98,7 +98,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PBS TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -115,25 +115,25 @@ EOF esac if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then - CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; no) - whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_error "Selected no to Disabling subscription nag" ;; esac fi - CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox Backup Server now?" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --menu "\nUpdate Proxmox Backup Server now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -148,7 +148,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox Backup Server now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox Backup Server now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index ca076582..5f4fe348 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -48,10 +48,10 @@ start_routines() { header_info VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then - whiptail --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58 fi - CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -69,7 +69,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -85,7 +85,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -102,7 +102,7 @@ EOF esac if [[ "${VERSION}" == "bookworm" ]]; then - CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nAdd 'ceph package repositories?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nAdd 'ceph package repositories?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -120,7 +120,7 @@ EOF esac fi - CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -137,26 +137,26 @@ EOF esac if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then - CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; no) - whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_error "Selected no to Disabling subscription nag" ;; esac fi if ! systemctl is-active --quiet pve-ha-lrm; then - CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -174,7 +174,7 @@ EOF fi if systemctl is-active --quiet pve-ha-lrm; then - CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -191,7 +191,7 @@ EOF esac fi - CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -206,7 +206,7 @@ EOF ;; esac - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index 53eff2cc..e2e86cb5 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -47,7 +47,7 @@ msg_error() { start_routines() { header_info - whiptail --msgbox --title "PVE8 SOURCES" "This will set the correct sources to update and install Proxmox VE 8." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 SOURCES" "This will set the correct sources to update and install Proxmox VE 8." 10 58 msg_info "Changing to Proxmox VE 8 Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bookworm main contrib @@ -56,21 +56,21 @@ deb http://security.debian.org/debian-security bookworm-security main contrib EOF msg_ok "Changed to Proxmox VE 8 Sources" - whiptail --msgbox --title "PVE8-ENTERPRISE" "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8-ENTERPRISE" "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription." 10 58 msg_info "Disabling 'pve-enterprise' repository" cat </etc/apt/sources.list.d/pve-enterprise.list # deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise EOF msg_ok "Disabled 'pve-enterprise' repository" - whiptail --msgbox --title "PVE8-NO-SUBSCRIPTION" "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8-NO-SUBSCRIPTION" "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE." 10 58 msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" - whiptail --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58 msg_info "Enabling 'ceph package repositories'" cat </etc/apt/sources.list.d/ceph.list # deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise @@ -78,20 +78,20 @@ deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription EOF msg_ok "Enabled 'ceph package repositories'" - whiptail --msgbox --title "PVE8 TEST" "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released (Disabled)." 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 TEST" "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released (Disabled)." 10 58 msg_info "Adding 'pvetest' repository and set disabled" cat </etc/apt/sources.list.d/pvetest-for-beta.list # deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" - whiptail --msgbox --title "PVE8 UPDATE" "Updating to Proxmox VE 8" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 UPDATE" "Updating to Proxmox VE 8" 10 58 msg_info "Updating to Proxmox VE 8 (Patience)" apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y msg_ok "Updated to Proxmox VE 8" - CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 5bc0f978..dd826f46 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -44,7 +44,7 @@ while read -r line; do fi CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --title "Containers on $NODE" --checklist \ +excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \ "\nSelect containers to skip from updates:\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index 2294896d..f780971e 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 88bbd21d..01915039 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 85ef344b..4f122c0d 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index a85c609a..0a59fad6 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-mediaserver.sh b/turnkey/turnkey-mediaserver.sh index 2ce0209c..a4a6a538 100644 --- a/turnkey/turnkey-mediaserver.sh +++ b/turnkey/turnkey-mediaserver.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index cdbc41d9..02383f51 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index da16c7ae..b065d90e 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-openvpn.sh b/turnkey/turnkey-openvpn.sh index c1548cab..62483753 100644 --- a/turnkey/turnkey-openvpn.sh +++ b/turnkey/turnkey-openvpn.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index a71630b9..c726005a 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index 549a7786..b6638157 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 63858486..56400e73 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/turnkey/turnkey-zoneminder.sh b/turnkey/turnkey-zoneminder.sh index ba90bd4f..daf137b7 100644 --- a/turnkey/turnkey-zoneminder.sh +++ b/turnkey/turnkey-zoneminder.sh @@ -113,7 +113,7 @@ function select_storage() { else local STORAGE while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 06d15d21..8294ec68 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -63,7 +63,7 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then : else header_info && echo -e "⚠ User exited script \n" && exit @@ -106,7 +106,7 @@ function arch_check() { function ssh_check() { if command -v pveversion >/dev/null 2>&1; then if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then echo "you've been warned" else clear @@ -154,7 +154,7 @@ function default_settings() { } function advanced_settings() { - if BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ + if BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$stable" "Stable " ON \ "$beta" "Beta " OFF \ "$dev" "Dev " OFF \ @@ -165,7 +165,7 @@ function advanced_settings() { fi while true; do - if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then VMID="$NEXTID" fi @@ -181,7 +181,7 @@ function advanced_settings() { fi done - if MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ "i440fx" "Machine i440fx" ON \ "q35" "Machine q35" OFF \ 3>&1 1>&2 2>&3); then @@ -198,7 +198,7 @@ function advanced_settings() { exit-script fi - if DISK_CACHE1=$(whiptail --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + if DISK_CACHE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ "0" "Default" ON \ "1" "Write Through" OFF \ 3>&1 1>&2 2>&3); then @@ -213,7 +213,7 @@ function advanced_settings() { exit-script fi - if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VM_NAME ]; then HN="haos${BRANCH}" echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" @@ -225,7 +225,7 @@ function advanced_settings() { exit-script fi - if CPU_TYPE1=$(whiptail --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ "0" "KVM64 (Default)" ON \ "1" "Host" OFF \ 3>&1 1>&2 2>&3); then @@ -240,7 +240,7 @@ function advanced_settings() { exit-script fi - if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $CORE_COUNT ]; then CORE_COUNT="2" echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" @@ -251,7 +251,7 @@ function advanced_settings() { exit-script fi - if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $RAM_SIZE ]; then RAM_SIZE="4096" echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" @@ -262,7 +262,7 @@ function advanced_settings() { exit-script fi - if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $BRG ]; then BRG="vmbr0" echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" @@ -273,7 +273,7 @@ function advanced_settings() { exit-script fi - if MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MAC1 ]; then MAC="$GEN_MAC" echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" @@ -285,7 +285,7 @@ function advanced_settings() { exit-script fi - if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="" @@ -298,7 +298,7 @@ function advanced_settings() { exit-script fi - if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then MTU1="Default" MTU="" @@ -311,7 +311,7 @@ function advanced_settings() { exit-script fi - if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" else @@ -319,7 +319,7 @@ function advanced_settings() { START_VM="no" fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else header_info @@ -329,7 +329,7 @@ function advanced_settings() { } function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings @@ -365,7 +365,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 78f7208a..35a92d9b 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -69,7 +69,7 @@ pushd $TEMP_DIR >/dev/null sleep 3 exit fi -if (whiptail --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then echo "User selected Yes" else clear @@ -107,14 +107,14 @@ function default_settings() { echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}" } function advanced_settings() { - VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) + VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}" else exit fi - VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3) + VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' ') @@ -122,28 +122,28 @@ function advanced_settings() { else exit fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) + CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" else exit fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) + RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" else exit fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) + BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" else exit fi - MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) + MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then MAC="$MAC1" @@ -151,7 +151,7 @@ function advanced_settings() { else exit fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) + VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then @@ -162,7 +162,7 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MTU1 ]; then @@ -173,14 +173,14 @@ function advanced_settings() { echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi fi - if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}" START_VM="yes" else echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}no${CL}" START_VM="no" fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then echo -e "${RD}Creating Mikrotik RouterOS VM using the above advanced settings${CL}" else clear @@ -190,7 +190,7 @@ function advanced_settings() { fi } function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then clear header_info echo -e "${BL}Using Default Settings${CL}" @@ -224,7 +224,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 66bccd19..dc1c1828 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -135,7 +135,7 @@ function send_line_to_vm() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if (whiptail --title "OpenWrt VM" --yesno "This will create a New OpenWrt VM. Proceed?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "OpenWrt VM" --yesno "This will create a New OpenWrt VM. Proceed?" 10 58); then : else header_info && echo -e "⚠ User exited script \n" && exit @@ -178,7 +178,7 @@ function arch_check() { function ssh_check() { if command -v pveversion >/dev/null 2>&1; then if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then echo "you've been warned" else clear @@ -228,7 +228,7 @@ function default_settings() { function advanced_settings() { while true; do - if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then VMID="$NEXTID" fi @@ -244,7 +244,7 @@ function advanced_settings() { fi done - if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VM_NAME ]; then HN="openwrt" else @@ -255,7 +255,7 @@ function advanced_settings() { exit-script fi - if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $CORE_COUNT ]; then CORE_COUNT="1" fi @@ -264,7 +264,7 @@ function advanced_settings() { exit-script fi - if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $RAM_SIZE ]; then RAM_SIZE="256" fi @@ -273,7 +273,7 @@ function advanced_settings() { exit-script fi - if BRG=$(whiptail --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $BRG ]; then BRG="vmbr0" fi @@ -282,7 +282,7 @@ function advanced_settings() { exit-script fi - if LAN_BRG=$(whiptail --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if LAN_BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $LAN_BRG ]; then LAN_BRG="vmbr0" fi @@ -291,7 +291,7 @@ 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 LAN_IP_ADDR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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 @@ -300,7 +300,7 @@ function advanced_settings() { 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 LAN_NETMASK=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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 @@ -309,7 +309,7 @@ function advanced_settings() { 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 MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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" else @@ -320,7 +320,7 @@ function advanced_settings() { exit-script fi - if MAC2=$(whiptail --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if MAC2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MAC2 ]; then LAN_MAC="$GEN_MAC_LAN" else @@ -331,7 +331,7 @@ function advanced_settings() { exit-script fi - if VLAN1=$(whiptail --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="" @@ -343,7 +343,7 @@ function advanced_settings() { exit-script fi - if VLAN2=$(whiptail --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VLAN2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VLAN2 ]; then VLAN2="999" LAN_VLAN=",tag=$VLAN2" @@ -355,7 +355,7 @@ function advanced_settings() { exit-script fi - if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $MTU1 ]; then MTU1="Default" MTU="" @@ -367,14 +367,14 @@ function advanced_settings() { exit-script fi - if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then START_VM="yes" else START_VM="no" fi echo -e "${DGN}Start VM when completed: ${BGN}$START_VM${CL}" - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a OpenWrt VM using the above advanced settings${CL}" else header_info @@ -384,7 +384,7 @@ function advanced_settings() { } function start_script() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" default_settings @@ -421,7 +421,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the OpenWrt VM?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 9fc13f2c..1cf39709 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -71,7 +71,7 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if (whiptail --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then echo "User selected Yes" else clear @@ -133,14 +133,14 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { - BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ + BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$STABLE" "Stable" ON \ "$BETA" "Beta" OFF \ "$DEV" "Dev" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi - VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $VMID ]; then VMID="$NEXTID" @@ -155,7 +155,7 @@ function advanced_settings() { if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi fi fi - VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $VM_NAME ]; then HN="haos${BRANCH}" @@ -166,7 +166,7 @@ function advanced_settings() { echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" fi fi - CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $CORE_COUNT ]; then CORE_COUNT="2" @@ -174,7 +174,7 @@ function advanced_settings() { else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi fi - RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $RAM_SIZE ]; then RAM_SIZE="4096" @@ -182,7 +182,7 @@ function advanced_settings() { else if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi fi - BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $BRG ]; then BRG="vmbr0" @@ -190,7 +190,7 @@ function advanced_settings() { else if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi fi - MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ -z $MAC1 ]; then MAC="$GEN_MAC" @@ -201,7 +201,7 @@ function advanced_settings() { echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" fi fi - VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $VLAN1 ]; then @@ -212,7 +212,7 @@ function advanced_settings() { echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" fi fi - MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MTU1 ]; then @@ -223,14 +223,14 @@ function advanced_settings() { echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi fi - if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" START_VM="yes" else echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" fi - if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" else clear @@ -240,7 +240,7 @@ function advanced_settings() { fi } function START_SCRIPT() { - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then clear header_info echo -e "${BL}Using Default Settings${CL}" @@ -273,7 +273,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the HAOS VM?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit From b31de2b71211debd69e41cef3776871747840843 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 16:50:45 -0400 Subject: [PATCH 1997/3335] Update host-backup.sh Allow users to specify the backup path and directory they want to work in. --- misc/host-backup.sh | 85 ++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index 0fbe9a41..5722e1f0 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ ___ __ / // /__ ___ / /_ / _ )___ _____/ /____ _____ / _ / _ \(_-&1 1>&2 2>&3) -while read -r dir; do - DIRNAME=$(basename "$dir") - OFFSET=2 - if [[ $((${#DIRNAME} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#DIRNAME} + $OFFSET)) + if [ -z "$BACKUP_PATH" ]; then + BACKUP_PATH="/root/" + else + BACKUP_PATH="$BACKUP_PATH" fi - CTID_MENU+=("$DIRNAME" "$dir " "OFF") -done < <(ls -d /etc/*) -while [ -z "${HOST_BACKUP:+x}" ]; do - HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECTIONS" --checklist \ - "\nSelect what files/directories to backup:\n" \ - 16 $(($MSG_MAX_LENGTH + 58)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to etc\ne.g. root, var/lib/pve-cluster etc." 9 68 --title "Directory to work in (No leading or trailing slashes):" 3>&1 1>&2 2>&3) - for selected_dir in ${HOST_BACKUP//\"}; do - selected_directories+=("/etc/$selected_dir") + if [ -z "$DIR" ]; then + DIR="etc" + else + DIR="$DIR" + fi + + DIR_DASH=$(echo "$DIR" | tr '/' '-') + BACKUP_FILE="$(hostname)-${DIR_DASH}-backup" + selected_directories=() + + while read -r dir; do + DIRNAME=$(basename "$dir") + OFFSET=2 + if [[ $((${#DIRNAME} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#DIRNAME} + $OFFSET)) + fi + CTID_MENU+=("$DIRNAME" "$dir " "OFF") + done < <(ls -d /${DIR}/*) + + while [ -z "${HOST_BACKUP:+x}" ]; do + HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Host Backup" --title "Working in the ${DIR} directory " --checklist \ + "\nSelect what files/directories to backup:\n" \ + 16 $(($MSG_MAX_LENGTH + 58)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + + for selected_dir in ${HOST_BACKUP//\"/}; do + selected_directories+=("/${DIR}/$selected_dir") + done done -done -selected_directories_string=$(printf "%s " "${selected_directories[@]}") -header_info -echo -e "This will create backups for the directories \e[1;33m ${selected_directories_string% } \e[0m" -read -p "Press ENTER to continue..." -header_info -tar -czf $BACKUP_PATH$BACKUP_FILE-$(date +%Y_%m_%d).tar.gz --absolute-names ${selected_directories_string% } + selected_directories_string=$(printf "%s " "${selected_directories[@]}") + header_info + echo -e "This will create a backup in\e[1;33m $BACKUP_PATH \e[0mfor these files and directories\e[1;33m ${selected_directories_string% } \e[0m" + read -p "Press ENTER to continue..." + header_info + tar -czf "$BACKUP_PATH$BACKUP_FILE-$(date +%Y_%m_%d).tar.gz" --absolute-names ${selected_directories_string% } -echo -e "\nFinished" + echo -e "\nFinished" +} + +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Host Backup" --yesno "This will create backups for particular files and directories located within a designated directory. Proceed?" 10 88); then + start +fi echo -e "\e[1;33m \nA backup is rendered ineffective when it remains stored on the host.\n \e[0m" From 06686f506a166e1db04d1c5f3cade6e106ebf755 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 16:54:24 -0400 Subject: [PATCH 1998/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c624dda2..e7c9ac98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-09 + +### Changed + +- **Proxmox VE Host Backup** + - Users are now able to specify both the backup path and the directory in which they wish to work. + ## 2023-09-07 ### Changed From 8c4d2a37119b91736a9bf3ef5dfc7663778565ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 17:07:58 -0400 Subject: [PATCH 1999/3335] Update host-backup.sh tweak --- misc/host-backup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index 5722e1f0..78712ae7 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -63,12 +63,13 @@ start() { echo -e "This will create a backup in\e[1;33m $BACKUP_PATH \e[0mfor these files and directories\e[1;33m ${selected_directories_string% } \e[0m" read -p "Press ENTER to continue..." header_info + echo "Working..." tar -czf "$BACKUP_PATH$BACKUP_FILE-$(date +%Y_%m_%d).tar.gz" --absolute-names ${selected_directories_string% } - + header_info echo -e "\nFinished" + echo -e "\e[1;33m \nA backup is rendered ineffective when it remains stored on the host.\n \e[0m" } if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Host Backup" --yesno "This will create backups for particular files and directories located within a designated directory. Proceed?" 10 88); then start fi -echo -e "\e[1;33m \nA backup is rendered ineffective when it remains stored on the host.\n \e[0m" From 4535f31d3db8493d65ad71dba033d747b552a9d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 17:26:14 -0400 Subject: [PATCH 2000/3335] Update host-backup.sh tweak --- misc/host-backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index 78712ae7..03140862 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -18,7 +18,7 @@ EOF header_info start() { - BACKUP_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to root\ne.g. /mnt/backups/" 9 68 --title "Directory to backup to:" 3>&1 1>&2 2>&3) + BACKUP_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /root/\ne.g. /mnt/backups/" 11 68 --title "Directory to backup to:" 3>&1 1>&2 2>&3) if [ -z "$BACKUP_PATH" ]; then BACKUP_PATH="/root/" @@ -26,7 +26,7 @@ start() { BACKUP_PATH="$BACKUP_PATH" fi - DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to etc\ne.g. root, var/lib/pve-cluster etc." 9 68 --title "Directory to work in (No leading or trailing slashes):" 3>&1 1>&2 2>&3) + DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to etc\ne.g. root, var/lib/pve-cluster etc." 11 68 --title "Directory to work in (No leading or trailing slashes):" 3>&1 1>&2 2>&3) if [ -z "$DIR" ]; then DIR="etc" From 64b395868552fbcc19b8f400406631f2509b8219 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 19:02:27 -0400 Subject: [PATCH 2001/3335] Update host-backup.sh For consistency, it's necessary to include slashes both before and after the backup path and directory path when entering them. --- misc/host-backup.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index 03140862..2cac3bb4 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -26,16 +26,16 @@ start() { BACKUP_PATH="$BACKUP_PATH" fi - DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to etc\ne.g. root, var/lib/pve-cluster etc." 11 68 --title "Directory to work in (No leading or trailing slashes):" 3>&1 1>&2 2>&3) + DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /etc/\ne.g. /root/, /var/lib/pve-cluster/ etc." 11 68 --title "Directory to work in:" 3>&1 1>&2 2>&3) if [ -z "$DIR" ]; then - DIR="etc" + DIR="/etc/" else DIR="$DIR" fi DIR_DASH=$(echo "$DIR" | tr '/' '-') - BACKUP_FILE="$(hostname)-${DIR_DASH}-backup" + BACKUP_FILE="$(hostname)${DIR_DASH}backup" selected_directories=() while read -r dir; do @@ -45,7 +45,7 @@ start() { MSG_MAX_LENGTH=$((${#DIRNAME} + $OFFSET)) fi CTID_MENU+=("$DIRNAME" "$dir " "OFF") - done < <(ls -d /${DIR}/*) + done < <(ls -d ${DIR}*) while [ -z "${HOST_BACKUP:+x}" ]; do HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Host Backup" --title "Working in the ${DIR} directory " --checklist \ @@ -54,17 +54,17 @@ start() { "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit for selected_dir in ${HOST_BACKUP//\"/}; do - selected_directories+=("/${DIR}/$selected_dir") + selected_directories+=("${DIR}${selected_dir}") done done selected_directories_string=$(printf "%s " "${selected_directories[@]}") header_info - echo -e "This will create a backup in\e[1;33m $BACKUP_PATH \e[0mfor these files and directories\e[1;33m ${selected_directories_string% } \e[0m" + echo -e "This will create a backup in\e[1;33m ${BACKUP_PATH} \e[0mfor these files and directories\e[1;33m ${selected_directories_string% } \e[0m" read -p "Press ENTER to continue..." header_info echo "Working..." - tar -czf "$BACKUP_PATH$BACKUP_FILE-$(date +%Y_%m_%d).tar.gz" --absolute-names ${selected_directories_string% } + tar -czf "${BACKUP_PATH}${BACKUP_FILE}-$(date +%Y_%m_%d).tar.gz" --absolute-names ${selected_directories_string% } header_info echo -e "\nFinished" echo -e "\e[1;33m \nA backup is rendered ineffective when it remains stored on the host.\n \e[0m" From e098af8ed9dda752d8d5fcb582b0df8b586ed173 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Sep 2023 20:50:26 -0400 Subject: [PATCH 2002/3335] Update host-backup.sh - code refactoring - add comments - loop the main script execution until "No" --- misc/host-backup.sh | 68 ++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/misc/host-backup.sh b/misc/host-backup.sh index 2cac3bb4..f2c231d8 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -15,61 +15,65 @@ function header_info { /_/ EOF } -header_info -start() { - BACKUP_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /root/\ne.g. /mnt/backups/" 11 68 --title "Directory to backup to:" 3>&1 1>&2 2>&3) +# Function to perform backup +function perform_backup { + local BACKUP_PATH + local DIR + local DIR_DASH + local BACKUP_FILE + local selected_directories=() - if [ -z "$BACKUP_PATH" ]; then - BACKUP_PATH="/root/" - else - BACKUP_PATH="$BACKUP_PATH" - fi + # Get backup path from user + BACKUP_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /root/\ne.g. /mnt/backups/" 11 68 --title "Directory to backup to:" 3>&1 1>&2 2>&3) || return - DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /etc/\ne.g. /root/, /var/lib/pve-cluster/ etc." 11 68 --title "Directory to work in:" 3>&1 1>&2 2>&3) + # Default to /root/ if no input + BACKUP_PATH="${BACKUP_PATH:-/root/}" - if [ -z "$DIR" ]; then - DIR="/etc/" - else - DIR="$DIR" - fi + # Get directory to work in from user + DIR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nDefaults to /etc/\ne.g. /root/, /var/lib/pve-cluster/ etc." 11 68 --title "Directory to work in:" 3>&1 1>&2 2>&3) || return + + # Default to /etc/ if no input + DIR="${DIR:-/etc/}" DIR_DASH=$(echo "$DIR" | tr '/' '-') BACKUP_FILE="$(hostname)${DIR_DASH}backup" - selected_directories=() + # Build a list of directories for backup + local CTID_MENU=() while read -r dir; do - DIRNAME=$(basename "$dir") - OFFSET=2 - if [[ $((${#DIRNAME} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#DIRNAME} + $OFFSET)) - fi - CTID_MENU+=("$DIRNAME" "$dir " "OFF") - done < <(ls -d ${DIR}*) + CTID_MENU+=("$(basename "$dir")" "$dir " "OFF") + done < <(ls -d "${DIR}"*) + # Allow the user to select directories + local HOST_BACKUP while [ -z "${HOST_BACKUP:+x}" ]; do HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Host Backup" --title "Working in the ${DIR} directory " --checklist \ - "\nSelect what files/directories to backup:\n" \ - 16 $(($MSG_MAX_LENGTH + 58)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit + "\nSelect what files/directories to backup:\n" 16 $(((${#DIRNAME} + 2) + 88)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || return for selected_dir in ${HOST_BACKUP//\"/}; do - selected_directories+=("${DIR}${selected_dir}") + selected_directories+=("${DIR}$selected_dir") done done - selected_directories_string=$(printf "%s " "${selected_directories[@]}") + # Perform the backup header_info - echo -e "This will create a backup in\e[1;33m ${BACKUP_PATH} \e[0mfor these files and directories\e[1;33m ${selected_directories_string% } \e[0m" + echo -e "This will create a backup in\e[1;33m $BACKUP_PATH \e[0mfor these files and directories\e[1;33m ${selected_directories[*]} \e[0m" read -p "Press ENTER to continue..." header_info echo "Working..." - tar -czf "${BACKUP_PATH}${BACKUP_FILE}-$(date +%Y_%m_%d).tar.gz" --absolute-names ${selected_directories_string% } + tar -czf "$BACKUP_PATH$BACKUP_FILE-$(date +%Y_%m_%d).tar.gz" --absolute-names "${selected_directories[@]}" header_info echo -e "\nFinished" echo -e "\e[1;33m \nA backup is rendered ineffective when it remains stored on the host.\n \e[0m" + sleep 2 } -if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Host Backup" --yesno "This will create backups for particular files and directories located within a designated directory. Proceed?" 10 88); then - start -fi +# Main script execution loop +while true; do + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Host Backup" --yesno "This will create backups for particular files and directories located within a designated directory. Proceed?" 10 88); then + perform_backup + else + break + fi +done From 761f05ca65df642751f4082eb75e25d376b219e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Sep 2023 09:43:31 -0400 Subject: [PATCH 2003/3335] Create turnkey-gameserver.sh --- turnkey/turnkey-gameserver.sh | 200 ++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 turnkey/turnkey-gameserver.sh diff --git a/turnkey/turnkey-gameserver.sh b/turnkey/turnkey-gameserver.sh new file mode 100644 index 00000000..9b603ce6 --- /dev/null +++ b/turnkey/turnkey-gameserver.sh @@ -0,0 +1,200 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +# Setup script environment +NAME="gameserver" +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" +PCT_DISK_SIZE="8" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${NAME} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,hwaddr=AE:1A:60:07:B7:59,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) +function header_info { +clear +cat <<"EOF" + _____ ____ + / ___/__ ___ _ ___ / __/__ _____ _____ ____ +/ (_ / _ `/ ' \/ -_) _\ \/ -_) __/ |/ / -_) __/ +\___/\_,_/_/_/_/\__/ /___/\__/_/ |___/\__/_/ + +EOF +} +header_info +read -p "Press ENTER to continue..." +header_info +set -eEuo pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR + +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} + +# Stop Proxmox VE Monitor-All if running +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi + +# Set the CONTENT and CONTENT_LABEL variables +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) CONTENT='rootdir'; CONTENT_LABEL='Container';; + template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; + *) false || die "Invalid storage class.";; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=("$TAG" "$ITEM" "OFF") + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then + printf ${MENU[0]} + else + local STORAGE + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Save password +echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory + +# Start container +msg "Starting LXC Container..." +pct start "$CTID" +sleep 5 + +# Get container IP +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +# Start Proxmox VE Monitor-All if available +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi + +# Success message +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo +info "Proceed to the LXC console to complete the setup." +echo +info "login: root" +info "password: $PASS" +echo From 4bbbcd2fea9e73951408d78955fd4e92f7d3d1f0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Sep 2023 09:44:50 -0400 Subject: [PATCH 2004/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7c9ac98..6e7a746e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-10 + +### Changed + +- **TurnKey Game Server LXC** + - NEW Script + ## 2023-09-09 ### Changed From c64c8d5adfb4b3d5bcf29ac3dd0cb96ebcc0f19b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Sep 2023 15:57:03 -0400 Subject: [PATCH 2005/3335] Update turnkey-gameserver.sh remove test MAC --- turnkey/turnkey-gameserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turnkey/turnkey-gameserver.sh b/turnkey/turnkey-gameserver.sh index 9b603ce6..e810688a 100644 --- a/turnkey/turnkey-gameserver.sh +++ b/turnkey/turnkey-gameserver.sh @@ -18,7 +18,7 @@ PCT_OPTIONS=" -cores 2 -memory 2048 -password $PASS - -net0 name=eth0,bridge=vmbr0,hwaddr=AE:1A:60:07:B7:59,ip=dhcp + -net0 name=eth0,bridge=vmbr0,ip=dhcp -unprivileged 1 " DEFAULT_PCT_OPTIONS=( From 3b1560fa63a85ba121995f0bbfe98fe455d2d144 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Sep 2023 16:07:40 -0400 Subject: [PATCH 2006/3335] An alternative method for acquiring the IP address in the TurnKey scripts. --- turnkey/turnkey-core.sh | 2 +- turnkey/turnkey-fileserver.sh | 2 +- turnkey/turnkey-gameserver.sh | 2 +- turnkey/turnkey-gitea.sh | 2 +- turnkey/turnkey-gitlab.sh | 2 +- turnkey/turnkey-mediaserver.sh | 2 +- turnkey/turnkey-nextcloud.sh | 2 +- turnkey/turnkey-observium.sh | 2 +- turnkey/turnkey-openvpn.sh | 2 +- turnkey/turnkey-owncloud.sh | 2 +- turnkey/turnkey-torrentserver.sh | 2 +- turnkey/turnkey-wordpress.sh | 2 +- turnkey/turnkey-zoneminder.sh | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index f780971e..49ff3b73 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 01915039..379e8785 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-gameserver.sh b/turnkey/turnkey-gameserver.sh index e810688a..9bf18305 100644 --- a/turnkey/turnkey-gameserver.sh +++ b/turnkey/turnkey-gameserver.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 4f122c0d..2573f471 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index 0a59fad6..b5ec6f5f 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-mediaserver.sh b/turnkey/turnkey-mediaserver.sh index a4a6a538..f43e54a1 100644 --- a/turnkey/turnkey-mediaserver.sh +++ b/turnkey/turnkey-mediaserver.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index 02383f51..2147c3c2 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index b065d90e..d4e5e5de 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-openvpn.sh b/turnkey/turnkey-openvpn.sh index 62483753..4727d459 100644 --- a/turnkey/turnkey-openvpn.sh +++ b/turnkey/turnkey-openvpn.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index c726005a..0ae77f2d 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index b6638157..6d15b34c 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 56400e73..3ae34dea 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else diff --git a/turnkey/turnkey-zoneminder.sh b/turnkey/turnkey-zoneminder.sh index daf137b7..be3197c3 100644 --- a/turnkey/turnkey-zoneminder.sh +++ b/turnkey/turnkey-zoneminder.sh @@ -168,7 +168,7 @@ max_attempts=5 attempt=1 IP="" while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}') + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') if [[ -n $IP ]]; then break else From c10678e251185c59d073f240474afaa7161c03a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Sep 2023 17:05:03 -0400 Subject: [PATCH 2007/3335] Update TurnKey scripts Disable the 'exit on error' behavior while checking for an IP. --- turnkey/turnkey-core.sh | 2 ++ turnkey/turnkey-fileserver.sh | 2 ++ turnkey/turnkey-gameserver.sh | 2 ++ turnkey/turnkey-gitea.sh | 2 ++ turnkey/turnkey-gitlab.sh | 2 ++ turnkey/turnkey-mediaserver.sh | 2 ++ turnkey/turnkey-nextcloud.sh | 2 ++ turnkey/turnkey-observium.sh | 2 ++ turnkey/turnkey-openvpn.sh | 2 ++ turnkey/turnkey-owncloud.sh | 2 ++ turnkey/turnkey-torrentserver.sh | 2 ++ turnkey/turnkey-wordpress.sh | 2 ++ turnkey/turnkey-zoneminder.sh | 2 ++ 13 files changed, 26 insertions(+) diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh index 49ff3b73..7a0f8733 100644 --- a/turnkey/turnkey-core.sh +++ b/turnkey/turnkey-core.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh index 379e8785..4826f253 100644 --- a/turnkey/turnkey-fileserver.sh +++ b/turnkey/turnkey-fileserver.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-gameserver.sh b/turnkey/turnkey-gameserver.sh index 9bf18305..bc19fd26 100644 --- a/turnkey/turnkey-gameserver.sh +++ b/turnkey/turnkey-gameserver.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh index 2573f471..3943cde5 100644 --- a/turnkey/turnkey-gitea.sh +++ b/turnkey/turnkey-gitea.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh index b5ec6f5f..4059f424 100644 --- a/turnkey/turnkey-gitlab.sh +++ b/turnkey/turnkey-gitlab.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-mediaserver.sh b/turnkey/turnkey-mediaserver.sh index f43e54a1..edd1b6f6 100644 --- a/turnkey/turnkey-mediaserver.sh +++ b/turnkey/turnkey-mediaserver.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh index 2147c3c2..b13cdb5e 100644 --- a/turnkey/turnkey-nextcloud.sh +++ b/turnkey/turnkey-nextcloud.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh index d4e5e5de..93f444b7 100644 --- a/turnkey/turnkey-observium.sh +++ b/turnkey/turnkey-observium.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-openvpn.sh b/turnkey/turnkey-openvpn.sh index 4727d459..79f5b407 100644 --- a/turnkey/turnkey-openvpn.sh +++ b/turnkey/turnkey-openvpn.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh index 0ae77f2d..a5f16ff0 100644 --- a/turnkey/turnkey-owncloud.sh +++ b/turnkey/turnkey-owncloud.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh index 6d15b34c..795d6c6f 100644 --- a/turnkey/turnkey-torrentserver.sh +++ b/turnkey/turnkey-torrentserver.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh index 3ae34dea..9c7aedc8 100644 --- a/turnkey/turnkey-wordpress.sh +++ b/turnkey/turnkey-wordpress.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service diff --git a/turnkey/turnkey-zoneminder.sh b/turnkey/turnkey-zoneminder.sh index be3197c3..41321872 100644 --- a/turnkey/turnkey-zoneminder.sh +++ b/turnkey/turnkey-zoneminder.sh @@ -164,6 +164,7 @@ pct start "$CTID" sleep 5 # Get container IP +set +e max_attempts=5 attempt=1 IP="" @@ -183,6 +184,7 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi +set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service From 67edaf0193ad877a23f212738cf7521637859a62 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 05:47:03 -0400 Subject: [PATCH 2008/3335] Update scrypted-install.sh remove `sudo` as the user is already `root` --- install/scrypted-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 348f0368..e51d3a65 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -108,7 +108,7 @@ msg_ok "Coral Edge TPU Support Added" fi msg_info "Installing Scrypted" -$STD sudo -u root npx -y scrypted@latest install-server +$STD npx -y scrypted@latest install-server msg_ok "Installed Scrypted" msg_info "Creating Service" From 3da94bb95c8eb61262ee563effb9c2dfebae7cda Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 13:18:06 -0400 Subject: [PATCH 2009/3335] Update paperless-ngx-install.sh use Redis and PostgreSQL --- install/paperless-ngx-install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 50f749f5..c7efc8ae 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -93,10 +93,11 @@ msg_info "Installing Natural Language Toolkit (Patience)" $STD python3 -m nltk.downloader -d /usr/share/nltk_data all msg_ok "Installed Natural Language Toolkit" -msg_info "Setting up database" +msg_info "Setting up PostgreSQL database" +DB_NAME=paperlessdb DB_USER=paperless DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" -DB_NAME=paperlessdb +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" echo "Paperless-ngx Database User" >>~/paperless.creds @@ -106,13 +107,16 @@ echo $DB_PASS >>~/paperless.creds echo "Paperless-ngx Database Name" >>~/paperless.creds echo $DB_NAME >>~/paperless.creds mkdir -p {consume,media} -sed -i -e 's|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=paperlessdb|' /opt/paperless/paperless.conf +sed -i -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' /opt/paperless/paperless.conf +sed -i -e 's|#PAPERLESS_DBHOST=localhost|PAPERLESS_DBHOST=localhost|' /opt/paperless/paperless.conf +sed -i -e 's|#PAPERLESS_DBPORT=5432|PAPERLESS_DBPORT=5432|' /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=$DB_NAME|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_DBUSER=paperless|PAPERLESS_DBUSER=$DB_USER|" /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf -SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf cd /opt/paperless/src $STD python3 manage.py migrate -msg_ok "Set up database" +msg_ok "Set up PostgreSQL database" msg_info "Setting up admin Paperless-ngx User & Password" ## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations From 85d523dbdf66d70ac87271cfb4242a9024016fce Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 13:43:34 -0400 Subject: [PATCH 2010/3335] Update paperless-ngx-install.sh add option to install Adminer --- install/paperless-ngx-install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index c7efc8ae..cd2331ce 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -118,6 +118,15 @@ cd /opt/paperless/src $STD python3 manage.py migrate msg_ok "Set up PostgreSQL database" +read -r -p "Would you like to add Adminer? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Adminer" + $STD apt install -y adminer + $STD a2enconf adminer + systemctl reload apache2 + msg_ok "Installed Adminer" +fi + msg_info "Setting up admin Paperless-ngx User & Password" ## From https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations cat < Date: Mon, 11 Sep 2023 14:00:11 -0400 Subject: [PATCH 2011/3335] Update paperless-ngx-install.sh update `paperless.creds` --- install/paperless-ngx-install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index cd2331ce..065594f9 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -124,6 +124,19 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then $STD apt install -y adminer $STD a2enconf adminer systemctl reload apache2 + echo "" >>~/paperless.creds + echo "Adminer Interface" >>~/paperless.creds + echo $IP/adminer/ >>~/paperless.creds + echo "Adminer System" >>~/paperless.creds + echo PostgreSQL >>~/paperless.creds + echo "Adminer Server" >>~/paperless.creds + echo localhost:5432 >>~/paperless.creds + echo "Adminer Username" >>~/paperless.creds + echo $DB_USER >>~/paperless.creds + echo "Adminer Password" >>~/paperless.creds + echo $DB_PASS >>~/paperless.creds + echo "Adminer Database" >>~/paperless.creds + echo $DB_NAME >>~/paperless.creds msg_ok "Installed Adminer" fi From 95a762c38f322cfd1c1ef4778c08ced4670b24a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 14:14:21 -0400 Subject: [PATCH 2012/3335] Update paperless-ngx-install.sh fix unbound variable --- install/paperless-ngx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 065594f9..c617ed68 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -124,6 +124,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then $STD apt install -y adminer $STD a2enconf adminer systemctl reload apache2 + IP=$(hostname -I) echo "" >>~/paperless.creds echo "Adminer Interface" >>~/paperless.creds echo $IP/adminer/ >>~/paperless.creds From 29c764031aaf01b15a3a4bf9a704749c8dc0b21d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 14:26:36 -0400 Subject: [PATCH 2013/3335] Update paperless-ngx-install.sh tweak --- install/paperless-ngx-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index c617ed68..27709e35 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -124,7 +124,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then $STD apt install -y adminer $STD a2enconf adminer systemctl reload apache2 - IP=$(hostname -I) + IP=$(hostname -I | awk '{print $1}') echo "" >>~/paperless.creds echo "Adminer Interface" >>~/paperless.creds echo $IP/adminer/ >>~/paperless.creds From 435e19d21ed16e8732165872f4b0d7a5611949c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 14:40:12 -0400 Subject: [PATCH 2014/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e7a746e..4aa13c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-11 + +### Changed + +- **Paperless-ngx LXC** + - Modify the script to incorporate Redis and PostgreSQL, while also introducing an option to include Adminer during installation. + ## 2023-09-10 ### Changed From 3b0168b8d471d45ec770c74002507b3906e15a8f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 14:43:56 -0400 Subject: [PATCH 2015/3335] Update paperless-ngx.sh increase storage --- ct/paperless-ngx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 31277348..ff4db22b 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -20,7 +20,7 @@ EOF header_info echo -e "Loading..." APP="Paperless-ngx" -var_disk="8" +var_disk="10" var_cpu="2" var_ram="2048" var_os="debian" From 7306991688f9444bed6cbf729345888f33be442c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 15:22:40 -0400 Subject: [PATCH 2016/3335] Update paperless-ngx-install.sh make `/paperless.creds` easier to read --- install/paperless-ngx-install.sh | 35 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 27709e35..49a9bff2 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -100,12 +100,10 @@ DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" -echo "Paperless-ngx Database User" >>~/paperless.creds -echo $DB_USER >>~/paperless.creds -echo "Paperless-ngx Database Password" >>~/paperless.creds -echo $DB_PASS >>~/paperless.creds -echo "Paperless-ngx Database Name" >>~/paperless.creds -echo $DB_NAME >>~/paperless.creds +echo "" >>~/paperless.creds +echo -e "Paperless-ngx Database User: \e[32m$DB_USER\e[0m" >>~/paperless.creds +echo -e "Paperless-ngx Database Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds +echo -e "Paperless-ngx Database Name: \e[32m$DB_NAME\e[0m" >>~/paperless.creds mkdir -p {consume,media} sed -i -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' /opt/paperless/paperless.conf sed -i -e 's|#PAPERLESS_DBHOST=localhost|PAPERLESS_DBHOST=localhost|' /opt/paperless/paperless.conf @@ -126,18 +124,12 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then systemctl reload apache2 IP=$(hostname -I | awk '{print $1}') echo "" >>~/paperless.creds - echo "Adminer Interface" >>~/paperless.creds - echo $IP/adminer/ >>~/paperless.creds - echo "Adminer System" >>~/paperless.creds - echo PostgreSQL >>~/paperless.creds - echo "Adminer Server" >>~/paperless.creds - echo localhost:5432 >>~/paperless.creds - echo "Adminer Username" >>~/paperless.creds - echo $DB_USER >>~/paperless.creds - echo "Adminer Password" >>~/paperless.creds - echo $DB_PASS >>~/paperless.creds - echo "Adminer Database" >>~/paperless.creds - echo $DB_NAME >>~/paperless.creds + echo -e "Adminer Interface: \e[32m$IP/adminer/\e[0m" >>~/paperless.creds + echo -e "Adminer System: \e[32mPostgreSQL\e[0m" >>~/paperless.creds + echo -e "Adminer Server: \e[32mlocalhost:5432\e[0m" >>~/paperless.creds + echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/paperless.creds + echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds + echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/paperless.creds msg_ok "Installed Adminer" fi @@ -152,10 +144,9 @@ user.is_staff = True user.save() EOF echo "" >>~/paperless.creds -echo "Paperless-ngx WebUI User" >>~/paperless.creds -echo admin >>~/paperless.creds -echo "Paperless-ngx WebUI Password" >>~/paperless.creds -echo $DB_PASS >>~/paperless.creds +echo -e "Paperless-ngx WebUI User: \e[32madmin\e[0m" >>~/paperless.creds +echo -e "Paperless-ngx WebUI Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds +echo "" >>~/paperless.creds msg_ok "Set up admin Paperless-ngx User & Password" msg_info "Creating Services" From 9dab6d52bcf62cd71a5488b547b2b88be3115a7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 16:56:42 -0400 Subject: [PATCH 2017/3335] Update paperless-ngx-install.sh create directories named "consume," "data," "media," and "static," then configure the corresponding paths in the `paperless.conf` file. --- install/paperless-ngx-install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 49a9bff2..b52064bf 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -87,6 +87,12 @@ sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://gi $STD pip install --upgrade pip $STD pip install -r requirements.txt curl -s -o /opt/paperless/paperless.conf https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/paperless.conf.example +mkdir -p {consume,data,media,static} +sed -i -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_CONSUMPTION_DIR=../consume|PAPERLESS_CONSUMPTION_DIR=/opt/paperless/consume|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_DATA_DIR=../data|PAPERLESS_DATA_DIR=/opt/paperless/data|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_MEDIA_ROOT=../media|PAPERLESS_MEDIA_ROOT=/opt/paperless/media|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_STATICDIR=../static|PAPERLESS_STATICDIR=/opt/paperless/static|" /opt/paperless/paperless.conf msg_ok "Installed Paperless-ngx" msg_info "Installing Natural Language Toolkit (Patience)" @@ -104,8 +110,6 @@ echo "" >>~/paperless.creds echo -e "Paperless-ngx Database User: \e[32m$DB_USER\e[0m" >>~/paperless.creds echo -e "Paperless-ngx Database Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds echo -e "Paperless-ngx Database Name: \e[32m$DB_NAME\e[0m" >>~/paperless.creds -mkdir -p {consume,media} -sed -i -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' /opt/paperless/paperless.conf sed -i -e 's|#PAPERLESS_DBHOST=localhost|PAPERLESS_DBHOST=localhost|' /opt/paperless/paperless.conf sed -i -e 's|#PAPERLESS_DBPORT=5432|PAPERLESS_DBPORT=5432|' /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=$DB_NAME|" /opt/paperless/paperless.conf @@ -214,6 +218,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -rf /opt/paperless/docker $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 5b7eb21c6a472fa319643c54fadc1b22ffa7f7c7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Sep 2023 02:18:28 -0400 Subject: [PATCH 2018/3335] Update update-lxcs.sh code refactoring --- misc/update-lxcs.sh | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index dd826f46..d4b442f0 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ __ __ _ ________ / / / /___ ____/ /___ _/ /____ / / | |/ / ____/ / / / / __ \/ __ / __ `/ __/ _ \ / / | / / @@ -25,29 +25,18 @@ CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info -while true; do - read -p "This Will Update Selected LXC Containers. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear +echo "Loading..." +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update Selected LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) -while read -r line; do - TAG=$(echo "$line" | awk '{print $1}') - ITEM=$(echo "$line" | awk '{print substr($0,36)}') +while read -r TAG ITEM; do OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \ "\nSelect containers to skip from updates:\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + function update_container() { container=$1 header_info @@ -55,16 +44,16 @@ function update_container() { os=$(pct config "$container" | awk '/^ostype/ {print $2}') if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') - read -ra disk_info_array <<< "$disk_info" + read -ra disk_info_array <<<"$disk_info" echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]${CL}\n" else echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}[No disk info for ${os}]${CL}\n" fi case "$os" in - alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; - archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";; - fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; + alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; + archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; + fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; esac } header_info From 273dc38c8acc58a33f737ec31a49e9267b299bae Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Sep 2023 19:32:27 -0400 Subject: [PATCH 2019/3335] Create kernel-clean-test.sh --- misc/kernel-clean-test.sh | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 misc/kernel-clean-test.sh diff --git a/misc/kernel-clean-test.sh b/misc/kernel-clean-test.sh new file mode 100644 index 00000000..c440a9cf --- /dev/null +++ b/misc/kernel-clean-test.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ __ __ ________ + / //_/__ _________ ___ / / / ____/ /__ ____ _____ + / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ + / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / +/_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ + +EOF +} +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +current_kernel=$(uname -r) +available_kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | grep -v "$current_kernel" | sort -V) +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit + +if [ -z "$available_kernels" ]; then + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Other Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68 + msg_info "Exiting" + sleep 2 + msg_ok "Done" + exit +fi + +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(echo "$available_kernels") + +remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \ + 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the selected Kernels\n $remove_kernels\n Proceed?" 10 68 || exit + +msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" +/usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 +msg_ok "Successfully Removed Kernels" + +msg_info "Updating GRUB" +/usr/sbin/update-grub >/dev/null 2>&1 +msg_ok "Successfully Updated GRUB" +msg_info "Exiting" +sleep 2 +msg_ok "Done" From 7f5d708977bdde06e3c3bf89d364ccc7c2f4c27f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 04:20:38 -0400 Subject: [PATCH 2020/3335] Update nginxproxymanager-install.sh - add plugin for certbot to obtain certificates using a DNS TXT record for Porkbun domains - fixes https://github.com/tteck/Proxmox/issues/1790 --- install/nginxproxymanager-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 640227d9..6946848c 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -30,7 +30,7 @@ $STD apt-get -y install \ git msg_ok "Installed Dependencies" -msg_info "Updating Python" +msg_info "Installing Python Dependencies" $STD apt-get install -y \ python3 \ python3-dev \ @@ -38,10 +38,10 @@ $STD apt-get install -y \ python3-venv \ python3-cffi \ python3-certbot \ - python3-certbot-dns-cloudflare - + python3-certbot-dns-cloudflare \ + pip3 install certbot_dns_porkbun $STD python3 -m venv /opt/certbot/ -msg_ok "Updated Python" +msg_ok "Installed Python Dependencies" VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" From acdd9f8203f05a3e005f183b0b4b53ccab0ffe8e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 07:25:40 -0400 Subject: [PATCH 2021/3335] Update nginxproxymanager-install.sh remove `\` --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 6946848c..412fa4e1 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -38,7 +38,7 @@ $STD apt-get install -y \ python3-venv \ python3-cffi \ python3-certbot \ - python3-certbot-dns-cloudflare \ + python3-certbot-dns-cloudflare pip3 install certbot_dns_porkbun $STD python3 -m venv /opt/certbot/ msg_ok "Installed Python Dependencies" From fc49442ff871eebc72569bbf319df30a6d539b94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 07:27:42 -0400 Subject: [PATCH 2022/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 412fa4e1..04b8820e 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -39,7 +39,7 @@ $STD apt-get install -y \ python3-cffi \ python3-certbot \ python3-certbot-dns-cloudflare - pip3 install certbot_dns_porkbun +$STD pip3 install certbot_dns_porkbun $STD python3 -m venv /opt/certbot/ msg_ok "Installed Python Dependencies" From 4041a275c2785af48b59bc1715e19999be907117 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 08:09:25 -0400 Subject: [PATCH 2023/3335] Create pialert-install.sh --- install/pialert-install.sh | 97 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 install/pialert-install.sh diff --git a/install/pialert-install.sh b/install/pialert-install.sh new file mode 100644 index 00000000..a3181661 --- /dev/null +++ b/install/pialert-install.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get -y install \ + sudo \ + mc \ + curl \ + apt-utils \ + lighttpd \ + sqlite3 \ + mmdb-bin \ + arp-scan \ + dnsutils \ + net-tools \ + libwww-perl \ + nmap \ + zip \ + wakeonlan +msg_ok "Installed Dependencies" + +msg_info "Installing PHP Dependencies" +$STD apt-get -y install \ + php \ + php-cgi \ + php-fpm \ + php-curl \ + php-sqlite3 +$STD lighttpd-enable-mod fastcgi-php +service lighttpd force-reload +msg_ok "Installed PHP Dependencies" +#arp-scan -l + +msg_info "Installing Python Dependencies" +$STD apt-get -y install \ + python3-pip \ + python3-requests +$STD pip3 install mac-vendor-lookup +$STD pip3 install fritzconnection +$STD pip3 install cryptography +msg_ok "Installed Python Dependencies" + +msg_info "Installing Pi.Alert (Patience)" +curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 + +rm /var/www/html/index.html +mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old +ln -s /opt/pialert/install/index.html /var/www/html/index.html +ln -s /opt/pialert/front /var/www/html/pialert +chmod go+x /opt/pialert +chgrp -R www-data /opt/pialert/db +chmod -R 775 /opt/pialert/db +chmod -R 775 /opt/pialert/db/temp +chgrp www-data /opt/pialert/config +chmod -R 775 /opt/pialert/config +chgrp www-data /opt/pialert/config/pialert.conf +chmod -R 775 /opt/pialert/front/reports +chgrp -R www-data /opt/pialert/front/reports +chmod +x /opt/pialert/back/shoutrrr/x86/shoutrrr +touch "/opt/pialert/log/pialert.vendors.log" +touch "/opt/pialert/log/pialert.IP.log" +touch "/opt/pialert/log/pialert.1.log" +touch "/opt/pialert/log/pialert.cleanup.log" +touch "/opt/pialert/log/pialert.webservices.log" +ln -s "/opt/pialert/log/pialert.vendors.log" "/opt/pialert/front/php/server/pialert.vendors.log" +ln -s "/opt/pialert/log/pialert.IP.log" "/opt/pialert/front/php/server/pialert.IP.log" +ln -s "/opt/pialert/log/pialert.1.log" "/opt/pialert/front/php/server/pialert.1.log" +ln -s "/opt/pialert/log/pialert.cleanup.log" "/opt/pialert/front/php/server/pialert.cleanup.log" +ln -s "/opt/pialert/log/pialert.webservices.log" "/opt/pialert/front/php/server/pialert.webservices.log" +sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf +msg_ok "Installed Pi.Alert" + +msg_info "Start Pi.Alert Scan" +$STD python3 /opt/pialert/back/pialert.py update_vendors +$STD python3 /opt/pialert/back/pialert.py internet_IP +$STD python3 /opt/pialert/back/pialert.py 1 +msg_ok "Finished Pi.Alert Scan" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 4ad11e74f74b1a13e6ddb885873e9e5a2a993411 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 08:10:44 -0400 Subject: [PATCH 2024/3335] Create pialert.sh --- ct/pialert.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/pialert.sh diff --git a/ct/pialert.sh b/ct/pialert.sh new file mode 100644 index 00000000..39ddd9de --- /dev/null +++ b/ct/pialert.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _ ___ __ __ + / __ \(_) / | / /__ _____/ /_ + / /_/ / / / /| | / / _ \/ ___/ __/ + / ____/ / / ___ |/ / __/ / / /_ +/_/ /_(_)_/ |_/_/\___/_/ \__/ + +EOF +} +header_info +echo -e "Loading..." +APP="PiAlert" +var_disk="3" +var_cpu="1" +var_ram="512" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/pialert/${CL} \n" From e09013a8df10c3dd3efeb08cefa2dd0742386e7a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 08:28:57 -0400 Subject: [PATCH 2025/3335] Update pialert-install.sh tweak --- install/pialert-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index a3181661..32453b42 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -52,7 +52,7 @@ $STD pip3 install fritzconnection $STD pip3 install cryptography msg_ok "Installed Python Dependencies" -msg_info "Installing Pi.Alert (Patience)" +msg_info "Installing Pi.Alert" curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 rm /var/www/html/index.html @@ -82,7 +82,7 @@ ln -s "/opt/pialert/log/pialert.webservices.log" "/opt/pialert/front/php/server/ sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf msg_ok "Installed Pi.Alert" -msg_info "Start Pi.Alert Scan" +msg_info "Start Pi.Alert Scan (Patience)" $STD python3 /opt/pialert/back/pialert.py update_vendors $STD python3 /opt/pialert/back/pialert.py internet_IP $STD python3 /opt/pialert/back/pialert.py 1 From 644ca75dbdd3dddf30741712f84b826e4b7cf9e9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 08:50:10 -0400 Subject: [PATCH 2026/3335] Update kernel-clean.sh Code overhaul with a fresh start. --- misc/kernel-clean.sh | 144 +++++++++++-------------------------------- 1 file changed, 37 insertions(+), 107 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 81bc0e63..c440a9cf 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -6,8 +6,9 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { - cat <<"EOF" - __ __ __ ________ + clear + cat <<"EOF" + __ __ __ ________ / //_/__ _________ ___ / / / ____/ /__ ____ _____ / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / @@ -15,126 +16,55 @@ function header_info { EOF } -set -euo pipefail -shopt -s inherit_errexit nullglob YW=$(echo "\033[33m") -BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") CL=$(echo "\033[m") BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -PARTY="🎉" current_kernel=$(uname -r) -clear +available_kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | grep -v "$current_kernel" | sort -V) header_info -while true; do - read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo -e "${RD}Please answer y/n${CL}" ;; - esac -done -clear + function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -function check_root() { - if [[ $EUID -ne 0 ]]; then - echo -e "${CROSS}${RD}Error: This script must be ran as the root user.\n${CL}" - exit 1 - else - header_info - other_kernel - kernel_info - kernel_clean - fi -} +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit - VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" -function other_kernel() { - if [[ "${VERSION}" == "bullseye" ]]; then - if [[ "$current_kernel" == *"edge"* ]]; then - echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" - echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" - exit 1 - fi - if [[ "$current_kernel" == *"6.1"* || "$current_kernel" == *"6.2"* ]]; then - echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" - echo -e "\nThe script cannot be used when running opt-in kernels. \nProxmox VE's package management relies directly on the current default kernel, which is 5.15. \nTherefore, it is not possible to utilize this script. In this case, you should use autoremove instead. \n`apt-get autoremove`\n" - exit 1 - fi - fi -} - -function kernel_info() { - if [[ "$MODE" != "PBS" ]]; then - echo -e "${YW}PVE Version: ${BL}$(pveversion)\n${CL}" - fi - if [[ "$current_kernel" == *"pve"* ]]; then - echo -e "${YW}Current Kernel: ${BL}$current_kernel\n${CL}" - else - echo -e "\n${CROSS} ${RD}ERROR: No PVE Kernel Found\n${CL}" - exit 1 - fi -} - -function kernel_clean() { - kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | sort -V) - remove_kernels="" - for kernel in $kernels; do - if [ "$(echo $kernel | grep $current_kernel)" ]; then - break - else - echo -e "${BL}'$kernel' ${CL}${YW}has been added to the remove Kernel list\n${CL}" - remove_kernels+=" $kernel" - fi - done - msg_ok "Kernel Search Completed\n" - if [[ "$remove_kernels" != *"pve"* ]]; then - echo -e "${PARTY} ${GN}It appears there are no old Kernels on your system. \n${CL}" - msg_info "Exiting" - sleep 2 - msg_ok "Done" - else - read -p "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') selected Kernels listed above? [y/n]: " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" - /usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 - msg_ok "Successfully Removed Kernels" - msg_info "Updating GRUB" - /usr/sbin/update-grub >/dev/null 2>&1 - msg_ok "Successfully Updated GRUB" - msg_info "Exiting" - sleep 2 - msg_ok "Done" - else - msg_info "Exiting" - sleep 2 - msg_ok "Done" - fi - fi -} - -if ! command -v pveversion >/dev/null 2>&1; then - echo -e " Switching to PBS mode" - MODE="PBS" - sleep 2 -else - MODE="PVE" +if [ -z "$available_kernels" ]; then + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Other Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68 + msg_info "Exiting" + sleep 2 + msg_ok "Done" + exit fi -check_root +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(echo "$available_kernels") + +remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \ + 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the selected Kernels\n $remove_kernels\n Proceed?" 10 68 || exit + +msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" +/usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 +msg_ok "Successfully Removed Kernels" + +msg_info "Updating GRUB" +/usr/sbin/update-grub >/dev/null 2>&1 +msg_ok "Successfully Updated GRUB" +msg_info "Exiting" +sleep 2 +msg_ok "Done" From 4fdead6380aef15485d760df7a0be2a8ec3ff901 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 08:50:28 -0400 Subject: [PATCH 2027/3335] Delete misc/kernel-clean-test.sh --- misc/kernel-clean-test.sh | 70 --------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 misc/kernel-clean-test.sh diff --git a/misc/kernel-clean-test.sh b/misc/kernel-clean-test.sh deleted file mode 100644 index c440a9cf..00000000 --- a/misc/kernel-clean-test.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { - clear - cat <<"EOF" - __ __ __ ________ - / //_/__ _________ ___ / / / ____/ /__ ____ _____ - / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ - / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / -/_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ - -EOF -} -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -current_kernel=$(uname -r) -available_kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | grep -v "$current_kernel" | sort -V) -header_info - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit - -if [ -z "$available_kernels" ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Other Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68 - msg_info "Exiting" - sleep 2 - msg_ok "Done" - exit -fi - -while read -r TAG ITEM; do - OFFSET=2 - ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") -done < <(echo "$available_kernels") - -remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \ - 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit - -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the selected Kernels\n $remove_kernels\n Proceed?" 10 68 || exit - -msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" -/usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 -msg_ok "Successfully Removed Kernels" - -msg_info "Updating GRUB" -/usr/sbin/update-grub >/dev/null 2>&1 -msg_ok "Successfully Updated GRUB" -msg_info "Exiting" -sleep 2 -msg_ok "Done" From d8044f713d46092e78f73a9f9d649893f60b91f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 08:57:02 -0400 Subject: [PATCH 2028/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa13c47..8c7f9116 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ - 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-09-13 + +### Changed + +- **Pi.Alert LXC** + - NEW Script +- **Proxmox VE Kernel Clean** + - Code overhaul with a fresh start. + ## 2023-09-11 ### Changed From e35904fbcfada638e166663dd10312d045c35a20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 09:38:12 -0400 Subject: [PATCH 2029/3335] Update kernel-clean.sh tweak --- misc/kernel-clean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index c440a9cf..0dc53347 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -40,7 +40,7 @@ function msg_ok() { whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit if [ -z "$available_kernels" ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Other Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68 + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Old Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68 msg_info "Exiting" sleep 2 msg_ok "Done" From 955d4b8ce54e387ca247179129aad74677eabaa7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 10:59:59 -0400 Subject: [PATCH 2030/3335] Update kernel-clean.sh tweak --- misc/kernel-clean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 0dc53347..ace0f0a1 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -56,7 +56,7 @@ done < <(echo "$available_kernels") remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \ 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the selected Kernels\n $remove_kernels\n Proceed?" 10 68 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the previously selected Kernels?" 10 68 || exit msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" /usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 From c844311b548bf8d4ff0cc2ed3af56d61e8cc8224 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 11:15:30 -0400 Subject: [PATCH 2031/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c7f9116..07884985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ - **Pi.Alert LXC** - NEW Script - **Proxmox VE Kernel Clean** - - Code overhaul with a fresh start. + - Code overhaul with a fresh start. This script offers the flexibility to select specific kernels for removal, unlike the previous version, which was an all-or-nothing approach. ## 2023-09-11 From 14390c0e9ef19527528641062baed0009f574ff8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 11:35:21 -0400 Subject: [PATCH 2032/3335] Update clean-lxcs.sh code refactoring --- misc/clean-lxcs.sh | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 2614846b..a44e67cb 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -16,38 +16,23 @@ function header_info() { EOF } -set -e -YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info -while true; do - read -p "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear +echo "Loading..." +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) -while read -r line; do - TAG=$(echo "$line" | awk '{print $1}') - ITEM=$(echo "$line" | awk '{print substr($0,36)}') +while read -r TAG ITEM; do OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \ - "\nSelect containers to skip from cleaning:\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit - +excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \ + 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + function clean_container() { container=$1 header_info @@ -87,4 +72,4 @@ done wait header_info -echo -e "${GN} Finished, Containers Cleaned. ${CL} \n" +echo -e "${GN} Finished, Selected Containers Cleaned. ${CL} \n" From 975bce31ba10f7a4d7a42180732562f3f259f2ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 11:48:21 -0400 Subject: [PATCH 2033/3335] Update clean.sh code refactoring --- misc/clean.sh | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index 1d32009e..8e223784 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -6,14 +6,14 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info() { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ - / / / / _ \/ __ `/ __ \ / / | / / -/ /___/ / __/ /_/ / / / / / /___/ / /___ -\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ - + / / / / _ \/ __ `/ __ \ / / | / / +/ /___/ / __/ /_/ / / / / / /___/ / /___ +\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ + EOF } BL=$(echo "\033[36m") @@ -27,16 +27,10 @@ if [[ -z "$cache" ]]; then echo -e "It appears there are no cached files on your system. \n" sleep 2 else - echo -e "$cache \n" - echo -e "${GN}Cache in $name${CL}" - read -p "Would you like to remove the selected cache listed above? [y/N] " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Removing cache" - find /var/cache -type f -delete - echo "Successfully Removed cache" - sleep 2 - fi + echo "Removing Cache" + find /var/cache -type f -delete + echo "Successfully Removed Cache" + sleep 2 fi header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" @@ -45,16 +39,10 @@ if [[ -z "$logs" ]]; then echo -e "It appears there are no logs on your system. \n" sleep 2 else - echo -e "$logs \n" - echo -e "${GN}Logs in $name${CL}" - read -p "Would you like to remove the selected logs listed above? [y/N] " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo "Removing logs" - find /var/log -type f -delete - echo "Successfully Removed logs" - sleep 2 - fi + echo "Removing Logs" + find /var/log -type f -delete + echo "Successfully Removed Logs" + sleep 2 fi header_info echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n" From b651b404f67368ad6600029c9e318c81f1fa8ce6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Sep 2023 15:13:01 -0400 Subject: [PATCH 2034/3335] Update clean.sh tweak --- misc/clean.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/clean.sh b/misc/clean.sh index 8e223784..1e73f66d 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -27,7 +27,6 @@ if [[ -z "$cache" ]]; then echo -e "It appears there are no cached files on your system. \n" sleep 2 else - echo "Removing Cache" find /var/cache -type f -delete echo "Successfully Removed Cache" sleep 2 @@ -39,7 +38,6 @@ if [[ -z "$logs" ]]; then echo -e "It appears there are no logs on your system. \n" sleep 2 else - echo "Removing Logs" find /var/log -type f -delete echo "Successfully Removed Logs" sleep 2 From ff42ff1082443dc1f5d1768f25e55e89e4cb9c5e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 07:41:16 -0400 Subject: [PATCH 2035/3335] Update shinobi-install.sh fixes https://github.com/tteck/Proxmox/issues/1792 --- install/shinobi-install.sh | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 94fe7bc2..dd81b791 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -13,15 +13,6 @@ setting_up_container network_check update_os -ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1) -if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then - apt install sudo wget -y - sudo apt install -y software-properties-common - sudo add-apt-repository universe -y - apt update -y - apt update --fix-missing -y -fi - msg_info "Installing Dependencies" $STD apt-get install -y curl sudo git mc $STD apt-get install -y make zip net-tools @@ -57,21 +48,20 @@ echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$git msg_ok "Cloned Shinobi" msg_info "Installing Database" -sqlpass="" +sqluser="root" +sqlpass="root" echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections $STD apt-get install -y mariadb-server service mysql start -sqluser="root" -mysql -e "source sql/user.sql" || true -mysql -e "source sql/framework.sql" || true +mysql -u "$sqluser" -p"$sqlpass" -e "source sql/user.sql" || true msg_ok "Installed Database" + +msg_info "Installing Shinobi" cp conf.sample.json conf.json cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json cp super.sample.json super.json - -msg_info "Installing Shinobi" $STD npm i npm -g $STD npm install --unsafe-perm $STD npm install pm2@latest -g From 3db776e749356d18e30d8c977da4786419e694a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 07:42:39 -0400 Subject: [PATCH 2036/3335] Update shinobi.sh default Ubuntu 22.04 --- ct/shinobi.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 58882700..c5ce6ae3 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -24,7 +24,6 @@ var_cpu="2" var_ram="2048" var_os="ubuntu" var_version="22.04" -var_version="20.04" variables color catch_errors From 6df6d1c2fb27c5480e64e7aba8908b4cae12eafe Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 10:21:18 -0400 Subject: [PATCH 2037/3335] Update postgresql-install.sh postgresql-16 --- install/postgresql-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 309b2d50..f85ca562 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -30,7 +30,7 @@ msg_info "Installing PostgreSQL" $STD apt-get update $STD apt-get install -y postgresql -cat </etc/postgresql/15/main/pg_hba.conf +cat </etc/postgresql/16/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File local all postgres peer # TYPE DATABASE USER ADDRESS METHOD @@ -49,7 +49,7 @@ host replication all 127.0.0.1/32 scram-sha-256 host replication all ::1/128 scram-sha-256 EOF -cat </etc/postgresql/15/main/postgresql.conf +cat </etc/postgresql/16/main/postgresql.conf # ----------------------------- # PostgreSQL configuration file # ----------------------------- @@ -58,10 +58,10 @@ cat </etc/postgresql/15/main/postgresql.conf # FILE LOCATIONS #------------------------------------------------------------------------------ -data_directory = '/var/lib/postgresql/15/main' -hba_file = '/etc/postgresql/15/main/pg_hba.conf' -ident_file = '/etc/postgresql/15/main/pg_ident.conf' -external_pid_file = '/var/run/postgresql/15-main.pid' +data_directory = '/var/lib/postgresql/16/main' +hba_file = '/etc/postgresql/16/main/pg_hba.conf' +ident_file = '/etc/postgresql/16/main/pg_ident.conf' +external_pid_file = '/var/run/postgresql/16-main.pid' #------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION @@ -107,7 +107,7 @@ log_timezone = 'Etc/UTC' # PROCESS TITLE #------------------------------------------------------------------------------ -cluster_name = '15/main' +cluster_name = '16/main' #------------------------------------------------------------------------------ # CLIENT CONNECTION DEFAULTS From 64bdc91b677b1e7f36657d4dee5898b0a4a76de0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 12:16:26 -0400 Subject: [PATCH 2038/3335] Update microcode.sh code refactoring --- misc/microcode.sh | 121 +++++++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 6b3bb5fc..7900bacd 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -5,8 +5,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ ____ __ / __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__ / /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ @@ -25,90 +25,99 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} +msg_info() { echo -ne " ${HOLD} ${YW}$1..."; } +msg_ok() { echo -e "${BFR} ${CM} ${GN}$1${CL}"; } +msg_error() { echo -e "${BFR} ${CROSS} ${RD}$1${CL}"; } header_info -current_microcode=$(dmesg | grep -o 'microcode updated early to revision [^,]*, date = [0-9\-]*') -while true; do - if [ -z "${current_microcode}" ]; then - msg_error "Microcode update information not found." - else - msg_ok "Current ${current_microcode}" - fi - read -p "Install the latest Processor Microcode (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -header_info +current_microcode=$(journalctl -k | grep -E "microcode: microcode" | awk -F 'microcode: microcode updated early to revision |, date = ' '{print $2 ", date = " $3}') +[ -z "$current_microcode" ] && current_microcode="Not found." intel() { if ! dpkg -s iucode-tool >/dev/null 2>&1; then - msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" + msg_info "Installing iucode-tool (Intel microcode updater)" apt-get install -y iucode-tool &>/dev/null msg_ok "Installed iucode-tool" else msg_ok "Intel iucode-tool is already installed" + sleep 1 fi - - msg_info "Downloading the latest Intel Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230808.1_amd64.deb - msg_ok "Downloaded the latest Intel Processor Microcode Package" - msg_info "Installing the Intel Processor Microcode (Patience)" - dpkg -i intel-microcode_3.20230808.1_amd64.deb &>/dev/null - msg_ok "Installed the Intel Processor Microcode" + intel_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode//" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//') + [ -z "$intel_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } + + CTID_MENU=() + MSG_MAX_LENGTH=0 + + while read -r TAG ITEM; do + OFFSET=2 + (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + CTID_MENU+=("$TAG" "$ITEM " "OFF") + done < <(echo "$intel_microcode") + + microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + + [ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } + + msg_info "Downloading the Intel Processor Microcode Package $microcode" + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/$microcode + msg_ok "Downloaded the Intel Processor Microcode Package $microcode" + + msg_info "Installing $microcode (Patience)" + dpkg -i $microcode &>/dev/null + msg_ok "Installed $microcode" msg_info "Cleaning up" - rm intel-microcode_3.20230808.1_amd64.deb + rm $microcode msg_ok "Cleaned" - - echo -e "\n To apply the changes, the system will need to be rebooted.\n" + echo -e "\nIn order to apply the changes, a system reboot will be necessary.\n" } amd() { - msg_info "Downloading the latest AMD Processor Microcode Package for Linux" - wget -q http://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230808.1.1_amd64.deb - msg_ok "Downloaded the latest AMD Processor Microcode Package" + amd_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode///" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//') - msg_info "Installing the AMD Processor Microcode (Patience)" - dpkg -i amd64-microcode_3.20230808.1.1_amd64.deb &>/dev/null - msg_ok "Installed the AMD Processor Microcode" + [ -z "$amd_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } + + CTID_MENU=() + MSG_MAX_LENGTH=0 + + while read -r TAG ITEM; do + OFFSET=2 + (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + CTID_MENU+=("$TAG" "$ITEM " "OFF") + done < <(echo "$amd_microcode") + + microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + + [ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } + + msg_info "Downloading the AMD Processor Microcode Package $microcode" + wget -q https://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/$microcode + msg_ok "Downloaded the AMD Processor Microcode Package $microcode" + + msg_info "Installing $microcode (Patience)" + dpkg -i $microcode &>/dev/null + msg_ok "Installed $microcode" msg_info "Cleaning up" - rm amd64-microcode_3.20230808.1.1_amd64.deb + rm $microcode msg_ok "Cleaned" - - echo -e "\n To apply the changes, the system will need to be rebooted.\n" + echo -e "\nIn order to apply the changes, a system reboot will be necessary.\n" } -if ! command -v pveversion >/dev/null 2>&1; then - header_info - msg_error "\n No PVE Detected!\n" - exit -fi +if ! command -v pveversion >/dev/null 2>&1; then header_info; msg_error "No PVE Detected!"; exit; fi + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Processor Microcode" --yesno "This will check for CPU microcode packages with the option to install. Proceed?" 10 58 || exit + msg_info "Checking CPU Vendor" cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1) if [ "$cpu" == "GenuineIntel" ]; then msg_ok "${cpu} was detected" + sleep 1 intel elif [ "$cpu" == "AuthenticAMD" ]; then msg_ok "${cpu} was detected" + sleep 1 amd else msg_error "${cpu} is not supported" From 43d77409606c6ba9bda4c1aba79735207c1ffdf7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 12:20:58 -0400 Subject: [PATCH 2039/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07884985..f6359acb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ ### Changed +- **Proxmox VE Processor Microcode** + - Allow users to select available microcode packages. + +## 2023-09-13 + +### Changed + - **Pi.Alert LXC** - NEW Script - **Proxmox VE Kernel Clean** From 4b5069f2bc99d1b53f89ab7453f38f1b074ace3a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 12:21:17 -0400 Subject: [PATCH 2040/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6359acb..15de103c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - 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-09-13 +## 2023-09-14 ### Changed From d48b458969891c89e3515026337aa6aa5579c256 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 22:24:08 -0400 Subject: [PATCH 2041/3335] Create turnkey.sh This will allow for the creation of one of the many TurnKey LXC Containers. --- turnkey/turnkey.sh | 236 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 turnkey/turnkey.sh diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh new file mode 100644 index 00000000..fff4a4c4 --- /dev/null +++ b/turnkey/turnkey.sh @@ -0,0 +1,236 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ______ __ __ __ _ _______ +/_ __/_ _________ / //_/__ __ __ / / | |/_/ ___/ + / / / // / __/ _ \/ ,< / -_) // / / /___> &2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} + +# Stop Proxmox VE Monitor-All if running +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +header_info +whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno "This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68 || exit +CTID_MENU=() +MSG_MAX_LENGTH=0 +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <( + cat <&1 1>&2 2>&3 | tr -d '"') || exit +[ -z "$turnkey" ] && { + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" --msgbox "It appears that no TurnKey LXC container was selected" 10 68 + msg "Done" + exit +} + +# Setup script environment +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +TEMPLATE_SEARCH="debian-11-turnkey-${turnkey}" +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname turnkey-${turnkey} + -tags proxmox-helper-scripts + -onboot 1 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) + +# Set the CONTENT and CONTENT_LABEL variables +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) + CONTENT='rootdir' + CONTENT_LABEL='Container' + ;; + template) + CONTENT='vztmpl' + CONTENT_LABEL='Container template' + ;; + *) false || die "Invalid storage class." ;; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=("$TAG" "$ITEM" "OFF") + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then + printf ${MENU[0]} + else + local STORAGE + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Update LXC template list +msg "Updating LXC template list..." +pveam update >/dev/null + +# Get LXC template string +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +TEMPLATE="${TEMPLATES[-1]}" + +# Download LXC template +if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then + msg "Downloading LXC template (Patience)..." + pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || + die "A problem occured while downloading the LXC template." +fi + +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Save password +echo "TurnKey ${turnkey} password: ${PASS}" >>~/turnkey-${turnkey}.creds # file is located in the Proxmox root directory + +# Start container +msg "Starting LXC Container..." +pct start "$CTID" +sleep 5 + +# Get container IP +set +e +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +set -e +# Start Proxmox VE Monitor-All if available +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi + +# Success message +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo +info "Proceed to the LXC console to complete the setup." +echo +info "login: root" +info "password: $PASS" +echo From 63dbfcdec4a79217884410fd5911744b3bcc1760 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Sep 2023 23:16:54 -0400 Subject: [PATCH 2042/3335] Remove unnecessary turnkey container files. --- turnkey/turnkey-core.sh | 202 ------------------------------- turnkey/turnkey-fileserver.sh | 202 ------------------------------- turnkey/turnkey-gameserver.sh | 202 ------------------------------- turnkey/turnkey-gitea.sh | 202 ------------------------------- turnkey/turnkey-gitlab.sh | 202 ------------------------------- turnkey/turnkey-mediaserver.sh | 202 ------------------------------- turnkey/turnkey-nextcloud.sh | 202 ------------------------------- turnkey/turnkey-observium.sh | 202 ------------------------------- turnkey/turnkey-openvpn.sh | 202 ------------------------------- turnkey/turnkey-owncloud.sh | 202 ------------------------------- turnkey/turnkey-torrentserver.sh | 202 ------------------------------- turnkey/turnkey-wordpress.sh | 202 ------------------------------- turnkey/turnkey-zoneminder.sh | 202 ------------------------------- 13 files changed, 2626 deletions(-) delete mode 100644 turnkey/turnkey-core.sh delete mode 100644 turnkey/turnkey-fileserver.sh delete mode 100644 turnkey/turnkey-gameserver.sh delete mode 100644 turnkey/turnkey-gitea.sh delete mode 100644 turnkey/turnkey-gitlab.sh delete mode 100644 turnkey/turnkey-mediaserver.sh delete mode 100644 turnkey/turnkey-nextcloud.sh delete mode 100644 turnkey/turnkey-observium.sh delete mode 100644 turnkey/turnkey-openvpn.sh delete mode 100644 turnkey/turnkey-owncloud.sh delete mode 100644 turnkey/turnkey-torrentserver.sh delete mode 100644 turnkey/turnkey-wordpress.sh delete mode 100644 turnkey/turnkey-zoneminder.sh diff --git a/turnkey/turnkey-core.sh b/turnkey/turnkey-core.sh deleted file mode 100644 index 7a0f8733..00000000 --- a/turnkey/turnkey-core.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="core" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="4" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ _____ -/_ __/_ _________ / //_/__ __ __ / ___/__ _______ - / / / // / __/ _ \/ ,< / -_) // / / /__/ _ \/ __/ -_) -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/\___/_/ \__/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-fileserver.sh b/turnkey/turnkey-fileserver.sh deleted file mode 100644 index 4826f253..00000000 --- a/turnkey/turnkey-fileserver.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="fileserver" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="8" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ _____ __ ____ -/_ __/_ _________ / //_/__ __ __ / __(_) /__ / __/__ _____ _____ ____ - / / / // / __/ _ \/ ,< / -_) // / / _// / / -_) _\ \/ -_) __/ |/ / -_) __/ -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/ /_/_/\__/ /___/\__/_/ |___/\__/_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-gameserver.sh b/turnkey/turnkey-gameserver.sh deleted file mode 100644 index bc19fd26..00000000 --- a/turnkey/turnkey-gameserver.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="gameserver" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="8" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - _____ ____ - / ___/__ ___ _ ___ / __/__ _____ _____ ____ -/ (_ / _ `/ ' \/ -_) _\ \/ -_) __/ |/ / -_) __/ -\___/\_,_/_/_/_/\__/ /___/\__/_/ |___/\__/_/ - -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo diff --git a/turnkey/turnkey-gitea.sh b/turnkey/turnkey-gitea.sh deleted file mode 100644 index 3943cde5..00000000 --- a/turnkey/turnkey-gitea.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="gitea" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="4" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ ______ __ -/_ __/_ _________ / //_/__ __ __ / ___(_) /____ ___ _ - / / / // / __/ _ \/ ,< / -_) // / / (_ / / __/ -_) _ `/ -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/_/\__/\__/\_,_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-gitlab.sh b/turnkey/turnkey-gitlab.sh deleted file mode 100644 index 4059f424..00000000 --- a/turnkey/turnkey-gitlab.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="gitlab" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="8" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 4 - -memory 4096 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ ______ __ __ __ -/_ __/_ _________ / //_/__ __ __ / ___(_) /_/ / ___ _/ / - / / / // / __/ _ \/ ,< / -_) // / / (_ / / __/ /__/ _ `/ _ \ -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/_/\__/____/\_,_/_.__/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-mediaserver.sh b/turnkey/turnkey-mediaserver.sh deleted file mode 100644 index edd1b6f6..00000000 --- a/turnkey/turnkey-mediaserver.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="mediaserver" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="8" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ __ ___ ___ ____ -/_ __/_ _________ / //_/__ __ __ / |/ /__ ___/ (_)__ _ / __/__ _____ _____ ____ - / / / // / __/ _ \/ ,< / -_) // / / /|_/ / -_) _ / / _ `/ _\ \/ -_) __/ |/ / -_) __/ -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/ /_/\__/\_,_/_/\_,_/ /___/\__/_/ |___/\__/_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo diff --git a/turnkey/turnkey-nextcloud.sh b/turnkey/turnkey-nextcloud.sh deleted file mode 100644 index b13cdb5e..00000000 --- a/turnkey/turnkey-nextcloud.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="nextcloud" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="10" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ _ __ __ __ __ -/_ __/_ _________ / //_/__ __ __ / |/ /____ __/ /_____/ /__ __ _____/ / - / / / // / __/ _ \/ ,< / -_) // / / / -_) \ / __/ __/ / _ \/ // / _ / -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/|_/\__/_\_\\__/\__/_/\___/\_,_/\_,_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-observium.sh b/turnkey/turnkey-observium.sh deleted file mode 100644 index 93f444b7..00000000 --- a/turnkey/turnkey-observium.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="observium" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="4" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ ____ __ _ -/_ __/_ _________ / //_/__ __ __ / __ \/ / ___ ___ _____ __(_)_ ____ _ - / / / // / __/ _ \/ ,< / -_) // / / /_/ / _ \(_-&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-openvpn.sh b/turnkey/turnkey-openvpn.sh deleted file mode 100644 index 79f5b407..00000000 --- a/turnkey/turnkey-openvpn.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="openvpn" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="4" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ ____ _ _____ _ __ -/_ __/_ _________ / //_/__ __ __ / __ \___ ___ ___| | / / _ \/ |/ / - / / / // / __/ _ \/ ,< / -_) // / / /_/ / _ \/ -_) _ \ |/ / ___/ / -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \____/ .__/\__/_//_/___/_/ /_/|_/ - /___/ /_/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-owncloud.sh b/turnkey/turnkey-owncloud.sh deleted file mode 100644 index a5f16ff0..00000000 --- a/turnkey/turnkey-owncloud.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="owncloud" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="10" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ _______ __ -/_ __/_ _________ / //_/__ __ __ ___ _ _____ / ___/ /__ __ _____/ / - / / / // / __/ _ \/ ,< / -_) // / / _ \ |/|/ / _ \/ /__/ / _ \/ // / _ / -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/__,__/_//_/\___/_/\___/\_,_/\_,_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-torrentserver.sh b/turnkey/turnkey-torrentserver.sh deleted file mode 100644 index 795d6c6f..00000000 --- a/turnkey/turnkey-torrentserver.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="torrentserver" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="10" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ ______ __ ____ -/_ __/_ _________ / //_/__ __ __ /_ __/__ ___________ ___ / /_ / __/__ _____ _____ ____ - / / / // / __/ _ \/ ,< / -_) // / / / / _ \/ __/ __/ -_) _ \/ __/ _\ \/ -_) __/ |/ / -_) __/ -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/ \___/_/ /_/ \__/_//_/\__/ /___/\__/_/ |___/\__/_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-wordpress.sh b/turnkey/turnkey-wordpress.sh deleted file mode 100644 index 9c7aedc8..00000000 --- a/turnkey/turnkey-wordpress.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="wordpress" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="8" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ _ __ _____ -/_ __/_ _________ / //_/__ __ __ | | /| / /__ _______/ / _ \_______ ___ ___ - / / / // / __/ _ \/ ,< / -_) // / | |/ |/ / _ \/ __/ _ / ___/ __/ -_|_-<(_-< -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / |__/|__/\___/_/ \_,_/_/ /_/ \__/___/___/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file diff --git a/turnkey/turnkey-zoneminder.sh b/turnkey/turnkey-zoneminder.sh deleted file mode 100644 index 41321872..00000000 --- a/turnkey/turnkey-zoneminder.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# Setup script environment -NAME="zoneminder" -PASS="$(openssl rand -base64 8)" -CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${NAME}" -PCT_DISK_SIZE="8" -PCT_OPTIONS=" - -features keyctl=1,nesting=1 - -hostname turnkey-${NAME} - -tags proxmox-helper-scripts - -onboot 1 - -cores 2 - -memory 2048 - -password $PASS - -net0 name=eth0,bridge=vmbr0,ip=dhcp - -unprivileged 1 - " -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture) -) -function header_info { -clear -cat <<"EOF" - ______ __ __ ____ __ ____ __ -/_ __/_ _________ / //_/__ __ __ /_ / ___ ___ ___ / |/ (_)__ ___/ /__ ____ - / / / // / __/ _ \/ ,< / -_) // / / /_/ _ \/ _ \/ -_) /|_/ / / _ \/ _ / -_) __/ -/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /___/\___/_//_/\__/_/ /_/_/_//_/\_,_/\__/_/ - /___/ -EOF -} -header_info -read -p "Press ENTER to continue..." -header_info -set -eEuo pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local DEFAULT='Unknown failure occured.' - local REASON="\e[97m${1:-$DEFAULT}\e[39m" - local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" - msg "$FLAG $REASON" 1>&2 - [ ! -z ${CTID-} ] && cleanup_ctid - exit $EXIT -} -function warn() { - local REASON="\e[97m$1\e[39m" - local FLAG="\e[93m[WARNING]\e[39m" - msg "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="\e[36m[INFO]\e[39m" - msg "$FLAG $REASON" -} -function msg() { - local TEXT="$1" - echo -e "$TEXT" -} -function cleanup_ctid() { - if pct status $CTID &>/dev/null; then - if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then - pct stop $CTID - fi - pct destroy $CTID - fi -} - -# Stop Proxmox VE Monitor-All if running -if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service -fi - -# Set the CONTENT and CONTENT_LABEL variables -function select_storage() { - local CLASS=$1 - local CONTENT - local CONTENT_LABEL - case $CLASS in - container) CONTENT='rootdir'; CONTENT_LABEL='Container';; - template) CONTENT='vztmpl'; CONTENT_LABEL='Container template';; - *) false || die "Invalid storage class.";; - esac - - # Query all storage locations - local -a MENU - while read -r line; do - local TAG=$(echo $line | awk '{print $1}') - local TYPE=$(echo $line | awk '{printf "%-10s", $2}') - local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " - local OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - MENU+=("$TAG" "$ITEM" "OFF") - done < <(pvesm status -content $CONTENT | awk 'NR>1') - - # Select storage location - if [ $((${#MENU[@]} / 3)) -eq 0 ]; then - warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." - die "Unable to detect valid storage location." - elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then - printf ${MENU[0]} - else - local STORAGE - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." - done - printf $STORAGE - fi -} - -# Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -info "Using '$TEMPLATE_STORAGE' for template storage." - -# Get container storage -CONTAINER_STORAGE=$(select_storage container) || exit -info "Using '$CONTAINER_STORAGE' for container storage." - -# Update LXC template list -msg "Updating LXC template list..." -pveam update >/dev/null - -# Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." -TEMPLATE="${TEMPLATES[-1]}" - -# Download LXC template -if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then - msg "Downloading LXC template (Patience)..." - pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || - die "A problem occured while downloading the LXC template." -fi - -# Create variable for 'pct' options -PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) - -# Create LXC -msg "Creating LXC container..." -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - die "A problem occured while trying to create container." - -# Save password -echo "TurnKey ${NAME} password: ${PASS}" >>~/turnkey-${NAME}.creds # file is located in the Proxmox root directory - -# Start container -msg "Starting LXC Container..." -pct start "$CTID" -sleep 5 - -# Get container IP -set +e -max_attempts=5 -attempt=1 -IP="" -while [[ $attempt -le $max_attempts ]]; do - IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') - if [[ -n $IP ]]; then - break - else - warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." - sleep 5 - ((attempt++)) - fi -done - -if [[ -z $IP ]]; then - warn "Maximum number of attempts reached. IP address not found." - IP="NOT FOUND" -fi - -set -e -# Start Proxmox VE Monitor-All if available -if [[ -f /etc/systemd/system/ping-instances.service ]]; then - systemctl start ping-instances.service -fi - -# Success message -header_info -echo -info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." -echo -info "Proceed to the LXC console to complete the setup." -echo -info "login: root" -info "password: $PASS" -echo \ No newline at end of file From 7edf944b6b18e8f485daef0943e6645324de06b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Sep 2023 05:28:17 -0400 Subject: [PATCH 2043/3335] Update nginxproxymanager-install.sh fixes https://github.com/tteck/Proxmox/issues/1797 --- install/nginxproxymanager-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 04b8820e..add592ee 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -40,6 +40,7 @@ $STD apt-get install -y \ python3-certbot \ python3-certbot-dns-cloudflare $STD pip3 install certbot_dns_porkbun +$STD pip3 install certbot-dns-duckdns $STD python3 -m venv /opt/certbot/ msg_ok "Installed Python Dependencies" From 28b290c4e5aa34094bb0bc74b9108d3eececc28f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 15 Sep 2023 17:44:16 -0400 Subject: [PATCH 2044/3335] Update turnkey.sh add Invoice Ninja --- turnkey/turnkey.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index fff4a4c4..51197ea5 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -71,6 +71,7 @@ gallery Gallery gameserver Game Server gitea Gitea gitlab GitLab +invoice-ninja Invoice Ninja mediaserver Media Server nextcloud Nextcloud observium Observium From 6c4a48dd658a6e4edd8e6ee9ebcfe28db3b3f1ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Sep 2023 11:42:03 -0400 Subject: [PATCH 2045/3335] Update pialert-install.sh code refactoring --- install/pialert-install.sh | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 32453b42..866bb94a 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -54,31 +54,20 @@ msg_ok "Installed Python Dependencies" msg_info "Installing Pi.Alert" curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 - -rm /var/www/html/index.html +mkdir -p /opt/pialert/front/reports +rm -rf /var/www/html/index.html /opt/pialert/{docs,install,tar} mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old ln -s /opt/pialert/install/index.html /var/www/html/index.html ln -s /opt/pialert/front /var/www/html/pialert -chmod go+x /opt/pialert -chgrp -R www-data /opt/pialert/db -chmod -R 775 /opt/pialert/db -chmod -R 775 /opt/pialert/db/temp -chgrp www-data /opt/pialert/config -chmod -R 775 /opt/pialert/config -chgrp www-data /opt/pialert/config/pialert.conf -chmod -R 775 /opt/pialert/front/reports -chgrp -R www-data /opt/pialert/front/reports -chmod +x /opt/pialert/back/shoutrrr/x86/shoutrrr -touch "/opt/pialert/log/pialert.vendors.log" -touch "/opt/pialert/log/pialert.IP.log" -touch "/opt/pialert/log/pialert.1.log" -touch "/opt/pialert/log/pialert.cleanup.log" -touch "/opt/pialert/log/pialert.webservices.log" -ln -s "/opt/pialert/log/pialert.vendors.log" "/opt/pialert/front/php/server/pialert.vendors.log" -ln -s "/opt/pialert/log/pialert.IP.log" "/opt/pialert/front/php/server/pialert.IP.log" -ln -s "/opt/pialert/log/pialert.1.log" "/opt/pialert/front/php/server/pialert.1.log" -ln -s "/opt/pialert/log/pialert.cleanup.log" "/opt/pialert/front/php/server/pialert.cleanup.log" -ln -s "/opt/pialert/log/pialert.webservices.log" "/opt/pialert/front/php/server/pialert.webservices.log" +chmod go+x /opt/pialert /opt/pialert/back/shoutrrr/x86/shoutrrr +chgrp -R www-data /opt/pialert/db /opt/pialert/front/reports /opt/pialert/config /opt/pialert/config/pialert.conf +chmod -R 775 /opt/pialert/db /opt/pialert/db/temp /opt/pialert/config /opt/pialert/front/reports +touch /opt/pialert/log/pialert.vendors.log /opt/pialert/log/pialert.IP.log /opt/pialert/log/pialert.1.log /opt/pialert/log/pialert.cleanup.log /opt/pialert/log/pialert.webservices.log +src_dir="/opt/pialert/log" +dest_dir="/opt/pialert/front/php/server" +for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log pialert.webservices.log; do + ln -s "$src_dir/$file" "$dest_dir/$file" +done sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf msg_ok "Installed Pi.Alert" From c68e8e69e0769b4a03c8dbf93fd62d65a189909b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Sep 2023 13:54:54 -0400 Subject: [PATCH 2046/3335] Update pialert-install.sh switch to "git clone" installation --- install/pialert-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 866bb94a..90a5626d 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -18,6 +18,7 @@ $STD apt-get -y install \ sudo \ mc \ curl \ + git \ apt-utils \ lighttpd \ sqlite3 \ @@ -52,8 +53,8 @@ $STD pip3 install fritzconnection $STD pip3 install cryptography msg_ok "Installed Python Dependencies" -msg_info "Installing Pi.Alert" -curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 +msg_info "Installing Pi.Alert (Patience)" +git clone -q https://github.com/leiweibau/Pi.Alert.git /opt/pialert mkdir -p /opt/pialert/front/reports rm -rf /var/www/html/index.html /opt/pialert/{docs,install,tar} mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old From ed674aaedd5695c8de2276b77ace3b7d170a3c51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Sep 2023 15:24:18 -0400 Subject: [PATCH 2047/3335] Update pialert.sh tweak --- ct/pialert.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ct/pialert.sh b/ct/pialert.sh index 39ddd9de..abe9c4b3 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -52,11 +52,8 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." exit } From 0554641b835d095452a6fdb6cfbfa8da6c491b3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Sep 2023 22:53:33 -0400 Subject: [PATCH 2048/3335] Update pialert-install.sh tweak --- install/pialert-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 90a5626d..4fd3078a 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -56,7 +56,7 @@ msg_ok "Installed Python Dependencies" msg_info "Installing Pi.Alert (Patience)" git clone -q https://github.com/leiweibau/Pi.Alert.git /opt/pialert mkdir -p /opt/pialert/front/reports -rm -rf /var/www/html/index.html /opt/pialert/{docs,install,tar} +rm -rf /var/www/html/index.html mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old ln -s /opt/pialert/install/index.html /var/www/html/index.html ln -s /opt/pialert/front /var/www/html/pialert From 1fb4fcf84e0f239eb8353d93d4c5b1f4f7724112 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 10:55:33 -0400 Subject: [PATCH 2049/3335] Update pialert-install.sh add three new commands - "scan" Runs arp-scan - "permissions" Repair file group permissions - "sudoers" Create sudoer file for www-data and Pi.Alert user --- install/pialert-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 4fd3078a..63c9ba4d 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -70,6 +70,12 @@ for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log ln -s "$src_dir/$file" "$dest_dir/$file" done sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf +echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan +chmod +x /usr/bin/scan +echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions +chmod +x /usr/bin/permissions +echo "/opt/pialert/back/pialert-cli set_sudoers --lxc" >/usr/bin/sudoers +chmod +x /usr/bin/sudoers msg_ok "Installed Pi.Alert" msg_info "Start Pi.Alert Scan (Patience)" From d1da3949eac9e7f9a7ced9ba51d957b5f59b8aeb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 16:44:04 -0400 Subject: [PATCH 2050/3335] Update pialert-install.sh - add crontab - fixes https://github.com/tteck/Proxmox/issues/1806 --- install/pialert-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 63c9ba4d..f0e3f0d6 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -70,6 +70,8 @@ for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log ln -s "$src_dir/$file" "$dest_dir/$file" done sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf +sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron +(crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan chmod +x /usr/bin/scan echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions From 0042ec95cf70341f440b06e8160c74b5f8bf8c51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 22:13:11 -0400 Subject: [PATCH 2051/3335] Update pialert.sh increase storage --- ct/pialert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pialert.sh b/ct/pialert.sh index abe9c4b3..f9f98a92 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="PiAlert" -var_disk="3" +var_disk="6" var_cpu="1" var_ram="512" var_os="debian" From 3fd4a5007857258f6587f8f9d3c9c6fb035934ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 22:33:28 -0400 Subject: [PATCH 2052/3335] Update pialert-install.sh - added a new "update" command that allows you to execute updates for Pi.Alert. - tweaks --- install/pialert-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index f0e3f0d6..34b57319 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -53,8 +53,8 @@ $STD pip3 install fritzconnection $STD pip3 install cryptography msg_ok "Installed Python Dependencies" -msg_info "Installing Pi.Alert (Patience)" -git clone -q https://github.com/leiweibau/Pi.Alert.git /opt/pialert +msg_info "Installing Pi.Alert" +curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 mkdir -p /opt/pialert/front/reports rm -rf /var/www/html/index.html mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old @@ -69,9 +69,13 @@ dest_dir="/opt/pialert/front/php/server" for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log pialert.webservices.log; do ln -s "$src_dir/$file" "$dest_dir/$file" done +git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron (crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - +cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update +sed -i 's/~/\/opt/g' /usr/bin/update +chmod +x /usr/bin/update echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan chmod +x /usr/bin/scan echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions From 35701cb845a9ebee89967de4a1566c5d218bf1fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 22:54:31 -0400 Subject: [PATCH 2053/3335] Update pialert-install.sh test --- install/pialert-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 34b57319..c452d0b7 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -72,7 +72,9 @@ done git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron +set +e (crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - +set -e cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update sed -i 's/~/\/opt/g' /usr/bin/update chmod +x /usr/bin/update From fb57a5f0f1884ef9ef1342e63129a4bd63b5f6f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 23:24:00 -0400 Subject: [PATCH 2054/3335] Update pialert-install.sh --- install/pialert-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index c452d0b7..8c45003a 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -71,7 +71,7 @@ for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log done git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf -sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron +sed -i -e 's/0 2 \* \* \*\/4/0 2 * * 3/g' -e 's/~/\/opt/g' /opt/pialert/install/pialert.cron set +e (crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - set -e From 3115e46e3041446569ec536c5dead91c8a35f187 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 23:45:47 -0400 Subject: [PATCH 2055/3335] Update pialert-install.sh --- install/pialert-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 8c45003a..563244ea 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -71,9 +71,10 @@ for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log done git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf -sed -i -e 's/0 2 \* \* \*\/4/0 2 * * 3/g' -e 's/~/\/opt/g' /opt/pialert/install/pialert.cron +sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron set +e -(crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - +#(crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - +crontab /opt/pialert/install/pialert.cron set -e cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update sed -i 's/~/\/opt/g' /usr/bin/update From fc8ddc3a7c252180f52a27118adf8a609faf63a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Sep 2023 23:53:59 -0400 Subject: [PATCH 2056/3335] Update pialert-install.sh fix crontab --- install/pialert-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 563244ea..394ac8e2 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -72,10 +72,7 @@ done git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron -set +e -#(crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - crontab /opt/pialert/install/pialert.cron -set -e cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update sed -i 's/~/\/opt/g' /usr/bin/update chmod +x /usr/bin/update From 97219fc7c221db613f3717c9a12845177656d000 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 00:38:38 -0400 Subject: [PATCH 2057/3335] Update pialert.sh update --- ct/pialert.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/pialert.sh b/ct/pialert.sh index f9f98a92..1fbbf2bb 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -53,8 +53,9 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." -exit +msg_info "Updating $APP" +update +msg_ok "Updated $APP" } start From 16bdcb3cb16974acd0ee84b67d22d5ed5deb45ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 00:40:54 -0400 Subject: [PATCH 2058/3335] Update pialert.sh tweak --- ct/pialert.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/pialert.sh b/ct/pialert.sh index 1fbbf2bb..76bb430f 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -53,7 +53,6 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" update msg_ok "Updated $APP" } From 6d360c6d4305c8d0bb2fd235aff53491766036a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 07:04:12 -0400 Subject: [PATCH 2059/3335] Update openobserve.sh fix spelling fixes https://github.com/tteck/Proxmox/issues/1807 --- ct/openobserve.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/openobserve.sh b/ct/openobserve.sh index 7cdd431e..d3300770 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -56,10 +56,10 @@ function update_script() { header_info if [[ ! -d /opt/openobserve/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" -systemctl stop openobsecure +systemctl stop openobserve LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve -systemctl start openobsecure +systemctl start openobserve msg_ok "Updated $APP" exit } From 4ad7bbd8848e63dd6073e67c1030f23f2637abfe Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 08:59:59 -0400 Subject: [PATCH 2060/3335] Update pialert.sh tweak --- ct/pialert.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/pialert.sh b/ct/pialert.sh index 76bb430f..dd3a1615 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -55,6 +55,7 @@ header_info if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi update msg_ok "Updated $APP" +exit } start From c7fef220b165c1abd6fdf8321693188fdf79aaa0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 14:27:51 -0400 Subject: [PATCH 2061/3335] Update pialert-install.sh - redirect updates to https://github.com/leiweibau/Pi.Alert - clean code (final) --- install/pialert-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 394ac8e2..3c3ba4ad 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -55,7 +55,6 @@ msg_ok "Installed Python Dependencies" msg_info "Installing Pi.Alert" curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 -mkdir -p /opt/pialert/front/reports rm -rf /var/www/html/index.html mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old ln -s /opt/pialert/install/index.html /var/www/html/index.html @@ -69,12 +68,10 @@ dest_dir="/opt/pialert/front/php/server" for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log pialert.webservices.log; do ln -s "$src_dir/$file" "$dest_dir/$file" done -git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron crontab /opt/pialert/install/pialert.cron -cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update -sed -i 's/~/\/opt/g' /usr/bin/update +echo "bash -c \"\$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)\" -s --lxc" >/usr/bin/update chmod +x /usr/bin/update echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan chmod +x /usr/bin/scan From 5a526099f7aad83ded2386d9c38ab9bc6ca1a924 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 14:28:36 -0400 Subject: [PATCH 2062/3335] Update pialert.sh reduce storage --- ct/pialert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pialert.sh b/ct/pialert.sh index dd3a1615..17a1195b 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="PiAlert" -var_disk="6" +var_disk="3" var_cpu="1" var_ram="512" var_os="debian" From a72c411497376946fdc9b02368e87c7dcd30f17e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 19:53:44 -0400 Subject: [PATCH 2063/3335] Update turnkey.sh add appliances --- turnkey/turnkey.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index 51197ea5..333badad 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -66,6 +66,7 @@ while read -r TAG ITEM; do done < <( cat < Date: Tue, 19 Sep 2023 16:00:04 -0400 Subject: [PATCH 2064/3335] Update zwave-js-ui.sh default Debian 12 --- ct/zwave-js-ui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index c4217d3e..465f02df 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From a520795e1b3f4ea585bc00816c1952c17a5b013e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Sep 2023 05:27:06 -0400 Subject: [PATCH 2065/3335] Update kernel-clean.sh tweak --- misc/kernel-clean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index ace0f0a1..d34a63af 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -56,7 +56,7 @@ done < <(echo "$available_kernels") remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \ 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the previously selected Kernels?" 10 68 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') previously selected Kernels?" 10 68 || exit msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" /usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 From b0a7fc06ebec7eb0524313c0ed4c361c5238a487 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Sep 2023 19:00:13 -0400 Subject: [PATCH 2066/3335] Update monitor-all.sh tweak --- misc/monitor-all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 7e6f15c7..187c82fb 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -35,6 +35,7 @@ while true; do for instance in $(pct list | awk '\''{if(NR>1) print $1}'\''; qm list | awk '\''{if(NR>1) print $1}'\''); do # Skip excluded instances if [[ " ${excluded_instances[@]} " =~ " ${instance} " ]]; then + echo "Skipping $instance because it is excluded" continue fi From 0692bad5c6c0b0adaa5b18dafa1c0b8d7dcaed0f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Sep 2023 08:46:41 -0400 Subject: [PATCH 2067/3335] Update pialert-install.sh tweaks for new release --- install/pialert-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 3c3ba4ad..789710c0 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -18,7 +18,6 @@ $STD apt-get -y install \ sudo \ mc \ curl \ - git \ apt-utils \ lighttpd \ sqlite3 \ @@ -29,6 +28,7 @@ $STD apt-get -y install \ libwww-perl \ nmap \ zip \ + aria2 \ wakeonlan msg_ok "Installed Dependencies" @@ -42,7 +42,6 @@ $STD apt-get -y install \ $STD lighttpd-enable-mod fastcgi-php service lighttpd force-reload msg_ok "Installed PHP Dependencies" -#arp-scan -l msg_info "Installing Python Dependencies" $STD apt-get -y install \ @@ -55,8 +54,10 @@ msg_ok "Installed Python Dependencies" msg_info "Installing Pi.Alert" curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 -rm -rf /var/www/html/index.html +rm -rf /var/lib/ieee-data /var/www/html/index.html +sed -i -e 's#^sudo cp -n /usr/share/ieee-data/.* /var/lib/ieee-data/#\# &#' -e '/^sudo mkdir -p 2_backup$/s/^/# /' -e '/^sudo cp \*.txt 2_backup$/s/^/# /' -e '/^sudo cp \*.csv 2_backup$/s/^/# /' /opt/pialert/back/update_vendors.sh mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old +ln -s /usr/share/ieee-data/ /var/lib/ ln -s /opt/pialert/install/index.html /var/www/html/index.html ln -s /opt/pialert/front /var/www/html/pialert chmod go+x /opt/pialert /opt/pialert/back/shoutrrr/x86/shoutrrr @@ -69,7 +70,7 @@ for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log ln -s "$src_dir/$file" "$dest_dir/$file" done sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf -sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron +sed -i 's/$HOME/\/opt/g' /opt/pialert/install/pialert.cron crontab /opt/pialert/install/pialert.cron echo "bash -c \"\$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)\" -s --lxc" >/usr/bin/update chmod +x /usr/bin/update From 7f2c3d15492faa341f502efc44d8f86b07fc80a0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Sep 2023 14:17:01 -0400 Subject: [PATCH 2068/3335] Update update-lxcs.sh change wording fixes https://github.com/tteck/Proxmox/issues/1824 --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index d4b442f0..c6e41f3b 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update Selected LXC Containers. Proceed?" 10 58 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) while read -r TAG ITEM; do OFFSET=2 From 461a737b98c53b918bcb9768e089e0c74c643140 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Sep 2023 21:02:00 -0400 Subject: [PATCH 2069/3335] Update update-lxcs.sh fixes https://github.com/tteck/Proxmox/issues/1825 --- misc/update-lxcs.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index c6e41f3b..dcf5cbfc 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -17,7 +17,7 @@ function header_info { EOF } -set -e +set -eEuo pipefail YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") @@ -26,8 +26,10 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || clear; exit NODE=$(hostname) +CTID_MENU=() +MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET @@ -35,7 +37,7 @@ while read -r TAG ITEM; do done < <(pct list | awk 'NR>1') excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \ "\nSelect containers to skip from updates:\n" \ - 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || clear; exit function update_container() { container=$1 From f6a59ba4fd7f8db5fa96c7eafba68d7c21fb6555 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Sep 2023 21:03:41 -0400 Subject: [PATCH 2070/3335] Update update-lxcs.sh --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index dcf5cbfc..168ce2c0 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || clear; exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) CTID_MENU=() MSG_MAX_LENGTH=0 From 7942bf57559bb7370d906d7d0894c95eebf54b22 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Sep 2023 21:10:00 -0400 Subject: [PATCH 2071/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 168ce2c0..dcf5cbfc 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || clear; exit NODE=$(hostname) CTID_MENU=() MSG_MAX_LENGTH=0 From c7593ed2eb5797642d5c6692da7d63e93d83c987 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Sep 2023 21:20:00 -0400 Subject: [PATCH 2072/3335] Update update-lxcs.sh tweaks --- misc/update-lxcs.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index dcf5cbfc..1e63ff1b 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m") CL=$(echo "\033[m") header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || clear; exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) CTID_MENU=() MSG_MAX_LENGTH=0 @@ -35,10 +35,7 @@ while read -r TAG ITEM; do ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \ - "\nSelect containers to skip from updates:\n" \ - 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || clear; exit - +excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit function update_container() { container=$1 header_info From 9dc43c396f96f7916e07b7c8207bfca185a22e5d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Sep 2023 05:58:20 -0400 Subject: [PATCH 2073/3335] Update docker-install.sh change Portainer to port 9443 fixes https://github.com/tteck/Proxmox/issues/1763 --- install/docker-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/docker-install.sh b/install/docker-install.sh index 37575f46..1a15edb3 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -50,7 +50,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then docker volume create portainer_data >/dev/null $STD docker run -d \ -p 8000:8000 \ - -p 9000:9000 \ + -p 9443:9443 \ --name=portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ From e24879f192f859d932eef7f9b598d9b3728198b8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Sep 2023 07:39:53 -0400 Subject: [PATCH 2074/3335] Create all-templates.sh Builds upon the functionality of the existing "turnkey.sh" script to incorporate all available templates. --- misc/all-templates.sh | 208 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 misc/all-templates.sh diff --git a/misc/all-templates.sh b/misc/all-templates.sh new file mode 100644 index 00000000..8f3ac79b --- /dev/null +++ b/misc/all-templates.sh @@ -0,0 +1,208 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ___ ____ ______ __ __ + / _ | / / / /_ __/__ __ _ ___ / /__ _/ /____ ___ + / __ |/ / / / / / -_) ' \/ _ \/ / _ `/ __/ -_|_-< +/_/ |_/_/_/ /_/ \__/_/_/_/ .__/_/\_,_/\__/\__/___/ + /_/ +EOF +} + +set -eEuo pipefail +shopt -s expand_aliases +alias die='EXIT=$? LINE=$LINENO error_exit' +trap die ERR +function error_exit() { + trap - ERR + local DEFAULT='Unknown failure occured.' + local REASON="\e[97m${1:-$DEFAULT}\e[39m" + local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE" + msg "$FLAG $REASON" 1>&2 + [ ! -z ${CTID-} ] && cleanup_ctid + exit $EXIT +} +function warn() { + local REASON="\e[97m$1\e[39m" + local FLAG="\e[93m[WARNING]\e[39m" + msg "$FLAG $REASON" +} +function info() { + local REASON="$1" + local FLAG="\e[36m[INFO]\e[39m" + msg "$FLAG $REASON" +} +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} +function cleanup_ctid() { + if pct status $CTID &>/dev/null; then + if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then + pct stop $CTID + fi + pct destroy $CTID + fi +} + +# Stop Proxmox VE Monitor-All if running +if systemctl is-active -q ping-instances.service; then + systemctl stop ping-instances.service +fi +header_info +pveam update >/dev/null 2>&1 +whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68 || exit +CTID_MENU=() +MSG_MAX_LENGTH=0 +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + CTID_MENU+=("$ITEM" "$TAG " "OFF") +done < <(pveam available) +TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +[ -z "$TEMPLATE" ] && { + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68 + msg "Done" + exit +} + +# Setup script environment +NAME=$(echo "$TEMPLATE" | grep -oE '^[^-]+-[^-]+') +PASS="$(openssl rand -base64 8)" +CTID=$(pvesh get /cluster/nextid) +PCT_OPTIONS=" + -features keyctl=1,nesting=1 + -hostname $NAME + -tags proxmox-helper-scripts + -onboot 0 + -cores 2 + -memory 2048 + -password $PASS + -net0 name=eth0,bridge=vmbr0,hwaddr=AE:1A:60:07:B7:59,ip=dhcp + -unprivileged 1 + " +DEFAULT_PCT_OPTIONS=( + -arch $(dpkg --print-architecture) +) + +# Set the CONTENT and CONTENT_LABEL variables +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) + CONTENT='rootdir' + CONTENT_LABEL='Container' + ;; + template) + CONTENT='vztmpl' + CONTENT_LABEL='Container template' + ;; + *) false || die "Invalid storage class." ;; + esac + + # Query all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM=" Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=("$TAG" "$ITEM" "OFF") + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]} / 3)) -eq 0 ]; then + warn "'$CONTENT_LABEL' needs to be selected for at least one storage location." + die "Unable to detect valid storage location." + elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then + printf ${MENU[0]} + else + local STORAGE + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted." + done + printf $STORAGE + fi +} + +# Get template storage +TEMPLATE_STORAGE=$(select_storage template) || exit +info "Using '$TEMPLATE_STORAGE' for template storage." + +# Get container storage +CONTAINER_STORAGE=$(select_storage container) || exit +info "Using '$CONTAINER_STORAGE' for container storage." + +# Download template +msg "Downloading LXC template (Patience)..." +pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || die "A problem occured while downloading the LXC template." + +# Create variable for 'pct' options +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) + +# Create LXC +msg "Creating LXC container..." +pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || + die "A problem occured while trying to create container." + +# Save password +echo "$NAME password: ${PASS}" >>~/$NAME.creds # file is located in the Proxmox root directory + +# Start container +msg "Starting LXC Container..." +pct start "$CTID" +sleep 5 + +# Get container IP +set +eEuo pipefail +max_attempts=5 +attempt=1 +IP="" +while [[ $attempt -le $max_attempts ]]; do + IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+') + if [[ -n $IP ]]; then + break + else + warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..." + sleep 5 + ((attempt++)) + fi +done + +if [[ -z $IP ]]; then + warn "Maximum number of attempts reached. IP address not found." + IP="NOT FOUND" +fi + +set -eEuo pipefail +# Start Proxmox VE Monitor-All if available +if [[ -f /etc/systemd/system/ping-instances.service ]]; then + systemctl start ping-instances.service +fi + +# Success message +header_info +echo +info "LXC container '$CTID' was successfully created, and its IP address is ${IP}." +echo +info "Proceed to the LXC console to complete the setup." +echo +info "login: root" +info "password: $PASS" +echo From 148c2cb1265bcfe2331af57916705324f2edb8fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Sep 2023 07:53:12 -0400 Subject: [PATCH 2075/3335] Update all-templates.sh tweaks --- misc/all-templates.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/all-templates.sh b/misc/all-templates.sh index 8f3ac79b..472f0f2d 100644 --- a/misc/all-templates.sh +++ b/misc/all-templates.sh @@ -56,6 +56,7 @@ if systemctl is-active -q ping-instances.service; then systemctl stop ping-instances.service fi header_info +echo "Loading..." pveam update >/dev/null 2>&1 whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68 || exit CTID_MENU=() @@ -65,7 +66,7 @@ while read -r TAG ITEM; do ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET CTID_MENU+=("$ITEM" "$TAG " "OFF") done < <(pveam available) -TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$TEMPLATE" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68 msg "Done" From af5a0e340910baa17f13fd900ee87153097efea2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Sep 2023 08:00:12 -0400 Subject: [PATCH 2076/3335] Update all-templates.sh remove test MAC address --- misc/all-templates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/all-templates.sh b/misc/all-templates.sh index 472f0f2d..a63f44ac 100644 --- a/misc/all-templates.sh +++ b/misc/all-templates.sh @@ -85,7 +85,7 @@ PCT_OPTIONS=" -cores 2 -memory 2048 -password $PASS - -net0 name=eth0,bridge=vmbr0,hwaddr=AE:1A:60:07:B7:59,ip=dhcp + -net0 name=eth0,bridge=vmbr0,ip=dhcp -unprivileged 1 " DEFAULT_PCT_OPTIONS=( From 7691aded5861f74ebc0c555abb99d23ebc02472d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Sep 2023 08:38:39 -0400 Subject: [PATCH 2077/3335] Update all-templates.sh tweak --- misc/all-templates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/all-templates.sh b/misc/all-templates.sh index a63f44ac..34c291a5 100644 --- a/misc/all-templates.sh +++ b/misc/all-templates.sh @@ -140,7 +140,7 @@ function select_storage() { printf $STORAGE fi } - +header_info # Get template storage TEMPLATE_STORAGE=$(select_storage template) || exit info "Using '$TEMPLATE_STORAGE' for template storage." From e26aeb25a8bafee96d23182f9eb2614c54ffd4a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Sep 2023 15:03:35 -0400 Subject: [PATCH 2078/3335] Update turnkey.sh add Ansible --- turnkey/turnkey.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index 333badad..292930f6 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -65,6 +65,7 @@ while read -r TAG ITEM; do CTID_MENU+=("$TAG" "$ITEM " "OFF") done < <( cat < Date: Sun, 24 Sep 2023 20:23:32 -0400 Subject: [PATCH 2079/3335] Update homarr-install.sh set NEXTAUTH_URL=http://localhost:3000 --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 8ef64f09..5d083f84 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -41,7 +41,7 @@ msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr $STD yarn install -$STD yarn build +$STD NEXTAUTH_URL=http://localhost:3000 yarn build msg_ok "Installed Homarr" msg_info "Creating Service" From 62784e9200cbd0a02c0fb9b485e4f50caa165f74 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Sep 2023 20:32:41 -0400 Subject: [PATCH 2080/3335] Update homarr-install.sh --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 5d083f84..ebd6d7a0 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -41,7 +41,7 @@ msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr $STD yarn install -$STD NEXTAUTH_URL=http://localhost:3000 yarn build +NEXTAUTH_URL=http://localhost:3000 yarn build &>/dev/null msg_ok "Installed Homarr" msg_info "Creating Service" From f39274a5c7fd22d3fb45ceba000d9628c8c281d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Sep 2023 21:35:32 -0400 Subject: [PATCH 2081/3335] Update homarr-install.sh --- install/homarr-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index ebd6d7a0..1e8788fd 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -35,13 +35,14 @@ msg_ok "Installed Node.js" msg_info "Installing Yarn" $STD npm install -g yarn +$STD npm install next react react-dom msg_ok "Installed Yarn" msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr $STD yarn install -NEXTAUTH_URL=http://localhost:3000 yarn build &>/dev/null +$STD yarn build msg_ok "Installed Homarr" msg_info "Creating Service" From a6318456be2f320154eb956f1e6c2ced6f4e829a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Sep 2023 05:17:51 -0400 Subject: [PATCH 2082/3335] Update homarr-install.sh Homarr is currently undergoing extensive development, and we do not recommend installing it from source at this point. As a result, Homarr has been taken down from this site. We kindly suggest using the Docker installation method as an alternative. --- install/homarr-install.sh | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 1e8788fd..d4f91978 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -31,16 +31,44 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" $STD apt-get update $STD apt-get install -y nodejs +$STD npm install next +$STD npm instal react +$STD npm instal react-dom msg_ok "Installed Node.js" msg_info "Installing Yarn" $STD npm install -g yarn -$STD npm install next react react-dom +$STD yarn global add prisma msg_ok "Installed Yarn" msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr +cat </opt/homarr/.env +# Since the ".env" file is gitignored, you can use the ".env.example" file to +# build a new ".env" file when you clone the repo. Keep this file up-to-date +# when you add new variables to `.env`. + +# This file will be committed to version control, so make sure not to have any +# secrets in it. If you are cloning this repo, create a copy of this file named +# ".env" and populate it with your secrets. + +# When adding additional environment variables, the schema in "/src/env.js" +# should be updated accordingly. + +# Prisma +# https://www.prisma.io/docs/reference/database-reference/connection-urls#env +DATABASE_URL="file:../database/db.sqlite" + +# Next Auth +# You can generate a new secret on the command line with: +# openssl rand -base64 32 +# https://next-auth.js.org/configuration/options#secret +# NEXTAUTH_SECRET="" +NEXTAUTH_URL="http://localhost:3000" + +NEXTAUTH_SECRET="1234" +EOF $STD yarn install $STD yarn build msg_ok "Installed Homarr" @@ -54,6 +82,7 @@ After=network.target [Service] Type=exec WorkingDirectory=/opt/homarr +EnvironmentFile=-/opt/homarr/.env ExecStart=/usr/bin/yarn start [Install] From 4ea029864480ad8337ce0bbfc10028714663147f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Sep 2023 16:57:00 -0400 Subject: [PATCH 2083/3335] Update monitor-all.sh implement a 5-minute delay before starting fixes https://github.com/tteck/Proxmox/issues/1840 --- misc/monitor-all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 187c82fb..02d0b696 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -102,6 +102,7 @@ Type=simple # To specify which CT/VM should be excluded, add the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified. # For example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 # Virtual machines without the QEMU guest agent installed must be excluded. +ExecStartPre=/usr/bin/sleep 300 # Sleep for 300 seconds (5 minutes) ExecStart=/usr/local/bin/ping-instances.sh Restart=always StandardOutput=file:/var/log/ping-instances.log From d7ed355918118c1dd2648277afd45118ee706668 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Sep 2023 11:43:20 -0400 Subject: [PATCH 2084/3335] Update openwrt.sh fixes https://github.com/tteck/Proxmox/issues/1842 --- vm/openwrt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index dc1c1828..9c511e37 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -36,7 +36,7 @@ BFR="\\r\\033[K" HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" -set -Eeuo pipefail +set -Eeo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT function error_handler() { From 4689cbc5e559da8e0a462dad70902fdc0aea2ef0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Sep 2023 12:14:30 -0400 Subject: [PATCH 2085/3335] Update CONTRIBUTING.md The repository will only accept Alpine applications that make use of the Alpine Package Keeper. --- .github/CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 142f6aa9..3b61df05 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,3 +5,5 @@ Everybody is invited and welcome to contribute to Proxmox VE Helper Scripts. - Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. By adhering to the established patterns and conventions throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). - It is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. + +- The repository will only accept Alpine applications that make use of the Alpine Package Keeper. From e0e81a022d6203bdcca13d03fbf6c4faf9cc6d02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Sep 2023 17:55:13 -0400 Subject: [PATCH 2086/3335] Update build.func Please run these scripts as root (not with sudo). --- misc/build.func | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/build.func b/misc/build.func index c1c9394f..90d24563 100644 --- a/misc/build.func +++ b/misc/build.func @@ -52,6 +52,15 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# Run as root only +if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit +fi + # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then From 682a08e970f847b96a24bc81f80c06e7d40308d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Sep 2023 19:16:25 -0400 Subject: [PATCH 2087/3335] Update build.func tweak --- misc/build.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/build.func b/misc/build.func index 90d24563..79b5b5ad 100644 --- a/misc/build.func +++ b/misc/build.func @@ -53,6 +53,7 @@ msg_error() { } # Run as root only +check_root() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear msg_error "Please run this script as root." @@ -60,6 +61,7 @@ if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then sleep 2 exit fi +} # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { @@ -428,6 +430,7 @@ advanced_settings() { } install_script() { + check_root ssh_check arch_check pve_check From 885f5a9a2b020083a224fc06eb3841f25b100d9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Sep 2023 19:18:57 -0400 Subject: [PATCH 2088/3335] Update build.func --- misc/build.func | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 79b5b5ad..c1e36895 100644 --- a/misc/build.func +++ b/misc/build.func @@ -54,13 +54,13 @@ msg_error() { # Run as root only check_root() { -if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then - clear - msg_error "Please run this script as root." - echo -e "\nExiting..." - sleep 2 - exit -fi + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi } # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. From 24551de29206f1a1b71a1df413125126353d0757 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Sep 2023 06:40:15 -0400 Subject: [PATCH 2089/3335] Update haos-vm.sh - Add a function to verify if the user is the root user (without using sudo). - Set default disk cache to writethrough - Set default CPU type to host --- vm/haos-vm.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 8294ec68..05dd891e 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -84,9 +84,19 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 7.2 or higher" echo -e "Exiting..." sleep 2 @@ -96,7 +106,7 @@ function pve_check() { function arch_check() { if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" + msg_error "This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -127,9 +137,9 @@ function default_settings() { VMID="$NEXTID" FORMAT=",efitype=4m" MACHINE="" - DISK_CACHE="" + DISK_CACHE="cache=writethrough," HN="haos$stable" - CPU_TYPE="" + CPU_TYPE=" -cpu host" CORE_COUNT="2" RAM_SIZE="4096" BRG="vmbr0" @@ -140,9 +150,9 @@ function default_settings() { echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" - echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}Writethrough${CL}" echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" - echo -e "${DGN}Using CPU Model: ${BGN}Default${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" @@ -340,6 +350,7 @@ function start_script() { fi } +check_root arch_check pve_check ssh_check From 9d7372b679bfb77406478d1eac80e35cc8821a11 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Sep 2023 06:52:05 -0400 Subject: [PATCH 2090/3335] Update haos-vm.sh - Set "Advanced" defaults --- vm/haos-vm.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 05dd891e..27dcb8ce 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -150,7 +150,7 @@ function default_settings() { echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" - echo -e "${DGN}Using Disk Cache: ${BGN}Writethrough${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" @@ -209,14 +209,14 @@ function advanced_settings() { fi if DISK_CACHE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ - "0" "Default" ON \ - "1" "Write Through" OFF \ + "0" "None" OFF \ + "1" "Write Through (Default)" ON \ 3>&1 1>&2 2>&3); then if [ $DISK_CACHE1 = "1" ]; then echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" DISK_CACHE="cache=writethrough," else - echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" DISK_CACHE="" fi else @@ -236,14 +236,14 @@ function advanced_settings() { fi if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ - "0" "KVM64 (Default)" ON \ - "1" "Host" OFF \ + "0" "KVM64" OFF \ + "1" "Host (Default)" ON \ 3>&1 1>&2 2>&3); then if [ $CPU_TYPE1 = "1" ]; then echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" CPU_TYPE=" -cpu host" else - echo -e "${DGN}Using CPU Model: ${BGN}Default${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" CPU_TYPE="" fi else From 1ca1be76cfa15bbcd66622f7d0c2da2be88eaf1e Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Thu, 28 Sep 2023 18:14:58 +0200 Subject: [PATCH 2091/3335] Initial Release for Alpine-Nextcloud Script (#1850) - initial Release - for testing --- ct/alpine-nextcloud.sh | 110 +++++++++++++ install/alpine-nextcloud-install.sh | 242 ++++++++++++++++++++++++++++ 2 files changed, 352 insertions(+) create mode 100644 ct/alpine-nextcloud.sh create mode 100644 install/alpine-nextcloud-install.sh diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh new file mode 100644 index 00000000..aac6be33 --- /dev/null +++ b/ct/alpine-nextcloud.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + _ __ __ ________ __ + / | / /__ _ __/ /_/ ____/ /___ __ ______/ / + / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / + / /| / __/> /dev/null 2>&1; then + apk add -q newt + fi + RELEASE=$(curl -s https://api.github.com/repos/nextcloud/server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + while true; do + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ + "1" "Update Nextcloud to $RELEASE" ON \ + "2" "Nextcloud Credentials" OFF \ + "3" "Renew selfsigned Certificate" OFF \ + 3>&1 1>&2 2>&3) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + INSTALLED=$(grep -Rnw '/usr/share/webapps/nextcloud/config/config.php' -e '\'installed\'' => false,') + if [ -z "$INSTALLED" ] + then + apk update && apk upgrade + su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade' + su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices' + else + msg_error "${APP} not initialized, go to the WebUI and run the Setup-Wizard first.\n" + fi + exit + ;; + 2) + cat nextcloud.creds + exit + ;; + 3) + openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" > /dev/null 2>&1 + rc-service nginx restart + exit + ;; + esac + done +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "To get the randomized credentials for Setup-Wizard, +run the script again inside the LXC Container. \n + +${APP} should be reachable by going to the following URL. + ${BL}https://${IP}${CL} \n" diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh new file mode 100644 index 00000000..127f5bf1 --- /dev/null +++ b/install/alpine-nextcloud-install.sh @@ -0,0 +1,242 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apk add newt +$STD apk add curl +$STD apk add openssl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +$STD apk add argon2 +msg_ok "Installed Dependencies" + +msg_info "Installing Alpine-Nextcloud" +$STD apk add nextcloud-mysql mariadb mariadb-client +$STD mysql_install_db --user=mysql --datadir=/var/lib/mysql +$STD service mariadb start +$STD rc-update add mariadb +msg_ok "Installed Alpine-Nextcloud" + +msg_info "Setting up MySQL database" +DB_NAME=nextcloud +DB_USER=nextcloud +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +ROOT_PASS="$(openssl rand -base64 18 | cut -c1-13)" +$STD mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS' WITH GRANT OPTION;FLUSH PRIVILEGES;" +$STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='';" +$STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" +$STD mysql -uroot -p$ROOT_PASS -e "DROP DATABASE test;" +$STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';" +$STD mysql -uroot -p$ROOT_PASS -e "CREATE DATABASE $DB_NAME;" +$STD mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +$STD mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS';" +$STD mysql -uroot -p$ROOT_PASS -e "FLUSH PRIVILEGES;" +echo "" >>~/nextcloud.creds +echo -e "MySQL Root Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Database User: \e[32m$DB_USER\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Database Password: \e[32m$DB_PASS\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Database Name: \e[32m$DB_NAME\e[0m" >>~/nextcloud.creds +$STD apk del mariadb-client +msg_ok "Set up MySQL database" + +msg_info "Installing Web-Server" +$STD apk add nextcloud-initscript +$STD apk add nginx +$STD apk add php82-fpm +$STD apk add php82-sysvsem +$STD apk add php82-pecl-imagick +$STD apk add php82-exif +msg_ok "Installed Web-Server" + +msg_info "Setting up Web-Server" +$STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" +$STD rm /etc/nginx/http.d/default.conf +cat <<'EOF' >/etc/nginx/http.d/nextcloud.conf +server { + listen [::]:80; + listen 80; + return 301 https://$host$request_uri; + server_name localhost; +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name localhost; + + root /usr/share/webapps/nextcloud; + index index.php index.html index.htm; + disable_symlinks off; + + ssl_certificate /etc/ssl/certs/nextcloud-selfsigned.crt; + ssl_certificate_key /etc/ssl/private/nextcloud-selfsigned.key; + ssl_session_timeout 5m; + + #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities + #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.) + ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA; + ssl_prefer_server_ciphers on; + + + location / { + try_files $uri $uri/ /index.html; + } + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + #fastcgi_pass 127.0.0.1:9000; + #fastcgi_pass unix:/run/php-fpm/socket; + fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package + fastcgi_index index.php; + include fastcgi.conf; + } + + # Help pass nextcloud's configuration checks after install: + # Per https://docs.nextcloud.com/server/22/admin_manual/issues/general_troubleshooting.html#service-discovery + location ^~ /.well-known/carddav { return 301 /remote.php/dav/; } + location ^~ /.well-known/caldav { return 301 /remote.php/dav/; } + location ^~ /.well-known/webfinger { return 301 /index.php/.well-known/webfinger; } + location ^~ /.well-known/nodeinfo { return 301 /index.php/.well-known/nodeinfo; } +} +EOF +sed -i -e 's|client_max_body_size 1m;|client_max_body_size 5120m;|' /etc/nginx/nginx.conf +sed -i -e 's|php_admin_value\[memory_limit\] = 512M|php_admin_value\[memory_limit\] = 5120M|' /etc/php82/php-fpm.d/nextcloud.conf +sed -i -e 's|php_admin_value\[post_max_size\] = 513M|php_admin_value\[post_max_size\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf +sed -i -e 's|php_admin_value\[upload_max_filesize\] = 513M|php_admin_value\[upload_max_filesize\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf +sed -i -e 's|upload_max_filesize = 513M|upload_max_filesize = 5121M|' /etc/php82/php.ini +sed -i -e 's|memory_limit = 128M|memory_limit = 512M|' /etc/php82/php.ini +msg_ok "Set up Web-Server" + +msg_info "Adding additional Nextcloud Packages" +$STD apk add nextcloud-activity +$STD apk add nextcloud-admin_audit +$STD apk add nextcloud-comments +$STD apk add nextcloud-dashboard +$STD apk add nextcloud-default-apps +$STD apk add nextcloud-doc +$STD apk add nextcloud-encryption +$STD apk add nextcloud-federation +$STD apk add nextcloud-files_external +$STD apk add nextcloud-files_pdfviewer +$STD apk add nextcloud-files_rightclick +$STD apk add nextcloud-files_sharing +$STD apk add nextcloud-files_trashbin +$STD apk add nextcloud-files_versions +$STD apk add nextcloud-logreader +$STD apk add nextcloud-notifications +$STD apk add nextcloud-password_policy +$STD apk add nextcloud-photos +$STD apk add nextcloud-privacy +$STD apk add nextcloud-recommendations +$STD apk add nextcloud-serverinfo +$STD apk add nextcloud-sharebymail +$STD apk add nextcloud-suspicious_login +$STD apk add nextcloud-support +$STD apk add nextcloud-systemtags +$STD apk add nextcloud-text +$STD apk add nextcloud-user_status +$STD apk add nextcloud-weather_status +msg_ok "Added additional Nextcloud Packages" + +msg_info "Setting up PHP-opcache + Redis" +$STD apk add php82-opcache +$STD apk add php82-redis +$STD apk add php82-apcu +$STD apk add redis +sed -i -e 's|;opcache.enable=1|opcache.enable=1|' /etc/php82/php.ini +sed -i -e 's|;opcache.enable_cli=1|opcache.enable_cli=1|' /etc/php82/php.ini +sed -i -e 's|;opcache.interned_strings_buffer=8|opcache.interned_strings_buffer=16|' /etc/php82/php.ini +sed -i -e 's|;opcache.max_accelerated_files=10000|opcache.max_accelerated_files=10000|' /etc/php82/php.ini +sed -i -e 's|;opcache.memory_consumption=128|opcache.memory_consumption=256|' /etc/php82/php.ini +sed -i -e 's|;opcache.save_comments=1|opcache.save_comments=1|' /etc/php82/php.ini +sed -i -e 's|;opcache.revalidate_freq=1|opcache.revalidate_freq=1|' /etc/php82/php.ini +$STD rc-update add redis +$STD rc-service redis start +msg_ok "Set up PHP-opcache + Redis" + +msg_info "Setting up Nextcloud-Cronjob" +mkdir -p /etc/periodic/5min +cat <<'EOF' >/etc/periodic/5min/nextcloud_cron +#!/bin/sh + +# Run only when nextcloud service is started. +if rc-service nextcloud -q status >/dev/null 2>&1; then + su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' +fi +EOF +sed -i '/monthly/a */5 * * * * run-parts /etc/periodic/5min' /etc/crontabs/root +msg_ok "Set up Nextcloud-Cronjob" + +msg_info "Setting up Nextcloud-Config" +cat <<'EOF' >/usr/share/webapps/nextcloud/config/config.php + '/var/lib/nextcloud/data', + 'logfile' => '/var/log/nextcloud/nextcloud.log', + 'logdateformat' => 'F d, Y H:i:s', + 'log_rotate_size' => 104857600, + 'apps_paths' => array ( + // Read-only location for apps shipped with Nextcloud and installed by apk. + 0 => array ( + 'path' => '/usr/share/webapps/nextcloud/apps', + 'url' => '/apps', + 'writable' => false, + ), + // Writable location for apps installed from AppStore. + 1 => array ( + 'path' => '/var/lib/nextcloud/apps', + 'url' => '/apps-appstore', + 'writable' => true, + ), + ), + 'updatechecker' => false, + 'check_for_working_htaccess' => false, + + // Uncomment to enable Zend OPcache. + 'memcache.local' => '\\OC\\Memcache\\Redis', + + // Uncomment this and add user nextcloud to the redis group to enable Redis + // cache for file locking. This is highly recommended, see + // https://github.com/nextcloud/server/issues/9305. + 'memcache.locking' => '\\OC\\Memcache\\Redis', + 'redis' => array( + 'host' => 'localhost', + 'port' => 6379, + 'dbindex' => 0, + 'timeout' => 1.5, + ), + + 'installed' => false, +); +EOF +msg_ok "Set up Nextcloud-Config" + +msg_info "Starting Alpine-Nextcloud" +$STD rc-service php-fpm82 start +$STD chown -R nextcloud:www-data /var/log/nextcloud/ +$STD rc-service php-fpm82 restart +$STD rc-service nginx start +$STD rc-service nextcloud start +$STD rc-update add nginx default +$STD rc-update add nextcloud default +msg_ok "Started Alpine-Nextcloud" + +motd_ssh +customize From c1627e1ce77f47f78883aca35d15d718fc060201 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:11:57 +0200 Subject: [PATCH 2092/3335] Fixed Update Part (#1851) there was a missing ' --- ct/alpine-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index aac6be33..8931f824 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -74,7 +74,7 @@ function update_script() { header_info case $CHOICE in 1) - INSTALLED=$(grep -Rnw '/usr/share/webapps/nextcloud/config/config.php' -e '\'installed\'' => false,') + INSTALLED=$(grep -Rnw '/usr/share/webapps/nextcloud/config/config.php' -e ''\'installed\'' => false,') if [ -z "$INSTALLED" ] then apk update && apk upgrade From a9fea5e552c40a3fae3ae619204284421e7a0816 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:29:18 +0200 Subject: [PATCH 2093/3335] Update alpine-nextcloud.sh (#1852) as suggested by tteckster --- ct/alpine-nextcloud.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 8931f824..b0faf344 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -74,15 +74,9 @@ function update_script() { header_info case $CHOICE in 1) - INSTALLED=$(grep -Rnw '/usr/share/webapps/nextcloud/config/config.php' -e ''\'installed\'' => false,') - if [ -z "$INSTALLED" ] - then - apk update && apk upgrade - su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade' - su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices' - else - msg_error "${APP} not initialized, go to the WebUI and run the Setup-Wizard first.\n" - fi + apk update && apk upgrade + su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade' + su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices' exit ;; 2) From 497b6bd9a89ef988aab9faf1b6fccc8c324bfd27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Sep 2023 13:34:24 -0400 Subject: [PATCH 2094/3335] Update alpine-nextcloud.sh tweak --- ct/alpine-nextcloud.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index b0faf344..5356a022 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -8,13 +8,12 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _ __ __ ________ __ - / | / /__ _ __/ /_/ ____/ /___ __ ______/ / - / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / - / /| / __/> Date: Thu, 28 Sep 2023 13:57:47 -0400 Subject: [PATCH 2095/3335] Update alpine-nextcloud.sh tweaks --- ct/alpine-nextcloud.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 5356a022..77ce63d0 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -61,9 +61,9 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/nextcloud/server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') while true; do CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ - "1" "Update Nextcloud to $RELEASE" ON \ - "2" "Nextcloud Credentials" OFF \ - "3" "Renew selfsigned Certificate" OFF \ + "1" "Update Nextcloud to $RELEASE" OFF \ + "2" "Nextcloud Database Credentials" ON \ + "3" "Renew Self-signed Certificate" OFF \ 3>&1 1>&2 2>&3) exit_status=$? if [ $exit_status == 1 ]; then @@ -96,8 +96,7 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "To get the randomized credentials for Setup-Wizard, -run the script again inside the LXC Container. \n +echo -e "To retrieve the database credentials required for the Setup-Wizard, execute the same script within the LXC Console.\n ${APP} should be reachable by going to the following URL. ${BL}https://${IP}${CL} \n" From feb04ca52b30a8667dba8e60c4c7a5c7231d3d2b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Sep 2023 13:59:33 -0400 Subject: [PATCH 2096/3335] Update alpine-nextcloud-install.sh tweak --- install/alpine-nextcloud-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 127f5bf1..2f33c37d 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -124,7 +124,7 @@ sed -i -e 's|upload_max_filesize = 513M|upload_max_filesize = 5121M|' /etc/php82 sed -i -e 's|memory_limit = 128M|memory_limit = 512M|' /etc/php82/php.ini msg_ok "Set up Web-Server" -msg_info "Adding additional Nextcloud Packages" +msg_info "Adding Additional Nextcloud Packages" $STD apk add nextcloud-activity $STD apk add nextcloud-admin_audit $STD apk add nextcloud-comments @@ -153,7 +153,7 @@ $STD apk add nextcloud-systemtags $STD apk add nextcloud-text $STD apk add nextcloud-user_status $STD apk add nextcloud-weather_status -msg_ok "Added additional Nextcloud Packages" +msg_ok "Added Additional Nextcloud Packages" msg_info "Setting up PHP-opcache + Redis" $STD apk add php82-opcache From 2be6c1cf55f2c2f82ae64e0df5461a0ad48ce078 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Sep 2023 14:24:16 -0400 Subject: [PATCH 2097/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index c1e36895..8b752d6d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -462,7 +462,7 @@ start() { fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support functions for ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit From c9a9e45be23e6f1b38f8878ee0651df683b98c12 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 28 Sep 2023 15:06:49 -0400 Subject: [PATCH 2098/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15de103c..7352f879 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-28 + +### Changed + +- **Alpine Nextcloud Hub LXC** + - NEW Script (Thanks to @nicedevil007) + ## 2023-09-14 ### Changed From 0bd5c03afe13c0280bb29a93c47e4a6d714ffce1 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Fri, 29 Sep 2023 08:57:16 +0200 Subject: [PATCH 2099/3335] Update for Alpine-Nextcloud (#1854) code refactoring --- ct/alpine-nextcloud.sh | 1 + install/alpine-nextcloud-install.sh | 64 +++++++++++++++++------------ 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 77ce63d0..1a6e9cf9 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -97,6 +97,7 @@ description msg_ok "Completed Successfully!\n" echo -e "To retrieve the database credentials required for the Setup-Wizard, execute the same script within the LXC Console.\n +For advanced configuration use this file: /usr/share/webapps/nextcloud/config/config.php \n ${APP} should be reachable by going to the following URL. ${BL}https://${IP}${CL} \n" diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 2f33c37d..d42cb406 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -23,18 +23,30 @@ $STD apk add mc $STD apk add argon2 msg_ok "Installed Dependencies" -msg_info "Installing Alpine-Nextcloud" -$STD apk add nextcloud-mysql mariadb mariadb-client -$STD mysql_install_db --user=mysql --datadir=/var/lib/mysql -$STD service mariadb start -$STD rc-update add mariadb -msg_ok "Installed Alpine-Nextcloud" - -msg_info "Setting up MySQL database" +msg_info "Creating Credentials" DB_NAME=nextcloud DB_USER=nextcloud DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" ROOT_PASS="$(openssl rand -base64 18 | cut -c1-13)" +ADMIN_USER=ncAdmin +ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" +echo "" >>~/nextcloud.creds +echo -e "Nextcloud Database Username: \e[32m$DB_USER\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Database Password: \e[32m$DB_PASS\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Database Name: \e[32m$DB_NAME\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Admin Username: \e[32m$ADMIN_USER\e[0m" >>~/nextcloud.creds +echo -e "MySQL Root Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds +msg_ok "Created Credentials" + +msg_info "Installing MySQL Database" +$STD apk add nextcloud-mysql mariadb mariadb-client +$STD mysql_install_db --user=mysql --datadir=/var/lib/mysql +$STD service mariadb start +$STD rc-update add mariadb +msg_ok "Installed MySQL Database" + +msg_info "Setting up MySQL Database" $STD mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS' WITH GRANT OPTION;FLUSH PRIVILEGES;" $STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='';" $STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" @@ -44,13 +56,8 @@ $STD mysql -uroot -p$ROOT_PASS -e "CREATE DATABASE $DB_NAME;" $STD mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS';" $STD mysql -uroot -p$ROOT_PASS -e "FLUSH PRIVILEGES;" -echo "" >>~/nextcloud.creds -echo -e "MySQL Root Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds -echo -e "Nextcloud Database User: \e[32m$DB_USER\e[0m" >>~/nextcloud.creds -echo -e "Nextcloud Database Password: \e[32m$DB_PASS\e[0m" >>~/nextcloud.creds -echo -e "Nextcloud Database Name: \e[32m$DB_NAME\e[0m" >>~/nextcloud.creds $STD apk del mariadb-client -msg_ok "Set up MySQL database" +msg_ok "Set up MySQL Database" msg_info "Installing Web-Server" $STD apk add nextcloud-initscript @@ -129,33 +136,23 @@ $STD apk add nextcloud-activity $STD apk add nextcloud-admin_audit $STD apk add nextcloud-comments $STD apk add nextcloud-dashboard -$STD apk add nextcloud-default-apps $STD apk add nextcloud-doc $STD apk add nextcloud-encryption $STD apk add nextcloud-federation $STD apk add nextcloud-files_external -$STD apk add nextcloud-files_pdfviewer -$STD apk add nextcloud-files_rightclick $STD apk add nextcloud-files_sharing $STD apk add nextcloud-files_trashbin $STD apk add nextcloud-files_versions -$STD apk add nextcloud-logreader $STD apk add nextcloud-notifications -$STD apk add nextcloud-password_policy -$STD apk add nextcloud-photos -$STD apk add nextcloud-privacy -$STD apk add nextcloud-recommendations -$STD apk add nextcloud-serverinfo $STD apk add nextcloud-sharebymail $STD apk add nextcloud-suspicious_login $STD apk add nextcloud-support $STD apk add nextcloud-systemtags -$STD apk add nextcloud-text $STD apk add nextcloud-user_status $STD apk add nextcloud-weather_status msg_ok "Added Additional Nextcloud Packages" -msg_info "Setting up PHP-opcache + Redis" +msg_info "Setting up Cache" $STD apk add php82-opcache $STD apk add php82-redis $STD apk add php82-apcu @@ -169,7 +166,7 @@ sed -i -e 's|;opcache.save_comments=1|opcache.save_comments=1|' /etc/php82/php.i sed -i -e 's|;opcache.revalidate_freq=1|opcache.revalidate_freq=1|' /etc/php82/php.ini $STD rc-update add redis $STD rc-service redis start -msg_ok "Set up PHP-opcache + Redis" +msg_ok "Set up Cache" msg_info "Setting up Nextcloud-Cronjob" mkdir -p /etc/periodic/5min @@ -182,6 +179,7 @@ if rc-service nextcloud -q status >/dev/null 2>&1; then fi EOF sed -i '/monthly/a */5 * * * * run-parts /etc/periodic/5min' /etc/crontabs/root +$STD chmod +x /etc/periodic/5min/nextcloud_cron msg_ok "Set up Nextcloud-Cronjob" msg_info "Setting up Nextcloud-Config" @@ -222,7 +220,6 @@ $CONFIG = array ( 'dbindex' => 0, 'timeout' => 1.5, ), - 'installed' => false, ); EOF @@ -238,5 +235,18 @@ $STD rc-update add nginx default $STD rc-update add nextcloud default msg_ok "Started Alpine-Nextcloud" +msg_info "Start Setup-Wizard" +$STD cd /usr/share/webapps/nextcloud +$STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ +--database='mysql' --database-name $DB_NAME \ +--database-user '$DB_USER' --database-pass '$DB_PASS' \ +--admin-user '$ADMIN_USER' --admin-pass '$ADMIN_PASS' \ +--data-dir '/var/lib/nextcloud/data'" +$STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' +$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable dashboard' +IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) +sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php +msg_ok "Run Setup-Wizard" + motd_ssh customize From 31c34d368ac3bb96c89f4ad822ce31c91ee2295e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 03:32:16 -0400 Subject: [PATCH 2100/3335] Update alpine-nextcloud-install.sh testing --- install/alpine-nextcloud-install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index d42cb406..a730a2b0 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -31,12 +31,12 @@ ROOT_PASS="$(openssl rand -base64 18 | cut -c1-13)" ADMIN_USER=ncAdmin ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" echo "" >>~/nextcloud.creds +echo -e "MySQL Admin Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Username: \e[32m$DB_USER\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Password: \e[32m$DB_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Name: \e[32m$DB_NAME\e[0m" >>~/nextcloud.creds -echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Admin Username: \e[32m$ADMIN_USER\e[0m" >>~/nextcloud.creds -echo -e "MySQL Root Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/nextcloud.creds msg_ok "Created Credentials" msg_info "Installing MySQL Database" @@ -70,7 +70,7 @@ msg_ok "Installed Web-Server" msg_info "Setting up Web-Server" $STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" -$STD rm /etc/nginx/http.d/default.conf +rm /etc/nginx/http.d/default.conf cat <<'EOF' >/etc/nginx/http.d/nextcloud.conf server { listen [::]:80; @@ -152,7 +152,7 @@ $STD apk add nextcloud-user_status $STD apk add nextcloud-weather_status msg_ok "Added Additional Nextcloud Packages" -msg_info "Setting up Cache" +msg_info "Setting up PHP/Redis" $STD apk add php82-opcache $STD apk add php82-redis $STD apk add php82-apcu @@ -166,7 +166,7 @@ sed -i -e 's|;opcache.save_comments=1|opcache.save_comments=1|' /etc/php82/php.i sed -i -e 's|;opcache.revalidate_freq=1|opcache.revalidate_freq=1|' /etc/php82/php.ini $STD rc-update add redis $STD rc-service redis start -msg_ok "Set up Cache" +msg_ok "Set up PHP/Redis" msg_info "Setting up Nextcloud-Cronjob" mkdir -p /etc/periodic/5min @@ -178,8 +178,8 @@ if rc-service nextcloud -q status >/dev/null 2>&1; then su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' fi EOF -sed -i '/monthly/a */5 * * * * run-parts /etc/periodic/5min' /etc/crontabs/root -$STD chmod +x /etc/periodic/5min/nextcloud_cron +#sed -i '/monthly/a */5 * * * * run-parts /etc/periodic/5min' /etc/crontabs/root +#chmod +x /etc/periodic/5min/nextcloud_cron msg_ok "Set up Nextcloud-Cronjob" msg_info "Setting up Nextcloud-Config" @@ -227,7 +227,7 @@ msg_ok "Set up Nextcloud-Config" msg_info "Starting Alpine-Nextcloud" $STD rc-service php-fpm82 start -$STD chown -R nextcloud:www-data /var/log/nextcloud/ +chown -R nextcloud:www-data /var/log/nextcloud/ $STD rc-service php-fpm82 restart $STD rc-service nginx start $STD rc-service nextcloud start @@ -236,17 +236,17 @@ $STD rc-update add nextcloud default msg_ok "Started Alpine-Nextcloud" msg_info "Start Setup-Wizard" -$STD cd /usr/share/webapps/nextcloud +cd /usr/share/webapps/nextcloud $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --database='mysql' --database-name $DB_NAME \ --database-user '$DB_USER' --database-pass '$DB_PASS' \ --admin-user '$ADMIN_USER' --admin-pass '$ADMIN_PASS' \ --data-dir '/var/lib/nextcloud/data'" $STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' -$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable dashboard' +#$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable dashboard' IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php -msg_ok "Run Setup-Wizard" +msg_ok "Finished Setup-Wizard" motd_ssh customize From 970475a21034cbc4bcde912ab9fe1d0117c00bb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 04:07:30 -0400 Subject: [PATCH 2101/3335] Update alpine-nextcloud-install.sh tweak --- install/alpine-nextcloud-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index a730a2b0..39cc825f 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -178,8 +178,8 @@ if rc-service nextcloud -q status >/dev/null 2>&1; then su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' fi EOF -#sed -i '/monthly/a */5 * * * * run-parts /etc/periodic/5min' /etc/crontabs/root -#chmod +x /etc/periodic/5min/nextcloud_cron +(crontab -l ; echo "*/5 * * * * run-parts /etc/periodic/5min") | crontab - +chmod +x /etc/periodic/5min/nextcloud_cron msg_ok "Set up Nextcloud-Cronjob" msg_info "Setting up Nextcloud-Config" @@ -243,7 +243,6 @@ $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --admin-user '$ADMIN_USER' --admin-pass '$ADMIN_PASS' \ --data-dir '/var/lib/nextcloud/data'" $STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' -#$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable dashboard' IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php msg_ok "Finished Setup-Wizard" From 9124b596eb570258000662deb59e38191b61b9e8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 05:49:09 -0400 Subject: [PATCH 2102/3335] Update rdtclient.sh fix path --- ct/rdtclient.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 3e70c3dd..227856d6 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /opt/rdtclient/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -d /opt/rdtc/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null From 88fd96dc5d3cf6213f8d58860926eac181722659 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 06:31:02 -0400 Subject: [PATCH 2103/3335] Update alpine-nextcloud.sh tweak --- ct/alpine-nextcloud.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 1a6e9cf9..2f596c9f 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -96,8 +96,5 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "To retrieve the database credentials required for the Setup-Wizard, execute the same script within the LXC Console.\n -For advanced configuration use this file: /usr/share/webapps/nextcloud/config/config.php \n - ${APP} should be reachable by going to the following URL. ${BL}https://${IP}${CL} \n" From 1c5ac20a6ff54352b01977ef6c641eecce4c00d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 06:42:06 -0400 Subject: [PATCH 2104/3335] Update alpine-nextcloud.sh --- ct/alpine-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 2f596c9f..084d36e0 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -95,6 +95,6 @@ start build_container description -msg_ok "Completed Successfully!\n" +msg_ok "Completed Successfully!\n ${APP} should be reachable by going to the following URL. ${BL}https://${IP}${CL} \n" From 9fb5e232bd56aa7a78a76e256b396390e2ebb135 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 06:48:31 -0400 Subject: [PATCH 2105/3335] Update alpine-nextcloud.sh --- ct/alpine-nextcloud.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 084d36e0..4769d44e 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -95,6 +95,6 @@ start build_container description -msg_ok "Completed Successfully!\n -${APP} should be reachable by going to the following URL. +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}https://${IP}${CL} \n" From 6faf005189dd1504394451b593fbe724f8ebba2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 12:34:23 -0400 Subject: [PATCH 2106/3335] Update alpine-nextcloud-install.sh code refactoring --- install/alpine-nextcloud-install.sh | 185 +++++++++++++--------------- 1 file changed, 83 insertions(+), 102 deletions(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 39cc825f..ae30ab31 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -20,9 +20,30 @@ $STD apk add openssl $STD apk add openssh $STD apk add nano $STD apk add mc -$STD apk add argon2 +$STD apk add nginx +echo -e "export VISUAL=nano\nexport EDITOR=nano" >>/etc/profile msg_ok "Installed Dependencies" +msg_info "Installing PHP/Redis" +$STD apk add php82-opcache +$STD apk add php82-redis +$STD apk add php82-apcu +$STD apk add php82-fpm +$STD apk add php82-sysvsem +$STD apk add php82-pecl-imagick +$STD apk add php82-exif +$STD apk add redis +sed -i -e 's|;opcache.enable=1|opcache.enable=1|' /etc/php82/php.ini +sed -i -e 's|;opcache.enable_cli=1|opcache.enable_cli=1|' /etc/php82/php.ini +sed -i -e 's|;opcache.interned_strings_buffer=8|opcache.interned_strings_buffer=16|' /etc/php82/php.ini +sed -i -e 's|;opcache.max_accelerated_files=10000|opcache.max_accelerated_files=10000|' /etc/php82/php.ini +sed -i -e 's|;opcache.memory_consumption=128|opcache.memory_consumption=256|' /etc/php82/php.ini +sed -i -e 's|;opcache.save_comments=1|opcache.save_comments=1|' /etc/php82/php.ini +sed -i -e 's|;opcache.revalidate_freq=1|opcache.revalidate_freq=1|' /etc/php82/php.ini +$STD rc-update add redis +$STD rc-service redis start +msg_ok "Installed PHP/Redis" + msg_info "Creating Credentials" DB_NAME=nextcloud DB_USER=nextcloud @@ -35,8 +56,9 @@ echo -e "MySQL Admin Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Username: \e[32m$DB_USER\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Password: \e[32m$DB_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Name: \e[32m$DB_NAME\e[0m" >>~/nextcloud.creds +echo "" >>~/nextcloud.creds echo -e "Nextcloud Admin Username: \e[32m$ADMIN_USER\e[0m" >>~/nextcloud.creds -echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m (Initially enter twice)" >>~/nextcloud.creds msg_ok "Created Credentials" msg_info "Installing MySQL Database" @@ -44,32 +66,62 @@ $STD apk add nextcloud-mysql mariadb mariadb-client $STD mysql_install_db --user=mysql --datadir=/var/lib/mysql $STD service mariadb start $STD rc-update add mariadb + +mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS' WITH GRANT OPTION;FLUSH PRIVILEGES;" +mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='';" +mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" +mysql -uroot -p$ROOT_PASS -e "DROP DATABASE test;" +mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';" +mysql -uroot -p$ROOT_PASS -e "CREATE DATABASE $DB_NAME;" +mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS';" +mysql -uroot -p$ROOT_PASS -e "FLUSH PRIVILEGES;" +$STD apk del mariadb-client msg_ok "Installed MySQL Database" -msg_info "Setting up MySQL Database" -$STD mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS' WITH GRANT OPTION;FLUSH PRIVILEGES;" -$STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='';" -$STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" -$STD mysql -uroot -p$ROOT_PASS -e "DROP DATABASE test;" -$STD mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';" -$STD mysql -uroot -p$ROOT_PASS -e "CREATE DATABASE $DB_NAME;" -$STD mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" -$STD mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS';" -$STD mysql -uroot -p$ROOT_PASS -e "FLUSH PRIVILEGES;" -$STD apk del mariadb-client -msg_ok "Set up MySQL Database" - -msg_info "Installing Web-Server" +msg_info "Installing Nextcloud" $STD apk add nextcloud-initscript -$STD apk add nginx -$STD apk add php82-fpm -$STD apk add php82-sysvsem -$STD apk add php82-pecl-imagick -$STD apk add php82-exif -msg_ok "Installed Web-Server" - -msg_info "Setting up Web-Server" $STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" +cat <<'EOF' >/usr/share/webapps/nextcloud/config/config.php + '/var/lib/nextcloud/data', + 'logfile' => '/var/log/nextcloud/nextcloud.log', + 'logdateformat' => 'F d, Y H:i:s', + 'log_rotate_size' => 104857600, + 'apps_paths' => array ( + // Read-only location for apps shipped with Nextcloud and installed by apk. + 0 => array ( + 'path' => '/usr/share/webapps/nextcloud/apps', + 'url' => '/apps', + 'writable' => false, + ), + // Writable location for apps installed from AppStore. + 1 => array ( + 'path' => '/var/lib/nextcloud/apps', + 'url' => '/apps-appstore', + 'writable' => true, + ), + ), + 'updatechecker' => false, + 'check_for_working_htaccess' => false, + + // Uncomment to enable Zend OPcache. + 'memcache.local' => '\\OC\\Memcache\\Redis', + + // Uncomment this and add user nextcloud to the redis group to enable Redis + // cache for file locking. This is highly recommended, see + // https://github.com/nextcloud/server/issues/9305. + 'memcache.locking' => '\\OC\\Memcache\\Redis', + 'redis' => array( + 'host' => 'localhost', + 'port' => 6379, + 'dbindex' => 0, + 'timeout' => 1.5, + ), + 'installed' => false, +); +EOF rm /etc/nginx/http.d/default.conf cat <<'EOF' >/etc/nginx/http.d/nextcloud.conf server { @@ -129,9 +181,10 @@ sed -i -e 's|php_admin_value\[post_max_size\] = 513M|php_admin_value\[post_max_s sed -i -e 's|php_admin_value\[upload_max_filesize\] = 513M|php_admin_value\[upload_max_filesize\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf sed -i -e 's|upload_max_filesize = 513M|upload_max_filesize = 5121M|' /etc/php82/php.ini sed -i -e 's|memory_limit = 128M|memory_limit = 512M|' /etc/php82/php.ini -msg_ok "Set up Web-Server" +msg_ok "Installed Nextcloud" msg_info "Adding Additional Nextcloud Packages" +$STD apk add nextcloud-default-apps $STD apk add nextcloud-activity $STD apk add nextcloud-admin_audit $STD apk add nextcloud-comments @@ -152,80 +205,7 @@ $STD apk add nextcloud-user_status $STD apk add nextcloud-weather_status msg_ok "Added Additional Nextcloud Packages" -msg_info "Setting up PHP/Redis" -$STD apk add php82-opcache -$STD apk add php82-redis -$STD apk add php82-apcu -$STD apk add redis -sed -i -e 's|;opcache.enable=1|opcache.enable=1|' /etc/php82/php.ini -sed -i -e 's|;opcache.enable_cli=1|opcache.enable_cli=1|' /etc/php82/php.ini -sed -i -e 's|;opcache.interned_strings_buffer=8|opcache.interned_strings_buffer=16|' /etc/php82/php.ini -sed -i -e 's|;opcache.max_accelerated_files=10000|opcache.max_accelerated_files=10000|' /etc/php82/php.ini -sed -i -e 's|;opcache.memory_consumption=128|opcache.memory_consumption=256|' /etc/php82/php.ini -sed -i -e 's|;opcache.save_comments=1|opcache.save_comments=1|' /etc/php82/php.ini -sed -i -e 's|;opcache.revalidate_freq=1|opcache.revalidate_freq=1|' /etc/php82/php.ini -$STD rc-update add redis -$STD rc-service redis start -msg_ok "Set up PHP/Redis" - -msg_info "Setting up Nextcloud-Cronjob" -mkdir -p /etc/periodic/5min -cat <<'EOF' >/etc/periodic/5min/nextcloud_cron -#!/bin/sh - -# Run only when nextcloud service is started. -if rc-service nextcloud -q status >/dev/null 2>&1; then - su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' -fi -EOF -(crontab -l ; echo "*/5 * * * * run-parts /etc/periodic/5min") | crontab - -chmod +x /etc/periodic/5min/nextcloud_cron -msg_ok "Set up Nextcloud-Cronjob" - -msg_info "Setting up Nextcloud-Config" -cat <<'EOF' >/usr/share/webapps/nextcloud/config/config.php - '/var/lib/nextcloud/data', - 'logfile' => '/var/log/nextcloud/nextcloud.log', - 'logdateformat' => 'F d, Y H:i:s', - 'log_rotate_size' => 104857600, - 'apps_paths' => array ( - // Read-only location for apps shipped with Nextcloud and installed by apk. - 0 => array ( - 'path' => '/usr/share/webapps/nextcloud/apps', - 'url' => '/apps', - 'writable' => false, - ), - // Writable location for apps installed from AppStore. - 1 => array ( - 'path' => '/var/lib/nextcloud/apps', - 'url' => '/apps-appstore', - 'writable' => true, - ), - ), - 'updatechecker' => false, - 'check_for_working_htaccess' => false, - - // Uncomment to enable Zend OPcache. - 'memcache.local' => '\\OC\\Memcache\\Redis', - - // Uncomment this and add user nextcloud to the redis group to enable Redis - // cache for file locking. This is highly recommended, see - // https://github.com/nextcloud/server/issues/9305. - 'memcache.locking' => '\\OC\\Memcache\\Redis', - 'redis' => array( - 'host' => 'localhost', - 'port' => 6379, - 'dbindex' => 0, - 'timeout' => 1.5, - ), - 'installed' => false, -); -EOF -msg_ok "Set up Nextcloud-Config" - -msg_info "Starting Alpine-Nextcloud" +msg_info "Starting Services" $STD rc-service php-fpm82 start chown -R nextcloud:www-data /var/log/nextcloud/ $STD rc-service php-fpm82 restart @@ -233,9 +213,9 @@ $STD rc-service nginx start $STD rc-service nextcloud start $STD rc-update add nginx default $STD rc-update add nextcloud default -msg_ok "Started Alpine-Nextcloud" +msg_ok "Started Services" -msg_info "Start Setup-Wizard" +msg_info "Start Nextcloud Setup-Wizard" cd /usr/share/webapps/nextcloud $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --database='mysql' --database-name $DB_NAME \ @@ -245,7 +225,8 @@ $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ $STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php -msg_ok "Finished Setup-Wizard" +su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' +msg_ok "Finished Nextcloud Setup-Wizard" motd_ssh customize From 6e296bbc2e11c50ea05dd361ea9304b884362b3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 13:10:04 -0400 Subject: [PATCH 2107/3335] Update alpine-nextcloud-install.sh error control --- install/alpine-nextcloud-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index ae30ab31..e201875b 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -175,6 +175,7 @@ server { location ^~ /.well-known/nodeinfo { return 301 /index.php/.well-known/nodeinfo; } } EOF +sed -i -E '/^php_admin_(flag|value)\[opcache/s/^/;/' /etc/php82/php-fpm.d/nextcloud.conf sed -i -e 's|client_max_body_size 1m;|client_max_body_size 5120m;|' /etc/nginx/nginx.conf sed -i -e 's|php_admin_value\[memory_limit\] = 512M|php_admin_value\[memory_limit\] = 5120M|' /etc/php82/php-fpm.d/nextcloud.conf sed -i -e 's|php_admin_value\[post_max_size\] = 513M|php_admin_value\[post_max_size\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf From c2b3388dbaba512ac67b29408c7d505446c190b8 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Fri, 29 Sep 2023 19:37:56 +0200 Subject: [PATCH 2108/3335] Updates (#1859) - APCu enabled for most performance on single server (https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html) - External Storage working with CIFS/SMB now - Disabled Serverinfo because it is not working on alpine (shell_exec.....) --- install/alpine-nextcloud-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index e201875b..7c508489 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -31,6 +31,7 @@ $STD apk add php82-apcu $STD apk add php82-fpm $STD apk add php82-sysvsem $STD apk add php82-pecl-imagick +$STD apk add php82-pecl-smbclient $STD apk add php82-exif $STD apk add redis sed -i -e 's|;opcache.enable=1|opcache.enable=1|' /etc/php82/php.ini @@ -107,7 +108,8 @@ $CONFIG = array ( 'check_for_working_htaccess' => false, // Uncomment to enable Zend OPcache. - 'memcache.local' => '\\OC\\Memcache\\Redis', + 'memcache.local' => '\\OC\\Memcache\\APCu', + 'memcache.distributed' => '\\OC\\Memcache\\Redis', // Uncomment this and add user nextcloud to the redis group to enable Redis // cache for file locking. This is highly recommended, see @@ -182,6 +184,7 @@ sed -i -e 's|php_admin_value\[post_max_size\] = 513M|php_admin_value\[post_max_s sed -i -e 's|php_admin_value\[upload_max_filesize\] = 513M|php_admin_value\[upload_max_filesize\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf sed -i -e 's|upload_max_filesize = 513M|upload_max_filesize = 5121M|' /etc/php82/php.ini sed -i -e 's|memory_limit = 128M|memory_limit = 512M|' /etc/php82/php.ini +sed -i -e '$aapc.enable_cli=1' /etc/php82/php.ini msg_ok "Installed Nextcloud" msg_info "Adding Additional Nextcloud Packages" @@ -224,6 +227,7 @@ $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --admin-user '$ADMIN_USER' --admin-pass '$ADMIN_PASS' \ --data-dir '/var/lib/nextcloud/data'" $STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' +$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable serverinfo' IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' From 60112cddd2691fc6efe6cd8ae624cd7aeffef3c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 13:50:17 -0400 Subject: [PATCH 2109/3335] Update alpine-nextcloud-install.sh test --- install/alpine-nextcloud-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 7c508489..01cfa664 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -227,7 +227,7 @@ $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --admin-user '$ADMIN_USER' --admin-pass '$ADMIN_PASS' \ --data-dir '/var/lib/nextcloud/data'" $STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' -$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable serverinfo' +#$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable serverinfo' IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' From 7af2bda0395d65c3c880dac252c1be4c68f1733c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 13:58:45 -0400 Subject: [PATCH 2110/3335] Update alpine-nextcloud-install.sh fix error in logs --- install/alpine-nextcloud-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 01cfa664..83e029be 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -227,7 +227,7 @@ $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --admin-user '$ADMIN_USER' --admin-pass '$ADMIN_PASS' \ --data-dir '/var/lib/nextcloud/data'" $STD su nextcloud -s /bin/sh -c 'php82 occ background:cron' -#$STD su nextcloud -s /bin/sh -c 'php82 occ app:disable serverinfo' +rm -rf /usr/share/webapps/nextcloud/apps/serverinfo IP4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) sed -i "/0 => \'localhost\',/a \ \1 => '$IP4'," /usr/share/webapps/nextcloud/config/config.php su nextcloud -s /bin/sh -c 'php82 -f /usr/share/webapps/nextcloud/cron.php' From 1f63d49e428da3080cb30794f3e1c89ccefe38fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Sep 2023 18:32:43 -0400 Subject: [PATCH 2111/3335] Update alpine-nextcloud-install.sh code refactoring --- install/alpine-nextcloud-install.sh | 78 ++++++----------------------- 1 file changed, 14 insertions(+), 64 deletions(-) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 83e029be..15ead7e0 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -21,7 +21,6 @@ $STD apk add openssh $STD apk add nano $STD apk add mc $STD apk add nginx -echo -e "export VISUAL=nano\nexport EDITOR=nano" >>/etc/profile msg_ok "Installed Dependencies" msg_info "Installing PHP/Redis" @@ -30,57 +29,35 @@ $STD apk add php82-redis $STD apk add php82-apcu $STD apk add php82-fpm $STD apk add php82-sysvsem -$STD apk add php82-pecl-imagick $STD apk add php82-pecl-smbclient +$STD apk add php82-pecl-imagick $STD apk add php82-exif $STD apk add redis -sed -i -e 's|;opcache.enable=1|opcache.enable=1|' /etc/php82/php.ini -sed -i -e 's|;opcache.enable_cli=1|opcache.enable_cli=1|' /etc/php82/php.ini -sed -i -e 's|;opcache.interned_strings_buffer=8|opcache.interned_strings_buffer=16|' /etc/php82/php.ini -sed -i -e 's|;opcache.max_accelerated_files=10000|opcache.max_accelerated_files=10000|' /etc/php82/php.ini -sed -i -e 's|;opcache.memory_consumption=128|opcache.memory_consumption=256|' /etc/php82/php.ini -sed -i -e 's|;opcache.save_comments=1|opcache.save_comments=1|' /etc/php82/php.ini -sed -i -e 's|;opcache.revalidate_freq=1|opcache.revalidate_freq=1|' /etc/php82/php.ini -$STD rc-update add redis -$STD rc-service redis start msg_ok "Installed PHP/Redis" -msg_info "Creating Credentials" +msg_info "Installing MySQL Database" DB_NAME=nextcloud DB_USER=nextcloud DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" -ROOT_PASS="$(openssl rand -base64 18 | cut -c1-13)" -ADMIN_USER=ncAdmin ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" echo "" >>~/nextcloud.creds -echo -e "MySQL Admin Password: \e[32m$ROOT_PASS\e[0m" >>~/nextcloud.creds +echo -e "MySQL Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Username: \e[32m$DB_USER\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Password: \e[32m$DB_PASS\e[0m" >>~/nextcloud.creds echo -e "Nextcloud Database Name: \e[32m$DB_NAME\e[0m" >>~/nextcloud.creds -echo "" >>~/nextcloud.creds -echo -e "Nextcloud Admin Username: \e[32m$ADMIN_USER\e[0m" >>~/nextcloud.creds -echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m (Initially enter twice)" >>~/nextcloud.creds -msg_ok "Created Credentials" - -msg_info "Installing MySQL Database" $STD apk add nextcloud-mysql mariadb mariadb-client $STD mysql_install_db --user=mysql --datadir=/var/lib/mysql $STD service mariadb start $STD rc-update add mariadb - -mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS' WITH GRANT OPTION;FLUSH PRIVILEGES;" -mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='';" -mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" -mysql -uroot -p$ROOT_PASS -e "DROP DATABASE test;" -mysql -uroot -p$ROOT_PASS -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';" -mysql -uroot -p$ROOT_PASS -e "CREATE DATABASE $DB_NAME;" -mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" -mysql -uroot -p$ROOT_PASS -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS';" -mysql -uroot -p$ROOT_PASS -e "FLUSH PRIVILEGES;" +mysql -uroot -p"$ADMIN_PASS" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ADMIN_PASS' WITH GRANT OPTION; DELETE FROM mysql.user WHERE User=''; DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); DROP DATABASE test; DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'; CREATE DATABASE $DB_NAME; GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS'; GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS'; FLUSH PRIVILEGES;" $STD apk del mariadb-client msg_ok "Installed MySQL Database" msg_info "Installing Nextcloud" +ADMIN_USER=ncAdmin +echo "" >>~/nextcloud.creds +echo -e "Nextcloud Admin Username: \e[32m$ADMIN_USER\e[0m" >>~/nextcloud.creds +echo -e "Nextcloud Admin Password: \e[32m$ADMIN_PASS\e[0m (Initially enter twice)" >>~/nextcloud.creds $STD apk add nextcloud-initscript $STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" cat <<'EOF' >/usr/share/webapps/nextcloud/config/config.php @@ -91,13 +68,11 @@ $CONFIG = array ( 'logdateformat' => 'F d, Y H:i:s', 'log_rotate_size' => 104857600, 'apps_paths' => array ( - // Read-only location for apps shipped with Nextcloud and installed by apk. 0 => array ( 'path' => '/usr/share/webapps/nextcloud/apps', 'url' => '/apps', 'writable' => false, ), - // Writable location for apps installed from AppStore. 1 => array ( 'path' => '/var/lib/nextcloud/apps', 'url' => '/apps-appstore', @@ -106,14 +81,7 @@ $CONFIG = array ( ), 'updatechecker' => false, 'check_for_working_htaccess' => false, - - // Uncomment to enable Zend OPcache. - 'memcache.local' => '\\OC\\Memcache\\APCu', - 'memcache.distributed' => '\\OC\\Memcache\\Redis', - - // Uncomment this and add user nextcloud to the redis group to enable Redis - // cache for file locking. This is highly recommended, see - // https://github.com/nextcloud/server/issues/9305. + 'memcache.local' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array( 'host' => 'localhost', @@ -124,7 +92,7 @@ $CONFIG = array ( 'installed' => false, ); EOF -rm /etc/nginx/http.d/default.conf +rm -rf /etc/nginx/http.d/default.conf cat <<'EOF' >/etc/nginx/http.d/nextcloud.conf server { listen [::]:80; @@ -132,59 +100,38 @@ server { return 301 https://$host$request_uri; server_name localhost; } - server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name localhost; - root /usr/share/webapps/nextcloud; index index.php index.html index.htm; disable_symlinks off; - ssl_certificate /etc/ssl/certs/nextcloud-selfsigned.crt; ssl_certificate_key /etc/ssl/private/nextcloud-selfsigned.key; ssl_session_timeout 5m; - - #Enable Perfect Forward Secrecy and ciphers without known vulnerabilities - #Beware! It breaks compatibility with older OS and browsers (e.g. Windows XP, Android 2.x, etc.) ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA; ssl_prefer_server_ciphers on; - - location / { try_files $uri $uri/ /index.html; } - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } - #fastcgi_pass 127.0.0.1:9000; - #fastcgi_pass unix:/run/php-fpm/socket; fastcgi_pass unix:/run/nextcloud/fastcgi.sock; # From the nextcloud-initscript package fastcgi_index index.php; include fastcgi.conf; } - - # Help pass nextcloud's configuration checks after install: - # Per https://docs.nextcloud.com/server/22/admin_manual/issues/general_troubleshooting.html#service-discovery location ^~ /.well-known/carddav { return 301 /remote.php/dav/; } location ^~ /.well-known/caldav { return 301 /remote.php/dav/; } location ^~ /.well-known/webfinger { return 301 /index.php/.well-known/webfinger; } location ^~ /.well-known/nodeinfo { return 301 /index.php/.well-known/nodeinfo; } } EOF +sed -i -e 's|memory_limit = 128M|memory_limit = 512M|; $aapc.enable_cli=1' /etc/php82/php.ini sed -i -E '/^php_admin_(flag|value)\[opcache/s/^/;/' /etc/php82/php-fpm.d/nextcloud.conf -sed -i -e 's|client_max_body_size 1m;|client_max_body_size 5120m;|' /etc/nginx/nginx.conf -sed -i -e 's|php_admin_value\[memory_limit\] = 512M|php_admin_value\[memory_limit\] = 5120M|' /etc/php82/php-fpm.d/nextcloud.conf -sed -i -e 's|php_admin_value\[post_max_size\] = 513M|php_admin_value\[post_max_size\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf -sed -i -e 's|php_admin_value\[upload_max_filesize\] = 513M|php_admin_value\[upload_max_filesize\] = 5121M|' /etc/php82/php-fpm.d/nextcloud.conf -sed -i -e 's|upload_max_filesize = 513M|upload_max_filesize = 5121M|' /etc/php82/php.ini -sed -i -e 's|memory_limit = 128M|memory_limit = 512M|' /etc/php82/php.ini -sed -i -e '$aapc.enable_cli=1' /etc/php82/php.ini msg_ok "Installed Nextcloud" msg_info "Adding Additional Nextcloud Packages" @@ -210,6 +157,8 @@ $STD apk add nextcloud-weather_status msg_ok "Added Additional Nextcloud Packages" msg_info "Starting Services" +$STD rc-service redis start +$STD rc-update add redis default $STD rc-service php-fpm82 start chown -R nextcloud:www-data /var/log/nextcloud/ $STD rc-service php-fpm82 restart @@ -220,6 +169,7 @@ $STD rc-update add nextcloud default msg_ok "Started Services" msg_info "Start Nextcloud Setup-Wizard" +echo -e "export VISUAL=nano\nexport EDITOR=nano" >>/etc/profile cd /usr/share/webapps/nextcloud $STD su nextcloud -s /bin/sh -c "php82 occ maintenance:install \ --database='mysql' --database-name $DB_NAME \ From 4280da6c42f814a1730ff0127bd96fc005ca5c95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Sep 2023 07:03:00 -0400 Subject: [PATCH 2112/3335] Update alpine-nextcloud.sh tweak --- ct/alpine-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 4769d44e..0028e6a7 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -96,5 +96,5 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${APP} Setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}https://${IP}${CL} \n" From 0e60f4ac4b0117fdf32b5aff97462ba3f4ecceec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Sep 2023 08:29:05 -0400 Subject: [PATCH 2113/3335] Update umbrel.sh set default Debian 12 fixes https://github.com/tteck/Proxmox/issues/1862 http://umbrel.local --- ct/umbrel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 8babfc1b..2dd3c08f 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 45067cfdd1b57179f00ba244d67de4b840adabbe Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Sep 2023 11:19:22 -0400 Subject: [PATCH 2114/3335] Update unifi.sh tweak update --- ct/unifi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/unifi.sh b/ct/unifi.sh index 5f20a0ed..188b5f56 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -54,7 +54,7 @@ function update_script() { header_info if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" -apt-get update +apt-get update --allow-releaseinfo-change apt-get install -y unifi msg_ok "Updated Successfully" exit From 3678d28151068620c74e21420e627e41cc4043df Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Sep 2023 11:55:47 -0400 Subject: [PATCH 2115/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7352f879..1b6f1615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-09-30 + +### Changed + +- **All Templates** + - NEW Script + ## 2023-09-28 ### Changed From a37c57665d46ce234eb0cbf514f9d111e81a8c6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Oct 2023 07:51:17 -0400 Subject: [PATCH 2116/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 8b752d6d..75878301 100644 --- a/misc/build.func +++ b/misc/build.func @@ -462,7 +462,7 @@ start() { fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support functions for ${APP} LXC. Proceed?" 10 58); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit From b1f2e76f7a78dbefe131b9f7274c3e7e8264ef66 Mon Sep 17 00:00:00 2001 From: leiweibau <105860611+leiweibau@users.noreply.github.com> Date: Mon, 2 Oct 2023 19:26:18 +0200 Subject: [PATCH 2117/3335] Update pialert-install.sh (#1871) Update php dependencies. --- install/pialert-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 789710c0..0a5d06cf 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -38,6 +38,7 @@ $STD apt-get -y install \ php-cgi \ php-fpm \ php-curl \ + php-xml \ php-sqlite3 $STD lighttpd-enable-mod fastcgi-php service lighttpd force-reload From d48605dcde110003572fb4d67fdcc8ad27a39e04 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:14:26 +0200 Subject: [PATCH 2118/3335] Update Alpine Nextcloud (#1876) add php82-pecl-vips --- install/alpine-nextcloud-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 15ead7e0..e89a1c4a 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -31,6 +31,7 @@ $STD apk add php82-fpm $STD apk add php82-sysvsem $STD apk add php82-pecl-smbclient $STD apk add php82-pecl-imagick +$STD apk add php82-pecl-vips $STD apk add php82-exif $STD apk add redis msg_ok "Installed PHP/Redis" From 9c7dccf152290177b1805c4dfb80b2c05275aa35 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:59:18 +0200 Subject: [PATCH 2119/3335] Update Alpine Nextcloud (#1877) add option for FTP Support --- install/alpine-nextcloud-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index e89a1c4a..8ee125bf 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -29,6 +29,7 @@ $STD apk add php82-redis $STD apk add php82-apcu $STD apk add php82-fpm $STD apk add php82-sysvsem +$STD apk add php82-ftp $STD apk add php82-pecl-smbclient $STD apk add php82-pecl-imagick $STD apk add php82-pecl-vips From 597c9ad1e3ae2a745a1927c11bb6267efabcd47a Mon Sep 17 00:00:00 2001 From: Ben Bennett Date: Tue, 3 Oct 2023 11:32:18 -0400 Subject: [PATCH 2120/3335] Add fedora disk info command (#1878) Added fedora to the supported list for the disk info command. --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 1e63ff1b..2e4c510d 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -41,7 +41,7 @@ function update_container() { header_info name=$(pct exec "$container" hostname) os=$(pct config "$container" | awk '/^ostype/ {print $2}') - if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then + if [[ "$os" == "ubuntu" || "$os" == "debian" || "$os" == "fedora" ]]; then disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }') read -ra disk_info_array <<<"$disk_info" echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]${CL}\n" From 216d7116601d9b594235dad35b69f3b65a822494 Mon Sep 17 00:00:00 2001 From: h-4-t <65722138+h-4-t@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:11:30 +0100 Subject: [PATCH 2121/3335] Update monitor-all.sh (#1881) Fix service file --- misc/monitor-all.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 02d0b696..f7e74dcf 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -102,7 +102,8 @@ Type=simple # To specify which CT/VM should be excluded, add the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified. # For example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 # Virtual machines without the QEMU guest agent installed must be excluded. -ExecStartPre=/usr/bin/sleep 300 # Sleep for 300 seconds (5 minutes) +# Sleep for 300 seconds (5 minutes) +ExecStartPre=/usr/bin/sleep 300 ExecStart=/usr/local/bin/ping-instances.sh Restart=always StandardOutput=file:/var/log/ping-instances.log From c37e75f6eed17494a060de342a181ec4c2682ccd Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 4 Oct 2023 07:36:49 -0400 Subject: [PATCH 2122/3335] Update node-red-install.sh node version 20 --- install/node-red-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 5b673133..94271b41 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 295ddcdc8237958ce788178401866815137bbe0a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 01:15:20 -0400 Subject: [PATCH 2123/3335] Create pingvin-install.sh --- install/pingvin-install.sh | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 install/pingvin-install.sh diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh new file mode 100644 index 00000000..b8d31fb2 --- /dev/null +++ b/install/pingvin-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install pm2 -g +msg_ok "Installed Node.js" + +msg_info "Installing Pingvin Share (Patience)" +git clone -q https://github.com/stonith404/pingvin-share /opt/pingvin-share +cd /opt/pingvin-share +$STD git fetch --tags +$STD git checkout $(git describe --tags `git rev-list --tags --max-count=1`) +cd backend +$STD npm install +$STD npm run build +$STD pm2 start --name="pingvin-share-backend" npm -- run prod +cd ../frontend +$STD npm install +$STD npm run build +$STD pm2 start --name="pingvin-share-frontend" npm -- run start +$STD pm2 startup +msg_ok "Installed Pingvin Share" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 0c5836e61a6a7d2a3c4636f5f8a8d6ed10e37c4e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 01:21:05 -0400 Subject: [PATCH 2124/3335] Create pingvin.sh --- ct/pingvin.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/pingvin.sh diff --git a/ct/pingvin.sh b/ct/pingvin.sh new file mode 100644 index 00000000..20ad9b67 --- /dev/null +++ b/ct/pingvin.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _ _ _____ __ + / __ \(_)___ ____ __ __(_)___ / ___// /_ ____ _________ + / /_/ / / __ \/ __ `/ | / / / __ \ \__ \/ __ \/ __ `/ ___/ _ \ + / ____/ / / / / /_/ /| |/ / / / / / ___/ / / / / /_/ / / / __/ +/_/ /_/_/ /_/\__, / |___/_/_/ /_/ /____/_/ /_/\__,_/_/ \___/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Pingvin" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000 ${CL} \n" From e9d6f10b3c0b7afebe13617b1ac5f7bb49ad9b8b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 09:11:08 -0400 Subject: [PATCH 2125/3335] Update pingvin.sh create update path --- ct/pingvin.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 20ad9b67..cba10c06 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -52,8 +52,26 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +if [[ ! -d /opt/pingvin-share ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping Pingvin Share" +pm2 stop pingvin-share-backend pingvin-share-frontend &>/dev/null +msg_ok "Stopped Pingvin Share" + +msg_info "Updating Pingvin Share" +cd /opt/pingvin-share +git fetch --tags +git checkout $(git describe --tags `git rev-list --tags --max-count=1`) &>/dev/null +cd backend +npm run build &>/dev/null +cd ../frontend +npm run build &>/dev/null +msg_ok "Updated Pingvin Share" + +msg_info "Starting Pingvin Share" +pm2 start pingvin-share-backend pingvin-share-frontend &>/dev/null +msg_ok "Started Pingvin Share" + +msg_ok "Updated Successfully" exit } From 067169f92bfecb2a7bf3bea5d11a62630a1b8e76 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 09:22:47 -0400 Subject: [PATCH 2126/3335] Update pingvin-install.sh add update command --- install/pingvin-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index b8d31fb2..6131e534 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -47,6 +47,8 @@ $STD npm install $STD npm run build $STD pm2 start --name="pingvin-share-frontend" npm -- run start $STD pm2 startup +echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update +chmod +x /usr/bin/update msg_ok "Installed Pingvin Share" motd_ssh From 95e6a5436ab1ffc4ada8606184ab980f4c4e1db1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 09:26:18 -0400 Subject: [PATCH 2127/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b6f1615..aa0db42f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-10-05 + +### Changed + +- **Pingvin Share LXC** + - NEW Script + ## 2023-09-30 ### Changed From e45aa5e42a98ecbc3c75bd034376fa2337113ab1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 15:36:19 -0400 Subject: [PATCH 2128/3335] Update install.func - globally add update command --- install/esphome-install.sh | 2 -- install/homeassistant-core-install.sh | 2 -- install/homeassistant-install.sh | 2 -- install/node-red-install.sh | 2 -- install/omada-install.sh | 2 -- install/pingvin-install.sh | 2 -- install/zigbee2mqtt-install.sh | 2 -- misc/install.func | 2 ++ 8 files changed, 2 insertions(+), 14 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 5cb2cb59..7dbbbc18 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -35,8 +35,6 @@ msg_info "Installing ESPHome" #python3 -m venv . #source bin/activate $STD pip install esphome tornado esptool -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed ESPHome" msg_info "Creating Service" diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 0c3a8cff..cbb10ed5 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -87,8 +87,6 @@ $STD pip install homeassistant $STD pip install mysqlclient $STD pip install psycopg2-binary mkdir -p /root/.homeassistant -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed Home Assistant-Core" msg_info "Creating Service" diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 5bfe63d2..0c19ca6c 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -88,8 +88,6 @@ $STD docker run -d \ --net=host \ ghcr.io/home-assistant/home-assistant:stable mkdir /root/hass_config -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" motd_ssh diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 94271b41..dc1f8759 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -43,8 +43,6 @@ echo "systemctl start nodered" >/usr/bin/node-red-start chmod +x /usr/bin/node-red-start echo "systemctl restart nodered" >/usr/bin/node-red-restart chmod +x /usr/bin/node-red-restart -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed Node-Red" msg_info "Creating Service" diff --git a/install/omada-install.sh b/install/omada-install.sh index f2f7a3e5..79a35359 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -42,8 +42,6 @@ latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//') msg_info "Installing Omada Controller ${latest_version}" wget -qL ${latest_url} $STD dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed Omada Controller ${latest_version}" motd_ssh diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index 6131e534..b8d31fb2 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -47,8 +47,6 @@ $STD npm install $STD npm run build $STD pm2 start --name="pingvin-share-frontend" npm -- run start $STD pm2 startup -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed Pingvin Share" motd_ssh diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 1e8b5089..dc52ffa0 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -53,8 +53,6 @@ if [[ $DEV == "y" ]]; then $STD git checkout dev fi $STD npm ci -echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update -chmod +x /usr/bin/update msg_ok "Installed Zigbee2MQTT" msg_info "Creating Service" diff --git a/misc/install.func b/misc/install.func index 24fd8533..a15364c2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -143,4 +143,6 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi + echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update + chmod +x /usr/bin/update } From ec6ff20ca2690eac1f9dc6323aebf36be1bfe2f0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Oct 2023 23:38:34 -0400 Subject: [PATCH 2129/3335] Update all-templates.sh change whiptail variables --- misc/all-templates.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/all-templates.sh b/misc/all-templates.sh index 34c291a5..d376cbf7 100644 --- a/misc/all-templates.sh +++ b/misc/all-templates.sh @@ -59,14 +59,14 @@ header_info echo "Loading..." pveam update >/dev/null 2>&1 whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68 || exit -CTID_MENU=() +TEMPLATE_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$ITEM" "$TAG " "OFF") + TEMPLATE_MENU+=("$ITEM" "$TAG " "OFF") done < <(pveam available) -TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${TEMPLATE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$TEMPLATE" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68 msg "Done" From 6c57809037e1d594c33371d167dfbb2069e679e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Oct 2023 23:42:54 -0400 Subject: [PATCH 2130/3335] Update clean-lxcs.sh change whiptail variables --- misc/clean-lxcs.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index a44e67cb..99af44a9 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -25,13 +25,15 @@ header_info echo "Loading..." whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) +EXCLUDE_MENU=() +MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \ - 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit function clean_container() { container=$1 From 6b2df5dd0f85cb2a1483250666ef18ee42dc22a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Oct 2023 23:48:01 -0400 Subject: [PATCH 2131/3335] Update microcode.sh change whiptail variables --- misc/microcode.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 7900bacd..a4653be5 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -46,16 +46,16 @@ intel() { intel_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode//" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//') [ -z "$intel_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } - CTID_MENU=() + MICROCODE_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + MICROCODE_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$intel_microcode") - microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } @@ -78,16 +78,16 @@ amd() { [ -z "$amd_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } - CTID_MENU=() + MICROCODE_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + MICROCODE_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$amd_microcode") - microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } From 7b7619aaa7d0c574eb628bcc2e2364561267a613 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Oct 2023 23:51:11 -0400 Subject: [PATCH 2132/3335] Update update-lxcs.sh change whiptail variables --- misc/update-lxcs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 2e4c510d..53fdd42c 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -28,14 +28,14 @@ header_info echo "Loading..." whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit NODE=$(hostname) -CTID_MENU=() +EXCLUDE_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit function update_container() { container=$1 header_info From 5d40a203e6953d46c6d5724cafa6b451bec60bd0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Oct 2023 23:53:18 -0400 Subject: [PATCH 2133/3335] Update turnkey.sh change whiptail variables --- turnkey/turnkey.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index 292930f6..a77573b5 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -57,12 +57,12 @@ if systemctl is-active -q ping-instances.service; then fi header_info whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno "This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68 || exit -CTID_MENU=() +TURNKEY_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + TURNKEY_MENU+=("$TAG" "$ITEM " "OFF") done < <( cat <&1 1>&2 2>&3 | tr -d '"') || exit +turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist "\nSelect a TurnKey LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${TURNKEY_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$turnkey" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" --msgbox "It appears that no TurnKey LXC container was selected" 10 68 msg "Done" From 27060de398f769a87580ea845f481c141f003eb8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Oct 2023 13:31:39 -0400 Subject: [PATCH 2134/3335] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa0db42f..ee6e1518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ - +

+ # Change Log **All notable changes to this project will be documented in this file.**
From bc4329a3b4676a62e8a97fda18b6b1d714ede556 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Oct 2023 13:53:26 -0400 Subject: [PATCH 2135/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6e1518..79ac503b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -

+

# Change Log **All notable changes to this project will be documented in this file.**
From 40ea76c0662d9c309c902283bd62011e43eb4447 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 Oct 2023 13:55:25 -0400 Subject: [PATCH 2136/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79ac503b..0210c6a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -

+

# Change Log **All notable changes to this project will be documented in this file.**
From 87e3c7581db6f8214dbc633f18b8c39f5706df6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 10:06:12 -0400 Subject: [PATCH 2137/3335] Update update-lxcs.sh List containers that require a reboot --- misc/update-lxcs.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 53fdd42c..1254b454 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -36,6 +36,21 @@ while read -r TAG ITEM; do EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + +function needs_reboot() { + local container=$1 + local os=$(pct config "$container" | awk '/^ostype/ {print $2}') + local reboot_required_file="/var/run/reboot-required.pkgs" + if [ -f "$reboot_required_file" ]; then + if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then + if pct exec "$container" -- [ -s "$reboot_required_file" ]; then + return 0 + fi + fi + fi + return 1 +} + function update_container() { container=$1 header_info @@ -55,6 +70,8 @@ function update_container() { ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; esac } + +containers_needing_reboot=() header_info for container in $(pct list | awk '{if(NR>1) print $1}'); do if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then @@ -75,8 +92,18 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do elif [ "$status" == "status: running" ]; then update_container $container fi + if pct exec "$container" -- [ -e "/var/run/reboot-required" ]; then + containers_needing_reboot+=("$container") + fi fi done wait header_info -echo -e "${GN} Finished, Selected Containers Updated. ${CL} \n" +echo -e "${GN}The process is complete, and the selected containers have been updated.${CL}\n" +if [ "${#containers_needing_reboot[@]}" -gt 0 ]; then + echo -e "${RD}The following containers require a reboot:${CL}" + for container_name in "${containers_needing_reboot[@]}"; do + echo "$container_name" + done +fi +echo "" From 61773ad6afa17e4c580b7587235054e3196d4eb2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 10:44:00 -0400 Subject: [PATCH 2138/3335] Update CHANGELOG.md - Proxmox VE LXC Updater --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0210c6a7..ba43fd68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-10-08 + +### Changed + +- **Proxmox VE LXC Updater** + - Now displays which containers require a reboot. + ## 2023-10-05 ### Changed From 3b4b021c9a6f489a819ca8c93407452a57f515b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 12:01:25 -0400 Subject: [PATCH 2139/3335] Update update-lxcs.sh display hostname of containers that require a reboot --- misc/update-lxcs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 1254b454..e1b810da 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -93,7 +93,9 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do update_container $container fi if pct exec "$container" -- [ -e "/var/run/reboot-required" ]; then - containers_needing_reboot+=("$container") + # Get the container's hostname and add it to the list + container_hostname=$(pct exec "$container" hostname) + containers_needing_reboot+=("$container - $container_hostname") fi fi done From 1517bec1c3a21a9d401b0a0a4eb08ad08703e9bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 12:07:56 -0400 Subject: [PATCH 2140/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index e1b810da..9a48dc1f 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -95,7 +95,7 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do if pct exec "$container" -- [ -e "/var/run/reboot-required" ]; then # Get the container's hostname and add it to the list container_hostname=$(pct exec "$container" hostname) - containers_needing_reboot+=("$container - $container_hostname") + containers_needing_reboot+=("$container ($container_hostname)") fi fi done From 453a934c8f252bdb50ebd14c884ce02f36a0bcb3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 15:08:30 -0400 Subject: [PATCH 2141/3335] Update kernel-clean.sh code refactoring --- misc/kernel-clean.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index d34a63af..7918ff81 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -38,24 +38,29 @@ function msg_ok() { } whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Clean" --yesno "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed?" 10 68 || exit - if [ -z "$available_kernels" ]; then whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Old Kernels" --msgbox "It appears there are no old Kernels on your system. \nCurrent kernel ($current_kernel)." 10 68 - msg_info "Exiting" + echo "Exiting..." sleep 2 - msg_ok "Done" + clear exit fi - + KERNEL_MENU=() + MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + KERNEL_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$available_kernels") -remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" \ - 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit - +remove_kernels=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --checklist "\nSelect Kernels to remove:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${KERNEL_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +[ -z "$remove_kernels" ] && { + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Kernel Selected" --msgbox "It appears that no Kernel was selected" 10 68 + echo "Exiting..." + sleep 2 + clear + exit +} whiptail --backtitle "Proxmox VE Helper Scripts" --title "Remove Kernels" --yesno "Would you like to remove the $(echo $remove_kernels | awk '{print NF}') previously selected Kernels?" 10 68 || exit msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" @@ -67,4 +72,4 @@ msg_info "Updating GRUB" msg_ok "Successfully Updated GRUB" msg_info "Exiting" sleep 2 -msg_ok "Done" +msg_ok "Finished" From 8bc37d93b7636ea408a1ae7653f023d3eadfe0c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 19:44:36 -0400 Subject: [PATCH 2142/3335] Delete misc/bluetooth.sh outdated --- misc/bluetooth.sh | 58 ----------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 misc/bluetooth.sh diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh deleted file mode 100644 index d3a3ca60..00000000 --- a/misc/bluetooth.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi -set -e -clear - -while true; do - read -p "Start the Bluetooth Integration Preparation (y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -clear - cat <<"EOF" - __ __ ___ _ __ __ - / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ - / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ - / __ )/ /_ _____ / /_____ ____ / /_/ /_ - / __ / / / / / _ \/ __/ __ \/ __ \/ __/ __ \ - / /_/ / / /_/ / __/ /_/ /_/ / /_/ / /_/ / / / - /_____/_/\__,_/\___/\__/\____/\____/\__/_/_/_/_ - / _/___ / /____ ____ __________ _/ /_(_)___ ____ - / // __ \/ __/ _ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \ - _/ // / / / /_/ __/ /_/ / / / /_/ / /_/ / /_/ / / / / - /___/_/_/_/\__/\___/\__, /_/ \__,_/\__/_/\____/_/ /_/ - / __ \________/____/ ____ __________ _/ /_(_)___ ____ - / /_/ / ___/ _ \/ __ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \ - / ____/ / / __/ /_/ / /_/ / / / /_/ / /_/ / /_/ / / / / - /_/ /_/ \___/ .___/\__,_/_/ \__,_/\__/_/\____/_/ /_/ - /_/ - -EOF -read -r -p "Switch from dbus-daemon to dbus-broker? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -cat <>/etc/apt/sources.list -deb http://deb.debian.org/debian bullseye-backports main contrib non-free - -deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free -EOF -apt-get update &>/dev/null -apt-get -t bullseye-backports install -y dbus-broker &>/dev/null -systemctl enable dbus-broker.service &>/dev/null -fi -read -r -p "Install BlueZ? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -apt-get -t bullseye-backports install -y bluez* &>/dev/null -fi -echo -e "Finished, reboot for changes to take affect" From 8b0f6b27fe74922614bd7607c82950f4aa6fe91f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 21:19:40 -0400 Subject: [PATCH 2143/3335] Update filebrowser.sh - Uninstall by re-executing the script - Option to use No Authentication --- misc/filebrowser.sh | 67 +++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index b4e40fd1..6a7325b4 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -6,13 +6,14 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { + clear cat <<"EOF" - _______ __ ____ + _______ __ ____ / ____(_) /__ / __ )_________ _ __________ _____ / /_ / / / _ \/ __ / ___/ __ \ | /| / / ___/ _ \/ ___/ - / __/ / / / __/ /_/ / / / /_/ / |/ |/ (__ ) __/ / -/_/ /_/_/\___/_____/_/ \____/|__/|__/____/\___/_/ - + / __/ / / / __/ /_/ / / / /_/ / |/ |/ (__ ) __/ / +/_/ /_/_/\___/_____/_/ \____/|__/|__/____/\___/_/ + EOF } IP=$(hostname -I | awk '{print $1}') @@ -28,24 +29,21 @@ HOLD="-" CM="${GN}✓${CL}" APP="FileBrowser" hostname="$(hostname)" -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} -clear header_info +if [ -f /root/filebrowser.db ]; then + read -r -p "Would you like to uninstall ${APP} on $hostname.? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + systemctl disable -q --now filebrowser.service + rm -rf /usr/local/bin/filebrowser /root/filebrowser.db /etc/systemd/system/filebrowser.service + echo "$APP Removed" + sleep 2 + clear + exit + else + clear + exit + fi +fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in @@ -54,7 +52,6 @@ while true; do *) echo "Please answer yes or no." ;; esac done -clear header_info function msg_info() { local msg="$1" @@ -66,17 +63,27 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +read -r -p "Would you like to use No Authentication? " prompt msg_info "Installing ${APP}" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null -filebrowser config init -a '0.0.0.0' &>/dev/null -filebrowser config set -a '0.0.0.0' &>/dev/null -filebrowser users add admin changeme --perm.admin &>/dev/null + +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser config init --auth.method=noauth &>/dev/null + filebrowser config set --auth.method=noauth &>/dev/null + filebrowser users add ID 1 --perm.admin &>/dev/null +else + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser users add admin changeme --perm.admin &>/dev/null +fi msg_ok "Installed ${APP} on $hostname" msg_info "Creating Service" -service_path="/etc/systemd/system/filebrowser.service" -echo "[Unit] +cat </etc/systemd/system/filebrowser.service +[Unit] Description=Filebrowser After=network-online.target @@ -86,9 +93,9 @@ WorkingDirectory=/root/ ExecStart=/usr/local/bin/filebrowser -r / [Install] -WantedBy=default.target" >$service_path - -systemctl enable --now filebrowser.service &>/dev/null +WantedBy=default.target +EOF +systemctl enable -q --now filebrowser.service msg_ok "Created Service" msg_ok "Completed Successfully!\n" From b0c32c4e47c214890362b15f8c8b84e5d462cc1f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 8 Oct 2023 21:22:58 -0400 Subject: [PATCH 2144/3335] Update CHANGELOG.md File Browser --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba43fd68..0282da4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - **Proxmox VE LXC Updater** - Now displays which containers require a reboot. +- **File Browser** + - Uninstall by re-executing the script + - Option to use No Authentication ## 2023-10-05 From 36aff248875bd33f39fece44d1ca08904ca4438c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Oct 2023 10:38:24 -0400 Subject: [PATCH 2145/3335] Update CHANGELOG.md comment out stats --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0282da4f..16d280ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -

+ # Change Log **All notable changes to this project will be documented in this file.**
From 6aeda1d4ff2bab2c6891fba42068e8ca4849edbe Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 9 Oct 2023 12:40:11 -0400 Subject: [PATCH 2146/3335] Update sabnzbd-install.sh fixes https://github.com/tteck/Proxmox/issues/1904 --- install/sabnzbd-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 6c97bd07..fb9690d3 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -19,9 +19,9 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y par2 $STD apt-get install -y p7zip-full -wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.0.3-1+deb11u1_amd64.deb -$STD dpkg -i unrar_6.0.3-1+deb11u1_amd64.deb -rm unrar_6.0.3-1+deb11u1_amd64.deb +wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.2.12-1_amd64.deb +$STD dpkg -i unrar_6.2.12-1_amd64.deb +rm unrar_6.2.12-1_amd64.deb msg_ok "Installed Dependencies" msg_info "Updating Python3" From 2d85b461bdfbcdaab4f7d4a129d89367b05645ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Oct 2023 14:39:33 -0400 Subject: [PATCH 2147/3335] Update scaling-governor.sh - A full code overhaul. - Include an option to configure a crontab for ensuring that the CPU Scaling Governor configuration persists across reboots. --- misc/scaling-governor.sh | 84 +++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 20138b08..74e1feeb 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -8,51 +8,45 @@ header_info() { clear cat < MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + GOVERNORS_MENU+=("$TAG" "$ITEM " "OFF") +done < <(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors | tr ' ' '\n' | grep -v "$current_governor") +scaling_governor=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current CPU Scaling Governor is set to $current_governor" --checklist "\nSelect the Scaling Governor to use:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${GOVERNORS_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +echo "${scaling_governor}" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null +current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) +whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Current CPU Scaling Governor" "\nCurrent CPU Scaling Governor has been set to $current_governor\n" 10 60 +CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU Scaling Governor" --menu "This will establish a crontab to maintain the CPU Scaling Governor configuration across reboots.\n \nSetup a crontab?" 14 68 2 \ + "yes" " " \ + "no" " " 3>&2 2>&1 1>&3) + +case $CHOICE in + yes) + NEW_CRONTAB_COMMAND="(sleep 60 && echo \"$current_governor\" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor)" + EXISTING_CRONTAB=$(crontab -l 2>/dev/null) + if [[ -n "$EXISTING_CRONTAB" ]]; then + TEMP_CRONTAB_FILE=$(mktemp) + echo "$EXISTING_CRONTAB" | grep -v "@reboot (sleep 60 && echo*" > "$TEMP_CRONTAB_FILE" + crontab "$TEMP_CRONTAB_FILE" + rm "$TEMP_CRONTAB_FILE" fi - show_menu -done + (crontab -l 2>/dev/null; echo "@reboot $NEW_CRONTAB_COMMAND") | crontab - + echo -e "\nCrontab Set (use 'crontab -e' to check)" + ;; + no) + echo -e "\n\033[31mNOTE: Settings return to default after reboot\033[m\n" + ;; +esac +echo -e "Current CPU Scaling Governor is set to \033[36m$current_governor\033[m\n" From 30a8e9687887af557ac46a2d4fd225865f9954cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Oct 2023 14:42:56 -0400 Subject: [PATCH 2148/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d280ae..9a3121c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ - 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-10-11 + +### Changed + +- **Proxmox VE CPU Scaling Governor** + - A full code overhaul. + - Include an option to configure a crontab for ensuring that the CPU Scaling Governor configuration persists across reboots. + ## 2023-10-08 ### Changed From 11b941da4ef06dd10f73c1b965663c5fb1e4b2e9 Mon Sep 17 00:00:00 2001 From: leiweibau <105860611+leiweibau@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:21:57 +0200 Subject: [PATCH 2149/3335] Update pialert-install.sh (#1909) Add UniFi dependency --- install/pialert-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 0a5d06cf..5f4f7a09 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -51,6 +51,7 @@ $STD apt-get -y install \ $STD pip3 install mac-vendor-lookup $STD pip3 install fritzconnection $STD pip3 install cryptography +$STD pip3 install pyunifi msg_ok "Installed Python Dependencies" msg_info "Installing Pi.Alert" From 3d3583488aa53af1fb637f4e1e62d2c385bd10a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 11 Oct 2023 15:31:27 -0400 Subject: [PATCH 2150/3335] Update scaling-governor.sh tweak --- misc/scaling-governor.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 74e1feeb..556a3854 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE - +set -e header_info() { clear cat <&1 1>&2 2>&3 | tr -d '"') || exit +[ -z "$scaling_governor" ] && { + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No CPU Scaling Governor Selected" --msgbox "It appears that no CPU Scaling Governor was selected" 10 68 + clear + exit +} echo "${scaling_governor}" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Current CPU Scaling Governor" "\nCurrent CPU Scaling Governor has been set to $current_governor\n" 10 60 @@ -34,6 +39,7 @@ CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU Scaling G case $CHOICE in yes) + set +e NEW_CRONTAB_COMMAND="(sleep 60 && echo \"$current_governor\" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor)" EXISTING_CRONTAB=$(crontab -l 2>/dev/null) if [[ -n "$EXISTING_CRONTAB" ]]; then From 39c47b8d2380f260fe99a1de28cae09cf08814fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Oct 2023 13:03:19 -0400 Subject: [PATCH 2151/3335] Update magicmirror.sh default Debian 12 --- ct/magicmirror.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index c3078bc3..4fde189e 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -24,7 +24,7 @@ var_disk="3" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From d6abb580d2e0fde1d58abfdf16659b9f1d3621b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 12 Oct 2023 13:04:26 -0400 Subject: [PATCH 2152/3335] Update magicmirror-install.sh fixes https://github.com/tteck/Proxmox/issues/1911 --- install/magicmirror-install.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 52d480b0..e2f5a054 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -18,13 +18,19 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD apt-get update +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Setting up MagicMirror Repository" From 737240916ee8daab0e54ad2f45642ef3f89f46a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Oct 2023 06:32:31 -0400 Subject: [PATCH 2153/3335] Update alpine-docker-install.sh Change Portainer port --- install/alpine-docker-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index eacbe6b0..ac9a0f7e 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -39,7 +39,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then docker volume create portainer_data >/dev/null $STD docker run -d \ -p 8000:8000 \ - -p 9000:9000 \ + -p 9443:9443 \ --name=portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ @@ -59,4 +59,4 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -customize \ No newline at end of file +customize From 359d5a3a48048ee7d8b0b9b51cd0033ca17e03d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 13 Oct 2023 12:13:31 -0400 Subject: [PATCH 2154/3335] Remove unused scripts - archlinux.sh - devuan.sh - devuan-install.sh --- ct/archlinux.sh | 418 -------------------------------------- ct/devuan.sh | 67 ------ install/devuan-install.sh | 28 --- 3 files changed, 513 deletions(-) delete mode 100644 ct/archlinux.sh delete mode 100644 ct/devuan.sh delete mode 100644 install/devuan-install.sh diff --git a/ct/archlinux.sh b/ct/archlinux.sh deleted file mode 100644 index 75e4119d..00000000 --- a/ct/archlinux.sh +++ /dev/null @@ -1,418 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ___ __ __ _ - / | __________/ /_ / / (_)___ __ ___ __ - / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ - / ___ |/ / / /__/ / / / / /___/ / / / / /_/ /> < -/_/ |_/_/ \___/_/ /_/ /_____/_/_/ /_/\__,_/_/|_| - -EOF -} -header_info -echo -e "Loading..." -APP="Arch Linux" -var_disk="1" -var_cpu="1" -var_ram="512" -var_os="archlinux" -var_version="base" -NSAPP=$(echo ${APP,,} | tr -d ' ') -var_install="${NSAPP}-v5-install" -timezone=$(cat /etc/timezone) -INTEGER='^[0-9]+([.][0-9]+)?$' -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -set -Eeuo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" -} - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function PVE_CHECK() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" - echo -e "Exiting..." - sleep 2 - exit - fi -} -function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi -} - -function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}archlinux${CL}" - PW="-password archlinux" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET="dhcp" - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function advanced_settings() { -if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " - else - PW="-password $PW1" - fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi - -if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" - else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" - fi -else - exit -fi - -if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" - else - HN=$(echo ${CT_NAME,,} | tr -d ' ') - fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi - -if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings - fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" - fi -else - exit-script -fi - -if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi -else - exit-script -fi - -if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi -else - exit-script -fi - -if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi -else - exit-script -fi - -if NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" - fi -else - exit-script -fi -if GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" - else - GATE=",gw=$GATE1" - fi - echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi - -if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi - echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" - -if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - else - MTU=",mtu=$MTU1" - fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi - -if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" - else - SX=$SD - SD="-searchdomain=$SD" - fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi - -if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" - else - NS="-nameserver=$NX" - fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi - -if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" - else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi -else - exit-script -fi - -if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - else - VLAN=",tag=$VLAN1" - fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi - -if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi - echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" - -if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi - echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" - -if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi -} - -function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function update_script() { -header_info -msg_info "Updating ${APP} LXC" -pacman-key --init -pacman-key --populate archlinux -pacman -Sy archlinux-keyring && pacman -Su -msg_ok "Updated Successfully" -exit -} - -if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - install_script -fi - -if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then - clear - echo -e "⚠ User exited script \n" - exit - fi - update_script -fi - -if [ "$VERB" == "yes" ]; then set -x; fi -if [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" -else - FEATURES="nesting=1" -fi -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -export tz=$timezone -export DISABLEIPV6=$DISABLEIP6 -export APPLICATION=$APP -export VERBOSE=$VERB -export SSH_ROOT=${SSH} -export CTID=$CT_ID -export PCT_OSTYPE=$var_os -export PCT_OSVERSION=$var_version -export PCT_DISK_SIZE=$DISK_SIZE -export PCT_OPTIONS=" - -features $FEATURES - -hostname $HN - $SD - $NS - -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU - -onboot 1 - -cores $CORE_COUNT - -memory $RAM_SIZE - -unprivileged $CT_TYPE - $PW -" -bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit -msg_info "Starting LXC Container" -pct start $CTID -msg_ok "Started LXC Container" -IP=$(pct exec $CTID ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) -pct set $CTID -description "# ${APP} ${var_version} LXC -### https://tteck.github.io/Proxmox/ -" -msg_ok "Completed Successfully!\n" diff --git a/ct/devuan.sh b/ct/devuan.sh deleted file mode 100644 index 25bdc96f..00000000 --- a/ct/devuan.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ____ - / __ \___ _ ____ ______ ____ - / / / / _ \ | / / / / / __ `/ __ \ - / /_/ / __/ |/ / /_/ / /_/ / / / / -/_____/\___/|___/\__,_/\__,_/_/ /_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Devuan" -var_disk="2" -var_cpu="1" -var_ram="512" -var_os="devuan" -var_version="4.0" -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="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - echo_default -} - -function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" diff --git a/install/devuan-install.sh b/install/devuan-install.sh deleted file mode 100644 index 64e6f242..00000000 --- a/install/devuan-install.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/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" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" From be4d28c1417105ccba825943933ab47804ce1cef Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 09:58:39 -0400 Subject: [PATCH 2155/3335] Update monitor-all.sh - disable start delay - fixes https://github.com/tteck/Proxmox/issues/1919 --- misc/monitor-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index f7e74dcf..0067ca90 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -103,7 +103,7 @@ Type=simple # For example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 # Virtual machines without the QEMU guest agent installed must be excluded. # Sleep for 300 seconds (5 minutes) -ExecStartPre=/usr/bin/sleep 300 +# ExecStartPre=/usr/bin/sleep 300 ExecStart=/usr/local/bin/ping-instances.sh Restart=always StandardOutput=file:/var/log/ping-instances.log From 7724546b6f3fac39f3231a9c8a029e3b75cd4747 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 12:31:06 -0400 Subject: [PATCH 2156/3335] Update monitor-all.sh code refactoring --- misc/monitor-all.sh | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 0067ca90..b5567b8e 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -88,43 +88,54 @@ while true; do # Wait for 5 minutes. (Edit to your needs) echo "$(date): Pausing for 5 minutes..." sleep 300 -done >> /var/log/ping-instances.log 2>&1' >/usr/local/bin/ping-instances.sh - +done >/var/log/ping-instances.log 2>&1' >/usr/local/bin/ping-instances.sh +touch /var/log/ping-instances.log # Change file permissions to executable chmod +x /usr/local/bin/ping-instances.sh +cat </etc/systemd/system/ping-instances.timer +[Unit] +Description=Delay ping-instances.service by 5 minutes + +[Timer] +OnBootSec=300 +OnUnitActiveSec=300 + +[Install] +WantedBy=timers.target +EOF # Create ping-instances.service -echo '[Unit] +cat </etc/systemd/system/ping-instances.service +[Unit] Description=Ping instances every 5 minutes and restarts if necessary - +After=ping-instances.timer +Requires=ping-instances.timer [Service] Type=simple # To specify which CT/VM should be excluded, add the CT/VM ID at the end of the line where ExecStart=/usr/local/bin/ping-instances.sh is specified. # For example: ExecStart=/usr/local/bin/ping-instances.sh 100 102 # Virtual machines without the QEMU guest agent installed must be excluded. -# Sleep for 300 seconds (5 minutes) -# ExecStartPre=/usr/bin/sleep 300 + ExecStart=/usr/local/bin/ping-instances.sh -Restart=always StandardOutput=file:/var/log/ping-instances.log StandardError=file:/var/log/ping-instances.log [Install] -WantedBy=multi-user.target' >/etc/systemd/system/ping-instances.service +WantedBy=multi-user.target +EOF # Reload daemon, enable and start ping-instances.service systemctl daemon-reload +systemctl enable -q --now ping-instances.timer systemctl enable -q --now ping-instances.service clear echo -e "\n To view Monitor All logs: cat /var/log/ping-instances.log" } remove() { - systemctl stop ping-instances.service - systemctl disable ping-instances.service &>/dev/null - rm /etc/systemd/system/ping-instances.service - rm /usr/local/bin/ping-instances.sh - rm /var/log/ping-instances.log + systemctl disable -q --now ping-instances.timer + systemctl disable -q --now ping-instances.service + rm /etc/systemd/system/ping-instances.service /etc/systemd/system/ping-instances.timer /usr/local/bin/ping-instances.sh /var/log/ping-instances.log echo "Removed Monitor All from Proxmox VE" } From 85b0003df959634982e26dc2986343b29165ce37 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 12:45:48 -0400 Subject: [PATCH 2157/3335] Update monitor-all.sh tweak --- misc/monitor-all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index b5567b8e..e4251757 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -117,6 +117,7 @@ Type=simple # Virtual machines without the QEMU guest agent installed must be excluded. ExecStart=/usr/local/bin/ping-instances.sh +Restart=always StandardOutput=file:/var/log/ping-instances.log StandardError=file:/var/log/ping-instances.log From c79153f4a6645bd4f39985069fc4b629a9d129ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 19:56:28 -0400 Subject: [PATCH 2158/3335] Update meshcentral.sh default Debian 12 --- ct/meshcentral.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 03b3efd2..ff75e93d 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 34414e6266feea6488ebc91422dccd0583133888 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 19:57:25 -0400 Subject: [PATCH 2159/3335] Update meshcentral-install.sh fixes https://github.com/tteck/Proxmox/issues/1923 --- install/meshcentral-install.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index ec191bdc..1cd0b903 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -17,13 +17,19 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD apt-get update +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing MeshCentral" From 89c3dfd206642242d658eb5e6bc4365ced0e2a30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 20:18:46 -0400 Subject: [PATCH 2160/3335] Update sonarr-install.sh - add an option to install v4 (experimental) --- install/sonarr-install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index e2857b87..78f96594 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -21,11 +21,22 @@ $STD apt-get install -y gnupg $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" +read -r -p "Would you like to install v4 (experimental)? " prompt msg_info "Installing Sonarr" wget -qO /etc/apt/trusted.gpg.d/sonarr-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2009837cbffd68f45bc180471f4f90de2a9b4bf8" echo "deb https://apt.sonarr.tv/debian testing-main main" >/etc/apt/sources.list.d/sonarr.list $STD apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + systemctl stop sonarr.service + wget -q https://download.sonarr.tv/v4/develop/4.0.0.697/Sonarr.develop.4.0.0.697.linux-x64.tar.gz + tar -xzf Sonarr.develop.4.0.0.697.linux-x64.tar.gz + cp -r Sonarr/* /usr/lib/sonarr/bin + rm -rf Sonarr Sonarr.develop.4.0.0.697.linux-x64.tar.gz + sed -i 's|ExecStart=/usr/bin/mono --debug /usr/lib/sonarr/bin/Sonarr.exe -nobrowser -data=/var/lib/sonarr|ExecStart=/usr/lib/sonarr/bin/Sonarr -nobrowser -data=/var/lib/sonarr|' /lib/systemd/system/sonarr.service + systemctl daemon-reload + systemctl start sonarr.service +fi msg_ok "Installed Sonarr" motd_ssh From 4d2343607b21922043a67ae9c53a881ae31978e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 14 Oct 2023 20:21:58 -0400 Subject: [PATCH 2161/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a3121c4..5eff2168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-10-14 + +### Changed + +- **Sonarr LXC** + - Include an option to install v4 (experimental) + ## 2023-10-11 ### Changed From 8014a410f5dd6a869a440b7b392c836d1adb480b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Oct 2023 01:15:09 -0400 Subject: [PATCH 2162/3335] Create tasmoadmin.sh --- ct/tasmoadmin.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/tasmoadmin.sh diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh new file mode 100644 index 00000000..7287ed1a --- /dev/null +++ b/ct/tasmoadmin.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ ___ __ _ + /_ __/___ __________ ___ ____ / | ____/ /___ ___ (_)___ + / / / __ `/ ___/ __ `__ \/ __ \/ /| |/ __ / __ `__ \/ / __ \ + / / / /_/ (__ ) / / / / / /_/ / ___ / /_/ / / / / / / / / / / +/_/ \__,_/____/_/ /_/ /_/\____/_/ |_\__,_/_/ /_/ /_/_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="TasmoAdmin" +var_disk="2" +var_cpu="1" +var_ram="512" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9999${CL} \n" From fa21400a98b7aa80cd82964483de7685922f5515 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Oct 2023 01:16:41 -0400 Subject: [PATCH 2163/3335] Create tasmoadmin-install.sh --- install/tasmoadmin-install.sh | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 install/tasmoadmin-install.sh diff --git a/install/tasmoadmin-install.sh b/install/tasmoadmin-install.sh new file mode 100644 index 00000000..0b65b9ce --- /dev/null +++ b/install/tasmoadmin-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apache2 +$STD apt-get install -y php8.2 +$STD apt-get install -y libapache2-mod-php +$STD apt-get install -y php8.2-curl +$STD apt-get install -y php8.2-zip +$STD apt-get install -y php8.2-mbstring +$STD apt-get install -y php8.2-xml +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing TasmoAdmin" +wget -q https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.1.1/tasmoadmin_v3.1.1.tar.gz +tar -xzf tasmoadmin_v3.1.1.tar.gz -C /var/www/ +rm -rf tasmoadmin_v3.1.1.tar.gz /etc/php/8.2/apache2/conf.d/10-opcache.ini +chown -R www-data:www-data /var/www/tasmoadmin +chmod 777 /var/www/tasmoadmin/tmp /var/www/tasmoadmin/data +cat </etc/apache2/sites-available/tasmoadmin.conf + + ServerName tasmoadmin + ServerAdmin webmaster@localhost + DocumentRoot /var/www/tasmoadmin + + AllowOverride All + Order allow,deny + allow from all + + ErrorLog /var/log/apache2/error.log + LogLevel warn + CustomLog /var/log/apache2/access.log combined + ServerSignature On + +EOF +sed -i '6iListen 9999' /etc/apache2/ports.conf +$STD a2ensite tasmoadmin +$STD a2enmod rewrite +systemctl reload apache2 +systemctl restart apache2 +msg_ok "Installed TasmoAdmin" +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 937695b3b894e65d976197075b86307a96fe809b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Oct 2023 01:43:25 -0400 Subject: [PATCH 2164/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eff2168..9123a5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-10-15 + +### Changed + +- **TasmoAdmin LXC** + - NEW Script + ## 2023-10-14 ### Changed From e71b8cd2de575a76c77a4252f0d5535253f5e100 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Oct 2023 07:27:56 -0400 Subject: [PATCH 2165/3335] Update openwrt.sh fixes https://github.com/tteck/Proxmox/issues/1924 --- vm/openwrt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 9c511e37..b9bc088e 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -431,8 +431,8 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for OpenWrt Disk Image" -regex='Current Stable Release - OpenWrt ([^/]*)<\/strong>' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}" -URL=https://downloads.openwrt.org/releases/$stableVersion/targets/x86/64/openwrt-$stableVersion-x86-64-generic-ext4-combined.img.gz +# regex='Current Stable Release - OpenWrt ([^/]*)<\/strong>' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}" +URL=https://downloads.openwrt.org/releases/23.05.0/targets/x86/64/openwrt-23.05.0-x86-64-generic-ext4-combined.img.gz sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From 7a58b8c01c5d8fe8d20d8e6def18346ed8faf99f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Oct 2023 08:43:44 -0400 Subject: [PATCH 2166/3335] Update openwrt.sh fix stableversion variable --- vm/openwrt.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index b9bc088e..5f9d6fcc 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -431,8 +431,9 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for OpenWrt Disk Image" -# regex='Current Stable Release - OpenWrt ([^/]*)<\/strong>' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}" -URL=https://downloads.openwrt.org/releases/23.05.0/targets/x86/64/openwrt-23.05.0-x86-64-generic-ext4-combined.img.gz +response=$(curl -s https://openwrt.org) +stableversion=$(echo "$response" | sed -n 's/.*Current stable release - OpenWrt \([0-9.]\+\).*/\1/p') +URL="https://downloads.openwrt.org/releases/$stableversion/targets/x86/64/openwrt-$stableversion-x86-64-generic-ext4-combined.img.gz" sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From e95a7bf9fbcb88701189bd250930b4436092c6bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 15 Oct 2023 11:19:54 -0400 Subject: [PATCH 2167/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 75878301..4c975369 100644 --- a/misc/build.func +++ b/misc/build.func @@ -435,7 +435,7 @@ install_script() { arch_check pve_check if systemctl is-active -q ping-instances.service; then - systemctl stop ping-instances.service + systemctl -q stop ping-instances.service fi NEXTID=$(pvesh get /cluster/nextid) timezone=$(cat /etc/timezone) From 1c0f43fb91782fc8ccab57811b6fd55bde17bb11 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 17 Oct 2023 18:55:25 -0400 Subject: [PATCH 2168/3335] Update sonarr-install.sh change User/Group to root --- install/sonarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 78f96594..c183454a 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -34,6 +34,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then cp -r Sonarr/* /usr/lib/sonarr/bin rm -rf Sonarr Sonarr.develop.4.0.0.697.linux-x64.tar.gz sed -i 's|ExecStart=/usr/bin/mono --debug /usr/lib/sonarr/bin/Sonarr.exe -nobrowser -data=/var/lib/sonarr|ExecStart=/usr/lib/sonarr/bin/Sonarr -nobrowser -data=/var/lib/sonarr|' /lib/systemd/system/sonarr.service + sed -i 's/\(User=\|Group=\).*/\1root/' /lib/systemd/system/sonarr.service systemctl daemon-reload systemctl start sonarr.service fi From a901f2a06547e5a74cb795485650866e435357ed Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:06:28 +1300 Subject: [PATCH 2169/3335] Update haos-vm.sh (#1940) Dev OS builds have been moved to a new server --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 27dcb8ce..d535b99a 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -386,7 +386,7 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image" if [ "$BRANCH" == "$dev" ]; then - URL=https://os-builds.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz + URL=https://os-artifacts.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz else URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz fi From b2fc242e68d6a765f5885f02e2818f211f8351eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 19 Oct 2023 04:36:55 -0400 Subject: [PATCH 2170/3335] Update mqtt.sh set new file path check --- ct/mqtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 79273287..7c8fa42e 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -52,7 +52,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/mosquitto/conf.d/default.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null From 3d54b1dfbbc8ba3ee0f6bddd8d996e5cb1b3826b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 19 Oct 2023 08:08:46 -0400 Subject: [PATCH 2171/3335] Update pialert.sh fix update --- ct/pialert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pialert.sh b/ct/pialert.sh index 17a1195b..967b5043 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -53,7 +53,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -update +bash -c "$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)" -s --lxc msg_ok "Updated $APP" exit } From 108c4e1a14de47c73f306457dc274db56645800d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Oct 2023 05:32:58 -0400 Subject: [PATCH 2172/3335] Update unifi-install.sh tweak --- install/unifi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 4ce0e417..c0d1c823 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf mongodb-org-server_3.6.23_amd64.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +rm -rf mongodb-org-server_3.6.23_amd64.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb /etc/apt/sources.list.d/openjdk-11-jre-headless.list $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 8e5760af2865b7ff0338bb101414c709fc75f57a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Oct 2023 13:17:43 -0400 Subject: [PATCH 2173/3335] Update influxdb.sh - default Debian 12 - set new file path check --- ct/influxdb.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 3c7bda46..8f3216d6 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -52,12 +52,8 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /etc/apt/sources.list.d/influxdb.list || ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" -wget -q https://repos.influxdata.com/influxdata-archive_compat.key -cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null -echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list -rm -f /etc/apt/trusted.gpg.d/influxdb.gpg apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated Successfully" From abd627f93b1c0e24b54d06e899e01e5793ce7910 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 20 Oct 2023 21:33:14 -0400 Subject: [PATCH 2174/3335] Create hw-acceleration.sh --- misc/hw-acceleration.sh | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 misc/hw-acceleration.sh diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh new file mode 100644 index 00000000..2bc78f13 --- /dev/null +++ b/misc/hw-acceleration.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +set -eEuo pipefail +function header_info { + clear + cat <<"EOF" + + __ ___ __ ___ __ __ _ + / // / | /| / / / _ |___________ / /__ _______ _/ /_(_)__ ___ + / _ /| |/ |/ / / __ / __/ __/ -_) / -_) __/ _ `/ __/ / _ \/ _ \ +/_//_/ |__/|__/ /_/ |_\__/\__/\__/_/\__/_/ \_,_/\__/_/\___/_//_/ + +EOF +} +header_info +echo "Loading..." +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add HW Acceleration" --yesno "This Will Add HW Acceleration to an exixting LXC Container. Proceed?" 10 68 || exit +NODE=$(hostname) +PREV_MENU=() +MSG_MAX_LENGTH=0 +privileged_containers=$(pct list | awk 'NR>1 && system("grep -q \047unprivileged: 1\047 /etc/pve/lxc/" $1 ".conf")') +if [ -z "$privileged_containers" ]; then + whiptail --msgbox "No Privileged Containers Found." 10 58 + exit +fi +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + PREV_MENU+=("$TAG" "$ITEM " "OFF") +done < <(echo "$privileged_containers") +privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +header_info +cat <>/etc/pve/lxc/${privileged_container}.conf +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file +EOF +pct exec $privileged_container -- bash -c "apt-get -y install va-driver-all && apt-get -y install ocl-icd-libopencl1 && apt-get install -y intel-opencl-icd && chgrp video /dev/dri && chmod 755 /dev/dri && chmod 660 /dev/dri/*" +header_info +echo -e "Completed Successfully!\n" +echo -e "Reboot container $privileged_container to apply the new settings\n" From f3c8d3c774f91336290dacb18e1328cf4ee6985b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 09:52:23 -0400 Subject: [PATCH 2175/3335] Update nocodb-install.sh - full code overhaul --- install/nocodb-install.sh | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 509bd282..aaa3b55d 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -17,25 +17,13 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc msg_ok "Installed Dependencies" -msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node -ln -sf /root/.nvm/versions/node/v16.20.1/bin/npm /usr/bin/npm -msg_ok "Installed Node.js" - msg_info "Installing NocoDB" -$STD git clone https://github.com/nocodb/nocodb-seed -mv nocodb-seed /opt/nocodb +mkdir -p /opt/nocodb cd /opt/nocodb -$STD npm install +curl -s http://get.nocodb.com/linux-x64 -o nocodb -L +chmod +x nocodb msg_ok "Installed NocoDB" msg_info "Creating Service" @@ -48,11 +36,11 @@ Type=simple Restart=always User=root WorkingDirectory=/opt/nocodb -ExecStart=/usr/bin/npm start +ExecStart=/opt/nocodb/./nocodb [Install] WantedBy=multi-user.target" >$service_path -systemctl enable --now nocodb.service &>/dev/null +systemctl enable -q --now nocodb.service &>/dev/null msg_ok "Created Service" motd_ssh From 1e62c159f1bd4f5117d815ba60f84c812666986a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 09:54:09 -0400 Subject: [PATCH 2176/3335] Update nocodb.sh - default Debian 12 - new update path --- ct/nocodb.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 3c400a1e..b46ee722 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -54,10 +54,12 @@ function update_script() { header_info if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" +systemctl stop nocodb.service cd /opt/nocodb -npm uninstall -s --save nocodb &>/dev/null -npm install -s --save nocodb &>/dev/null -systemctl restart nocodb.service +rm nocodb +curl -s http://get.nocodb.com/linux-x64 -o nocodb -L +chmod +x nocodb +systemctl start nocodb.service msg_ok "Updated Successfully" exit } From 85cc309f8b7d28c6883320fd18b0f551a66e8336 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 11:00:50 -0400 Subject: [PATCH 2177/3335] Update nocodb.sh test --- ct/nocodb.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index b46ee722..efb2eb76 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -56,9 +56,24 @@ if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Inst msg_info "Updating ${APP}" systemctl stop nocodb.service cd /opt/nocodb -rm nocodb +rm -rf nocodb curl -s http://get.nocodb.com/linux-x64 -o nocodb -L chmod +x nocodb +cat </etc/systemd/system/nocodb.service" +echo "[Unit] +Description=nocodb + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/nocodb +ExecStart=/opt/nocodb/./nocodb + +[Install] +WantedBy=multi-user.target +EOF +systemctl daemon-reload systemctl start nocodb.service msg_ok "Updated Successfully" exit From a017ba7c000554923ddafa695f427352afefa070 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 11:15:54 -0400 Subject: [PATCH 2178/3335] Update nocodb.sh tweak --- ct/nocodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index efb2eb76..cd0f1295 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -60,7 +60,7 @@ rm -rf nocodb curl -s http://get.nocodb.com/linux-x64 -o nocodb -L chmod +x nocodb cat </etc/systemd/system/nocodb.service" -echo "[Unit] +echo [Unit] Description=nocodb [Service] From 537a855553a045379ad8ac65b492bc62ebc4b362 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 11:17:56 -0400 Subject: [PATCH 2179/3335] Update nocodb.sh --- ct/nocodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index cd0f1295..4ac7fea0 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -60,7 +60,7 @@ rm -rf nocodb curl -s http://get.nocodb.com/linux-x64 -o nocodb -L chmod +x nocodb cat </etc/systemd/system/nocodb.service" -echo [Unit] +[Unit] Description=nocodb [Service] From b81028fb3bde93724772719ee7259e89a3aa4efd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 11:48:25 -0400 Subject: [PATCH 2180/3335] Update nocodb.sh tweak --- ct/nocodb.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 4ac7fea0..018a06b2 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -59,8 +59,8 @@ cd /opt/nocodb rm -rf nocodb curl -s http://get.nocodb.com/linux-x64 -o nocodb -L chmod +x nocodb -cat </etc/systemd/system/nocodb.service" -[Unit] +service_path="/etc/systemd/system/nocodb.service" +echo "[Unit] Description=nocodb [Service] @@ -71,8 +71,7 @@ WorkingDirectory=/opt/nocodb ExecStart=/opt/nocodb/./nocodb [Install] -WantedBy=multi-user.target -EOF +WantedBy=multi-user.target" >$service_path systemctl daemon-reload systemctl start nocodb.service msg_ok "Updated Successfully" From f2e58ac26e7b9b1567026b0e6c23b9d3384c2740 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 11:53:44 -0400 Subject: [PATCH 2181/3335] Update nocodb.sh --- ct/nocodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 018a06b2..26da3998 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -73,7 +73,7 @@ ExecStart=/opt/nocodb/./nocodb [Install] WantedBy=multi-user.target" >$service_path systemctl daemon-reload -systemctl start nocodb.service +systemctl start -q nocodb.service msg_ok "Updated Successfully" exit } From f2a7a1699d1ff8f4872803f5f907fa70b51751b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 11:59:21 -0400 Subject: [PATCH 2182/3335] Update nocodb.sh --- ct/nocodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 26da3998..0a1739f6 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -72,7 +72,7 @@ ExecStart=/opt/nocodb/./nocodb [Install] WantedBy=multi-user.target" >$service_path -systemctl daemon-reload +systemctl -q daemon-reload systemctl start -q nocodb.service msg_ok "Updated Successfully" exit From 8e6f0c185cf24916ab2e4606a46a5cb204899b2b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 21 Oct 2023 12:16:58 -0400 Subject: [PATCH 2183/3335] Update nocodb.sh revert test --- ct/nocodb.sh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 0a1739f6..b25c2175 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -59,21 +59,7 @@ cd /opt/nocodb rm -rf nocodb curl -s http://get.nocodb.com/linux-x64 -o nocodb -L chmod +x nocodb -service_path="/etc/systemd/system/nocodb.service" -echo "[Unit] -Description=nocodb - -[Service] -Type=simple -Restart=always -User=root -WorkingDirectory=/opt/nocodb -ExecStart=/opt/nocodb/./nocodb - -[Install] -WantedBy=multi-user.target" >$service_path -systemctl -q daemon-reload -systemctl start -q nocodb.service +systemctl start nocodb.service msg_ok "Updated Successfully" exit } From 1c402475fdb1b83f19ad4761671bbc47c33de599 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 22 Oct 2023 16:52:21 -0400 Subject: [PATCH 2184/3335] Add files via upload --- misc/images/tteck.png | Bin 0 -> 52328 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/tteck.png diff --git a/misc/images/tteck.png b/misc/images/tteck.png new file mode 100644 index 0000000000000000000000000000000000000000..91d872b40039592f203fed4b21567b2dba6d038d GIT binary patch literal 52328 zcmV(|K+(U6P)PyA07*naRCr$OeFwN*WwG|mx7u!}CMP|i*U(Xl4M9*)L=;r4*cHWw?b^MTtJhyq z@AW=*v2d*yLXi2jiijT2F$bNpv9C&lM-=Nz`$mw$$S&~|Wbfg2AXVF5oVQZhulWJLWVM6X=a z$aY#jJbLIzt2u3aY@FLkYKRTxu1is#=FKeQoR~A?Q0}>u;ctd0&NIp~p*+t?G9rhB zTsGw5?un4em?Q~_Nhru!ILpKlVV8s}eu*k2pK6tAUUR)Q^Jh-Kep=1_zn&7^<`F%J zuRn{q)j8)aa54j*3$x^u zlaR?XSWGf`PJswf9E(Rr0+Vx>@6xQ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N~>}GhsW&t_3Irkyz=hVFU^~Gf3licqJGRA;PUH zA&d&f1w%xx0t?YpouzRga8~7K%yy^{%7)dC6ikR(j4Vb41S=1vvfi5q{uY+$?Y2Mx zoD0*6G>B-OGljf(-8xTdN^4ec4DUhT4aYPL9r(;#zkWxo95Z&ztTRs<_|%?~;@Mk0 zVXJX9;?4n0{^Bcd51#Y#yt@}IT-YO<%{he-Id~|$r-Myunx?3!spGn#GSe`vq6Vkg zB-->)WKkuH@JS#_q2`;jGl6Wy?Bz{^{p4 z{%^s@XH-;dRW@(ljAkn3TJQkG&jDsxRhRg@?eM0;QI&iHw*cUq?{gKD@ClBD+%4bW zwz>Zb&>K5W%n;y~IW(Z%33@A3P2+9alx2@Rvd{bz2M@e+)QI0MLGIMtGiJNL;(OO8 zTRm4Z+%F*nh$KWsU9{`RA1*lM>t%~i-nePwQL9$3@m1A@m2`$UIxtH{gqaA>NOWCQ z3G+yyo-8hGN6^dp4;nqmK+z+erm)k7OTifNH;>mV!u4Uw^FZ38Q`ueNZA#nbI(6z8 zIj}?f#k~*j`SpNfj(XuYojR=MoY%J+Q!{LWf-t0cj^29Ie_H_%XyT8xwYAQTm6b*7 z*KIj!?fSKBb9uR5S66$IX_&{vVllnGJ_J%87Kud3Xc%J$DT<~cN1Y$-bfWKux&<{|~>GR%G`+U`PM}002ovPDHLkV1jt+Q0xEz literal 0 HcmV?d00001 From f3ab218d2fa20ada361e637c18d265d73850e754 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 22 Oct 2023 18:09:16 -0400 Subject: [PATCH 2185/3335] Add files via upload --- misc/images/newtteck.png | Bin 0 -> 57853 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/newtteck.png diff --git a/misc/images/newtteck.png b/misc/images/newtteck.png new file mode 100644 index 0000000000000000000000000000000000000000..fa59dd85a347a0a076a39ef4e4c5ae40b3da19fc GIT binary patch literal 57853 zcmV(_K-9m9P)PyA07*naRCr$Gy$ie@b$KrQWE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YG8 z?oYA`8~2I)Jb42f1St2~H=_dccnD1ttir+OL288=JT^VdEDsGMNfwE^40`i?NYQ zc7+05sJd}M@Rh}pmCHYe6Wb2bujkRqErdf5GUw^#7WVfK*wEHNyXT&JY;enFTf26( z;x;GV(p~l@upEDo_UL!(+$J3ED~U5(z2-`=$uS>8Z0004FNklR%iyTzZY-MI;l`5W!dprvIi*n^;z}e*HSzxN)Pc>;qfEYoZM0^HI-MSH*Sm z9W-}i=j!JxR?7vgY*K@yG?TXU#@wx(16>Zj9c^ngj;%FaX}877!%+?q+GP-wU%~sh zHO57W^c+1a9MmA{SwBP7?#QF8i;O#ne-^IF!~1_O2mShehO=1!0000 Date: Sun, 22 Oct 2023 19:16:24 -0400 Subject: [PATCH 2186/3335] remove unused images --- misc/images/newtteck.png | Bin 57853 -> 0 bytes misc/images/tteck.png | Bin 52328 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/newtteck.png delete mode 100644 misc/images/tteck.png diff --git a/misc/images/newtteck.png b/misc/images/newtteck.png deleted file mode 100644 index fa59dd85a347a0a076a39ef4e4c5ae40b3da19fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57853 zcmV(_K-9m9P)PyA07*naRCr$Gy$ie@b$KrQWEh5VTr8KXyW8FEZkooFra)7qltZocsO5M;@m?=T zs|9a(t%uKAPk$CT96pZqha5jnYpJE8)K;ZfMWvKdN|90;X`03uV;W<+o5t;Sce%P4 zhGCdYzTfj+W@fFulk9-fsvF}@)@3gL`MUIe^i1`neFvPOkM@rX zu8Nm^&xE--$9KK#9PtLe=Y?yT2CXg4a_c4A+_kzHsLCuA|LK+_pit5}nT=>HiwY9| z6sS;`4G_Tsu$Y$EKNw<=X1I4WLSCwHmtly4f>f0vcsyrCOF~OW;jAi@B{#WQ2(eB9 zLK7&l1_ed4Ld?JO9;*rzrcM+ijw2kObdZE0PM)2?bP}MK_|@}RY75&|ud#lm7;9Hb zx}zr6&aARsPH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ff476af65033b2e73843 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 24 Oct 2023 23:05:44 -0400 Subject: [PATCH 2187/3335] Update changedetection.sh default Debian 12 --- ct/changedetection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 8f938dd5..c625e67c 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 7c527fa385a6207dd306215483e604ccac5e926e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 26 Oct 2023 14:36:36 -0400 Subject: [PATCH 2188/3335] Update omada-install.sh fixes https://github.com/tteck/Proxmox/issues/1963 --- install/omada-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index 79a35359..3bc337ab 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -30,8 +30,8 @@ $STD apt-get -y install zulu8-jdk msg_ok "Installed Azul Zulu" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From d45f386407e0a748ffd495c5848c91abcfb21120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Iskrzy=C5=84ski?= Date: Fri, 27 Oct 2023 00:36:18 +0200 Subject: [PATCH 2189/3335] libssl version update (#1965) update libssl version --- install/deconz-install.sh | 6 +++--- install/unifi-install.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 54631139..5611b7cc 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -26,8 +26,8 @@ echo "deb [arch=amd64] http://phoscon.de/apt/deconz $VERSION main" >/etc/apt/sou msg_ok "Setup Phoscon Repository" msg_info "Installing deConz" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD apt-get update $STD apt-get install -y deconz msg_ok "Installed deConz" @@ -56,7 +56,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +rm -rf libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" diff --git a/install/unifi-install.sh b/install/unifi-install.sh index c0d1c823..d65d2f2f 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -31,8 +31,8 @@ $STD apt-mark hold openjdk-11-* msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf mongodb-org-server_3.6.23_amd64.deb libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb /etc/apt/sources.list.d/openjdk-11-jre-headless.list +rm -rf mongodb-org-server_3.6.23_amd64.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb /etc/apt/sources.list.d/openjdk-11-jre-headless.list $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From b5c28fd921353561acd9b000b3758e0afe1bfd94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Oct 2023 12:21:36 -0400 Subject: [PATCH 2190/3335] Update webmin.sh A full code overhaul. --- misc/webmin.sh | 75 +++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/misc/webmin.sh b/misc/webmin.sh index b4375267..881de91a 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -5,40 +5,57 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -YW=$(echo "\033[33m") -RD=$(echo "\033[01;31m") -BL=$(echo "\033[36m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -while true; do - read -p "This will Install Webmin, Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear +function header_info { + clear + cat <<"EOF" + _ __ __ _ + | | /| / /__ / / __ _ (_)__ + | |/ |/ / -_) _ \/ ' \/ / _ \ + |__/|__/\__/_.__/_/_/_/_/_//_/ -echo -en "${GN} Installing Prerequisites... " +EOF +} +set -eEuo pipefail +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +CM="${GN}✓${CL}" +BFR="\\r\\033[K" +HOLD="-" + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +header_info + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Webmin Installer" --yesno "This Will Install Webmin on this LXC Container. Proceed?" 10 58 || exit + +msg_info "Installing Prerequisites" apt update &>/dev/null apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl unzip shared-mime-info &>/dev/null -echo -e "${CM}${CL} \r" +msg_ok "Installed Prerequisites" -echo -en "${GN} Downloading Webmin... " -wget http://prdownloads.sourceforge.net/webadmin/webmin_2.021_all.deb &>/dev/null -echo -e "${CM}${CL} \r" +LATEST=$(curl -sL https://api.github.com/repos/webmin/webmin/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -echo -en "${GN} Installing Webmin... " -dpkg --install webmin_2.021_all.deb &>/dev/null -echo -e "${CM}${CL} \r" +msg_info "Downloading Webmin" +wget -q https://github.com/webmin/webmin/releases/download/$LATEST/webmin_${LATEST}_all.deb +msg_ok "Downloaded Webmin" -echo -en "${GN} Setting Default Webmin usermame & password to root... " +msg_info "Installing Webmin" +dpkg -i webmin_${LATEST}_all.deb &>/dev/null /usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null -rm -rf /root/webmin_2.021_all.deb -echo -e "${CM}${CL} \r" -IP=$(hostname -I | cut -f1 -d ' ') -echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000" +rm -rf /root/webmin_${LATEST}_all.deb +msg_ok "Installed Webmin" -# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/webmin.sh)" +IP=$(hostname -I | cut -f1 -d ' ') +echo -e "Successfully Installed!! Webmin should be reachable by going to ${BL}https://${IP}:10000${CL}" From b7747c2b076d75415489ed7c8e522cd921b9d9d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 27 Oct 2023 12:28:17 -0400 Subject: [PATCH 2191/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9123a5b3..d3a77f17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-10-27 + +### Changed + +- **Webmin** + - A full code overhaul. + ## 2023-10-15 ### Changed From 52b0fd8f694c26167454c7c7efb0f9fedbc66fb7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Oct 2023 06:54:37 -0400 Subject: [PATCH 2192/3335] Update deluge-install.sh make Debian 12 compatible --- install/deluge-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/deluge-install.sh b/install/deluge-install.sh index 1fde3caa..fb6c50e1 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y python3-libtorrent msg_ok "Installed Dependencies" msg_info "Updating Python3" @@ -28,7 +29,6 @@ msg_ok "Updated Python3" msg_info "Installing Deluge" $STD pip install deluge[all] -$STD pip install lbry-libtorrent msg_ok "Installed Deluge" msg_info "Creating Service" From 1a985d64174322be5975e8cb543789d687485a3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 28 Oct 2023 06:55:11 -0400 Subject: [PATCH 2193/3335] Update deluge.sh default Debian 12 --- ct/deluge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/deluge.sh b/ct/deluge.sh index 163fe125..35d7eb16 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -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 From 3d4af6184daafa51019f37c7a0083a339428ef43 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 09:21:44 -0400 Subject: [PATCH 2194/3335] Create unmanic.sh --- misc/unmanic.sh | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 misc/unmanic.sh diff --git a/misc/unmanic.sh b/misc/unmanic.sh new file mode 100644 index 00000000..984917a4 --- /dev/null +++ b/misc/unmanic.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ __ _ + / / / /__ __ _ ___ ____ (_)___ +/ /_/ / _ \/ ' \/ _ `/ _ \/ / __/ +\____/_//_/_/_/_/\_,_/_//_/_/\__/ + +EOF +} +header_info +while true; do + read -p "This will add Unmanic to an existing LXC Container ONLY. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +set -e +NODE=$(hostname) +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') + +while [ -z "${CTID:+x}" ]; do + CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \ + "\nSelect a container to add Unmanic to:\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done + +echo "Installing Unmanic..." +lxc-attach -n $CTID -- bash -c "apt-get -y install python3-pip && python3 -m pip install unmanic && cat << EOF >/etc/systemd/system/unmanic.service +[Unit] +Description=Unmanic - Library Optimiser +After=network-online.target +StartLimitInterval=200 +StartLimitBurst=3 + +[Service] +Type=simple +ExecStart=/usr/local/bin/unmanic +Restart=always +RestartSec=30 + +[Install] +WantedBy=multi-user.target +EOF" +lxc-attach -n $CTID -- bash -c "systemctl enable -q --now unmanic.service" +echo "Installed Unmanic" +sleep 2 +echo -e "\n\e[1;32m ✔ Completed Successfully!\e[0m" +echo -e "\n\e[1;32m In a browser, go to ${CTID}'s IP:8888 \e[0m" From f34c2f150cbb412ef76e9d4dcc7531f18d36f8b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 10:08:24 -0400 Subject: [PATCH 2195/3335] Update unmanic.sh add ffmpeg --- misc/unmanic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/unmanic.sh b/misc/unmanic.sh index 984917a4..9b423bfe 100644 --- a/misc/unmanic.sh +++ b/misc/unmanic.sh @@ -44,7 +44,7 @@ while [ -z "${CTID:+x}" ]; do done echo "Installing Unmanic..." -lxc-attach -n $CTID -- bash -c "apt-get -y install python3-pip && python3 -m pip install unmanic && cat << EOF >/etc/systemd/system/unmanic.service +lxc-attach -n $CTID -- bash -c "apt-get -y install python3-pip && python3 -m pip install unmanic && apt-get -y install ffmpeg && cat << EOF >/etc/systemd/system/unmanic.service [Unit] Description=Unmanic - Library Optimiser After=network-online.target From c674b53a06d3dba4341b2c2d7c799eb3a6ba4c2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 15:33:13 -0400 Subject: [PATCH 2196/3335] Update sabnzbd-install.sh unrar 7.0.2 --- install/sabnzbd-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index fb9690d3..06c6b19b 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -19,9 +19,9 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y par2 $STD apt-get install -y p7zip-full -wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.2.12-1_amd64.deb -$STD dpkg -i unrar_6.2.12-1_amd64.deb -rm unrar_6.2.12-1_amd64.deb +wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_7.0.2-1_amd64.deb +$STD dpkg -i unrar_7.0.2-1_amd64.deb +rm unrar_7.0.2-1_amd64.deb msg_ok "Installed Dependencies" msg_info "Updating Python3" From d4b0512eaf107ba42a244e80c828372cb2408fe3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 17:53:59 -0400 Subject: [PATCH 2197/3335] Create unmanic-install.sh --- install/unmanic-install.sh | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 install/unmanic-install.sh diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh new file mode 100644 index 00000000..72b898a1 --- /dev/null +++ b/install/unmanic-install.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y ffmpeg +$STD apt-get install -y python3-pip +msg_ok "Installed Dependencies" + +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 Unmanic" +$STD pip3 install unmanic +msg_ok "Installed Unmanic" + +msg_info "Creating Service" +cat << EOF >/etc/systemd/system/unmanic.service +[Unit] +Description=Unmanic - Library Optimiser +After=network-online.target +StartLimitInterval=200 +StartLimitBurst=3 + +[Service] +Type=simple +ExecStart=/usr/local/bin/unmanic +Restart=always +RestartSec=30 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q unmanic.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 801ce7b7d76528d020dd6e7143c3c25daedcf471 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 17:55:19 -0400 Subject: [PATCH 2198/3335] Create unmanic.sh --- ct/unmanic.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/unmanic.sh diff --git a/ct/unmanic.sh b/ct/unmanic.sh new file mode 100644 index 00000000..76d61497 --- /dev/null +++ b/ct/unmanic.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ _ + / / / /___ ____ ___ ____ _____ (_)____ + / / / / __ \/ __ `__ \/ __ `/ __ \/ / ___/ +/ /_/ / / / / / / / / / /_/ / / / / / /__ +\____/_/ /_/_/ /_/ /_/\__,_/_/ /_/_/\___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Unmanic" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/unmanic.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +pip3 install -U unmanic &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8888${CL} \n" From a690992d631dbbd7a40b4c8627901688a2dbcf60 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 19:09:28 -0400 Subject: [PATCH 2199/3335] Update unmanic-install.sh tweak --- install/unmanic-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index 72b898a1..3e86fc89 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -27,10 +27,10 @@ if [[ "$CTTYPE" == "0" ]]; then va-driver-all \ ocl-icd-libopencl1 \ intel-opencl-icd - - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* + mkdir /dev/dri >/dev/null 2>&1 + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* msg_ok "Set Up Hardware Acceleration" fi From 59a8f12c0f293f13e354edcbc7b7a94ffd34a5c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 19:37:25 -0400 Subject: [PATCH 2200/3335] Update build.func add Unmanic to VAAPI hardware transcoding group --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 4c975369..78f3c74d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -545,7 +545,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" ]]; then + if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm From 85b0592f99b52305d37f08a1de16377fe4930a50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 19:42:12 -0400 Subject: [PATCH 2201/3335] Update unmanic-install.sh tweak --- install/unmanic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index 3e86fc89..53df335e 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -27,7 +27,7 @@ if [[ "$CTTYPE" == "0" ]]; then va-driver-all \ ocl-icd-libopencl1 \ intel-opencl-icd - mkdir /dev/dri >/dev/null 2>&1 + chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* From f2172b46097558504adcd5c97c2528000cf1a271 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 20:07:49 -0400 Subject: [PATCH 2202/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a77f17..45ab818a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-10-29 + +### Changed + +- **Unmanic LXC** + - NEW Script + ## 2023-10-27 ### Changed From 9decac3cd3a50ca0625f3bea05243f8ad8fbca3a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 20:52:15 -0400 Subject: [PATCH 2203/3335] Update unmanic-install.sh tweak --- install/unmanic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index 53df335e..ebf48b26 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (Patience)" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc From 2d832fb19408dafa2992101c4321a45b293d4d33 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 21:26:22 -0400 Subject: [PATCH 2204/3335] Update hw-acceleration.sh tweak --- misc/hw-acceleration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 2bc78f13..72e807c7 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -43,7 +43,7 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF -pct exec $privileged_container -- bash -c "apt-get -y install va-driver-all && apt-get -y install ocl-icd-libopencl1 && apt-get install -y intel-opencl-icd && chgrp video /dev/dri && chmod 755 /dev/dri && chmod 660 /dev/dri/*" +pct exec $privileged_container -- bash -c "apt-get -y install va-driver-all && apt-get -y install ocl-icd-libopencl1 && apt-get install -y intel-opencl-icd" header_info echo -e "Completed Successfully!\n" echo -e "Reboot container $privileged_container to apply the new settings\n" From c12a4f9f7c9a526aa73918aca004ecfc2ca849f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 29 Oct 2023 21:51:51 -0400 Subject: [PATCH 2205/3335] Update alpine-nextcloud.sh tweak --- ct/alpine-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 0028e6a7..e950f101 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -62,7 +62,7 @@ function update_script() { while true; do CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ "1" "Update Nextcloud to $RELEASE" OFF \ - "2" "Nextcloud Database Credentials" ON \ + "2" "Nextcloud Login Credentials" ON \ "3" "Renew Self-signed Certificate" OFF \ 3>&1 1>&2 2>&3) exit_status=$? From e0e09f8a0b988d47387f2600c6d2716b4c2dc48c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 30 Oct 2023 05:32:56 -0400 Subject: [PATCH 2206/3335] Delete misc/unmanic.sh outdated --- misc/unmanic.sh | 67 ------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 misc/unmanic.sh diff --git a/misc/unmanic.sh b/misc/unmanic.sh deleted file mode 100644 index 9b423bfe..00000000 --- a/misc/unmanic.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { - clear - cat <<"EOF" - __ __ _ - / / / /__ __ _ ___ ____ (_)___ -/ /_/ / _ \/ ' \/ _ `/ _ \/ / __/ -\____/_//_/_/_/_/\_,_/_//_/_/\__/ - -EOF -} -header_info -while true; do - read -p "This will add Unmanic to an existing LXC Container ONLY. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -set -e -NODE=$(hostname) -while read -r line; do - TAG=$(echo "$line" | awk '{print $1}') - ITEM=$(echo "$line" | awk '{print substr($0,36)}') - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - CTID_MENU+=("$TAG" "$ITEM " "OFF") -done < <(pct list | awk 'NR>1') - -while [ -z "${CTID:+x}" ]; do - CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \ - "\nSelect a container to add Unmanic to:\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit -done - -echo "Installing Unmanic..." -lxc-attach -n $CTID -- bash -c "apt-get -y install python3-pip && python3 -m pip install unmanic && apt-get -y install ffmpeg && cat << EOF >/etc/systemd/system/unmanic.service -[Unit] -Description=Unmanic - Library Optimiser -After=network-online.target -StartLimitInterval=200 -StartLimitBurst=3 - -[Service] -Type=simple -ExecStart=/usr/local/bin/unmanic -Restart=always -RestartSec=30 - -[Install] -WantedBy=multi-user.target -EOF" -lxc-attach -n $CTID -- bash -c "systemctl enable -q --now unmanic.service" -echo "Installed Unmanic" -sleep 2 -echo -e "\n\e[1;32m ✔ Completed Successfully!\e[0m" -echo -e "\n\e[1;32m In a browser, go to ${CTID}'s IP:8888 \e[0m" From 8de41a87c7bd9517eeb10449aaa09a6009b48b2f Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 30 Oct 2023 13:57:03 -0400 Subject: [PATCH 2207/3335] Update esphome-install.sh - create `config` directory - fixes https://github.com/tteck/Proxmox/issues/1981 --- install/esphome-install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 7dbbbc18..38710d3e 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -26,14 +26,10 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv - msg_ok "Updated Python3" msg_info "Installing ESPHome" -#mkdir /srv/esphome -#cd /srv/esphome -#python3 -m venv . -#source bin/activate +mkdir config $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" @@ -44,7 +40,6 @@ Description=ESPHome Dashboard After=network.target [Service] -#ExecStart=/srv/esphome/bin/esphome dashboard /root/config/ ExecStart=/usr/local/bin/esphome dashboard /root/config/ Restart=always User=root From 6da234a3ed5be71d82c83b6c4c9e2b561649d513 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 30 Oct 2023 14:02:46 -0400 Subject: [PATCH 2208/3335] Update esphome-install.sh --- install/esphome-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 38710d3e..5b5a8d1f 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -29,7 +29,7 @@ $STD apt-get install -y \ msg_ok "Updated Python3" msg_info "Installing ESPHome" -mkdir config +mkdir /root/config $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" From 4a2d9296bdc88dbb45e1f41888534a858ec0feaa Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 31 Oct 2023 16:01:05 -0400 Subject: [PATCH 2209/3335] Create debian-vm.sh --- vm/debian-vm.sh | 421 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 421 insertions(+) create mode 100644 vm/debian-vm.sh diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh new file mode 100644 index 00000000..feaf5238 --- /dev/null +++ b/vm/debian-vm.sh @@ -0,0 +1,421 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ____ __ _ ______ + / __ \___ / /_ (_)___ _____ < /__ \ + / / / / _ \/ __ \/ / __ `/ __ \ / /__/ / + / /_/ / __/ /_/ / / /_/ / / / / / // __/ +/_____/\___/_.___/_/\__,_/_/ /_/ /_//____/ + +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + msg_error "This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="debian" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="2048" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="yes" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${BL}Creating a Debian 12 VM using the above default settings${CL}" +} + +function advanced_settings() { + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 debian --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="debian" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="2048" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Debian 12 VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a Debian 12 VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image" +URL=https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-nocloud-amd64-20231013-1532.qcow2 +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a Debian 12 VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ + -boot order=scsi0 \ + -description "# Debian 12 VM +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null +msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting Debian 12 VM" + qm start $VMID + msg_ok "Started Debian 12 VM" +fi +msg_ok "Completed Successfully!\n" From 45baf98e99a9fb5f09055880514e9cf5363c166f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 31 Oct 2023 16:09:07 -0400 Subject: [PATCH 2210/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ab818a..8c513f7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-10-31 + +### Changed + +- **Debian 12 VM** + - NEW Script + ## 2023-10-29 ### Changed From cf8704529ca887636d2f50f8d4a9b4399edcbaa7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Nov 2023 02:23:38 -0400 Subject: [PATCH 2211/3335] Create owncast-install.sh --- install/owncast-install.sh | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/owncast-install.sh diff --git a/install/owncast-install.sh b/install/owncast-install.sh new file mode 100644 index 00000000..5b08b076 --- /dev/null +++ b/install/owncast-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y ffmpeg +msg_ok "Installed Dependencies" + +msg_info "Installing Owncast" +mkdir /opt/owncast +cd /opt/owncast +wget -q $(curl -s https://api.github.com/repos/owncast/owncast/releases/latest | grep download | grep linux-64bit | cut -d\" -f4) +unzip owncast*.zip +rm owncast*.zip +msg_ok "Installed Owncast" + +msg_info "Creating Service" +cat </etc/systemd/system/owncast.service +[Unit] +Description=Owncast +After=syslog.target network-online.target + +[Service] +ExecStart=/opt/owncast/./owncast +WorkingDirectory=/opt/owncast +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now owncast.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 7186cfc2a8346f4a6b4d66cb64dcee4dd243e02a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Nov 2023 02:25:03 -0400 Subject: [PATCH 2212/3335] Create owncast.sh --- ct/owncast.sh | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 ct/owncast.sh diff --git a/ct/owncast.sh b/ct/owncast.sh new file mode 100644 index 00000000..4049f043 --- /dev/null +++ b/ct/owncast.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \_ ______ _________ ______/ /_ + / / / / | /| / / __ \/ ___/ __ `/ ___/ __/ +/ /_/ /| |/ |/ / / / / /__/ /_/ (__ ) /_ +\____/ |__/|__/_/ /_/\___/\__,_/____/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="Owncast" +var_disk="2" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/owncast ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} + ${BL}http://${IP}:8080/admin${CL} admin|abc123\n" From 732b663147d474d216541840db69320dbc4663e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Nov 2023 02:29:46 -0400 Subject: [PATCH 2213/3335] Update owncast-install.sh tweak --- install/owncast-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/owncast-install.sh b/install/owncast-install.sh index 5b08b076..8514ae8b 100644 --- a/install/owncast-install.sh +++ b/install/owncast-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (Patience)" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc @@ -24,7 +24,7 @@ msg_info "Installing Owncast" mkdir /opt/owncast cd /opt/owncast wget -q $(curl -s https://api.github.com/repos/owncast/owncast/releases/latest | grep download | grep linux-64bit | cut -d\" -f4) -unzip owncast*.zip +$STD unzip owncast*.zip rm owncast*.zip msg_ok "Installed Owncast" From a94bcac429e83832a0af203fa52b0c60dfeb44e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Nov 2023 02:58:33 -0400 Subject: [PATCH 2214/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c513f7f..d59d41eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-11-1 + +### Changed + +- **Owncast LXC** + - NEW Script + ## 2023-10-31 ### Changed From 15f1343a000f8b43792b98c146d62d90c20cf719 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Nov 2023 03:40:43 -0400 Subject: [PATCH 2215/3335] Update openwrt.sh tweak --- vm/openwrt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 5f9d6fcc..d163b926 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -478,7 +478,7 @@ qm set $VMID \ -description "# OpenWrt VM ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null -msg_ok "OpenWrt VM ${CL}${BL}(${HN})" +msg_ok "Created OpenWrt VM ${CL}${BL}(${HN})" msg_info "OpenWrt is being started in order to configure the network interfaces." qm start $VMID sleep 15 From 19a6a06f5f9f74cd1f59454a7e4e47e7f5999d29 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 Nov 2023 19:16:54 -0400 Subject: [PATCH 2216/3335] Update podman-homeassistant.sh https://github.com/tteck/Proxmox/issues/1994 --- ct/podman-homeassistant.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 14c2ed98..aa473549 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -74,7 +74,7 @@ if [ "$UPD" == "1" ]; then for container in ${CONTAINER_LIST}; do CONTAINER_IMAGE="$(podman inspect --format "{{.Config.Image}}" --type container ${container})" RUNNING_IMAGE="$(podman inspect --format "{{.Image}}" --type container "${container}")" - podman pull "docker.io/${CONTAINER_IMAGE}" + podman pull "${CONTAINER_IMAGE}" LATEST_IMAGE="$(podman inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then echo "Updating ${container} image ${CONTAINER_IMAGE}" From 8982211e12a94d8aa7a80f25dce6a16f3fa72a1e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 Nov 2023 10:45:28 -0400 Subject: [PATCH 2217/3335] Update photoprism.sh Transitioned to PhotoPrism's latest installation package, featuring Linux binaries. --- ct/photoprism.sh | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/ct/photoprism.sh b/ct/photoprism.sh index ae29e486..2eefb474 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -20,8 +20,8 @@ header_info echo -e "Loading..." APP="PhotoPrism" var_disk="8" -var_cpu="4" -var_ram="4096" +var_cpu="2" +var_ram="2048" var_os="debian" var_version="12" variables @@ -61,24 +61,9 @@ function update_script() { sudo systemctl stop photoprism msg_ok "Stopped PhotoPrism" - msg_info "Cloning PhotoPrism" - cd ~ - git clone https://github.com/photoprism/photoprism.git &>/dev/null - cd photoprism - git checkout release &>/dev/null - msg_ok "Cloned PhotoPrism" - - msg_info "Building PhotoPrism" - sudo make all &>/dev/null - sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null - sudo rm -rf /opt/photoprism/assets - sudo cp -r assets/ /opt/photoprism/ &>/dev/null - msg_ok "Built PhotoPrism" - - msg_info "Cleaning" - cd ~ - rm -rf photoprism - msg_ok "Cleaned" + msg_info "Updating PhotoPrism" + wget -q -cO - https://dl.photoprism.app/pkg/linux/amd64.tar.gz | tar -xzf - -C /opt/photoprism --strip-components=1 + msg_ok "Updated PhotoPrism" msg_info "Starting PhotoPrism" sudo systemctl start photoprism @@ -91,9 +76,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:2342${CL} \n" From 9cfc8e3a62ad33987c5267ada869356cefa5d68c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 Nov 2023 10:48:47 -0400 Subject: [PATCH 2218/3335] Update photoprism-install.sh - Transitioned to PhotoPrism's latest installation package, featuring Linux binaries. --- install/photoprism-install.sh | 109 ++++++++-------------------------- 1 file changed, 24 insertions(+), 85 deletions(-) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 8a4e3da2..84573941 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -17,96 +17,41 @@ 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 gcc -$STD apt-get install -y g++ -$STD apt-get install -y git -$STD apt-get install -y make -$STD apt-get install -y zip $STD apt-get install -y exiftool $STD apt-get install -y ffmpeg $STD apt-get install -y libheif1 -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg +$STD apt-get install -y libpng-dev +$STD apt-get install -y libjpeg-dev +$STD apt-get install -y libtiff-dev +$STD apt-get install -y imagemagick +$STD apt-get install -y darktable + msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Golang" -set +o pipefail -RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) -wget -q https://golang.org/dl/$RELEASE -$STD tar -xzf $RELEASE -C /usr/local -$STD ln -s /usr/local/go/bin/go /usr/local/bin/go -msg_ok "Installed Golang" - -msg_info "Installing Go Dependencies" -$STD go install github.com/tianon/gosu@latest -$STD go install golang.org/x/tools/cmd/goimports@latest -$STD go install github.com/psampaz/go-mod-outdated@latest -$STD go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest -$STD go install github.com/mikefarah/yq/v4@latest -$STD go install github.com/kyoh86/richgo@latest -cp /root/go/bin/* /usr/local/go/bin/ -cp /usr/local/go/bin/richgo /usr/local/bin/richgo -cp /usr/local/go/bin/gosu /usr/local/sbin/gosu -chown root:root /usr/local/sbin/gosu -chmod 755 /usr/local/sbin/gosu -msg_ok "Installed Go Dependencies" - -msg_info "Installing Tensorflow" -if grep -q avx2 /proc/cpuinfo; then - suffix="avx2-" -elif grep -q avx /proc/cpuinfo; then - suffix="avx-" +msg_info "Installing PhotoPrism (Patience)" +mkdir -p /opt/photoprism/{cache,photos/originals,photos/import,storage,temp} +wget -q -cO - https://dl.photoprism.app/pkg/linux/amd64.tar.gz | tar -xz -C /opt/photoprism --strip-components=1 +if [[ ${PCT_OSTYPE} == "ubuntu" ]]; then + wget -q -cO - https://dl.photoprism.app/dist/libheif/libheif-jammy-amd64-v1.17.1.tar.gz | tar -xzf - -C /usr/local --strip-components=1 else - suffix="1" + wget -q -cO - https://dl.photoprism.app/dist/libheif/libheif-bookworm-amd64-v1.17.1.tar.gz | tar -xzf - -C /usr/local --strip-components=1 fi -version=$(curl -s https://dl.photoprism.org/tensorflow/amd64/ | grep -o "libtensorflow-amd64-$suffix.*\\.tar.gz" | head -n 1) -wget -q https://dl.photoprism.org/tensorflow/amd64/$version -tar -C /usr/local -xzf $version ldconfig -set -o pipefail -msg_ok "Installed Tensorflow" - -msg_info "Cloning PhotoPrism" -mkdir -p /opt/photoprism/bin -mkdir -p /var/lib/photoprism/storage -$STD git clone https://github.com/photoprism/photoprism.git -cd photoprism -$STD git checkout release -msg_ok "Cloned PhotoPrism" - -msg_info "Building PhotoPrism (Patience)" -$STD make -B -$STD ./scripts/build.sh prod /opt/photoprism/bin/photoprism -$STD cp -r assets/ /opt/photoprism/ -msg_ok "Built PhotoPrism" - -env_path="/var/lib/photoprism/.env" -echo " +cat </opt/photoprism/config/.env PHOTOPRISM_AUTH_MODE='password' PHOTOPRISM_ADMIN_PASSWORD='changeme' PHOTOPRISM_HTTP_HOST='0.0.0.0' PHOTOPRISM_HTTP_PORT='2342' PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' -PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism/storage' -PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals' -PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import' -" >$env_path +PHOTOPRISM_STORAGE_PATH='/opt/photoprism/storage' +PHOTOPRISM_ORIGINALS_PATH='/opt/photoprism/photos/originals' +PHOTOPRISM_IMPORT_PATH='/opt/photoprism/photos/import' +EOF +msg_ok "Installed PhotoPrism" msg_info "Creating Service" -service_path="/etc/systemd/system/photoprism.service" - -echo "[Unit] +cat </etc/systemd/system/photoprism.service +[Unit] Description=PhotoPrism service After=network.target @@ -114,12 +59,14 @@ After=network.target Type=forking User=root WorkingDirectory=/opt/photoprism -EnvironmentFile=/var/lib/photoprism/.env +EnvironmentFile=/opt/photoprism/config/.env ExecStart=/opt/photoprism/bin/photoprism up -d ExecStop=/opt/photoprism/bin/photoprism down [Install] -WantedBy=multi-user.target" >$service_path +WantedBy=multi-user.target +EOF +systemctl enable -q --now photoprism msg_ok "Created Service" motd_ssh @@ -128,12 +75,4 @@ customize msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean -rm -rf /var/{cache,log}/* \ - /photoprism \ - /$RELEASE \ - /$version msg_ok "Cleaned" - -msg_info "Starting PhotoPrism" -systemctl enable -q --now photoprism -msg_ok "Started PhotoPrism" From 4c4ff24327f7e601530adb7e7e23da1b273d0c19 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 Nov 2023 18:19:27 -0400 Subject: [PATCH 2219/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d59d41eb..b6dd39bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-11-2 + +### Changed + +- **PhotoPrism LXC** + - Transitioned to PhotoPrism's latest installation package, featuring Linux binaries. + ## 2023-11-1 ### Changed From e57a7f66c128fd94ddf3ddcdf5df7acec47c083f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Nov 2023 16:25:03 -0400 Subject: [PATCH 2220/3335] Update photoprism-install.sh create config directory --- install/photoprism-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 84573941..75a03fee 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -29,7 +29,7 @@ $STD apt-get install -y darktable msg_ok "Installed Dependencies" msg_info "Installing PhotoPrism (Patience)" -mkdir -p /opt/photoprism/{cache,photos/originals,photos/import,storage,temp} +mkdir -p /opt/photoprism/{cache,config,photos/originals,photos/import,storage,temp} wget -q -cO - https://dl.photoprism.app/pkg/linux/amd64.tar.gz | tar -xz -C /opt/photoprism --strip-components=1 if [[ ${PCT_OSTYPE} == "ubuntu" ]]; then wget -q -cO - https://dl.photoprism.app/dist/libheif/libheif-jammy-amd64-v1.17.1.tar.gz | tar -xzf - -C /usr/local --strip-components=1 From b918091d6b754053ffc22a927fb71ff7ee94efe8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 3 Nov 2023 16:39:23 -0400 Subject: [PATCH 2221/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 5f4fe348..b977a7cf 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -102,7 +102,7 @@ EOF esac if [[ "${VERSION}" == "bookworm" ]]; then - CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nAdd 'ceph package repositories?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nCorrect 'ceph package sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From 5dc1cf587096c05eacd5b82693886886d6eca802 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 Nov 2023 09:17:47 -0400 Subject: [PATCH 2222/3335] Update esphome-install.sh move /config to /.config --- install/esphome-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 5b5a8d1f..8961664b 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -29,7 +29,6 @@ $STD apt-get install -y \ msg_ok "Updated Python3" msg_info "Installing ESPHome" -mkdir /root/config $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" @@ -40,7 +39,7 @@ Description=ESPHome Dashboard After=network.target [Service] -ExecStart=/usr/local/bin/esphome dashboard /root/config/ +ExecStart=/usr/local/bin/esphome dashboard /root/.config/ Restart=always User=root From 64d5ec81eeee2c09318228bbcef77e26f10459a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fries?= Date: Sun, 5 Nov 2023 22:52:56 +0100 Subject: [PATCH 2223/3335] Fix typo (#2007) --- ct/homeassistant-core.sh | 4 ++-- ct/homeassistant.sh | 4 ++-- ct/podman-homeassistant.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 7b14b802..f3929b14 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -96,12 +96,12 @@ function update_script() { exit fi if [ "$UPD" == "2" ]; then - msg_info "Installing Home Assistant Comunity Store (HACS)" + msg_info "Installing Home Assistant Community Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null cd .homeassistant bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null - msg_ok "Installed Home Assistant Comunity Store (HACS)" + msg_ok "Installed Home Assistant Community Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit fi diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 3c1abf63..1298c150 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -88,12 +88,12 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then - msg_info "Installing Home Assistant Comunity Store (HACS)" + msg_info "Installing Home Assistant Community Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null cd /var/lib/docker/volumes/hass_config/_data bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null - msg_ok "Installed Home Assistant Comunity Store (HACS)" + msg_ok "Installed Home Assistant Community Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit fi diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index aa473549..87b1ed72 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -85,12 +85,12 @@ if [ "$UPD" == "1" ]; then exit fi if [ "$UPD" == "2" ]; then - msg_info "Installing Home Assistant Comunity Store (HACS)" + msg_info "Installing Home Assistant Community Store (HACS)" apt update &>/dev/null apt install unzip &>/dev/null cd /var/lib/containers/storage/volumes/hass_config/_data bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null - msg_ok "Installed Home Assistant Comunity Store (HACS)" + msg_ok "Installed Home Assistant Community Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit fi From d74faa16732560cf1f38156c2c6f43906d5e2281 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 09:06:13 -0500 Subject: [PATCH 2224/3335] Create linkwarden.sh --- ct/linkwarden.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/linkwarden.sh diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh new file mode 100644 index 00000000..1ece83f2 --- /dev/null +++ b/ct/linkwarden.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ _ __ __ + / / (_)___ / /___ ______ __________/ /__ ____ + / / / / __ \/ //_/ | /| / / __ `/ ___/ __ / _ \/ __ \ + / /___/ / / / / ,< | |/ |/ / /_/ / / / /_/ / __/ / / / +/_____/_/_/ /_/_/|_| |__/|__/\__,_/_/ \__,_/\___/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Linkwarden" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="22.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/linkwarden ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP}${CL} should be reachable by going to the following URL. + ${BL}https://${IP}:3000${CL} \n" From 5746f5c1c97682451d877f44a48daa073561db90 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 09:08:51 -0500 Subject: [PATCH 2225/3335] Create linkwarden-install.sh --- install/linkwarden-install.sh | 109 ++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 install/linkwarden-install.sh diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh new file mode 100644 index 00000000..e959f555 --- /dev/null +++ b/install/linkwarden-install.sh @@ -0,0 +1,109 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y gpg +$STD apt-get install -y postgresql +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Clone Linkwarden Repository" +$STD git clone https://github.com/linkwarden/linkwarden.git /opt/linkwarden +cd /opt/linkwarden +msg_info "Cloned Linkwarden Repository" + +msg_info "Setting up PostgreSQL DB" +DB_NAME=linkwardendb +DB_USER=linkwarden +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" + +echo "" >>~/linkwarden.creds +echo -e "Linkwarden Database User: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds +echo -e "Linkwarden Database Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds +echo -e "Linkwarden Database Name: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds +msg_ok "Set up PostgreSQL DB" + +read -r -p "Would you like to add Adminer? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Adminer" + $STD apt install -y adminer + $STD a2enconf adminer + systemctl reload apache2 + IP=$(hostname -I | awk '{print $1}') + echo "" >>~/linkwarden.creds + echo -e "Adminer Interface: \e[32m$IP/adminer/\e[0m" >>~/linkwarden.creds + echo -e "Adminer System: \e[32mPostgreSQL\e[0m" >>~/linkwarden.creds + echo -e "Adminer Server: \e[32mlocalhost:5432\e[0m" >>~/linkwarden.creds + echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds + echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds + echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds + msg_ok "Installed Adminer" +fi + +msg_info "Installing Linkwarden (Patience)" +$STD yarn +$STD npx playwright install-deps +IP=$(hostname -I | awk '{print $1}') +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +env_path="/opt/linkwarden/.env" +echo " +NEXTAUTH_SECRET=${SECRET_KEY} +NEXTAUTH_URL=http://${IP}:3000 +DATABASE_URL=postgresql://linkwarden:password@localhost:5432/linkwardendb +" >$env_path +$STD yarn build +$STD yarn prisma migrate deploy +msg_ok "Installed Linkwarden" + +msg_info "Creating Service" +cat </etc/systemd/system/linkwarden.service +[Unit] +Description=Linkwarden Service +After=network.target + +[Service] +Type=exec +WorkingDirectory=/opt/linkwarden +ExecStart=/usr/bin/yarn start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now linkwarden.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 41763b94ee73bf6ac0be7c1f0435bc51bde364c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 09:17:09 -0500 Subject: [PATCH 2226/3335] Update linkwarden-install.sh --- install/linkwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index e959f555..06624471 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -77,7 +77,7 @@ env_path="/opt/linkwarden/.env" echo " NEXTAUTH_SECRET=${SECRET_KEY} NEXTAUTH_URL=http://${IP}:3000 -DATABASE_URL=postgresql://linkwarden:password@localhost:5432/linkwardendb +DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME} " >$env_path $STD yarn build $STD yarn prisma migrate deploy From 26552c40816c3656b60e99c9a36bc84e70a52775 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 09:18:50 -0500 Subject: [PATCH 2227/3335] Update linkwarden-install.sh --- install/linkwarden-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 06624471..7ab85f54 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -28,10 +28,11 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" -msg_info "Installing Node.js" +msg_info "Installing Node.js/Yarn" $STD apt-get update $STD apt-get install -y nodejs -msg_ok "Installed Node.js" +$STD npm install -g yarn +msg_ok "Installed Node.js/Yarn" msg_info "Clone Linkwarden Repository" $STD git clone https://github.com/linkwarden/linkwarden.git /opt/linkwarden From 579d10a429d28578f276e27cb2da4daf5df1880d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 09:25:25 -0500 Subject: [PATCH 2228/3335] Update linkwarden-install.sh --- install/linkwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 7ab85f54..585d76c7 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -37,7 +37,7 @@ msg_ok "Installed Node.js/Yarn" msg_info "Clone Linkwarden Repository" $STD git clone https://github.com/linkwarden/linkwarden.git /opt/linkwarden cd /opt/linkwarden -msg_info "Cloned Linkwarden Repository" +msg_ok "Cloned Linkwarden Repository" msg_info "Setting up PostgreSQL DB" DB_NAME=linkwardendb From fb3a909c287c787755574f9fcf92d5aef5229d5c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 09:49:32 -0500 Subject: [PATCH 2229/3335] Update linkwarden.sh --- ct/linkwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 1ece83f2..fb2a8d01 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -63,4 +63,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:3000${CL} \n" + ${BL}http://${IP}:3000${CL} \n" From b0a9d6281431bd48786dc9623c09b5a937a5bb47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 Nov 2023 10:25:05 -0500 Subject: [PATCH 2230/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6dd39bd..74d99b2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-11-8 + +### Changed + +- **Linkwarden LXC** + - NEW Script + ## 2023-11-2 ### Changed From 95e26b68427592dbf25e8f187a0ebe7ab22cce51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 09:09:44 -0500 Subject: [PATCH 2231/3335] Update alpine-install.func fixes https://github.com/tteck/Proxmox/issues/2015 --- misc/alpine-install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 3fd39278..959d5443 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -72,7 +72,7 @@ setting_up_container() { echo -e " 🖧 Check Network Settings" exit 1 fi - cat </etc/apk/repositories + cat <>/etc/apk/repositories https://dl-cdn.alpinelinux.org/alpine/edge/main https://dl-cdn.alpinelinux.org/alpine/edge/community https://dl-cdn.alpinelinux.org/alpine/edge/testing From 9af470895c0712055035c053988dcd7cc5fc972e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 10:33:56 -0500 Subject: [PATCH 2232/3335] Create agentdvr.sh --- ct/agentdvr.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/agentdvr.sh diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh new file mode 100644 index 00000000..e93bab1a --- /dev/null +++ b/ct/agentdvr.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ ____ _ ______ + / | ____ ____ ____ / /_/ __ \ | / / __ \ + / /| |/ __ `/ _ \/ __ \/ __/ / / / | / / /_/ / + / ___ / /_/ / __/ / / / /_/ /_/ /| |/ / _, _/ +/_/ |_\__, /\___/_/ /_/\__/_____/ |___/_/ |_| + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="AgentDVR" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="ubuntu" +var_version="22.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/agentdvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP}${CL} should be reachable by going to the following URL. + ${BL}https://${IP}:8090${CL} \n" From e874e9c5cc22a3b3e41b65e6307bd17b6e9b73de Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 10:35:01 -0500 Subject: [PATCH 2233/3335] Create agentdvr-install.sh --- install/agentdvr-install.sh | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 install/agentdvr-install.sh diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh new file mode 100644 index 00000000..431b44ba --- /dev/null +++ b/install/agentdvr-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y unzip +$STD apt-get install -y apt-transport-https +$STD apt-get install -y alsa-utils +$STD apt-get install -y libxext-dev +$STD apt-get install -y fontconfig +msg_ok "Installed Dependencies" + +msg_info "Installing AgentDVR" +mkdir -p /opt/agentdvr/agent +RELEASE=$(curl -s "https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" | grep -o 'https://.*\.zip') +cd /opt/agentdvr/agent +wget -q $RELEASE +$STD unzip Agent_Linux64*.zip +rm -rf Agent_Linux64*.zip +chmod +x ./Agent +msg_info "Installed AgentDVR" + +msg_info "Creating Service" +cat </etc/systemd/system/agentdvr.service +[Unit] +Description=AgentDVR + +[Service] +WorkingDirectory=/opt/agentdvr/agent +ExecStart=/opt/agentdvr/agent/./Agent +Environment="MALLOC_TRIM_THRESHOLD_=100000" +SyslogIdentifier=AgentDVR +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now agentdvr.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 813771cde472b368476b9b34030c4c1f00772f44 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 10:43:50 -0500 Subject: [PATCH 2234/3335] Update agentdvr.sh --- ct/agentdvr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index e93bab1a..25b17e77 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -63,4 +63,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP}${CL} should be reachable by going to the following URL. - ${BL}https://${IP}:8090${CL} \n" + ${BL}http://${IP}:8090${CL} \n" From c9d255012cfed7771d7e4e133c4f689921e4f35f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 10:44:33 -0500 Subject: [PATCH 2235/3335] Update agentdvr-install.sh --- install/agentdvr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh index 431b44ba..7dcd0d0a 100644 --- a/install/agentdvr-install.sh +++ b/install/agentdvr-install.sh @@ -32,7 +32,7 @@ wget -q $RELEASE $STD unzip Agent_Linux64*.zip rm -rf Agent_Linux64*.zip chmod +x ./Agent -msg_info "Installed AgentDVR" +msg_ok "Installed AgentDVR" msg_info "Creating Service" cat </etc/systemd/system/agentdvr.service From ec2b16970f8a677c526b0752abc33aed774923fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 11:01:08 -0500 Subject: [PATCH 2236/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74d99b2b..b7bd0170 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-11-9 + +### Changed + +- **AgentDVR LXC** + - NEW Script + ## 2023-11-8 ### Changed From 2bfd58c92c1767c0cd51463b227e30476793f982 Mon Sep 17 00:00:00 2001 From: Scott Russell <95888238+scott-hpe@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:59:48 -0500 Subject: [PATCH 2237/3335] Update update-lxcs.sh (#2018) Add -q to apt-get to avoid terminal noise in the logs --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 9a48dc1f..5443d59e 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -67,7 +67,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade" ;; esac } From 6463c85f05f386bc70b4e5f561689de04625433b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 17:46:25 -0500 Subject: [PATCH 2238/3335] Update sonarr-install.sh change v4 path --- install/sonarr-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index c183454a..5a1780b0 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -29,10 +29,10 @@ $STD apt-get update DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then systemctl stop sonarr.service - wget -q https://download.sonarr.tv/v4/develop/4.0.0.697/Sonarr.develop.4.0.0.697.linux-x64.tar.gz - tar -xzf Sonarr.develop.4.0.0.697.linux-x64.tar.gz + wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux' + tar -xzf SonarrV4.tar.gz cp -r Sonarr/* /usr/lib/sonarr/bin - rm -rf Sonarr Sonarr.develop.4.0.0.697.linux-x64.tar.gz + rm -rf Sonarr SonarrV4.tar.gz sed -i 's|ExecStart=/usr/bin/mono --debug /usr/lib/sonarr/bin/Sonarr.exe -nobrowser -data=/var/lib/sonarr|ExecStart=/usr/lib/sonarr/bin/Sonarr -nobrowser -data=/var/lib/sonarr|' /lib/systemd/system/sonarr.service sed -i 's/\(User=\|Group=\).*/\1root/' /lib/systemd/system/sonarr.service systemctl daemon-reload From 92b50cf36f23e6bfe205e11d634fb78ce51238a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 17:52:48 -0500 Subject: [PATCH 2239/3335] Update sonarr.sh add update for v4 --- ct/sonarr.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ct/sonarr.sh b/ct/sonarr.sh index cbcf3e34..bd0f7342 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -53,6 +53,16 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +read -r -p "Are you updating Sonarr v4? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + systemctl stop sonarr.service + wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux' + tar -xzf SonarrV4.tar.gz + cp -r Sonarr/* /usr/lib/sonarr/bin + rm -rf Sonarr SonarrV4.tar.gz + systemctl start sonarr.service + exit +fi msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null From 04647388bfadee59470233b7a2d0af4d44629f9b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 Nov 2023 18:23:14 -0500 Subject: [PATCH 2240/3335] Update tdarr.sh default Debian 12 --- ct/tdarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/tdarr.sh b/ct/tdarr.sh index cff3d7fc..5210d6c1 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 239b9ea0bad419c1fd71a9940f130c4a8f9fc8ec Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Nov 2023 05:25:46 -0500 Subject: [PATCH 2241/3335] Update kavita.sh - default Debian 12 - set update path --- ct/kavita.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ct/kavita.sh b/ct/kavita.sh index 4d86cd74..ca448e24 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -54,8 +54,13 @@ function update_script() { header_info if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +systemctl stop kavita +RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, l> +tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) &>/dev/null +rm -rf Kavita/config +cp -r Kavita/* /opt/Kavita +rm -rf Kavita +systemctl start kavita msg_ok "Updated $APP LXC" exit } From 4fa50c91006058af184d2051a10017ca3b6488ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 Nov 2023 13:32:21 -0500 Subject: [PATCH 2242/3335] Update kavita.sh fixes https://github.com/tteck/Proxmox/issues/2022 --- ct/kavita.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/kavita.sh b/ct/kavita.sh index ca448e24..f5e1ba5b 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -55,7 +55,7 @@ header_info if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" systemctl stop kavita -RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, l> +RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) &>/dev/null rm -rf Kavita/config cp -r Kavita/* /opt/Kavita From e1cdf7ddd4d29fc1e5ec634f1297b5f231e5acac Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 06:50:31 -0500 Subject: [PATCH 2243/3335] Update shinobi-install.sh fix spelling --- install/shinobi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index dd81b791..52d470b4 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -36,7 +36,7 @@ msg_info "Installing FFMPEG" $STD apt-get install -y ffmpeg msg_ok "Installed FFMPEG" -msg_info "Clonning Shinobi" +msg_info "Cloning Shinobi" cd /opt $STD git clone https://gitlab.com/Shinobi-Systems/Shinobi.git -b master Shinobi cd Shinobi From 026ad7bbec68d9f3f253ea1b100461a5182b3cb6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 07:35:38 -0500 Subject: [PATCH 2244/3335] Update sonarr.sh tweak --- ct/sonarr.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/sonarr.sh b/ct/sonarr.sh index bd0f7342..dbfb22ea 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -55,12 +55,14 @@ header_info if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi read -r -p "Are you updating Sonarr v4? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Updating $APP v4" systemctl stop sonarr.service wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux' tar -xzf SonarrV4.tar.gz cp -r Sonarr/* /usr/lib/sonarr/bin rm -rf Sonarr SonarrV4.tar.gz systemctl start sonarr.service + msg_ok "Updated $APP v4" exit fi msg_info "Updating $APP LXC" From 72f580664d68fd9fda8d190ff91253af301ebdd2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 12:08:31 -0500 Subject: [PATCH 2245/3335] Update homarr-install.sh --- install/homarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index d4f91978..bf26eb19 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -71,6 +71,7 @@ NEXTAUTH_SECRET="1234" EOF $STD yarn install $STD yarn build +$STD yarn db:migrate msg_ok "Installed Homarr" msg_info "Creating Service" From 5998a3c542ff4c3c501e17690c6cfc60ad2cdc79 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 12:39:23 -0500 Subject: [PATCH 2246/3335] Update homarr-install.sh --- install/homarr-install.sh | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index bf26eb19..2fe23c2b 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -44,33 +44,10 @@ msg_ok "Installed Yarn" msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr -cat </opt/homarr/.env -# Since the ".env" file is gitignored, you can use the ".env.example" file to -# build a new ".env" file when you clone the repo. Keep this file up-to-date -# when you add new variables to `.env`. - -# This file will be committed to version control, so make sure not to have any -# secrets in it. If you are cloning this repo, create a copy of this file named -# ".env" and populate it with your secrets. - -# When adding additional environment variables, the schema in "/src/env.js" -# should be updated accordingly. - -# Prisma -# https://www.prisma.io/docs/reference/database-reference/connection-urls#env -DATABASE_URL="file:../database/db.sqlite" - -# Next Auth -# You can generate a new secret on the command line with: -# openssl rand -base64 32 -# https://next-auth.js.org/configuration/options#secret -# NEXTAUTH_SECRET="" -NEXTAUTH_URL="http://localhost:3000" - -NEXTAUTH_SECRET="1234" -EOF $STD yarn install $STD yarn build +cp -p /opt/homarr/.env.example /opt/homarr/.env +sed -i 's/NEXTAUTH_SECRET="[^"]*"/NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"/' /opt/homarr/.env $STD yarn db:migrate msg_ok "Installed Homarr" From 50165e4d38b288dd250e181971d5c08879012236 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 13:03:35 -0500 Subject: [PATCH 2247/3335] Update homarr-install.sh --- install/homarr-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 2fe23c2b..18d37290 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -44,10 +44,10 @@ msg_ok "Installed Yarn" msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr -$STD yarn install -$STD yarn build cp -p /opt/homarr/.env.example /opt/homarr/.env sed -i 's/NEXTAUTH_SECRET="[^"]*"/NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"/' /opt/homarr/.env +$STD yarn install +$STD yarn build $STD yarn db:migrate msg_ok "Installed Homarr" From ef222e11d4a3101ca4b78a6a047a714aa1357462 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 13:13:45 -0500 Subject: [PATCH 2248/3335] Update homarr-install.sh test --- install/homarr-install.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 18d37290..38966a3f 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -28,18 +28,16 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" -msg_info "Installing Node.js" +msg_info "Installing Node.js/Yarn" $STD apt-get update $STD apt-get install -y nodejs -$STD npm install next -$STD npm instal react -$STD npm instal react-dom -msg_ok "Installed Node.js" - -msg_info "Installing Yarn" +npm install -g npm@latest $STD npm install -g yarn $STD yarn global add prisma -msg_ok "Installed Yarn" +npm install next +$STD npm instal react +$STD npm instal react-dom +msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr From e7436ee55d5a91866097e0bce9f9677820192701 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 13:19:01 -0500 Subject: [PATCH 2249/3335] Update homarr-install.sh test --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 38966a3f..9067e47e 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -34,7 +34,7 @@ $STD apt-get install -y nodejs npm install -g npm@latest $STD npm install -g yarn $STD yarn global add prisma -npm install next +# npm install next $STD npm instal react $STD npm instal react-dom msg_ok "Installed Node.js/Yarn" From 9b251be440f1c39ce87e3c0949968013b981634a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 13:25:57 -0500 Subject: [PATCH 2250/3335] Update homarr-install.sh test --- install/homarr-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 9067e47e..eed6b88e 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -33,10 +33,10 @@ $STD apt-get update $STD apt-get install -y nodejs npm install -g npm@latest $STD npm install -g yarn -$STD yarn global add prisma +#$STD yarn global add prisma # npm install next -$STD npm instal react -$STD npm instal react-dom +#$STD npm install react +#$STD npm install react-dom msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" From 60d5522ec17e4c458af8d7e90a83861195092f90 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 13:36:23 -0500 Subject: [PATCH 2251/3335] Update homarr-install.sh ready for testing --- install/homarr-install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index eed6b88e..b6e23993 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -31,12 +31,8 @@ msg_ok "Set up Node.js Repository" msg_info "Installing Node.js/Yarn" $STD apt-get update $STD apt-get install -y nodejs -npm install -g npm@latest +$STD npm install -g npm@latest $STD npm install -g yarn -#$STD yarn global add prisma -# npm install next -#$STD npm install react -#$STD npm install react-dom msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" From 3ecfbe91e25dac00727faeaf345fd030481048f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 14:17:12 -0500 Subject: [PATCH 2252/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7bd0170..2292f503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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-11-11 + +### Changed + +- **Homarr LXC** + - Returns + ## 2023-11-9 ### Changed From fa44c278fb1e9cfef25dfd32d2d349062624da19 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 15:44:33 -0500 Subject: [PATCH 2253/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2292f503..4aa6dfa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ### Changed - **Homarr LXC** - - Returns + - Returns with v0.14.0 (The authentication update). ## 2023-11-9 From 8185b09e010d02e57dda0f045cee913d1f8bdfc9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Nov 2023 19:35:32 -0500 Subject: [PATCH 2254/3335] Update vaultwarden.sh default Debian 12 --- ct/vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index b804f195..3600f984 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -23,7 +23,7 @@ var_disk="6" var_cpu="4" var_ram="4096" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 161e51796a2551a9500b49dd9a8631f81c9349bf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 Nov 2023 01:16:05 -0500 Subject: [PATCH 2255/3335] default Debian 12 - autobrr - jackett - transmission --- ct/autobrr.sh | 2 +- ct/jackett.sh | 2 +- ct/transmission.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/autobrr.sh b/ct/autobrr.sh index c3f79c42..8365bc1a 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/jackett.sh b/ct/jackett.sh index 892e2da2..c005c552 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/transmission.sh b/ct/transmission.sh index fd8a5c2d..25c07b54 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 53f0f7493aef0634f7fe8b1848168125012be820 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 11:34:32 -0500 Subject: [PATCH 2256/3335] Update homarr-install.sh change delimiter in sed command --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index b6e23993..958dc10e 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -39,7 +39,7 @@ msg_info "Installing Homarr (Patience)" git clone -q https://github.com/ajnart/homarr.git /opt/homarr cd /opt/homarr cp -p /opt/homarr/.env.example /opt/homarr/.env -sed -i 's/NEXTAUTH_SECRET="[^"]*"/NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"/' /opt/homarr/.env +sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env $STD yarn install $STD yarn build $STD yarn db:migrate From ed6443bc84a7279847cd0906e09c8fe78a7948ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 12:10:15 -0500 Subject: [PATCH 2257/3335] default Debian 12 - Homer - Cronicle Thanks @zelig2 --- ct/cronicle.sh | 2 +- ct/homer.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 4d59253a..08d6a961 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/homer.sh b/ct/homer.sh index fcdc17ac..7d0c8a3a 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 2f824100830be4d6f3e76aae98279a235381c3bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 13:07:18 -0500 Subject: [PATCH 2258/3335] Update blocky-install.sh code refactoring --- install/blocky-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 6ef5abcc..f7e23b98 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -20,13 +20,13 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Blocky" -systemctl stop systemd-resolved -$STD systemctl disable systemd-resolved.service -RELEASE=0.20 #$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q https://github.com/0xERR0R/blocky/releases/download/v$RELEASE/blocky_${RELEASE}_Linux_x86_64.tar.gz -mkdir -p /opt/blocky -tar -xf blocky_${RELEASE}_Linux_x86_64.tar.gz -C /opt/blocky -rm -rf blocky_${RELEASE}_Linux_x86_64.tar.gz +if systemctl is-active systemd-resolved > /dev/null 2>&1; then + systemctl disable -q --now systemd-resolved +fi +mkdir /opt/blocky +RELEASE=$(curl -s https://api.github.com/repos/0xERR0R/blocky/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -qO- https://github.com/0xERR0R/blocky/releases/download/v${RELEASE}/blocky_v${RELEASE}_Linux_x86_64.tar.gz | tar -xzf - -C /opt/blocky/ + cat </opt/blocky/config.yml upstream: # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query From 8c8bce10e55fffe81c6fff79a9a29aa364a2290d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 13:07:54 -0500 Subject: [PATCH 2259/3335] Update blocky.sh default Debian 12 --- ct/blocky.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/blocky.sh b/ct/blocky.sh index 049f979d..e90b66fb 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 073aba4d5df39c12cc2efa91809ca40dc699efa1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 15:49:48 -0500 Subject: [PATCH 2260/3335] Update whoogle.sh default Debian 12 --- ct/whoogle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/whoogle.sh b/ct/whoogle.sh index c6054537..d4cb472a 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From f2f9b035b36ccb5c740dd0ef6d1ebc30dda74b79 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 15:54:23 -0500 Subject: [PATCH 2261/3335] default Debian 12 - Podman - Podman-Homeassastant --- ct/podman-homeassistant.sh | 2 +- ct/podman.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 87b1ed72..a7a6e7a6 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -27,7 +27,7 @@ var_disk="16" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/podman.sh b/ct/podman.sh index bd048a08..d5cf7bf6 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 70d8ce37067cc590f8a466ad89c981fc484dfa7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 16:07:30 -0500 Subject: [PATCH 2262/3335] Update casaos.sh default Debian 12 --- ct/casaos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/casaos.sh b/ct/casaos.sh index 52e9f880..a6dab10d 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From b03ddde9e2617127137da3be25b9611f7817cfee Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 16:12:08 -0500 Subject: [PATCH 2263/3335] Update daemonsync.sh - default Debian 12 Thanks @onethree7 --- ct/daemonsync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index c134ce41..ba536268 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 4748a65692c2f3df6229580dd7c5596104e98eb3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 16:22:39 -0500 Subject: [PATCH 2264/3335] Update prometheus.sh - default Debian 12 Thanks @onethree7 --- ct/prometheus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 3ee8a3de..c51fb4d3 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From bbd7393d94fede64dfbbe77342d9fec76d27515e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 17:42:37 -0500 Subject: [PATCH 2265/3335] Update sabnzbd-install.sh fixes https://github.com/tteck/Proxmox/issues/2051 --- install/sabnzbd-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 06c6b19b..fd29e48d 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -19,9 +19,9 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y par2 $STD apt-get install -y p7zip-full -wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_7.0.2-1_amd64.deb -$STD dpkg -i unrar_7.0.2-1_amd64.deb -rm unrar_7.0.2-1_amd64.deb +wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_7.0.3-1_amd64.deb +$STD dpkg -i unrar*.deb +rm unrar*.deb msg_ok "Installed Dependencies" msg_info "Updating Python3" From 19f08297e66994def88174a4e16fe0b048b59d7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 Nov 2023 18:20:59 -0500 Subject: [PATCH 2266/3335] Update sabnzbd-install.sh code refactoring --- install/sabnzbd-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index fd29e48d..0fef42d1 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -19,7 +19,8 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y par2 $STD apt-get install -y p7zip-full -wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_7.0.3-1_amd64.deb +RELEASE=$(curl -s http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/ | grep -oP 'href="\K[^"]*unrar_7\.\d+\.\d+-\d+_amd64\.deb') +wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/$RELEASE $STD dpkg -i unrar*.deb rm unrar*.deb msg_ok "Installed Dependencies" From 9418ccb1ef67e0a3c95d1fe0fa6ba63bca342da8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 04:19:26 -0500 Subject: [PATCH 2267/3335] default Debian 12 - go2rtc - homebridge - iobroker - motioneye - navidrome - octoprint - rtsptoweb - syncthing - whisparr Thanks @t0rb3n --- ct/go2rtc.sh | 2 +- ct/homebridge.sh | 2 +- ct/iobroker.sh | 2 +- ct/motioneye.sh | 2 +- ct/navidrome.sh | 2 +- ct/octoprint.sh | 2 +- ct/rtsptoweb.sh | 2 +- ct/syncthing.sh | 2 +- ct/whisparr.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 89c7405b..5fd59314 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -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 diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 7522a7f4..1c10dd00 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 8feef540..f2577806 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 8ec8f6a2..244738c8 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 258c0acd..c7d9c290 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/octoprint.sh b/ct/octoprint.sh index 3d4cb3e0..e0c38fa4 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="1" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index ce040eb5..e0208273 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -23,7 +23,7 @@ var_disk="4" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors diff --git a/ct/syncthing.sh b/ct/syncthing.sh index b45fcfd8..0cfce841 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -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 diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 4304d4aa..df39c2f9 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -24,7 +24,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 6ef30fbeb9cd07e53244110e20c9441d102ead28 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 07:31:43 -0500 Subject: [PATCH 2268/3335] Update homarr-install.sh fixes https://github.com/tteck/Proxmox/issues/2054 --- install/homarr-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 958dc10e..13d97470 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -36,7 +36,9 @@ $STD npm install -g yarn msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" -git clone -q https://github.com/ajnart/homarr.git /opt/homarr +mkdir -p /opt/homarr +RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt && mv /opt/homarr-${RELEASE} /opt/homarr cd /opt/homarr cp -p /opt/homarr/.env.example /opt/homarr/.env sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env From 866cf119ce168f34c9055496981ea4d865907ac5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 07:41:32 -0500 Subject: [PATCH 2269/3335] Update homarr-install.sh --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 13d97470..bc7c805d 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -38,7 +38,7 @@ msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" mkdir -p /opt/homarr RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt && mv /opt/homarr-${RELEASE} /opt/homarr +wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr cd /opt/homarr cp -p /opt/homarr/.env.example /opt/homarr/.env sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env From 2a13cce5b5d19841010e16f4c74ac6e1e93f3cec Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 07:45:40 -0500 Subject: [PATCH 2270/3335] Update homarr-install.sh --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index bc7c805d..01f7c9f1 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -38,7 +38,7 @@ msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" mkdir -p /opt/homarr RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr +wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | $STD tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr cd /opt/homarr cp -p /opt/homarr/.env.example /opt/homarr/.env sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env From 2c3a3292608361ba79f175864504c924aecd4d8b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 07:50:39 -0500 Subject: [PATCH 2271/3335] Update homarr-install.sh --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 01f7c9f1..fbf2790f 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -40,7 +40,7 @@ mkdir -p /opt/homarr RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | $STD tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr cd /opt/homarr -cp -p /opt/homarr/.env.example /opt/homarr/.env +wget -q -O /opt/homarr/.env https://raw.githubusercontent.com/ajnart/homarr/dev/.env.example sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env $STD yarn install $STD yarn build From f8b1d7600c096cdfa4718c680663264a90393229 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 07:57:30 -0500 Subject: [PATCH 2272/3335] Update homarr.sh increase storage --- ct/homarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 4f327ec7..ee27dd03 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="Homarr" -var_disk="4" +var_disk="6" var_cpu="2" var_ram="2048" var_os="debian" From 8f8f5e27feb36913e756d650e4da705074a812f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 08:09:13 -0500 Subject: [PATCH 2273/3335] Update homarr-install.sh --- install/homarr-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index fbf2790f..fbd6c11e 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -38,7 +38,8 @@ msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" mkdir -p /opt/homarr RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | $STD tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr +wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | $STD tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr +rm -rf /opt/homarr-0.14.0 cd /opt/homarr wget -q -O /opt/homarr/.env https://raw.githubusercontent.com/ajnart/homarr/dev/.env.example sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env From f35cf214e4329fbf23f139d0a40618ea1bb0c94f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 08:10:00 -0500 Subject: [PATCH 2274/3335] Update homarr.sh increase storage --- ct/homarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index ee27dd03..05b4f204 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="Homarr" -var_disk="6" +var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" From bc6b4d51f978c05f4991b89b15ac1c5cf115bd77 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 08:21:09 -0500 Subject: [PATCH 2275/3335] Update homarr-install.sh tweak --- install/homarr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index fbd6c11e..94a4d760 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -39,7 +39,7 @@ msg_info "Installing Homarr (Patience)" mkdir -p /opt/homarr RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | $STD tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr -rm -rf /opt/homarr-0.14.0 +rm -rf /opt/homarr-${RELEASE} cd /opt/homarr wget -q -O /opt/homarr/.env https://raw.githubusercontent.com/ajnart/homarr/dev/.env.example sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env From 7851ed6b70d2adfb9de27cba0514a412deebf3ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 09:36:00 -0500 Subject: [PATCH 2276/3335] Update turnkey.sh fixes https://github.com/tteck/Proxmox/issues/2055 --- turnkey/turnkey.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index a77573b5..d49a7b19 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -97,7 +97,6 @@ turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs # Setup script environment PASS="$(openssl rand -base64 8)" CTID=$(pvesh get /cluster/nextid) -TEMPLATE_SEARCH="debian-11-turnkey-${turnkey}" PCT_OPTIONS=" -features keyctl=1,nesting=1 -hostname turnkey-${turnkey} @@ -175,8 +174,8 @@ msg "Updating LXC template list..." pveam update >/dev/null # Get LXC template string -mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '$TEMPLATE_SEARCH'." +mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | awk -v turnkey="${turnkey}" '$0 ~ turnkey {print $2}' | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '${turnkey}'." TEMPLATE="${TEMPLATES[-1]}" # Download LXC template From 587ae7ab3f96aa78d249c76a5cc9392b1c1f5293 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 11:33:48 -0500 Subject: [PATCH 2277/3335] Create owncloud-vm.sh --- vm/owncloud-vm.sh | 420 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 420 insertions(+) create mode 100644 vm/owncloud-vm.sh diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh new file mode 100644 index 00000000..03fd3fd5 --- /dev/null +++ b/vm/owncloud-vm.sh @@ -0,0 +1,420 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ______ __ __ _______ __ _ ____ ___ +/_ __/_ _________ / //_/__ __ __ ___ _ _____ / ___/ /__ __ _____/ / | | / / |/ / + / / / // / __/ _ \/ ,< / -_) // / / _ \ |/|/ / _ \/ /__/ / _ \/ // / _ / | |/ / /|_/ / +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / \___/__,__/_//_/\___/_/\___/\_,_/\_,_/ |___/_/ /_/ + /___/ +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey-ownCloud VM" --yesno "This will create a New TurnKey-ownCloud VM. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + msg_error "This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="turnkey-owncloud-vm" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="2048" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="yes" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${BL}Creating a TurnKey ownCloud VM using the above default settings${CL}" +} + +function advanced_settings() { + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 turnkey-owncloud-vm --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="turnkey-owncloud-vm" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="2048" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a TurnKey ownCloud VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a TurnKey ownCloud VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the TurnKey ownCloud ISO Disk Image" +URL=http://mirror.turnkeylinux.org/turnkeylinux/images/iso/turnkey-owncloud-18.0-bookworm-amd64.iso +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a TurnKey ownCloud VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios seabios${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=12G \ + -boot order=scsi0 \ + -description "# TurnKey ownCloud VM +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null +msg_ok "Created a TurnKey ownCloud VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting TurnKey ownCloud VM" + qm start $VMID + msg_ok "Started TurnKey ownCloud VM" +fi +msg_ok "Completed Successfully!\n" From ac546e3f42478d81a9730ec76a22c481b0f82937 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 11:54:11 -0500 Subject: [PATCH 2278/3335] Create nextcloud-vm.sh --- vm/nextcloud-vm.sh | 420 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 420 insertions(+) create mode 100644 vm/nextcloud-vm.sh diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh new file mode 100644 index 00000000..c4074aaa --- /dev/null +++ b/vm/nextcloud-vm.sh @@ -0,0 +1,420 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ______ __ __ _ __ __ __ _ ____ ___ +/_ __/_ _________ / //_/__ __ __ / |/ /____ ______/ /__ __ _____/ / | | / / |/ / + / / / // / __/ _ \/ ,< / -_) // / / / -_) \ / __/ / _ \/ // / _ / | |/ / /|_/ / +/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /_/|_/\__/_\_\\__/_/\___/\_,_/\_,_/ |___/_/ /_/ + /___/ +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) +NAME="TurnKey Nexcloud VM" +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "$NAME" --yesno "This will create a New $NAME. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + msg_error "This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="turnkey-nextcloud-vm" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="2048" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="no" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${BL}Creating a $NAME using the above default settings${CL}" +} + +function advanced_settings() { + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $HN --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="$HN" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="2048" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a $NAME?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a $NAME using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the $NAME Disk Image" +URL=http://mirror.turnkeylinux.org/turnkeylinux/images/iso/turnkey-nextcloud-18.0-bookworm-amd64.iso +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a $NAME" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios seabios${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=12G \ + -boot order=scsi0 \ + -description "# $NAME +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null +msg_ok "Created a $NAME ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting $NAME" + qm start $VMID + msg_ok "Started $NAME" +fi +msg_ok "Completed Successfully!\n" From 9c4aa5410bb83635c5a6e0508a9ffa858a3f5eba Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 12:13:25 -0500 Subject: [PATCH 2279/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa6dfa9..f75daa3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ - 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-11-14 + +### Changed + +- **TurnKey Nextcloud VM** + - NEW Script +- **TurnKey ownCloud VM** + - NEW Script + ## 2023-11-11 ### Changed From 897c75478e997de4ee2a87a81c214de1e71f4f02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 13:02:13 -0500 Subject: [PATCH 2280/3335] Update owncloud-vm.sh tweak --- vm/owncloud-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 03fd3fd5..c41c1124 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -141,7 +141,7 @@ function default_settings() { MAC="$GEN_MAC" VLAN="" MTU="" - START_VM="yes" + START_VM="no" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" From a53f2e50aa07db23dc6c5875d58a2e0da2ff02a4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 16:04:40 -0500 Subject: [PATCH 2281/3335] Update homarr.sh --- ct/homarr.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/homarr.sh b/ct/homarr.sh index 05b4f204..a340dbcd 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -53,6 +53,8 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit msg_info "Updating $APP" systemctl stop homarr cd /opt/homarr From 3fd87569dfabb5b0a65c48fc9cf3b8cfe46e7377 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 Nov 2023 17:28:08 -0500 Subject: [PATCH 2282/3335] Update homarr.sh attempt to fix update --- ct/homarr.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index a340dbcd..340cc11f 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -53,18 +53,18 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." -exit -msg_info "Updating $APP" +msg_info "Updating $APP (Patience)" systemctl stop homarr +cp -Rf /opt/homarr/data /opt/homarr/data-backup +cp -Rf /opt/homarr/database /opt/homarr/data-backup +RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt +cp -Rf /opt/homarr-${RELEASE}/* /opt/homarr/ +cp -Rf /opt/homarr/data-backup/* /opt/homarr/ +rm -rf /opt/homarr-${RELEASE} /opt/homarr/data-backup cd /opt/homarr -cp -R data data-backup -git stash &>/dev/null -git pull &>/dev/null yarn install &>/dev/null yarn build &>/dev/null -cp -R data-backup/* data -rm -rf data-backup systemctl start homarr msg_ok "Updated $APP" exit From 634283c04e746c4bfff61d82b3b7debb735641a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Nov 2023 07:50:51 -0500 Subject: [PATCH 2283/3335] Update zigbee2mqtt.sh follow https://github.com/Koenkk/zigbee2mqtt/commit/311ea070b167ddc6d8de1f8922aed0d8b38025d7 --- ct/zigbee2mqtt.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 14b75066..9f679fe6 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -94,7 +94,13 @@ function update_script() { exit 1 } - echo "Initiating update" + echo "Checking if any changes were made to package-lock.json..." + git checkout package-lock.json || { + echo "Failed to check package-lock.json." + exit 1 + } + + echo "Initiating update..." if ! git pull; then echo "Update failed, temporarily storing changes and trying again." git stash && git pull || ( @@ -109,6 +115,12 @@ function update_script() { exit 1 } + echo "Building..." + npm run build || { + echo "Failed to build new version." + exit 1 + } + echo "Restoring configuration..." cp -R data-backup/* data || { echo "Failed to restore configuration." From c968f07e42685ac00704729d2cf567a48159b34f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 15 Nov 2023 19:22:40 -0500 Subject: [PATCH 2284/3335] Update debian-vm.sh tweak --- vm/debian-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index feaf5238..bd86e7a9 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -154,7 +154,7 @@ function default_settings() { echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" echo -e "${BL}Creating a Debian 12 VM using the above default settings${CL}" } From 48f59062462c0470d6b2027a228487bbd5d738e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Nov 2023 10:39:04 -0500 Subject: [PATCH 2285/3335] Update debian-vm.sh - add serial0 socket --- vm/debian-vm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index bd86e7a9..b549f062 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -409,6 +409,7 @@ qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ -boot order=scsi0 \ + -serial0 socket \ -description "# Debian 12 VM ### https://github.com/tteck/Proxmox [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null @@ -419,3 +420,4 @@ if [ "$START_VM" == "yes" ]; then msg_ok "Started Debian 12 VM" fi msg_ok "Completed Successfully!\n" +echo "More Info at https://github.com/tteck/Proxmox/discussions/1988" From 26230754af1445be9902474638700d9a146f03dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Nov 2023 18:20:09 -0500 Subject: [PATCH 2286/3335] Update homarr.sh - fix backup/restore paths - keep backups until the next update (root directory) --- ct/homarr.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 340cc11f..94ce3640 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -55,13 +55,15 @@ header_info if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP (Patience)" systemctl stop homarr -cp -Rf /opt/homarr/data /opt/homarr/data-backup -cp -Rf /opt/homarr/database /opt/homarr/data-backup +rm -rf /root/data-homarr-backup +rm -rf /root/database-homarr-backup +cp -R /opt/homarr/data /root/data-homarr-backup +cp -R /opt/homarr/database /root/database-homarr-backup RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt -cp -Rf /opt/homarr-${RELEASE}/* /opt/homarr/ -cp -Rf /opt/homarr/data-backup/* /opt/homarr/ -rm -rf /opt/homarr-${RELEASE} /opt/homarr/data-backup +cp -R /root/data-homarr-backup/* /opt/homarr/data +cp -R /root/database-homarr-backup/* /opt/homarr/database +rm -rf /opt/homarr-${RELEASE} cd /opt/homarr yarn install &>/dev/null yarn build &>/dev/null From 03ea3fb8dd83749c73e09b1711d43c35e55840e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 Nov 2023 19:38:59 -0500 Subject: [PATCH 2287/3335] Update esphome-install.sh - revert https://github.com/tteck/Proxmox/commit/5dc1cf587096c05eacd5b82693886886d6eca802 - fixes https://github.com/tteck/Proxmox/issues/2062 --- install/esphome-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 8961664b..5b5a8d1f 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -29,6 +29,7 @@ $STD apt-get install -y \ msg_ok "Updated Python3" msg_info "Installing ESPHome" +mkdir /root/config $STD pip install esphome tornado esptool msg_ok "Installed ESPHome" @@ -39,7 +40,7 @@ Description=ESPHome Dashboard After=network.target [Service] -ExecStart=/usr/local/bin/esphome dashboard /root/.config/ +ExecStart=/usr/local/bin/esphome dashboard /root/config/ Restart=always User=root From b3784e4df4d80d8136a7c7e83cd32ddd5875ee8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 Nov 2023 05:11:58 -0500 Subject: [PATCH 2288/3335] Update navidrome-install.sh fixes https://github.com/tteck/Proxmox/issues/2065 --- install/navidrome-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index d1a890db..b5a003af 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -20,14 +20,12 @@ $STD apt-get install -y mc $STD apt-get install -y ffmpeg msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Navidrome" install -d -o root -g root /opt/navidrome install -d -o root -g root /var/lib/navidrome -$STD wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz +wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_amd64.tar.gz -O Navidrome.tar.gz $STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ chown -R root:root /opt/navidrome mkdir -p /music From b8222e26fc16b2a6f7962934ad24a1775b742ccf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 Nov 2023 05:14:28 -0500 Subject: [PATCH 2289/3335] Update navidrome.sh fix file name --- ct/navidrome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/navidrome.sh b/ct/navidrome.sh index c7d9c290..4062fd7f 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -59,7 +59,7 @@ systemctl stop navidrome.service msg_ok "Stopped Navidrome" msg_info "Updating to v${RELEASE}" -wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null +wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_amd64.tar.gz -O Navidrome.tar.gz &>/dev/null tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null msg_ok "Updated ${APP}" rm Navidrome.tar.gz From f2aed7d532d04fa29edf16c32c9329bc4398e3d5 Mon Sep 17 00:00:00 2001 From: efr2et Date: Fri, 17 Nov 2023 16:35:23 +0200 Subject: [PATCH 2290/3335] Update syncthing-install.sh (#2066) Fix "301 Moved Permanently" for curl --- install/syncthing-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 3e8eef08..6fe0f10a 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Installing Syncthing" -curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg +curl -sL -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg sh -c 'echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list' $STD apt-get update $STD apt-get install -y syncthing From b422923ea70ee2df62a5e19e87aced7435225e30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Nov 2023 12:13:11 -0500 Subject: [PATCH 2291/3335] Update changedetection-install.sh remove dnspython-2.2.1 --- install/changedetection-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 7ad0e307..91f6e681 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -67,7 +67,6 @@ msg_ok "Installed Node.js" msg_info "Installing Change Detection" mkdir /opt/changedetection $STD pip3 install changedetection.io -$STD python3 -m pip install dnspython==2.2.1 msg_ok "Installed Change Detection" msg_info "Installing Browserless & Playwright" From eb6fd78fa6d8711496a958bf83f2bd7d958f222f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Nov 2023 16:58:19 -0500 Subject: [PATCH 2292/3335] Create ubuntu-vm.sh --- vm/ubuntu-vm.sh | 424 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 424 insertions(+) create mode 100644 vm/ubuntu-vm.sh diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh new file mode 100644 index 00000000..4da0d913 --- /dev/null +++ b/vm/ubuntu-vm.sh @@ -0,0 +1,424 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ ____ __ ___ ___ ____ __ __ _ ____ ___ + / / / / /_ __ ______ / /___ __ |__ \|__ \ / __ \/ // / | | / / |/ / + / / / / __ \/ / / / __ \/ __/ / / / __/ /__/ / / / / / // /_ | | / / /|_/ / +/ /_/ / /_/ / /_/ / / / / /_/ /_/ / / __// __/_/ /_/ /__ __/ | |/ / / / / +\____/_.___/\__,_/_/ /_/\__/\__,_/ /____/____(_)____/ /_/ |___/_/ /_/ + +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 22.04 VM" --yesno "This will create a New Ubuntu 22.04 VM. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + msg_error "This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="ubuntu" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="2048" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="no" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${BL}Creating a Ubuntu 22.04 VM using the above default settings${CL}" +} + +function advanced_settings() { + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 ubuntu --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="ubuntu" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="2048" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Ubuntu 22.04 VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a Ubuntu 22.04 VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the Ubuntu 22.04 Disk Image" +URL=https://cloud-images.ubuntu.com/jammy/20231027/jammy-server-cloudimg-amd64.img +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a Ubuntu 22.04 VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ + -ide2 local-lvm:cloudinit \ + -boot order=scsi0 \ + -serial0 socket \ + -description "# Ubuntu 22.04 VM +### https://github.com/tteck/Proxmox +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null +msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting Ubuntu 22.04 VM" + qm start $VMID + msg_ok "Started Ubuntu 22.04 VM" +fi +msg_ok "Completed Successfully!\n" +echo "Setup Cloud-Init before starting" From 8c3fd6f90da3a2a6d8e798914da8c2a7df1b9bcb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Nov 2023 17:42:31 -0500 Subject: [PATCH 2293/3335] Update ubuntu-vm.sh tweak --- vm/ubuntu-vm.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index 4da0d913..d44d404f 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -155,7 +155,7 @@ function default_settings() { echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" - echo -e "${BL}Creating a Ubuntu 22.04 VM using the above default settings${CL}" + echo -e "${BL}Creating an Ubuntu 22.04 VM using the above default settings${CL}" } function advanced_settings() { @@ -314,8 +314,8 @@ function advanced_settings() { START_VM="no" fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Ubuntu 22.04 VM?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a Ubuntu 22.04 VM using the above advanced settings${CL}" + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create an Ubuntu 22.04 VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating an Ubuntu 22.04 VM using the above advanced settings${CL}" else header_info echo -e "${RD}Using Advanced Settings${CL}" @@ -421,4 +421,5 @@ if [ "$START_VM" == "yes" ]; then msg_ok "Started Ubuntu 22.04 VM" fi msg_ok "Completed Successfully!\n" -echo "Setup Cloud-Init before starting" +echo -e "Setup Cloud-Init before starting \n +More info at https://github.com/tteck/Proxmox/discussions/2072 \n" From 12d7efc7283662be4aff529ea668c15edabefa51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Nov 2023 18:06:08 -0500 Subject: [PATCH 2294/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f75daa3f..fc50e917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ +## 2023-11-18 + +### Changed + +- **Ubuntu 22.04 VM** + - NEW Script + # Change Log **All notable changes to this project will be documented in this file.**
From a9e67dc9d5bdfe747729096b07a55429d6152e6c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 Nov 2023 20:47:42 -0500 Subject: [PATCH 2295/3335] Update CHANGELOG.md --- CHANGELOG.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc50e917..38474a38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ - + +# Change Log +**All notable changes to this project will be documented in this file.**
+ +- 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-11-18 @@ -7,11 +11,6 @@ - **Ubuntu 22.04 VM** - NEW Script -# Change Log -**All notable changes to this project will be documented in this file.**
- -- 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-11-14 ### Changed From 29efbdd2eb0a2e9c16a02fc6d7d311b1cd3bdc9f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Nov 2023 08:35:07 -0500 Subject: [PATCH 2296/3335] Create dockge.sh --- ct/dockge.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 ct/dockge.sh diff --git a/ct/dockge.sh b/ct/dockge.sh new file mode 100644 index 00000000..756fac46 --- /dev/null +++ b/ct/dockge.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \____ _____/ /______ ____ + / / / / __ \/ ___/ //_/ __ `/ _ \ + / /_/ / /_/ / /__/ ,< / /_/ / __/ +/_____/\____/\___/_/|_|\__, /\___/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Dockge" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + FUSE="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5001${CL} \n" From d8cb2f19d2d8b1469f6fac4c3ff7dc7a3dc43d3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Nov 2023 08:36:33 -0500 Subject: [PATCH 2297/3335] Create dockge-install.sh --- install/dockge-install.sh | 89 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 install/dockge-install.sh diff --git a/install/dockge-install.sh b/install/dockge-install.sh new file mode 100644 index 00000000..ad4834f6 --- /dev/null +++ b/install/dockge-install.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") + +msg_info "Installing Docker $DOCKER_LATEST_VERSION" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +if [ "$ST" == "yes" ]; then + VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + cd /usr/local/bin + curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 + chmod 755 /usr/local/bin/fuse-overlayfs + cd ~ + echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json +else + echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json +fi +$STD sh <(curl -sSL https://get.docker.com) +msg_ok "Installed Docker $DOCKER_LATEST_VERSION" + +msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" +DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} +mkdir -p $DOCKER_CONFIG/cli-plugins +curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose +chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose +msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" + +msg_info "Installing Dockge" +mkdir -p /opt/stacks /opt/dockge +cd /opt/dockge +$STD curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output compose.yaml +$STD docker compose up -d +msg_ok "Installed Dockge" + +read -r -p "Would you like to add Home Assistant? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Adding Home Assistant compose.yaml" + mkdir -p /opt/stacks/homeassistant + cat </opt/stacks/homeassistant/compose.yaml +version: "3.3" +services: + home-assistant: + container_name: homeassistant + privileged: true + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /dev:/dev + - ha_config:/config + network_mode: host + image: ghcr.io/home-assistant/home-assistant:stable +volumes: + ha_config: {} +networks: {} +EOF +msg_ok "Added Home Assistant compose.yaml" +fi + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 804aeaabb73cf66c61c1b613f6ac07a7d5d42f73 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Nov 2023 08:41:11 -0500 Subject: [PATCH 2298/3335] Update dockge-install.sh tweak --- install/dockge-install.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index ad4834f6..eec8bec6 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -29,16 +29,7 @@ DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then - VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - cd /usr/local/bin - curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 - chmod 755 /usr/local/bin/fuse-overlayfs - cd ~ - echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -else - echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -fi +echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" From 7f6521e3c7247591ded69ee78fa3e057825e14d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 Nov 2023 09:10:28 -0500 Subject: [PATCH 2299/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38474a38..1fe7b7e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-11-19 + +### Changed + +- **Dockge LXC** + - NEW Script + ## 2023-11-18 ### Changed From 46533c082b40477c6c664ae5bd8e5ecf7a65c318 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Nov 2023 07:46:08 -0500 Subject: [PATCH 2300/3335] Update dockge-install.sh option to add Immich --- install/dockge-install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index eec8bec6..20108196 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -47,6 +47,16 @@ $STD curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml $STD docker compose up -d msg_ok "Installed Dockge" +read -r -p "Would you like to add Immich? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Adding Immich compose.yaml" + mkdir -p /opt/stacks/immich + wget -q -O /opt/stacks/immich/compose.yaml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml + wget -q -O /opt/stacks/immich/.env https://github.com/immich-app/immich/releases/latest/download/example.env + wget -q -O /opt/stacks/immich/hwaccel.yaml https://github.com/immich-app/immich/releases/latest/download/hwaccel.yml + msg_ok "Added Immich compose.yaml" +fi + read -r -p "Would you like to add Home Assistant? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Adding Home Assistant compose.yaml" @@ -61,6 +71,7 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock - /dev:/dev + - /etc/localtime:/etc/localtime:ro - ha_config:/config network_mode: host image: ghcr.io/home-assistant/home-assistant:stable From f3b501d37a979ae70a79d02e71dde66378640ca1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Nov 2023 07:54:39 -0500 Subject: [PATCH 2301/3335] Update dockge-install.sh tweak --- install/dockge-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index 20108196..7d57b1cc 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -53,7 +53,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then mkdir -p /opt/stacks/immich wget -q -O /opt/stacks/immich/compose.yaml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -q -O /opt/stacks/immich/.env https://github.com/immich-app/immich/releases/latest/download/example.env - wget -q -O /opt/stacks/immich/hwaccel.yaml https://github.com/immich-app/immich/releases/latest/download/hwaccel.yml + wget -q -O /opt/stacks/immich/hwaccel.yml https://github.com/immich-app/immich/releases/latest/download/hwaccel.yml msg_ok "Added Immich compose.yaml" fi From 22dd71822e5772fe6a5c71335dfc47766faf71ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Nov 2023 07:55:52 -0500 Subject: [PATCH 2302/3335] Update dockge.sh increase storage --- ct/dockge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/dockge.sh b/ct/dockge.sh index 756fac46..155ef799 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="Dockge" -var_disk="8" +var_disk="18" var_cpu="2" var_ram="2048" var_os="debian" From cd4faadeb6108fc2ea668fc5eaef9126a96a5844 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Nov 2023 09:06:43 -0500 Subject: [PATCH 2303/3335] Update dockge.sh create update path --- ct/dockge.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ct/dockge.sh b/ct/dockge.sh index 155ef799..64cc093e 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -53,11 +53,12 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" +if [[ ! -d /opt/dockge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +cd /opt/dockge +docker compose pull +docker compose up -d +msg_ok "Updated ${APP}" exit } From 6c643e39d1726b0f6a008e90c1fb1c1c45e4e8e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Nov 2023 13:03:09 -0500 Subject: [PATCH 2304/3335] Update dockge-install.sh tweak --- install/dockge-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index 7d57b1cc..988c56f2 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -41,9 +41,9 @@ chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" msg_info "Installing Dockge" -mkdir -p /opt/stacks /opt/dockge +mkdir -p /opt/{dockge,stacks} +wget -q -O /opt/dockge/compose.yaml https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml cd /opt/dockge -$STD curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output compose.yaml $STD docker compose up -d msg_ok "Installed Dockge" From a697e5af52517dd63b11b3cb2f0f82c83e8108b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 Nov 2023 17:46:05 -0500 Subject: [PATCH 2305/3335] Update monitor-all.sh tweak --- misc/monitor-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index e4251757..e7702268 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -51,7 +51,7 @@ while true; do fi # Skip instances based on onboot and templates - onboot=$($config_cmd $instance | grep onboot | grep -q "onboot: 0" && echo "true" || echo "false") + onboot=$($config_cmd $instance | grep -q "onboot: 0" || ( ! $config_cmd $instance | grep -q "onboot" ) && echo "true" || echo "false") template=$($config_cmd $instance | grep template | grep -q "template:" && echo "true" || echo "false") if [ "$onboot" == "true" ]; then From 2b713d69973cbcfa80900313d484fc4f70810cf2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 Nov 2023 04:31:03 -0500 Subject: [PATCH 2306/3335] Update homebridge-install.sh tweak --- install/homebridge-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index ed071136..185a970e 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -29,7 +29,7 @@ msg_ok "Set up Homebridge Repository" msg_info "Installing Homebridge" $STD apt update $STD apt-get install -y homebridge -msg_info "Installed Homebridge" +msg_ok "Installed Homebridge" motd_ssh customize From 117c32a408c9c60e1a76b57938c37db1eceaf600 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 Nov 2023 10:26:20 -0500 Subject: [PATCH 2307/3335] Update microcode.sh tweak --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index a4653be5..91296a22 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -30,7 +30,7 @@ msg_ok() { echo -e "${BFR} ${CM} ${GN}$1${CL}"; } msg_error() { echo -e "${BFR} ${CROSS} ${RD}$1${CL}"; } header_info -current_microcode=$(journalctl -k | grep -E "microcode: microcode" | awk -F 'microcode: microcode updated early to revision |, date = ' '{print $2 ", date = " $3}') +current_microcode=$(journalctl -k | grep -oP "microcode: updated early: [^ ]+ -> \K[^,]+, date = [^ ]+" | head -n 1) [ -z "$current_microcode" ] && current_microcode="Not found." intel() { From e39cd4c56d3df956707d14c5e1c9aee5d4700d08 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 Nov 2023 10:39:04 -0500 Subject: [PATCH 2308/3335] Update USER_SUBMITTED_GUIDES.md update link --- USER_SUBMITTED_GUIDES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 57ec2294..9d011721 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -10,7 +10,7 @@ [Home Assistant: Installing InfluxDB (LXC)](https://www.derekseaman.com/2023/04/home-assistant-installing-influxdb-lxc.html) -[Home Assistant: Proxmox Quick Start Guide](https://www.derekseaman.com/2023/04/installing-home-assistant-on-proxmox-quick-start-guide.html) +[Home Assistant: Proxmox Quick Start Guide](https://www.derekseaman.com/2023/10/home-assistant-proxmox-ve-8-0-quick-start-guide-2.html) [Home Assistant: Installing Grafana (LXC) with Let’s Encrypt SSL](https://www.derekseaman.com/2023/04/home-assistant-installing-grafana-lxc.html) From 8e9ea1bd3c4c80dd7e69ffb7b801cee643224281 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 Nov 2023 15:30:18 -0500 Subject: [PATCH 2309/3335] Update rdtclient-install.sh tweak --- install/rdtclient-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index 8de86327..cc48a014 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -21,11 +21,11 @@ $STD apt-get install -y unzip msg_ok "Installed Dependencies" msg_info "Installing ASP.NET Core Runtime" -wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb +wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb $STD apt-get update -$STD apt-get install -y dotnet-sdk-6.0 +$STD apt-get install -y dotnet-sdk-8.0 msg_ok "Installed ASP.NET Core Runtime" msg_info "Installing rdtclient" @@ -33,7 +33,7 @@ wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebr unzip -qq RealDebridClient.zip -d /opt/rdtc rm RealDebridClient.zip cd /opt/rdtc -mkdir -p data/db/ data/downloads +mkdir -p data/{db,downloads} sed -i 's#/data/db/#/opt/rdtc&#g' /opt/rdtc/appsettings.json msg_ok "Installed rdtclient" From 2e5bcd8424e3e02a4c1f33bfcea6b4d6ccf4c40e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 Nov 2023 16:55:09 -0500 Subject: [PATCH 2310/3335] Update rdtclient.sh create update path --- ct/rdtclient.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 227856d6..e87c21f4 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -53,10 +53,16 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/rdtc/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_info "Updating $APP" +systemctl stop rdtc +mkdir -p rdtc-backup +cp -R /opt/rdtc/appsettings.json rdtc-backup/ +wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip +unzip -oqq RealDebridClient.zip -d /opt/rdtc +cp -R rdtc-backup/appsettings.json /opt/rdtc/ +rm -rf rdtc-backup RealDebridClient.zip +systemctl start rdtc +msg_ok "Updated $APP" exit } From 014b2dab554a8dcfc9962d81d2beb8696e86c5c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 00:12:19 -0500 Subject: [PATCH 2311/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 7c8d7a5a..5548ce3e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -6,7 +6,7 @@ body: value: | **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - - Changing Linux distributions without confirming the proper functioning of default settings. + - Switching Linux distributions without verifying that the default distribution is working correctly. - When encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: input From c870b93810a13be3b328a192f6f2a7c82620db94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 09:34:09 -0500 Subject: [PATCH 2312/3335] Update linkwarden.sh - create update path --- ct/linkwarden.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index fb2a8d01..70bf88e8 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -53,7 +53,21 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/linkwarden ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating $APP" +systemctl stop linkwarden +cd /opt/linkwarden +if git pull | grep 'Already up to date'; then + echo "Exiting script." + systemctl start linkwarden + exit +fi +git pull +yarn +npx playwright install-deps +yarn build +yarn prisma migrate deploy +systemctl start linkwarden +msg_ok "Updated $APP" exit } From c95f5dec17b34780d2fe6afed0f7445ff34f6ea7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 09:37:58 -0500 Subject: [PATCH 2313/3335] Update linkwarden.sh tweak --- ct/linkwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 70bf88e8..c8dbbf01 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -57,7 +57,7 @@ msg_info "Updating $APP" systemctl stop linkwarden cd /opt/linkwarden if git pull | grep 'Already up to date'; then - echo "Exiting script." + echo "Exiting script.${CL}" systemctl start linkwarden exit fi From 778c58f49e24bd3d9a5937876204224adad6528d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 09:41:48 -0500 Subject: [PATCH 2314/3335] Update linkwarden.sh tweak --- ct/linkwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index c8dbbf01..a94bdea5 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -57,7 +57,7 @@ msg_info "Updating $APP" systemctl stop linkwarden cd /opt/linkwarden if git pull | grep 'Already up to date'; then - echo "Exiting script.${CL}" + echo -e "Exiting script.${CL}" systemctl start linkwarden exit fi From 946114f59eda770781bbcb3d73ebe1f387c81b3a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 09:49:18 -0500 Subject: [PATCH 2315/3335] Update linkwarden.sh tweak --- ct/linkwarden.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index a94bdea5..0a10b1d9 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -56,8 +56,8 @@ if [[ ! -d /opt/linkwarden ]]; then msg_error "No ${APP} Installation Found!"; e msg_info "Updating $APP" systemctl stop linkwarden cd /opt/linkwarden -if git pull | grep 'Already up to date'; then - echo -e "Exiting script.${CL}" +if git pull | grep -q 'Already up to date'; then + msg_ok "Already up to date" systemctl start linkwarden exit fi From 04a0a412c4fe8fba780f1cce214136cd82d1a0b8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 13:00:53 -0500 Subject: [PATCH 2316/3335] Update ubuntu-vm.sh fixes https://github.com/tteck/Proxmox/issues/2090 --- vm/ubuntu-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index d44d404f..9d5f4e17 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -408,7 +408,7 @@ qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ - -ide2 local-lvm:cloudinit \ + -ide2 ${STORAGE}:cloudinit \ -boot order=scsi0 \ -serial0 socket \ -description "# Ubuntu 22.04 VM From d3a3c723356a58249e72e30d5830b8ef2049d868 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 14:58:01 -0500 Subject: [PATCH 2317/3335] Update README.md --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c27d9e2b..13ddf05a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ -

Contributing to Proxmox VE Helper Scripts

+

Proxmox VE Helper Scripts

-These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. Utilizing the whiptail command, options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine. +

+ Visit the project website | + Contribute to Proxmox VE Helper Scripts +

-

Proxmox VE Helper Scripts

-

Exercise caution and conduct a comprehensive assessment of scripts and automation tasks acquired from external sources.

+--- + +These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. Utilizing the whiptail command, options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine. +

+Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources. Read more +

Proxmox® is a registered trademark of Proxmox Server Solutions GmbH.
From 0e8144e9606b863f2a988d7809bc79b030dfee4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 15:13:00 -0500 Subject: [PATCH 2318/3335] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 13ddf05a..9634618f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,9 @@ --- -These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. Utilizing the whiptail command, options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine. +These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. + +Utilizing the whiptail command, options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine.

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources. Read more

From ddd0a9ab4d30bebe2794c6f08c35ada3e6702be0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 15:21:43 -0500 Subject: [PATCH 2319/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9634618f..1827d12c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Visit the project website | - Contribute to Proxmox VE Helper Scripts + Contribute to Helper Scripts

--- From 745f1aca2123c0f12750ce4a77fb2b74e743df12 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 17:30:07 -0500 Subject: [PATCH 2320/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 5548ce3e..f64afc99 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Problems with a script. -description: Generate a report on the issue pertaining specifically to the script in order to aid us in improving it. +description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) body: - type: markdown attributes: From c944e77cf4aa10474953e14e54a411cbfc37a6bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 17:31:42 -0500 Subject: [PATCH 2321/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index f64afc99..11a8371d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Problems with a script. -description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) +description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the Discussions section. body: - type: markdown attributes: From 6922be6928a890a817e5c970da14a84fc00ddc4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 17:33:09 -0500 Subject: [PATCH 2322/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 11a8371d..928395e2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Problems with a script. -description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the Discussions section. +description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the Discussions section. Blank issues will be closed. body: - type: markdown attributes: From 9a6fcbdfd632df6738864a60a7a6e09d88e9481b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 17:34:34 -0500 Subject: [PATCH 2323/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 928395e2..a99cae4d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Problems with a script. -description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the Discussions section. Blank issues will be closed. +description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the Discussions section. Blank issues will be closed immediately. body: - type: markdown attributes: From 92408b5fae86c930a965df01d5c0b5a9351705f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Nov 2023 08:46:33 -0500 Subject: [PATCH 2324/3335] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1827d12c..7e88e7b8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@

Proxmox VE Helper Scripts

- Visit the project website | - Contribute to Helper Scripts + Website | + Contribute | + Guides | + Changelog | + Support

--- From 9ebffbcc3e53c4f042a29c2372227447ff6d8a7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Nov 2023 08:49:01 -0500 Subject: [PATCH 2325/3335] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7e88e7b8..12d51d7c 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@

Website | - Contribute | - Guides | - Changelog | + Contribute | + Guides | + Changelog | Support

From 054ed83e0d9489c851c9eed26e10b7fd4bb6e995 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Nov 2023 08:50:19 -0500 Subject: [PATCH 2326/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12d51d7c..81e6c9bb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Website | - Contribute | + Contribute | Guides | Changelog | Support From 96abbe81d19b309b55bd645feadc84c71fe50824 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 Nov 2023 15:17:02 -0500 Subject: [PATCH 2327/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81e6c9bb..f575c691 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

Proxmox VE Helper Scripts

+

Proxmox VE Helper-Scripts

Website | From 166c9c85c44b4b52fbeb9f9d3cd60a39adf21b6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Nov 2023 06:59:49 -0500 Subject: [PATCH 2328/3335] Update post-pve-install.sh fix No Nag for 8.1 --- misc/post-pve-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index b977a7cf..6d1aece2 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -47,9 +47,6 @@ msg_error() { start_routines() { header_info VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58 - fi CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ "yes" " " \ @@ -144,7 +141,11 @@ EOF yes) whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + else + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + fi apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; From acf59946b63e5e6bc99af2d5967f25ee10c56cf6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 Nov 2023 08:04:58 -0500 Subject: [PATCH 2329/3335] Update post-pve-install.sh improve No Nag --- misc/post-pve-install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 6d1aece2..97def72d 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -141,11 +141,7 @@ EOF yes) whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" - if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script - else - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script - fi + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; From 6ab86e5c05b486227b1ad6d56ab7917e266933cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Nov 2023 10:19:33 -0500 Subject: [PATCH 2330/3335] Update sabnzbd-install.sh fix release variable --- install/sabnzbd-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 0fef42d1..368633da 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -19,7 +19,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y par2 $STD apt-get install -y p7zip-full -RELEASE=$(curl -s http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/ | grep -oP 'href="\K[^"]*unrar_7\.\d+\.\d+-\d+_amd64\.deb') +RELEASE=$(curl -s http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/ | grep -oP 'href="\K[^"]*unrar_7\.\d+\.\d+-\d+_amd64\.deb' | head -1) wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/$RELEASE $STD dpkg -i unrar*.deb rm unrar*.deb From cc97e682aee17cade6d8fe516509dd0aafbd997e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Nov 2023 14:03:23 -0500 Subject: [PATCH 2331/3335] Update add-tailscale-lxc.sh tweak --- misc/add-tailscale-lxc.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index a4661001..301c4a7e 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -8,11 +8,11 @@ function header_info { cat <<"EOF" ______ _ __ __ - /_ __/___ _(_) /_____________ _/ /__ - / / / __ `/ / / ___/ ___/ __ `/ / _ \ - / / / /_/ / / (__ ) /__/ /_/ / / __/ -/_/ \__,_/_/_/____/\___/\__,_/_/\___/ - + /_ __/___ _(_) /_____________ _/ /__ + / / / __ `/ / / ___/ ___/ __ `/ / _ \ + / / / /_/ / / (__ ) /__/ /_/ / / __/ +/_/ \__,_/_/_/____/\___/\__,_/_/\___/ + EOF } clear @@ -48,6 +48,7 @@ function msg() { } NODE=$(hostname) +MSG_MAX_LENGTH=0 while read -r line; do TAG=$(echo "$line" | awk '{print $1}') ITEM=$(echo "$line" | awk '{print substr($0,36)}') From 2c6d131d936ebcd4ddb1870b13754e8e66b24af0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Nov 2023 19:00:17 -0500 Subject: [PATCH 2332/3335] Add files via upload --- misc/images/tths.png | Bin 0 -> 24684 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/tths.png diff --git a/misc/images/tths.png b/misc/images/tths.png new file mode 100644 index 0000000000000000000000000000000000000000..e51475534450d22d312f7586dd3e698a56aaa63a GIT binary patch literal 24684 zcma%ibySpHv^U);-Q5UCH!s~?BHakm-Q7s1bhn6vgmiaHO1Grc(BJX9>;8XPYh($` z%roaaXYXI_Xf+jCbQEF~C@3g&c{wQ!@V)Eb0|^2ATX&59?;EtMhO7kC*GbYNC@4xO zc`0!%FQZdKX|r3}^;$GiJZD;?cnyBrD&#zZ~QWv9Iq(w)Ty0X1e4@T1T`VWNHU@p}?uWg|F&EjRrJ*Lkfxv)?POfZT&`7wuqBYC#6%Dw zr4yzPq4qD>wYL}w6}o`lx|;+j6B6XP9I67 zqod=@GKhcJlkRO-e5B&zO2Mn%NZ5!?RmcjtV}apu_MPX362Z0olF5{2wJ$+pQIMsi zthqKMa$Pp=Y}s{D^X0ZAE6U^5rZS4{l~i#W`kYF+|J-j0K~z(acOP>I{%&_)q4fJM z)#osmw#Ei(H$0BARF*W(YlHB2S>rWo=~-FJMIV}MGsZ|r)%b;kxYozVPnKiQOthC# z)C*WIw4>f>AKGh&!{cXXW!?V(f33j9)!b5*9OOFJs79V(IGy7<(Z^{=# zbsMiI-<8}nRf%ciLdunN;a`}ggllmtwx3l04C~(L(_QICi)jDn#muAz|5EObVw#K6FSc-Vr|)z{azp|@A!q+-BIl}k9`0T(4a ztF^WDm|XNy=xnFg6BQM8;r0IhzG_1)@9rYnT8$wuV{EVLyB~R1wZUT121M)(4-c<0 zuj%`D4gZX`Y4TJ{G1j+lCpfvdCT!;`OmFWt0uT0fch}lI&yC_kLql1`#JZN&)_#^$ zR3PQsL_sj?dL1+pqr0jDaGHYk3F?ooDOL$%V`CM;m7v)-H#VkPT38I*E>!K=SX(a^ zSWSG1nV;8c06)mW!^N$5z#t9@C`g!xe<)(j>+|$Wj;}&6)2xm9y1miA6J9?s;F;W6 zkni;qB0Rc9)QFeQm{31(-jCLKu(wyJe1CWL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1Jdx1y$o=GPhclNG?H?}KW{ zq^{B)nb!BU^tlVl#BJgrZXFoOvk=944X&y_$mCuCeK;Xf2*HyoW~Qd5@s3Qb<&h?QabcPy0*%C%9TN~9rK)yY3(5vzUo7U}S0!{H>O&N%o5mi;) zg{bOF27uj60y&>Bhf~KM*RSzlWs+G!#*V}yZYFuzXjyJs(5pPJEx9^kW zM6Jisxt6c#hz1fK){jY?bXJk186^wr)pP2Q!0(NDe$9H%J6nfi@Bcq_7W?J;wJSJL d_`(26@^=KVj&IidQG!PZV}11HQeCG<{|7xdDa-%> literal 0 HcmV?d00001 From c8cbb8626bae2348530120629a4b80a1a336e111 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Nov 2023 19:50:28 -0500 Subject: [PATCH 2333/3335] Add files via upload --- misc/images/tths.png | Bin 24684 -> 17782 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/misc/images/tths.png b/misc/images/tths.png index e51475534450d22d312f7586dd3e698a56aaa63a..c0ba97a25f629ce5274e580e977fd73ce5e702a3 100644 GIT binary patch literal 17782 zcmb7sg;!MF_czS|LyF{plz=e6&?()W4b+{(zUYl%)>iz2}~@_ow#6>1wMG6Vef4U|@D0;b zUqv3Hb^^8w{($W%uVx5=K)$W%tYTm=VW=s}8T#e@eChw%9GP<-IJbDd$J0g5MDUp+ zO;#0)4GO_xU5Caeav~sN&Ur8z2R%#~r0$TQL$(;E1DRNVEbE&HdrC5-ljgAef3s!S zYQ8n-{KLJ)=SJVne6Mf*p1t%$8+iw+age>+{_(@m`1__s!TADp1*cjWCUF(kpKC^0 zZ0Vw@-bB2aXgqtNA`u}(DQ0tV7%g!XG4YtA>@!CzWo%~!Y(Y9*db;fC(8d4Xm*U-Y zoiBS|EHpxxBR9k>=A;;P3=Enkx0~RjjqqsZNJJ#rDEK!hN^|2Z6RCAHNbq2^@f~~= zg+k?42tYMrl_0h~6S=bn`7MH(NW$>>rKN+@3r)0?dQ4d^`X7ZTs{Bidq%Z zp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t6c#hz1fK){jY?bXJk186^wr)pP2Q!0(NDe$9H%J6nfi@Bcq_7W?J;wJSJL d_`(26@^=KVj&IidQG!PZV}11HQeCG<{|7xdDa-%> From 60eeefe0c48340875dba5359347ee341a556fd66 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Nov 2023 20:48:14 -0500 Subject: [PATCH 2334/3335] Add files via upload --- misc/images/tths.png | Bin 17782 -> 25593 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/misc/images/tths.png b/misc/images/tths.png index c0ba97a25f629ce5274e580e977fd73ce5e702a3..d70a0cd0d4383540c5559346be8865d9385f9d1c 100644 GIT binary patch literal 25593 zcmXt?}m!MnlX zrh%qmr+-4g3o_W^+^>%DVR*2&68>Mo3lYI+C1|vtZh|RB!tqYQ3p~d?=RGpqlH4*k z$I{>hdQ{ppT5ohX8uSI7#82?Tj~=9%|30e+d%GVkertQ%dNW-hL##i8i7>Ls>o~y1 zrYzL3dh)U6?F)`CQBg08G|Et7-<4@C9&Nj}UJ7?u@TQ0ASIs@fdfms7#cj84@LbcZ zZH6A*NY(^dqAURaoc?%$8vy1L)~Vf#;@4U8c`B{(Rf*StCDbnj{A38h&-EgXvq z=Y|Z%vOq+*TU%T8pPhvsMSb~FPHn$jQFmGPYnzC8$Te@0cExS4N0%Ut9gR1ziW){4 zv&H%0qn}HGwxFJmQ#1-Q9ka+S`c6SNgz=LMGRGbHRc{O7$7^Hc@@xBouLRvgCx6*Z zWs$|Z&7U?UAVNpsg68)J2lgYkI$7@4HEO2GYgMYeQAmB68)C~4p%mq9OFrc6k7S}~ zxgtN)F1#0h|F(`J=~X^HktjgsM;6H(@~kcNrbEn4Ai45zcAi{~gOo6m2H${wviiMD=<&Ui3 zfyyNd3hm>3)w!s+%l4p8((FCWgua$m9!gbD!vgWX5irR6obGA6-#5_ZAtHe@rWxLCPCQs~tK+#|W1 zalY?$!Mh3pwix*;?H3%wSq;zTuIQzzA1a?Ju#!;p*EO`X=rX6ODA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VU9?pX^)m6CDvB-oDq$!Z~~nR7uBOUb)`HsU#yaZPDPR%H(Qk zY-%>9A9XnakJzAJ`8x>SD^{$?RRj=xFc`|4^=5FU;?d8cjT0b<&+VT9Aqyp^0@>Z& zT>yc)yE)H0A7v!%VXTI-5JvT)y=LpytWJdXOy?%e)SH}uI-+s68}-TiY+z_=Zg$q5 zW-ywVKKSOe@J=OEm28HO3XKD{4`Kyi43JsbrA8r_-QKFlI^kg?6Za#EI0O{Ll&>l( zE4SAZ_-)G4;NT$A16O9a)j!GX^)64q<6QIWO`+DY9}m|1>CB6kU+1%X(xvwz zKsqN7jK+d7>6ORlOP&D80hmCQ0PGMsBWoHw@f}Fy8%E=NcKhCs@sHLboN^rn&EZty zNiNRLV9*W-zMljqrO-=DS5bUH#T^}i%bot?!GJx<>bN$>ozwRXlfC*9^Q` zj%5!DOE{~jv6hofTdBQj2@=15qn<$EFw;c$ow`aF>Xhq)CJjt7P{!u}7qD9);K&Od zW*8)Sgu5<5#HW=UpqK3*D7dk+hj$nL1b6|A6z4b;fGcreNgW0Z?=Hm$^h^Wo3r7$M zV53M?{RBRX;`+u-Op2IW>_28oLTfEKRY?g6$Db0;UX^{=1~0pv&VN_@E#40RGz3mn z`l1h`qUE96tF2T283tMg24GfztiUW-ofVL90DDnx0L=ZGXzIE|TRSFMHJ1r|<%juP zKB^phoObCF{%pmr8l9|Mi{%7z6KS=%xlh9Tm~7(0XoGtm=oK0Su#UZhcnr3Y<5;`7 z9gmAzR<7;-o^v|LLk`uU43MT&^7%TC&whXWD1sv~Wl8QJQ@+ir(`v}Ye6LxT(@ua^ zElpXOB)((^d~ky*r;Dtg=tG|0;(|NwSGQfoVkvl;BqrdqQ!vz&v=wXRt-}8wU}y~2 From c912a037a1953a20517bb5406bc7d154fb769e6d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 Nov 2023 23:14:11 -0500 Subject: [PATCH 2335/3335] Update homarr.sh fixes https://github.com/tteck/Proxmox/issues/2102 --- ct/homarr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homarr.sh b/ct/homarr.sh index 94ce3640..3e247bb2 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -61,6 +61,7 @@ cp -R /opt/homarr/data /root/data-homarr-backup cp -R /opt/homarr/database /root/database-homarr-backup RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt +cp -R /opt/homarr-${RELEASE}/* /opt/homarr cp -R /root/data-homarr-backup/* /opt/homarr/data cp -R /root/database-homarr-backup/* /opt/homarr/database rm -rf /opt/homarr-${RELEASE} From 6fa39cb2830926dcee5bcb1d257ca8514da691bb Mon Sep 17 00:00:00 2001 From: Andy B Date: Sun, 26 Nov 2023 14:30:19 +0200 Subject: [PATCH 2336/3335] Update unifi to mongodb 4.4 and jre 17 (#2104) --- install/unifi-install.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index d65d2f2f..2970f848 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -18,28 +18,30 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y apt-transport-https +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" -if [[ "$PCT_OSVERSION" == "12" ]]; then - echo -e "deb http://ftp.debian.org/debian bullseye main" >/etc/apt/sources.list.d/openjdk-11-jre-headless.list - $STD apt-get update -fi - msg_info "Installing OpenJDK" -$STD apt-get install -y openjdk-11-jre-headless -$STD apt-mark hold openjdk-11-* +#$STD apt-get install -y openjdk-17-jre-headless +#$STD apt-mark hold openjdk-17-* +wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg >/dev/null 2>&1 +echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' > /etc/apt/sources.list.d/adoptium.list +$STD apt-get update +$STD apt-get install -y temurin-17-jre msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb -$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb +wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg >/dev/null 2>&1 +echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list +$STD apt-get update +$STD apt-get install -y mongodb-org msg_ok "Installed MongoDB" msg_info "Installing UniFi Network Application" wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg -echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' >/etc/apt/sources.list.d/100-ubnt-unifi.list +echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/unifi-repo.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti' >/etc/apt/sources.list.d/100-ubnt-unifi.list $STD apt-get update $STD apt-get install -y unifi msg_ok "Installed UniFi Network Application" @@ -48,7 +50,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf mongodb-org-server_3.6.23_amd64.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb /etc/apt/sources.list.d/openjdk-11-jre-headless.list +rm -rf libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From cb09bdf7b86645fe4378a1c95747b63dcba3d18d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Nov 2023 07:43:37 -0500 Subject: [PATCH 2337/3335] Update unifi-install.sh tweak --- install/unifi-install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 2970f848..cadb6db4 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -22,10 +22,8 @@ $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Installing OpenJDK" -#$STD apt-get install -y openjdk-17-jre-headless -#$STD apt-mark hold openjdk-17-* -wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg >/dev/null 2>&1 -echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' > /etc/apt/sources.list.d/adoptium.list +wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg +echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update $STD apt-get install -y temurin-17-jre msg_ok "Installed OpenJDK" @@ -33,7 +31,7 @@ msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg >/dev/null 2>&1 +wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list $STD apt-get update $STD apt-get install -y mongodb-org From b6fdaa624eb8664e9459b4369837b313e8921b03 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Nov 2023 11:32:42 -0500 Subject: [PATCH 2338/3335] Update turnkey.sh add BookStack --- turnkey/turnkey.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index d49a7b19..6eb31634 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -66,6 +66,7 @@ while read -r TAG ITEM; do done < <( cat < Date: Sun, 26 Nov 2023 15:54:00 -0500 Subject: [PATCH 2339/3335] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f575c691..2f1d12cf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. -Utilizing the whiptail command, options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine. +Options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine.

Be cautious and thoroughly evaluate scripts and automation tasks obtained from external sources. Read more

From 9183ff2a7ec4ae779f7b3edfadc04ca63ea9757c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Nov 2023 17:06:48 -0500 Subject: [PATCH 2340/3335] Add files via upload --- misc/images/logo.png | Bin 0 -> 64142 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/logo.png diff --git a/misc/images/logo.png b/misc/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1d2186da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@3p`JZbaBU@7S{{ygRQLfJVX?*DiEfMp}7 zsw3p{N!dv5dmOVf1-w7bYYzI??ScpR-^BGV$Kdiiy}TMjVl^4@^o_m1}`aQ3DzoNW_dgm%JUPZ;|Jh z3YNg*HPOqIRF>*2vN<0r>n;v*k~DMx*d8F?6$_a7_y3^>0j!1C@JdrF8LbgRkL|aC zH~TVB&O7Azs1I{B;sK%3kTKM#vSwrE4*sSbPG$7#hq;y4Rz&gcawEw-EenOO_8K54 z?rY3Cr|4cK`phDJWJqWui<^zdzZ_|@TMQ3@q1!WnyE6J$Xt_Mn4!{~WS!B~@+kGt^H1%l0H_5v0WQOnY&3fH`uaeLeeGFFMsCipo!xMD98UnM66ZGjC z=d((06EL#6M?%nLP;IQV)V-kueSl`1i52Z_FG9}mifFXRfZ+y!lk_obkR7Olhj+3W zJl*yG^f``SJ~}*H+q;2)Hb7jS!1aQj%jXP_8XL0ziELkAAMPkqWv0ZKD|Ukr0&wp6 zV8tN~{{WVmOLXAf5(e3S!uiU}DS2nM$ITw*n=yHsfpO*gr z1A7)S3F)^Pt~Ouyw=@@HrDha|n|+Sh?vDY3#Naq^OTS~|0d%er1Sz^MyeyM@TA^BG zj&HBatp$3{dH_g!7d~Pmi&DIsBd1N1-J&FI`xkDWqWzHcA^Vu|;kgSvR^v@dEBGTH zY@WLr{~&=(;@~D(kRDDF&8N>w80Y{amcK^lbwOzWXah=vS&F}=5)u;k5$H$Zqg%Zr zI)u Date: Sun, 26 Nov 2023 17:36:25 -0500 Subject: [PATCH 2341/3335] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2f1d12cf..36128c63 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +
+ +

Proxmox VE Helper-Scripts

+ + # ${APP} LXC + + +
" if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi From 6fac4f32ae0eefab6d162873f69954fea142c1eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:07:42 -0500 Subject: [PATCH 2345/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 243fa3c5..b1277f9d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -577,7 +577,7 @@ description() { # ${APP} LXC - + " if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service From f3b9b0fdf0866d137bb920092a2a5c897907b358 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:40:33 -0500 Subject: [PATCH 2346/3335] Update haos-vm.sh tweak description --- vm/haos-vm.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index d535b99a..005e2ef9 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -429,9 +429,12 @@ qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=32G \ -boot order=scsi0 \ - -description "# Home Assistant OS -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # Home Assistant OS + + +
" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" From f76bfa30378f452c0e3760d36713cce36f41b34b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:48:44 -0500 Subject: [PATCH 2347/3335] Update pimox-haos-vm.sh tweak description --- vm/pimox-haos-vm.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 1cf39709..41e25281 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -314,10 +314,13 @@ qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=64M \ -scsi0 ${DISK1_REF},size=32G >/dev/null qm set $VMID \ - -boot order=scsi0 >/dev/null -qm set $VMID -description "# PiMox HAOS -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -boot order=scsi0 \ + -description "
+ + # Home Assistant OS + + +
" >/dev/null msg_ok "Created HAOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Home Assistant OS VM" From 942fd3fda2da3144dddf48ccb73416208666add6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:50:06 -0500 Subject: [PATCH 2348/3335] Update debian-vm.sh tweak description --- vm/debian-vm.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index b549f062..e8037443 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -410,9 +410,12 @@ qm set $VMID \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ -boot order=scsi0 \ -serial0 socket \ - -description "# Debian 12 VM -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # Debian 12 + + +
" >/dev/null msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Debian 12 VM" From 09cc28b017ff41faf3de258d2b78a60bac765d59 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:51:48 -0500 Subject: [PATCH 2349/3335] Update mikrotik-routeros.sh tweak description --- vm/mikrotik-routeros.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 35a92d9b..0ffb85aa 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -273,9 +273,12 @@ qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=2G \ -boot order=scsi0 \ - -description "# Mikrotik RouterOS VM -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # Mikrotik RouterOS + + +
" >/dev/null msg_ok "Mikrotik RouterOS VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Mikrotik RouterOS VM" From dcad1abbbbe3ed798afd108e1df13cf3a6ded65d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:52:59 -0500 Subject: [PATCH 2350/3335] Update nextcloud-vm.sh tweak description --- vm/nextcloud-vm.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index c4074aaa..303910aa 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -408,9 +408,12 @@ qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=12G \ -boot order=scsi0 \ - -description "# $NAME -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # $NAME + + +
" >/dev/null msg_ok "Created a $NAME ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting $NAME" From 70cedc41e5b6097088f1fb9aad5aed4b8d9e24a3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:54:38 -0500 Subject: [PATCH 2351/3335] Update owncloud-vm.sh tweak description --- vm/owncloud-vm.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index c41c1124..40c5c0cb 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -408,9 +408,12 @@ qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=12G \ -boot order=scsi0 \ - -description "# TurnKey ownCloud VM -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # TurnKey ownCloud VM + + +
" >/dev/null msg_ok "Created a TurnKey ownCloud VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting TurnKey ownCloud VM" From cb970e8873e31e7d6a0530b9244c72a07aa5a232 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:56:24 -0500 Subject: [PATCH 2352/3335] Update openwrt.sh tweak description --- vm/openwrt.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index d163b926..96bca2be 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -475,9 +475,12 @@ qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=512M \ -boot order=scsi0 \ - -description "# OpenWrt VM -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # OpenWRT + + +
" >/dev/null msg_ok "Created OpenWrt VM ${CL}${BL}(${HN})" msg_info "OpenWrt is being started in order to configure the network interfaces." qm start $VMID From 4ecb33e99da0c5d3c81457a87c1b9a2b0d93b6f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:57:22 -0500 Subject: [PATCH 2353/3335] Update ubuntu-vm.sh tweak description --- vm/ubuntu-vm.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index 9d5f4e17..e971c027 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -411,9 +411,12 @@ qm set $VMID \ -ide2 ${STORAGE}:cloudinit \ -boot order=scsi0 \ -serial0 socket \ - -description "# Ubuntu 22.04 VM -### https://github.com/tteck/Proxmox -[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D7EP4GF)" >/dev/null + -description "
+ + # Ubuntu 22.04 VM + + +
" >/dev/null msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Ubuntu 22.04 VM" From 8a98b3d24e87068d2c3ea39928fe1f28ffc980bc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:58:16 -0500 Subject: [PATCH 2354/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index b1277f9d..096b1a6f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -577,7 +577,7 @@ description() { # ${APP} LXC - + " if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service From 4fdf751a509e1142fe963f9075d0d3e6e8d8ec12 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 12:43:17 -0500 Subject: [PATCH 2355/3335] Update debian-vm.sh tweak description --- vm/debian-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index e8037443..e74afdc1 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -412,7 +412,7 @@ qm set $VMID \ -serial0 socket \ -description "
- # Debian 12 + # Debian 12 VM
" >/dev/null From 0f727b91095ccdb5b8ddf0396b6c574a329dc7e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 Nov 2023 10:10:56 -0500 Subject: [PATCH 2356/3335] Update dockge-install.sh tweak Home Assistant compose.yaml --- install/dockge-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index 988c56f2..8509c2ad 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -72,12 +72,9 @@ services: - /var/run/docker.sock:/var/run/docker.sock - /dev:/dev - /etc/localtime:/etc/localtime:ro - - ha_config:/config + - ./config:/config network_mode: host image: ghcr.io/home-assistant/home-assistant:stable -volumes: - ha_config: {} -networks: {} EOF msg_ok "Added Home Assistant compose.yaml" fi From 14101800db5e0805b589404e8dfd497b85e4caed Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 06:51:52 -0500 Subject: [PATCH 2357/3335] Update build.func - If the default Linux distribution is not adhered to, script support will be discontinued. --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 096b1a6f..42036724 100644 --- a/misc/build.func +++ b/misc/build.func @@ -139,7 +139,7 @@ exit-script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 11 58 if [ "$var_os" != "alpine" ]; then var_os="" while [ -z "$var_os" ]; do From 45d30dbbba778c0abdc5ed26ff2cce87ea3a9aeb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 07:08:31 -0500 Subject: [PATCH 2358/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 42036724..e734fd1f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -139,7 +139,7 @@ exit-script() { # This function allows the user to configure advanced settings for the script. advanced_settings() { whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 11 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58 if [ "$var_os" != "alpine" ]; then var_os="" while [ -z "$var_os" ]; do From 8d5ca6becee342c8d0213c649605d64c60aff105 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 07:19:53 -0500 Subject: [PATCH 2359/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index a99cae4d..dacb876c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -6,7 +6,7 @@ body: value: | **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - - Switching Linux distributions without verifying that the default distribution is working correctly. + - If the default Linux distribution is not adhered to, script support will be discontinued. - When encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: input From ab521623cdf779ea2644ed415a08683e7ad70214 Mon Sep 17 00:00:00 2001 From: Danofun <568343+danofun@users.noreply.github.com> Date: Wed, 29 Nov 2023 09:36:42 -0500 Subject: [PATCH 2360/3335] Randomize the PiVPN subnet (#2118) --- install/wireguard-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index a133b2df..93ae6e56 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -22,11 +22,12 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard (using pivpn.io)" OPTIONS_PATH='/options.conf' -cat >$OPTIONS_PATH <<'EOF' +SUBNET=$(printf %d.%d.%d.%d 10 $((RANDOM % 256)) $((RANDOM % 256)) 0) +cat >$OPTIONS_PATH < Date: Wed, 29 Nov 2023 09:43:11 -0500 Subject: [PATCH 2361/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 93ae6e56..d74118d6 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -22,12 +22,11 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard (using pivpn.io)" OPTIONS_PATH='/options.conf' -SUBNET=$(printf %d.%d.%d.%d 10 $((RANDOM % 256)) $((RANDOM % 256)) 0) cat >$OPTIONS_PATH < Date: Wed, 29 Nov 2023 15:51:32 -0500 Subject: [PATCH 2362/3335] Update paperless-ngx.sh fixes https://github.com/tteck/Proxmox/issues/2123 --- ct/paperless-ngx.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index ff4db22b..98c0c556 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -74,6 +74,7 @@ function update_script() { msg_ok "Stopped Paperless-ngx" msg_info "Updating to ${RELEASE}" + cd ~ if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }' | wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null From 9534dd7a52e7799994eeacb4992e5e73b5fa8197 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 17:36:45 -0500 Subject: [PATCH 2363/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe7b7e2..108345bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-11-29 + +### Changed + +- **CasaOS LXC** + - Broken, temporarily removed from the website. + ## 2023-11-19 ### Changed From 883a16637ef34cb32742a16a0020de437df7cc00 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 23:14:56 -0500 Subject: [PATCH 2364/3335] Update casaos-install.sh - pin v0.4.1 - update after install --- install/casaos-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/casaos-install.sh b/install/casaos-install.sh index c0a068d0..2ff7b68b 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -32,7 +32,10 @@ echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n} else echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi -$STD bash <(curl -fsSL https://get.casaos.io) +wget -q https://get.casaos.io/v0.4.1 +chmod +x v0.4.1 +$STD ./v0.4.1 +rm v0.4.1 msg_ok "Installed CasaOS" motd_ssh From 83aee5ef7ac9ce4eaab69f142ed9f8f9348c1693 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 23:25:52 -0500 Subject: [PATCH 2365/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 108345bf..1fe7b7e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,6 @@ - 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-11-29 - -### Changed - -- **CasaOS LXC** - - Broken, temporarily removed from the website. - ## 2023-11-19 ### Changed From 36a911878882233c6246f83c2b40ddf478268efa Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 23:35:56 -0500 Subject: [PATCH 2366/3335] Update technitiumdns-install.sh tweak --- install/technitiumdns-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index f2b67d39..c1c58ec0 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -17,10 +17,11 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y libmsquic msg_ok "Installed Dependencies" msg_info "Installing ASP.NET Core Runtime" -wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb rm -rf packages-microsoft-prod.deb $STD apt-get update From 2154a19c1a571a68a02119880e4906cd8ae067b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 Nov 2023 23:40:47 -0500 Subject: [PATCH 2367/3335] Update technitiumdns-install.sh tweak --- install/technitiumdns-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index c1c58ec0..01f5fcd8 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y libmsquic msg_ok "Installed Dependencies" msg_info "Installing ASP.NET Core Runtime" From 7cc47d1d16ea5ea3d32b59dc1b61a862e3d1cf9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 10:31:45 -0500 Subject: [PATCH 2368/3335] Update casaos-install.sh tweak --- install/casaos-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/casaos-install.sh b/install/casaos-install.sh index 2ff7b68b..d3caecbc 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -32,10 +32,7 @@ echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n} else echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json fi -wget -q https://get.casaos.io/v0.4.1 -chmod +x v0.4.1 -$STD ./v0.4.1 -rm v0.4.1 +$STD bash <(curl -fsSL https://get.casaos.io/v0.4.1) msg_ok "Installed CasaOS" motd_ssh From de0fd7aa6d2f33ce64c014c246e087e04f03ae07 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 14:11:29 -0500 Subject: [PATCH 2369/3335] Update zwave-js-ui-install.sh fix service --- install/zwave-js-ui-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index a9a05c3e..e1e6da5d 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -36,7 +36,7 @@ After=network-online.target [Service] User=root WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux +ExecStart=/opt/zwave-js-ui/zwave-js-ui [Install] WantedBy=multi-user.target" >$service_path systemctl start zwave-js-ui From 6594ce2f3a3c0c89b72101ea6c76b8f3ed1daca6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 14:18:09 -0500 Subject: [PATCH 2370/3335] Update zwave-js-ui.sh fixes https://github.com/tteck/Proxmox/issues/2129 --- ct/zwave-js-ui.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 465f02df..a3407c6c 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -64,7 +64,19 @@ function update_script() { msg_info "Updating Z-wave JS UI" wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null - \cp -R zwave-js-ui-linux /opt/zwave-js-ui + \cp -R zwave-js-ui /opt/zwave-js-ui + cat </etc/systemd/system/zwave-js-ui.service + [Unit] + Description=zwave-js-ui + Wants=network-online.target + After=network-online.target + [Service] + User=root + WorkingDirectory=/opt/zwave-js-ui + ExecStart=/opt/zwave-js-ui/zwave-js-ui + [Install] + WantedBy=multi-user.target + EOF msg_ok "Updated Z-wave JS UI" msg_info "Starting Z-wave JS UI" From 76dbbf91ed078b8501daa9d673c810b320e7f9c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 14:20:12 -0500 Subject: [PATCH 2371/3335] Update zwave-js-ui.sh tweak --- ct/zwave-js-ui.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index a3407c6c..57187eb7 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -65,18 +65,18 @@ function update_script() { wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null \cp -R zwave-js-ui /opt/zwave-js-ui - cat </etc/systemd/system/zwave-js-ui.service - [Unit] - Description=zwave-js-ui - Wants=network-online.target - After=network-online.target - [Service] - User=root - WorkingDirectory=/opt/zwave-js-ui - ExecStart=/opt/zwave-js-ui/zwave-js-ui - [Install] - WantedBy=multi-user.target - EOF +cat </etc/systemd/system/zwave-js-ui.service +[Unit] +Description=zwave-js-ui +Wants=network-online.target +After=network-online.target +[Service] +User=root +WorkingDirectory=/opt/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui +[Install] +WantedBy=multi-user.target +EOF msg_ok "Updated Z-wave JS UI" msg_info "Starting Z-wave JS UI" From d4c685f05e388f2daa0520659eedab40b58e66c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 14:23:45 -0500 Subject: [PATCH 2372/3335] Update zwave-js-ui.sh tweak service file --- ct/zwave-js-ui.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 57187eb7..3c63b70f 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -65,18 +65,17 @@ function update_script() { wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null \cp -R zwave-js-ui /opt/zwave-js-ui -cat </etc/systemd/system/zwave-js-ui.service -[Unit] -Description=zwave-js-ui -Wants=network-online.target -After=network-online.target -[Service] -User=root -WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui -[Install] -WantedBy=multi-user.target -EOF + service_path="/etc/systemd/system/zwave-js-ui.service" + echo "[Unit] + Description=zwave-js-ui + Wants=network-online.target + After=network-online.target + [Service] + User=root + WorkingDirectory=/opt/zwave-js-ui + ExecStart=/opt/zwave-js-ui/zwave-js-ui + [Install] + WantedBy=multi-user.target" >$service_path msg_ok "Updated Z-wave JS UI" msg_info "Starting Z-wave JS UI" From f0a661fea9ac45f48a901c69c0389d9bc18961c9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 14:28:13 -0500 Subject: [PATCH 2373/3335] Update zwave-js-ui.sh tweak cleanup --- ct/zwave-js-ui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 3c63b70f..5291e134 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -83,7 +83,7 @@ function update_script() { msg_ok "Started Z-wave JS UI" msg_info "Cleanup" - rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store + rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui store msg_ok "Cleaned" msg_ok "Updated Successfully!\n" exit From 83136610ed42eae54a6b4e973ffc99a95f1ccd27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 17:51:02 -0500 Subject: [PATCH 2374/3335] Create channels-install.sh --- install/channels-install.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 install/channels-install.sh diff --git a/install/channels-install.sh b/install/channels-install.sh new file mode 100644 index 00000000..95bf8a40 --- /dev/null +++ b/install/channels-install.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Channels DVR Server (Patience)" +$STD bash <(curl -fsSL https://getchannels.com/dvr/setup.sh) +# adduser $(id -u -n) video && adduser $(id -u -n) render +msg_ok "Installed Channels DVR Server" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 3cda045ccefec3dbc12e0530fa43ec9485f92326 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 17:56:40 -0500 Subject: [PATCH 2375/3335] Create channels.sh --- ct/channels.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/channels.sh diff --git a/ct/channels.sh b/ct/channels.sh new file mode 100644 index 00000000..ce4722a5 --- /dev/null +++ b/ct/channels.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ __ ____ _ ______ _____ + / ____/ /_ ____ _____ ____ ___ / /____ / __ \ | / / __ \ / ___/___ ______ _____ _____ + / / / __ \/ __ `/ __ \/ __ \/ _ \/ / ___/ / / / / | / / /_/ / \__ \/ _ \/ ___/ | / / _ \/ ___/ +/ /___/ / / / /_/ / / / / / / / __/ (__ ) / /_/ /| |/ / _, _/ ___/ / __/ / | |/ / __/ / +\____/_/ /_/\__,_/_/ /_/_/ /_/\___/_/____/ /_____/ |___/_/ |_| /____/\___/_/ |___/\___/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Channels DVR Server" +var_disk="8" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/channels-dvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +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}:8089 ${CL} \n" From e01ff6dcb48c69d3283640a2ae2c1426bc2c115d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 17:57:33 -0500 Subject: [PATCH 2376/3335] Update channels-install.sh tweak --- install/channels-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/channels-install.sh b/install/channels-install.sh index 95bf8a40..7ff03334 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -20,6 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Channels DVR Server (Patience)" +cd /opt $STD bash <(curl -fsSL https://getchannels.com/dvr/setup.sh) # adduser $(id -u -n) video && adduser $(id -u -n) render msg_ok "Installed Channels DVR Server" From ed40ffc000eb7d3274e762122238403154df682e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 18:03:25 -0500 Subject: [PATCH 2377/3335] Update channels.sh tweak name --- ct/channels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/channels.sh b/ct/channels.sh index ce4722a5..f7018dda 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -18,7 +18,7 @@ EOF } header_info echo -e "Loading..." -APP="Channels DVR Server" +APP="Channels" var_disk="8" var_cpu="2" var_ram="2048" From 6dab19d260833fec2b16e72d5037f89324aa72e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 19:35:09 -0500 Subject: [PATCH 2378/3335] Update channels.sh adjust ram --- ct/channels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/channels.sh b/ct/channels.sh index f7018dda..5a192475 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="Channels" var_disk="8" var_cpu="2" -var_ram="2048" +var_ram="1024" var_os="debian" var_version="12" variables From 590f85ccd2e11035c8a3fc88267e2efdcdde29b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 19:39:28 -0500 Subject: [PATCH 2379/3335] Update channels-install.sh add extra dependencies --- install/channels-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/channels-install.sh b/install/channels-install.sh index 7ff03334..9f395ca8 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -17,6 +17,8 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y chromium-browser +$STD apt-get install -y xvfb msg_ok "Installed Dependencies" msg_info "Installing Channels DVR Server (Patience)" From dd43d742e0a6042101297f39085ac3bfe76fc7f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 19:42:10 -0500 Subject: [PATCH 2380/3335] Update build.func add Channels to the VAAPI hardware transcoding group --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index e734fd1f..cb684c48 100644 --- a/misc/build.func +++ b/misc/build.func @@ -545,7 +545,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm From ec320d565a145603d75ccb85c6adf3a0080ae8e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 Nov 2023 19:43:55 -0500 Subject: [PATCH 2381/3335] Update build.func revert add Channels to the VAAPI hardware transcoding group --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index cb684c48..e734fd1f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -545,7 +545,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm From 03b23c04564f0086716f05f68ac51cb7cf69c4ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Dec 2023 09:44:18 -0500 Subject: [PATCH 2382/3335] Update channels-install.sh tweak --- install/channels-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/channels-install.sh b/install/channels-install.sh index 9f395ca8..dbb4fb4f 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -17,7 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y chromium-browser +$STD apt-get install -y chromium $STD apt-get install -y xvfb msg_ok "Installed Dependencies" From c59141daf69b416ab8262259c57188416b400bb2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Dec 2023 19:03:26 -0500 Subject: [PATCH 2383/3335] Update zwave-js-ui-install.sh fix service file --- install/zwave-js-ui-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index e1e6da5d..a9a05c3e 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -36,7 +36,7 @@ After=network-online.target [Service] User=root WorkingDirectory=/opt/zwave-js-ui -ExecStart=/opt/zwave-js-ui/zwave-js-ui +ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] WantedBy=multi-user.target" >$service_path systemctl start zwave-js-ui From d4af04dfd38588a98244ee3e450e4d22cbec7be7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Dec 2023 19:06:38 -0500 Subject: [PATCH 2384/3335] Update zwave-js-ui.sh change back to `*-linux` --- ct/zwave-js-ui.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 5291e134..de994a7b 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -64,7 +64,7 @@ function update_script() { msg_info "Updating Z-wave JS UI" wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip &>/dev/null unzip zwave-js-ui-${RELEASE}-linux.zip &>/dev/null - \cp -R zwave-js-ui /opt/zwave-js-ui + \cp -R zwave-js-ui-linux /opt/zwave-js-ui service_path="/etc/systemd/system/zwave-js-ui.service" echo "[Unit] Description=zwave-js-ui @@ -73,7 +73,7 @@ function update_script() { [Service] User=root WorkingDirectory=/opt/zwave-js-ui - ExecStart=/opt/zwave-js-ui/zwave-js-ui + ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] WantedBy=multi-user.target" >$service_path msg_ok "Updated Z-wave JS UI" @@ -83,7 +83,7 @@ function update_script() { msg_ok "Started Z-wave JS UI" msg_info "Cleanup" - rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui store + rm -rf zwave-js-ui-${RELEASE}-linux.zip zwave-js-ui-linux store msg_ok "Cleaned" msg_ok "Updated Successfully!\n" exit From c82fc0ddbc19555d345997a23ddf8904a4ac0f7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Dec 2023 21:16:31 -0500 Subject: [PATCH 2385/3335] Update mikrotik-routeros.sh - code refactoring - update to CHR - thanks to @NiccyB --- vm/mikrotik-routeros.sh | 78 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 0ffb85aa..659f8385 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -7,12 +7,12 @@ function header_info { cat <<"EOF" - __ ____ __ __ _ __ ____ __ ____ _____ - / |/ (_) /___________ / /_(_) /__ / __ \____ __ __/ /____ _____/ __ \/ ___/ - / /|_/ / / //_/ ___/ __ \/ __/ / //_/ / /_/ / __ \/ / / / __/ _ \/ ___/ / / /\__ \ - / / / / / < / / / /_/ / /_/ / < / _ _/ /_/ / /_/ / /_/ __/ / / /_/ /___/ / -/_/ /_/_/_/|_/_/ \____/\__/_/_/|_| /_/ |_|\____/\__,_/\__/\___/_/ \____//____/ - + __ ____ __ __ _ __ ____ __ ____ _____ ________ ______ + / |/ (_) /___________ / /_(_) /__ / __ \____ __ __/ /____ _____/ __ \/ ___/ / ____/ / / / __ \ + / /|_/ / / //_/ ___/ __ \/ __/ / //_/ / /_/ / __ \/ / / / __/ _ \/ ___/ / / /\__ \ / / / /_/ / /_/ / + / / / / / ,< / / / /_/ / /_/ / ,< / _, _/ /_/ / /_/ / /_/ __/ / / /_/ /___/ / / /___/ __ / _, _/ +/_/ /_/_/_/|_/_/ \____/\__/_/_/|_| /_/ |_|\____/\__,_/\__/\___/_/ \____//____/ \____/_/ /_/_/ |_| + EOF } clear @@ -69,7 +69,7 @@ pushd $TEMP_DIR >/dev/null sleep 3 exit fi -if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Mikrotik RouterOS CHR VM" --yesno "This will create a New Mikrotik RouterOS CHR VM. Proceed?" 10 58); then echo "User selected Yes" else clear @@ -88,12 +88,12 @@ function msg_ok() { function default_settings() { echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" VMID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros${CL}" - HN=mikrotik-routeros + echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros-chr${CL}" + HN=mikrotik-routeros-chr echo -e "${DGN}Allocated Cores: ${BGN}1${CL}" - CORE_COUNT="1" - echo -e "${DGN}Allocated RAM: ${BGN}1024${CL}" - RAM_SIZE="1024" + CORE_COUNT="2" + echo -e "${DGN}Allocated RAM: ${BGN}256${CL}" + RAM_SIZE="512" echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" BRG="vmbr0" echo -e "${DGN}Using MAC Address: ${BGN}$GEN_MAC${CL}" @@ -104,7 +104,7 @@ function default_settings() { MTU="" echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" START_VM="no" - echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}" + echo -e "${BL}Creating a Mikrotik RouterOS CHR VM using the above default settings${CL}" } function advanced_settings() { VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) @@ -114,7 +114,7 @@ function advanced_settings() { else exit fi - VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3) + VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 mikrotik-routeros-chr --title "HOSTNAME" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then HN=$(echo ${VM_NAME,,} | tr -d ' ') @@ -122,14 +122,14 @@ function advanced_settings() { else exit fi - CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3) + CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" else exit fi - RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3) + RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 512 --title "RAM" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" @@ -173,15 +173,15 @@ function advanced_settings() { echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" fi fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then - echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}" + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS CHR VM when completed?" 10 58); then + echo -e "${DGN}Start Mikrotik RouterOS CHR VM when completed: ${BGN}yes${CL}" START_VM="yes" else - echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}no${CL}" + echo -e "${DGN}Start Mikrotik RouterOS CHR VM when completed: ${BGN}no${CL}" START_VM="no" fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then - echo -e "${RD}Creating Mikrotik RouterOS VM using the above advanced settings${CL}" + echo -e "${RD}Creating Mikrotik RouterOS CHR VM using the above advanced settings${CL}" else clear header_info @@ -190,7 +190,7 @@ function advanced_settings() { fi } function start_script() { - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then clear header_info echo -e "${BL}Using Default Settings${CL}" @@ -225,16 +225,16 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then else while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \ + "Which storage pool you would like to use for the Mikrotik RouterOS CHR VM?\n\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Mikrotik RouterOS Disk Image" +msg_info "Getting URL for Mikrotik RouterOS CHR Disk Image" -URL=https://download.mikrotik.com/routeros/7.11.2/install-image-7.11.2.zip +URL=https://download.mikrotik.com/routeros/7.12.1/chr-7.12.1.img.zip sleep 2 msg_ok "${CL}${BL}${URL}${CL}" @@ -242,7 +242,7 @@ wget -q --show-progress $URL echo -en "\e[1A\e[0K" FILE=$(basename $URL) msg_ok "Downloaded ${CL}${BL}$FILE${CL}" -msg_info "Extracting Mikrotik RouterOS Disk Image" +msg_info "Extracting Mikrotik RouterOS CHR Disk Image" gunzip -f -S .zip $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') case $STORAGE_TYPE in @@ -258,31 +258,29 @@ btrfs) DISK_IMPORT="-format raw" ;; esac -for i in {0,1}; do - disk="DISK$i" - eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} - eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} -done -msg_ok "Extracted Mikrotik RouterOS Disk Image" -msg_info "Creating Mikrotik RouterOS VM" -qm create $VMID -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE -name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ + +DISK_VAR="vm-${VMID}-disk-0${DISK_EXT:-}" +DISK_REF="${STORAGE}:${DISK_VAR:-}" + +msg_ok "Extracted Mikrotik RouterOS CHR Disk Image" +msg_info "Creating Mikrotik RouterOS CHR VM" +qm create $VMID -tablet 0 -localtime 1 -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \ + -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ - -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ - -scsi0 ${DISK1_REF},size=2G \ + -scsi0 "$DISK_REF" \ -boot order=scsi0 \ -description "
- # Mikrotik RouterOS + # Mikrotik RouterOS CHR
" >/dev/null -msg_ok "Mikrotik RouterOS VM ${CL}${BL}(${HN})" +msg_ok "Mikrotik RouterOS CHR VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then - msg_info "Starting Mikrotik RouterOS VM" + msg_info "Starting Mikrotik RouterOS CHR VM" qm start $VMID - msg_ok "Started Mikrotik RouterOS VM" + msg_ok "Started Mikrotik RouterOS CHR VM" fi msg_ok "Completed Successfully!\n" From fa38661006ffa5d2d6e61b1fce77276e59de9c25 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Dec 2023 21:23:32 -0500 Subject: [PATCH 2386/3335] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe7b7e2..283a3f60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ - 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-12-01 + +### Changed + +- **Mikrotik RouterOS VM** + - Now Mikrotik RouterOS CHR VM + - code refactoring + - update to CHR + - thanks to @NiccyB + ## 2023-11-19 ### Changed From f39d8cff0f2a2dceefa16db7648aeee04f8bbf9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Dec 2023 21:39:15 -0500 Subject: [PATCH 2387/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 283a3f60..6ec1448b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ - code refactoring - update to CHR - thanks to @NiccyB +- **Channels DVR Server LXC** + - NEW Script ## 2023-11-19 From f3c70a02225023b59c8408d661bc6bd9c6ce5c80 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 06:36:12 -0500 Subject: [PATCH 2388/3335] Create runtipi-install.sh --- install/runtipi-install.sh | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 install/runtipi-install.sh diff --git a/install/runtipi-install.sh b/install/runtipi-install.sh new file mode 100644 index 00000000..c9a2dce8 --- /dev/null +++ b/install/runtipi-install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Runtipi (Patience)" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p "$(dirname "$DOCKER_CONFIG_PATH")" +echo -e '{\n "log-driver": "journald"\n}' > "$DOCKER_CONFIG_PATH" +cd /opt +wget -q https://raw.githubusercontent.com/runtipi/runtipi/master/scripts/install.sh +sed -i -e '/newgrp docker/d' -e '/exit 0/d' install.sh +chmod +x install.sh +$STD ./install.sh +msg_ok "Installed Runtipi" + +motd_ssh +customize + +msg_info "Cleaning up" +rm /opt/install.sh +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 1112e0d8f656d1e6ba53cb4c5427fe6362599f76 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 06:37:26 -0500 Subject: [PATCH 2389/3335] Create runtipi.sh --- ct/runtipi.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/runtipi.sh diff --git a/ct/runtipi.sh b/ct/runtipi.sh new file mode 100644 index 00000000..e4eeaba4 --- /dev/null +++ b/ct/runtipi.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ _ _ + / __ \__ ______ / /_(_)___ (_) + / /_/ / / / / __ \/ __/ / __ \/ / + / _, _/ /_/ / / / / /_/ / /_/ / / +/_/ |_|\__,_/_/ /_/\__/_/ .___/_/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="Runtipi" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/runtipi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP} ${CL} \n" From 08aabfb27cafd5253ed89bbcbe4e46cf66cea6f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 07:11:08 -0500 Subject: [PATCH 2390/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec1448b..5724aa3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-12-02 + +### Changed + +- **Runtipi LXC** + - NEW Script + ## 2023-12-01 ### Changed From 2ccb561ff4d83f2493c2db1f328614d362ab9246 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 19:35:10 -0500 Subject: [PATCH 2391/3335] Create haos-test.sh test DO NOT USE --- vm/haos-test.sh | 444 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 444 insertions(+) create mode 100644 vm/haos-test.sh diff --git a/vm/haos-test.sh b/vm/haos-test.sh new file mode 100644 index 00000000..3afdbaa6 --- /dev/null +++ b/vm/haos-test.sh @@ -0,0 +1,444 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ __ ___ _ __ __ ____ _____ + / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ + / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ + / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / +/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ + +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) +VERSIONS=(stable beta dev) +for version in "${VERSIONS[@]}"; do + eval "$version=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/$version.json | grep "ova" | cut -d '"' -f 4)" +done +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -euo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + msg_error "This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + BRANCH="$stable" + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="cache=writethrough," + HN="haos$stable" + CPU_TYPE=" -cpu host" + CORE_COUNT="2" + RAM_SIZE="4096" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="no" + echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" +} + +function advanced_settings() { + if BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ + "$stable" "Stable " ON \ + "$beta" "Beta " OFF \ + "$dev" "Dev " OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" + else + exit-script + fi + + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None" OFF \ + "1" "Write Through (Default)" ON \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE1 = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="haos${BRANCH}" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64" OFF \ + "1" "Host (Default)" ON \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="4096" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image" +if [ "$BRANCH" == "$dev" ]; then + URL=https://os-artifacts.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +else + URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz +fi +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" +msg_info "Extracting KVM Disk Image" +unxz $FILE +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac + +DISK_VAR="vm-${VMID}-disk-0${DISK_EXT:-}" +DISK_REF="${STORAGE}:${DISK_VAR:-}" +NODE=$(hostname) + +msg_ok "Extracted KVM Disk Image" +msg_info "Creating HAOS VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw \virtio-scsi-pci +lvcreate -L 4G -n vm-$VMID-disk-1 $NODE 1>&/dev/null +qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${STORAGE}:vm-${VMID}-disk-1,efitype=4m \ + -scsi0 "${DISK_REF},${DISK_CACHE}${THIN}size=32G" \ + -boot order=scsi0 \ + -description "
+ + # Home Assistant OS + + +
" >/dev/null +msg_ok "Created HAOS VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting Home Assistant OS VM" + qm start $VMID + msg_ok "Started Home Assistant OS VM" +fi +msg_ok "Completed Successfully!\n" From e679048dda521391cccc91c0522c297d5eca480d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 19:56:35 -0500 Subject: [PATCH 2392/3335] Update haos-test.sh --- vm/haos-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-test.sh b/vm/haos-test.sh index 3afdbaa6..3cccf640 100644 --- a/vm/haos-test.sh +++ b/vm/haos-test.sh @@ -422,7 +422,7 @@ NODE=$(hostname) msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw \virtio-scsi-pci + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci lvcreate -L 4G -n vm-$VMID-disk-1 $NODE 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ From e95e8992a9387a98fde49b774f6d228e964daaf8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 20:06:05 -0500 Subject: [PATCH 2393/3335] Update haos-test.sh --- vm/haos-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-test.sh b/vm/haos-test.sh index 3cccf640..c431b5c7 100644 --- a/vm/haos-test.sh +++ b/vm/haos-test.sh @@ -37,7 +37,7 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" THIN="discard=on,ssd=1," -set -euo pipefail +set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT function error_handler() { From fea40f6526f97d00e1559782e0af0be27c34caba Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 20:22:18 -0500 Subject: [PATCH 2394/3335] Update haos-test.sh --- vm/haos-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/haos-test.sh b/vm/haos-test.sh index c431b5c7..3b11b977 100644 --- a/vm/haos-test.sh +++ b/vm/haos-test.sh @@ -37,7 +37,7 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" THIN="discard=on,ssd=1," -set -e +set -euo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT function error_handler() { @@ -423,8 +423,8 @@ msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -lvcreate -L 4G -n vm-$VMID-disk-1 $NODE 1>&/dev/null -qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +lvcreate -L 4G -n vm-${VMID}-disk-1 ${NODE} 1>&/dev/null +qm importdisk $VMID ${FILE%.*} ${STORAGE} ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${STORAGE}:vm-${VMID}-disk-1,efitype=4m \ -scsi0 "${DISK_REF},${DISK_CACHE}${THIN}size=32G" \ From 47ecba463abd0afe49f44255b20e5698670bf215 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 20:30:12 -0500 Subject: [PATCH 2395/3335] Update haos-test.sh --- vm/haos-test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vm/haos-test.sh b/vm/haos-test.sh index 3b11b977..3cd5936b 100644 --- a/vm/haos-test.sh +++ b/vm/haos-test.sh @@ -417,13 +417,12 @@ esac DISK_VAR="vm-${VMID}-disk-0${DISK_EXT:-}" DISK_REF="${STORAGE}:${DISK_VAR:-}" -NODE=$(hostname) msg_ok "Extracted KVM Disk Image" msg_info "Creating HAOS VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -lvcreate -L 4G -n vm-${VMID}-disk-1 ${NODE} 1>&/dev/null +lvcreate -L 4G -n vm-${VMID}-disk-1 pve 1>&/dev/null qm importdisk $VMID ${FILE%.*} ${STORAGE} ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${STORAGE}:vm-${VMID}-disk-1,efitype=4m \ From a78448679b71bcdae8bcc94e2f9d0bdf839f0df2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Dec 2023 20:47:12 -0500 Subject: [PATCH 2396/3335] Delete vm/haos-test.sh --- vm/haos-test.sh | 443 ------------------------------------------------ 1 file changed, 443 deletions(-) delete mode 100644 vm/haos-test.sh diff --git a/vm/haos-test.sh b/vm/haos-test.sh deleted file mode 100644 index 3cd5936b..00000000 --- a/vm/haos-test.sh +++ /dev/null @@ -1,443 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { - clear - cat <<"EOF" - __ __ ___ _ __ __ ____ _____ - / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / __ \/ ___/ - / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ / / / /\__ \ - / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ / /_/ /___/ / -/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____//____/ - -EOF -} -header_info -echo -e "\n Loading..." -GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') -NEXTID=$(pvesh get /cluster/nextid) -VERSIONS=(stable beta dev) -for version in "${VERSIONS[@]}"; do - eval "$version=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/$version.json | grep "ova" | cut -d '"' -f 4)" -done -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -HA=$(echo "\033[1;34m") -RD=$(echo "\033[01;31m") -BGN=$(echo "\033[4;92m") -GN=$(echo "\033[1;92m") -DGN=$(echo "\033[32m") -CL=$(echo "\033[m") -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" -THIN="discard=on,ssd=1," -set -euo pipefail -trap 'error_handler $LINENO "$BASH_COMMAND"' ERR -trap cleanup EXIT -function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" - cleanup_vmid -} - -function cleanup_vmid() { - if qm status $VMID &>/dev/null; then - qm stop $VMID &>/dev/null - qm destroy $VMID &>/dev/null - fi -} - -function cleanup() { - popd >/dev/null - rm -rf $TEMP_DIR -} - -TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null -if whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then - : -else - header_info && echo -e "⚠ User exited script \n" && exit -fi - -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." -} - -function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" -} - -function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" -} - -function check_root() { - if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then - clear - msg_error "Please run this script as root." - echo -e "\nExiting..." - sleep 2 - exit - fi -} - -function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - msg_error "This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 - exit - fi -} - -function ssh_check() { - if command -v pveversion >/dev/null 2>&1; then - if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then - echo "you've been warned" - else - clear - exit - fi - fi - fi -} - -function exit-script() { - clear - echo -e "⚠ User exited script \n" - exit -} - -function default_settings() { - BRANCH="$stable" - VMID="$NEXTID" - FORMAT=",efitype=4m" - MACHINE="" - DISK_CACHE="cache=writethrough," - HN="haos$stable" - CPU_TYPE=" -cpu host" - CORE_COUNT="2" - RAM_SIZE="4096" - BRG="vmbr0" - MAC="$GEN_MAC" - VLAN="" - MTU="" - START_VM="no" - echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" - echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" - echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" - echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" - echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" - echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" - echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" - echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" - echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" - echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" - echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" - echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" -} - -function advanced_settings() { - if BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ - "$stable" "Stable " ON \ - "$beta" "Beta " OFF \ - "$dev" "Dev " OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" - else - exit-script - fi - - while true; do - if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z "$VMID" ]; then - VMID="$NEXTID" - fi - if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then - echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" - sleep 2 - continue - fi - echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" - break - else - exit-script - fi - done - - if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ - "i440fx" "Machine i440fx" ON \ - "q35" "Machine q35" OFF \ - 3>&1 1>&2 2>&3); then - if [ $MACH = q35 ]; then - echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT="" - MACHINE=" -machine q35" - else - echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" - FORMAT=",efitype=4m" - MACHINE="" - fi - else - exit-script - fi - - if DISK_CACHE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ - "0" "None" OFF \ - "1" "Write Through (Default)" ON \ - 3>&1 1>&2 2>&3); then - if [ $DISK_CACHE1 = "1" ]; then - echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" - DISK_CACHE="cache=writethrough," - else - echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" - DISK_CACHE="" - fi - else - exit-script - fi - - if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $VM_NAME ]; then - HN="haos${BRANCH}" - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - else - HN=$(echo ${VM_NAME,,} | tr -d ' ') - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" - fi - else - exit-script - fi - - if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ - "0" "KVM64" OFF \ - "1" "Host (Default)" ON \ - 3>&1 1>&2 2>&3); then - if [ $CPU_TYPE1 = "1" ]; then - echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" - CPU_TYPE=" -cpu host" - else - echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" - CPU_TYPE="" - fi - else - exit-script - fi - - if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $CORE_COUNT ]; then - CORE_COUNT="2" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" - fi - else - exit-script - fi - - if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $RAM_SIZE ]; then - RAM_SIZE="4096" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" - fi - else - exit-script - fi - - if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $BRG ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" - fi - else - exit-script - fi - - if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC="$GEN_MAC" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" - else - MAC="$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" - fi - else - exit-script - fi - - if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - else - VLAN=",tag=$VLAN1" - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" - fi - else - exit-script - fi - - if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - else - MTU=",mtu=$MTU1" - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" - fi - else - exit-script - fi - - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then - echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - START_VM="yes" - else - echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" - START_VM="no" - fi - - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then - echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}" - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -function start_script() { - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then - header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi -} - -check_root -arch_check -pve_check -ssh_check -start_script - -msg_info "Validating Storage" -while read -r line; do - TAG=$(echo $line | awk '{print $1}') - TYPE=$(echo $line | awk '{printf "%-10s", $2}') - FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - ITEM=" Type: $TYPE Free: $FREE " - OFFSET=2 - if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then - MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) - fi - STORAGE_MENU+=("$TAG" "$ITEM" "OFF") -done < <(pvesm status -content images | awk 'NR>1') -VALID=$(pvesm status -content images | awk 'NR>1') -if [ -z "$VALID" ]; then - msg_error "Unable to detect a valid storage location." - exit -elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then - STORAGE=${STORAGE_MENU[0]} -else - while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit - done -fi -msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." -msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image" -if [ "$BRANCH" == "$dev" ]; then - URL=https://os-artifacts.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -else - URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz -fi -sleep 2 -msg_ok "${CL}${BL}${URL}${CL}" -wget -q --show-progress $URL -echo -en "\e[1A\e[0K" -FILE=$(basename $URL) -msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}" -msg_info "Extracting KVM Disk Image" -unxz $FILE -STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') -case $STORAGE_TYPE in -nfs | dir) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_IMPORT="-format raw" - THIN="" - ;; -btrfs) - DISK_EXT=".raw" - DISK_REF="$VMID/" - DISK_IMPORT="-format raw" - FORMAT=",efitype=4m" - THIN="" - ;; -esac - -DISK_VAR="vm-${VMID}-disk-0${DISK_EXT:-}" -DISK_REF="${STORAGE}:${DISK_VAR:-}" - -msg_ok "Extracted KVM Disk Image" -msg_info "Creating HAOS VM" -qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -lvcreate -L 4G -n vm-${VMID}-disk-1 pve 1>&/dev/null -qm importdisk $VMID ${FILE%.*} ${STORAGE} ${DISK_IMPORT:-} 1>&/dev/null -qm set $VMID \ - -efidisk0 ${STORAGE}:vm-${VMID}-disk-1,efitype=4m \ - -scsi0 "${DISK_REF},${DISK_CACHE}${THIN}size=32G" \ - -boot order=scsi0 \ - -description "
- - # Home Assistant OS - - -
" >/dev/null -msg_ok "Created HAOS VM ${CL}${BL}(${HN})" -if [ "$START_VM" == "yes" ]; then - msg_info "Starting Home Assistant OS VM" - qm start $VMID - msg_ok "Started Home Assistant OS VM" -fi -msg_ok "Completed Successfully!\n" From 21e95ccf6d6cacab691f4426a3d36aeb4e15eff2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Dec 2023 13:14:09 -0500 Subject: [PATCH 2397/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 9d011721..3506f415 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -25,3 +25,5 @@ [Moving Home Assistant’s Database To MariaDB On Proxmox](https://smarthomescene.com/guides/moving-home-assistants-database-to-mariadb-on-proxmox/) [How-to: Proxmox VE 7.4 to 8.0 Upgrade](https://www.derekseaman.com/2023/06/how-to-proxmox-7-4-to-8-0-upgrade.html) + +[iGPU Transcoding In Proxmox with Jellyfin](https://www.youtube.com/watch?v=XAa_qpNmzZs) From bafd32f777b97526a592e0dffa8837faf9127ccf Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Dec 2023 14:40:39 -0500 Subject: [PATCH 2398/3335] Update HW Acceleration LXCs --- install/emby-install.sh | 8 +++++--- install/jellyfin-install.sh | 8 +++++--- install/plex-install.sh | 8 +++++--- install/scrypted-install.sh | 9 +++++---- install/tdarr-install.sh | 9 +++++---- install/unmanic-install.sh | 3 ++- misc/hw-acceleration.sh | 2 +- 7 files changed, 28 insertions(+), 19 deletions(-) diff --git a/install/emby-install.sh b/install/emby-install.sh index 52fc3af6..e0337e77 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -29,9 +29,11 @@ if [[ "$CTTYPE" == "0" ]]; then else $STD apt-get install -y intel-opencl-icd fi - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render msg_ok "Set Up Hardware Acceleration" fi diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 787b0ab2..be373996 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -30,9 +30,11 @@ if [[ "$CTTYPE" == "0" ]]; then else $STD apt-get install -y intel-opencl-icd fi - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render msg_ok "Set Up Hardware Acceleration" fi diff --git a/install/plex-install.sh b/install/plex-install.sh index 5e7fda8d..4aec89ce 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -29,9 +29,11 @@ if [[ "$CTTYPE" == "0" ]]; then else $STD apt-get install -y intel-opencl-icd fi - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render msg_ok "Set Up Hardware Acceleration" fi diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index e51d3a65..081772fe 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -44,10 +44,11 @@ if [[ "$CTTYPE" == "0" ]]; then va-driver-all \ ocl-icd-libopencl1 \ intel-opencl-icd - - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render msg_ok "Set Up Hardware Acceleration" fi msg_info "Installing GStreamer (Patience)" diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 5e097586..702d3203 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -25,10 +25,11 @@ if [[ "$CTTYPE" == "0" ]]; then va-driver-all \ ocl-icd-libopencl1 \ intel-opencl-icd - - /bin/chgrp video /dev/dri - /bin/chmod 755 /dev/dri - /bin/chmod 660 /dev/dri/* + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render msg_ok "Set Up Hardware Acceleration" fi diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index ebf48b26..be5d336c 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -27,10 +27,11 @@ if [[ "$CTTYPE" == "0" ]]; then va-driver-all \ ocl-icd-libopencl1 \ intel-opencl-icd - chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render msg_ok "Set Up Hardware Acceleration" fi diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 72e807c7..32ccb72d 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -43,7 +43,7 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF -pct exec $privileged_container -- bash -c "apt-get -y install va-driver-all && apt-get -y install ocl-icd-libopencl1 && apt-get install -y intel-opencl-icd" +pct exec $privileged_container -- bash -c "apt-get -y install va-driver-all && apt-get -y install ocl-icd-libopencl1 && apt-get install -y intel-opencl-icd && chgrp video /dev/dri && chmod 755 /dev/dri && chmod 660 /dev/dri/* && adduser \$(id -u -n) video && adduser \$(id -u -n) render" header_info echo -e "Completed Successfully!\n" echo -e "Reboot container $privileged_container to apply the new settings\n" From d4363eb49f7530620c4d7019a7bfdaf9f2838653 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 4 Dec 2023 05:19:05 -0500 Subject: [PATCH 2399/3335] Update kavita.sh fixes https://github.com/tteck/Proxmox/issues/2151 --- ct/kavita.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/kavita.sh b/ct/kavita.sh index f5e1ba5b..1b37feda 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -56,7 +56,7 @@ if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; exit; msg_info "Updating $APP LXC" systemctl stop kavita RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) &>/dev/null +tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) --no-same-owner &>/dev/null rm -rf Kavita/config cp -r Kavita/* /opt/Kavita rm -rf Kavita From 1290e91450c3c510638a11134d42252b7802fda7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 4 Dec 2023 05:56:44 -0500 Subject: [PATCH 2400/3335] Update turnkey.sh tweak --- turnkey/turnkey.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index 6eb31634..f4100572 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -15,7 +15,7 @@ function header_info { EOF } -set -eEuo pipefail +set -euo pipefail shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR From cb312d1f5b186ec8a2bffb23cfcbd891550b4e9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 5 Dec 2023 05:41:51 -0500 Subject: [PATCH 2401/3335] Update turnkey.sh tweak --- turnkey/turnkey.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index f4100572..795dfbcb 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -204,7 +204,7 @@ pct start "$CTID" sleep 5 # Get container IP -set +e +set +euo pipefail # Turn off error checking max_attempts=5 attempt=1 IP="" @@ -224,7 +224,6 @@ if [[ -z $IP ]]; then IP="NOT FOUND" fi -set -e # Start Proxmox VE Monitor-All if available if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service From a22c3644a69470af17bd60f6f56173b5eb248cb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Dec 2023 20:13:12 -0500 Subject: [PATCH 2402/3335] drop fuse-overlayfs storage driver - As of Proxmox 8.1, `overlay2` is now a supported Docker storage driver when using ZFS, specifically with OpenZFS version 2.2.0 or later. --- ct/casaos.sh | 1 - ct/docker.sh | 1 - ct/dockge.sh | 1 - ct/homeassistant.sh | 1 - ct/umbrel.sh | 1 - install/casaos-install.sh | 9 --------- install/docker-install.sh | 11 +---------- install/homeassistant-install.sh | 11 +---------- install/umbrel-install.sh | 9 --------- misc/build.func | 33 +++++--------------------------- 10 files changed, 7 insertions(+), 71 deletions(-) diff --git a/ct/casaos.sh b/ct/casaos.sh index a6dab10d..ba4a5aed 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -46,7 +46,6 @@ function default_settings() { MAC="" VLAN="" SSH="no" - FUSE="no" VERB="no" echo_default } diff --git a/ct/docker.sh b/ct/docker.sh index db176aec..81a3a1dc 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -46,7 +46,6 @@ function default_settings() { MAC="" VLAN="" SSH="no" - FUSE="no" VERB="no" echo_default } diff --git a/ct/dockge.sh b/ct/dockge.sh index 64cc093e..fba046b6 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -46,7 +46,6 @@ function default_settings() { MAC="" VLAN="" SSH="no" - FUSE="no" VERB="no" echo_default } diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 1298c150..2056f0d6 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -46,7 +46,6 @@ function default_settings() { MAC="" VLAN="" SSH="no" - FUSE="no" VERB="no" echo_default } diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 2dd3c08f..d5992e0e 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -46,7 +46,6 @@ function default_settings() { MAC="" VLAN="" SSH="no" - FUSE="no" VERB="no" echo_default } diff --git a/install/casaos-install.sh b/install/casaos-install.sh index d3caecbc..05473132 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -22,16 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing CasaOS (Patience)" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi $STD bash <(curl -fsSL https://get.casaos.io/v0.4.1) msg_ok "Installed CasaOS" diff --git a/install/docker-install.sh b/install/docker-install.sh index 1a15edb3..6425d48e 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -31,16 +31,7 @@ DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then - VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - cd /usr/local/bin - curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 - chmod 755 /usr/local/bin/fuse-overlayfs - cd ~ - echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -else - echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -fi +echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 0c19ca6c..3609a358 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -42,16 +42,7 @@ PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") msg_info "Installing Docker $DOCKER_LATEST_VERSION" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then - VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - cd /usr/local/bin - curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 - chmod 755 /usr/local/bin/fuse-overlayfs - cd ~ - echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -else - echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -fi +echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index ea4d17ba..db058225 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -22,16 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Umbrel (Patience)" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) -if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -else echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json -fi $STD bash <(curl -fsSL https://umbrel.sh) systemctl daemon-reload $STD systemctl enable --now umbrel-startup.service diff --git a/misc/build.func b/misc/build.func index e734fd1f..5656561d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -122,9 +122,6 @@ echo_default() { echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}" - fi echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } @@ -403,15 +400,6 @@ advanced_settings() { echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" fi - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then - FUSE="yes" - else - FUSE="no" - fi - echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}" - fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else @@ -475,21 +463,13 @@ start() { build_container() { if [ "$VERB" == "yes" ]; then set -x; fi - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - if [ "$FUSE" == "yes" ]; then - FEATURES="fuse=1,keyctl=1,nesting=1" - else - FEATURES="keyctl=1,nesting=1" - fi - fi - if [[ "$APP" != "Docker" && "$APP" != "Umbrel" && "$APP" != "CasaOS" && "$APP" != "Home Assistant" ]]; then - if [ "$CT_TYPE" == "1" ]; then - FEATURES="keyctl=1,nesting=1" - else - FEATURES="nesting=1" - fi + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" fi + TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then @@ -498,9 +478,6 @@ build_container() { export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" fi export tz="$timezone" - if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then - export ST="$FUSE" - fi export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" export app="$NSAPP" From e2354aaab88c790102db67fb435aa6d6b0b768b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Dec 2023 20:30:41 -0500 Subject: [PATCH 2403/3335] Update homeassistant-install.sh change Portainer port to 9443 --- install/homeassistant-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 3609a358..958789e4 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -54,7 +54,7 @@ msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" $STD docker volume create portainer_data $STD docker run -d \ -p 8000:8000 \ - -p 9000:9000 \ + -p 9443:9443 \ --name=portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ From 9a9e91988fa8879957e8dd2942a01c51493655a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Dec 2023 07:59:22 -0500 Subject: [PATCH 2404/3335] Update syncthing-install.sh fix config path --- install/syncthing-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 6fe0f10a..43348999 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -28,7 +28,7 @@ $STD apt-get install -y syncthing $STD systemctl enable syncthing@root.service systemctl start syncthing@root.service sleep 5 -sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml +sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.local/state/syncthing/config.xml systemctl restart syncthing@root.service msg_ok "Installed Syncthing" From 587a8d64673a4172e47945fd5b4b45ff8523a4b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 06:44:09 -0500 Subject: [PATCH 2405/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 3506f415..11981378 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -27,3 +27,5 @@ [How-to: Proxmox VE 7.4 to 8.0 Upgrade](https://www.derekseaman.com/2023/06/how-to-proxmox-7-4-to-8-0-upgrade.html) [iGPU Transcoding In Proxmox with Jellyfin](https://www.youtube.com/watch?v=XAa_qpNmzZs) + +[Proxmox + NetData]() From ec08dae49cc0e675c0458937b1e414861bb2ac4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 09:15:10 -0500 Subject: [PATCH 2406/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 11981378..34e92707 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -28,4 +28,3 @@ [iGPU Transcoding In Proxmox with Jellyfin](https://www.youtube.com/watch?v=XAa_qpNmzZs) -[Proxmox + NetData]() From 128f22d0001461a6aa9170bd4ef603324f0d9e0a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 12:19:06 -0500 Subject: [PATCH 2407/3335] Create netdata.sh --- misc/netdata.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 misc/netdata.sh diff --git a/misc/netdata.sh b/misc/netdata.sh new file mode 100644 index 00000000..b4dd83e1 --- /dev/null +++ b/misc/netdata.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +clear +cat <<"EOF" + _ __ __ ____ __ + / | / /__ / /_/ __ \____ _/ /_____ _ + / |/ / _ \/ __/ / / / __ `/ __/ __ `/ + / /| / __/ /_/ /_/ / /_/ / /_/ /_/ / +/_/ |_/\___/\__/_____/\__,_/\__/\__,_/ + +EOF + +install() { +while true; do + read -p "This script will install NetData on Proxmox VE. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +cat </etc/apt/sources.list.d/netdata.list +deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ +deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ +EOF +apt-get update && apt-get -y upgrade +apt-get install -y netdata +echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" +} + +uninstall() { +apt remove -y netdata --purge +rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list +apt autoremove -y +userdel netdata + echo -e "\nRemoved NetData from Proxmox VE\n" +} + +if ! command -v pveversion >/dev/null 2>&1; then + clear + echo -e "\n No PVE Detected!\n" + exit +fi + +OPTIONS=(Install "Install NetData on Proxmox VE" \ + Uninstall "Uninstall NetData from Proxmox VE") + +# Show the whiptail menu and save the user's choice +CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + +case $CHOICE in + "Install") + install + ;; + "Uninstall") + uninstall + ;; + *) + echo "Exiting..." + exit 0 + ;; +esac From a78e93ae8330b55a03e9c1c75719d5c40650a785 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 13:31:54 -0500 Subject: [PATCH 2408/3335] Update netdata.sh tweak --- misc/netdata.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/netdata.sh b/misc/netdata.sh index b4dd83e1..51b9f743 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -25,6 +25,8 @@ while true; do esac done +useradd -r -s /bin/false netdata +wget -q https://repo.netdata.cloud/netdatabot.gpg.key -O - | gpg --dearmor >/usr/share/keyrings/netdata-archive-keyring.gpg cat </etc/apt/sources.list.d/netdata.list deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ From 487657850414d873887db52c2e4b092c930147ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 13:48:03 -0500 Subject: [PATCH 2409/3335] Update netdata.sh tweak --- misc/netdata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 51b9f743..06aaf131 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -26,7 +26,7 @@ while true; do done useradd -r -s /bin/false netdata -wget -q https://repo.netdata.cloud/netdatabot.gpg.key -O - | gpg --dearmor >/usr/share/keyrings/netdata-archive-keyring.gpg +curl -fsSL https://repo.netdata.cloud/netdatabot.gpg.key >/usr/share/keyrings/netdata.gpg cat </etc/apt/sources.list.d/netdata.list deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ From 76b26b030e58f7a5120ab94aaf2721c1def0642a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 14:49:24 -0500 Subject: [PATCH 2410/3335] Update netdata.sh tweak --- misc/netdata.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 06aaf131..7741bb54 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -25,20 +25,20 @@ while true; do esac done -useradd -r -s /bin/false netdata -curl -fsSL https://repo.netdata.cloud/netdatabot.gpg.key >/usr/share/keyrings/netdata.gpg +curl -sSL --fail --connect-timeout 10 --retry 3 -o /root/netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb cat </etc/apt/sources.list.d/netdata.list deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ EOF +rm -rf /etc/apt/sources.list.d/netdata-edge.list apt-get update && apt-get -y upgrade apt-get install -y netdata echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" } uninstall() { -apt remove -y netdata --purge -rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list +apt purge -y netdata netdata-core +rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list /usr/share/keyrings/netdata.gpg apt autoremove -y userdel netdata echo -e "\nRemoved NetData from Proxmox VE\n" From a777fd5364d807e93ad7338380b79da631d24144 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 15:00:17 -0500 Subject: [PATCH 2411/3335] Update netdata.sh tweak --- misc/netdata.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 7741bb54..ea6bfa67 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -25,12 +25,12 @@ while true; do esac done -curl -sSL --fail --connect-timeout 10 --retry 3 -o /root/netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb +curl -sSL --fail --connect-timeout 10 --retry 3 -o netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb cat </etc/apt/sources.list.d/netdata.list deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ EOF -rm -rf /etc/apt/sources.list.d/netdata-edge.list +rm -rf /etc/apt/sources.list.d/netdata-edge.list netdata-repo-edge_2-1+debian12_all.deb apt-get update && apt-get -y upgrade apt-get install -y netdata echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" From 0e1b0a838294c470a99274149af5993c36d6e246 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 15:13:19 -0500 Subject: [PATCH 2412/3335] Update netdata.sh more tweaks --- misc/netdata.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index ea6bfa67..5bfaeb9c 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -25,13 +25,15 @@ while true; do esac done -curl -sSL --fail --connect-timeout 10 --retry 3 -o netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb +curl -sSL --fail --connect-timeout 10 --retry 3 -o /root/netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb +apt-get install -y /root/netdata-repo-edge_2-1+debian12_all.deb cat </etc/apt/sources.list.d/netdata.list deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ EOF rm -rf /etc/apt/sources.list.d/netdata-edge.list netdata-repo-edge_2-1+debian12_all.deb -apt-get update && apt-get -y upgrade +apt-get update &>/dev/null +apt-get -y upgrade apt-get install -y netdata echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" } From 5e4f0d683ac73a4cbe9fac81b65cdc01634edf80 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 15:58:56 -0500 Subject: [PATCH 2413/3335] Update USER_SUBMITTED_GUIDES.md NetData --- USER_SUBMITTED_GUIDES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 34e92707..11981378 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -28,3 +28,4 @@ [iGPU Transcoding In Proxmox with Jellyfin](https://www.youtube.com/watch?v=XAa_qpNmzZs) +[Proxmox + NetData]() From dbf7425f222f8263ff55ba82b9b140d7d9f1e013 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 16:10:59 -0500 Subject: [PATCH 2414/3335] Delete misc/netdata.sh --- misc/netdata.sh | 73 ------------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 misc/netdata.sh diff --git a/misc/netdata.sh b/misc/netdata.sh deleted file mode 100644 index 5bfaeb9c..00000000 --- a/misc/netdata.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2023 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -clear -cat <<"EOF" - _ __ __ ____ __ - / | / /__ / /_/ __ \____ _/ /_____ _ - / |/ / _ \/ __/ / / / __ `/ __/ __ `/ - / /| / __/ /_/ /_/ / /_/ / /_/ /_/ / -/_/ |_/\___/\__/_____/\__,_/\__/\__,_/ - -EOF - -install() { -while true; do - read -p "This script will install NetData on Proxmox VE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -curl -sSL --fail --connect-timeout 10 --retry 3 -o /root/netdata-repo-edge_2-1+debian12_all.deb https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo-edge_2-1+debian12_all.deb -apt-get install -y /root/netdata-repo-edge_2-1+debian12_all.deb -cat </etc/apt/sources.list.d/netdata.list -deb http://repo.netdata.cloud/repos/stable/debian/ bookworm/ -deb http://repo.netdata.cloud/repos/repoconfig/debian/ bookworm/ -EOF -rm -rf /etc/apt/sources.list.d/netdata-edge.list netdata-repo-edge_2-1+debian12_all.deb -apt-get update &>/dev/null -apt-get -y upgrade -apt-get install -y netdata -echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" -} - -uninstall() { -apt purge -y netdata netdata-core -rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list /usr/share/keyrings/netdata.gpg -apt autoremove -y -userdel netdata - echo -e "\nRemoved NetData from Proxmox VE\n" -} - -if ! command -v pveversion >/dev/null 2>&1; then - clear - echo -e "\n No PVE Detected!\n" - exit -fi - -OPTIONS=(Install "Install NetData on Proxmox VE" \ - Uninstall "Uninstall NetData from Proxmox VE") - -# Show the whiptail menu and save the user's choice -CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" --menu "Select an option:" 10 58 2 \ - "${OPTIONS[@]}" 3>&1 1>&2 2>&3) - -case $CHOICE in - "Install") - install - ;; - "Uninstall") - uninstall - ;; - *) - echo "Exiting..." - exit 0 - ;; -esac From 6b31484fffc896e5eabec06119da11deb39d02fd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 10 Dec 2023 18:16:44 -0500 Subject: [PATCH 2415/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5724aa3e..4db61b3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-12-10 + +### Changed + +- **Homarr LXC** + - Removed, again. + ## 2023-12-02 ### Changed From 54720bdcdb97ee8d529cb6ecb70f7a8aa21e2129 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Dec 2023 06:12:00 -0500 Subject: [PATCH 2416/3335] Update heimdalldashboard-install.sh add php-intl --- install/heimdalldashboard-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 78d3be90..5fd52cff 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -24,6 +24,7 @@ $STD apt-get install -y php $STD apt-get install -y php-sqlite3 $STD apt-get install -y php-zip $STD apt-get install -y php-xml +$STD apt-get install -y php-intl msg_ok "Installed PHP" RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') From f39262c86eaab2df8f5d4d0c07a525f43daca4d8 Mon Sep 17 00:00:00 2001 From: Pablo Date: Thu, 14 Dec 2023 10:07:34 +0100 Subject: [PATCH 2417/3335] Updated address of cloud img file - ubuntu-vm.sh (#2189) Update to '20231207' https://cloud-images.ubuntu.com/jammy/20231207/jammy-server-cloudimg-amd64.img --- vm/ubuntu-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index e971c027..e9eacdf3 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -370,7 +370,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Ubuntu 22.04 Disk Image" -URL=https://cloud-images.ubuntu.com/jammy/20231027/jammy-server-cloudimg-amd64.img +URL=https://cloud-images.ubuntu.com/jammy/20231207/jammy-server-cloudimg-amd64.img sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL From 589d7d6377165c7d0404ad9dadc22f37a64ee10d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Dec 2023 04:51:52 -0500 Subject: [PATCH 2418/3335] Update ubuntu-vm.sh set image to `current` --- vm/ubuntu-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index e9eacdf3..4ff0af77 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -370,7 +370,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Ubuntu 22.04 Disk Image" -URL=https://cloud-images.ubuntu.com/jammy/20231207/jammy-server-cloudimg-amd64.img +URL=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL From 9873829c6786d30035b48eaa8806e4163b61b37f Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 14 Dec 2023 23:23:35 +0100 Subject: [PATCH 2419/3335] Small textual change (#2192) --- misc/hw-acceleration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 32ccb72d..0806bdfa 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -19,7 +19,7 @@ EOF } header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add HW Acceleration" --yesno "This Will Add HW Acceleration to an exixting LXC Container. Proceed?" 10 68 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add HW Acceleration" --yesno "This Will Add HW Acceleration to an existing LXC Container. Proceed?" 10 68 || exit NODE=$(hostname) PREV_MENU=() MSG_MAX_LENGTH=0 From 72b8deb363170bb20c553bd5e7787942b588773c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 16 Dec 2023 15:01:04 -0500 Subject: [PATCH 2420/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index add592ee..37656877 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -55,7 +55,7 @@ msg_ok "Installed Openresty" msg_info "Installing Node.js" $STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) -. ~/.bashrc +source ~/.bashrc $STD nvm install 16.20.1 ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node msg_ok "Installed Node.js" From 144c067c6f3e4298b73c017103912563c0c08f3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Dec 2023 20:21:23 -0500 Subject: [PATCH 2421/3335] Update homepage-install.sh install per releases/latest --- install/homepage-install.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 52dbd17e..00e2fec6 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -37,15 +37,18 @@ $STD apt-get install -y nodejs $STD npm install -g pnpm msg_ok "Installed Node.js" -msg_info "Installing Homepage (Patience)" -cd /opt -$STD git clone https://github.com/benphelps/homepage.git +RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing Homepage v${RELEASE} (Patience)" +wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz +$STD tar -xzf v${RELEASE}.tar.gz +mkdir -p /opt/homepage/config +mv homepage-${RELEASE}/* /opt/homepage +rm -rf mv homepage-${RELEASE} cd /opt/homepage -mkdir -p config cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install $STD pnpm build -msg_ok "Installed Homepage" +msg_ok "Installed Homepage v${RELEASE}" msg_info "Creating Service" service_path="/etc/systemd/system/homepage.service" From 0909ad493b4822ba7fcadade610aa84477fb7c1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Dec 2023 20:23:32 -0500 Subject: [PATCH 2422/3335] Update homepage.sh update to /releases/latest --- ct/homepage.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ct/homepage.sh b/ct/homepage.sh index eba11d3c..137ae1a1 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -53,17 +53,19 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -if ! command -v pnpm >/dev/null 2>&1; then - npm install -g pnpm &>/dev/null -fi -cd /opt/homepage +RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Updating Homepage to v${RELEASE} (Patience)" systemctl stop homepage -git pull --force &>/dev/null -pnpm install &>/dev/null -pnpm build &>/dev/null +wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz +tar -xzf v${RELEASE}.tar.gz +cp -r homepage-${RELEASE}/* /opt/homepage/ +rm -rf mv homepage-${RELEASE} +cd /opt/homepage +npx update-browserslist-db@latest +pnpm install +pnpm build systemctl start homepage -msg_ok "Updated Successfully" +msg_ok "Updated Homepage to v${RELEASE}" exit } From 82921933ea966e100caa775dc7725d499541cda6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Dec 2023 20:32:27 -0500 Subject: [PATCH 2423/3335] Update homepage-install.sh tweak --- install/homepage-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 00e2fec6..0a1dee42 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -43,7 +43,7 @@ wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.ta $STD tar -xzf v${RELEASE}.tar.gz mkdir -p /opt/homepage/config mv homepage-${RELEASE}/* /opt/homepage -rm -rf mv homepage-${RELEASE} +rm -rf homepage-${RELEASE} cd /opt/homepage cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install From e3739a8d40cec835f64ca8693c30afe44aae08fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Dec 2023 20:33:19 -0500 Subject: [PATCH 2424/3335] Update homepage-install.sh tweak --- install/homepage-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 0a1dee42..457eb796 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y git $STD apt-get install -y make $STD apt-get install -y g++ $STD apt-get install -y gcc From ab36af75af826ad7862d147578bc056997b2cd09 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 17 Dec 2023 20:35:11 -0500 Subject: [PATCH 2425/3335] Update homepage.sh tweak --- ct/homepage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homepage.sh b/ct/homepage.sh index 137ae1a1..988d0074 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -59,7 +59,7 @@ systemctl stop homepage wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz tar -xzf v${RELEASE}.tar.gz cp -r homepage-${RELEASE}/* /opt/homepage/ -rm -rf mv homepage-${RELEASE} +rm -rf homepage-${RELEASE} cd /opt/homepage npx update-browserslist-db@latest pnpm install From e441bdbad6a44bea1baef78f7a870c60affb7337 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Dec 2023 19:49:20 -0500 Subject: [PATCH 2426/3335] Create netdata.sh --- misc/netdata.sh | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 misc/netdata.sh diff --git a/misc/netdata.sh b/misc/netdata.sh new file mode 100644 index 00000000..1005f065 --- /dev/null +++ b/misc/netdata.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +clear +cat <<"EOF" + _ __ __ ____ __ + / | / /__ / /_/ __ \____ _/ /_____ _ + / |/ / _ \/ __/ / / / __ `/ __/ __ `/ + / /| / __/ /_/ /_/ / /_/ / /_/ /_/ / +/_/ |_/\___/\__/_____/\__,_/\__/\__,_/ + +EOF + +install() { +while true; do + read -p "This script will install NetData on Proxmox VE. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +wget -q https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo_2-2+debian12_all.deb +dpkg -i netdata-repo_2-2+debian12_all.deb +rm -rf netdata-repo_2-2+debian12_all.deb +apt-get update &>/dev/null +apt-get -y upgrade +apt-get install -y netdata +echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" +} + +uninstall() { +systemctl stop netdata +apt-get remove -y --purge netdata netdata-repo +rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list +rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg +systemctl daemon-reload +apt autoremove -y +userdel netdata + echo -e "\nRemoved NetData from Proxmox VE\n" +} + +if ! command -v pveversion >/dev/null 2>&1; then + clear + echo -e "\n No PVE Detected!\n" + exit +fi + +OPTIONS=(Install "Install NetData on Proxmox VE" \ + Uninstall "Uninstall NetData from Proxmox VE") + +# Show the whiptail menu and save the user's choice +CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + +case $CHOICE in + "Install") + install + ;; + "Uninstall") + uninstall + ;; + *) + echo "Exiting..." + exit 0 + ;; +esac From 524e80e88165d63bda15bd5b59c36fc773d3b921 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Dec 2023 20:17:36 -0500 Subject: [PATCH 2427/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4db61b3d..fc07fadf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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-12-19 + +### Changed + +- **Proxmox VE Netdata** + - NEW Script + ## 2023-12-10 ### Changed From fb394e9e8136145200064fcad75b367280fbdc18 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Dec 2023 20:23:19 -0500 Subject: [PATCH 2428/3335] Update netdata.sh tweak --- misc/netdata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 1005f065..01fd787f 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -36,7 +36,7 @@ echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" uninstall() { systemctl stop netdata -apt-get remove -y --purge netdata netdata-repo +apt-get remove --purge -y netdata netdata-repo rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg systemctl daemon-reload From b3a6f29bc2aa678a26785e29b78b9a776b02aeb7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 04:12:13 -0500 Subject: [PATCH 2429/3335] Update netdata.sh tweak --- misc/netdata.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 01fd787f..67c6646e 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -17,7 +17,7 @@ EOF install() { while true; do - read -p "This script will install NetData on Proxmox VE. Proceed(y/n)?" yn + read -p "This script will install NetData on Proxmox VE 8+. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -45,16 +45,17 @@ userdel netdata echo -e "\nRemoved NetData from Proxmox VE\n" } -if ! command -v pveversion >/dev/null 2>&1; then - clear - echo -e "\n No PVE Detected!\n" +if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 8.0 or higher" + echo -e "Exiting..." + sleep 2 exit fi OPTIONS=(Install "Install NetData on Proxmox VE" \ Uninstall "Uninstall NetData from Proxmox VE") -# Show the whiptail menu and save the user's choice CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" --menu "Select an option:" 10 58 2 \ "${OPTIONS[@]}" 3>&1 1>&2 2>&3) From 09bf75771dd10052f365962677a240b458cf5e9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 06:39:20 -0500 Subject: [PATCH 2430/3335] Update alpine-nextcloud-install.sh Nextcloud 28.0 requires sodium and bz2 --- install/alpine-nextcloud-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 8ee125bf..64c233b3 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -34,6 +34,8 @@ $STD apk add php82-pecl-smbclient $STD apk add php82-pecl-imagick $STD apk add php82-pecl-vips $STD apk add php82-exif +$STD apk add php82-sodium +$STD apk add php82-bz2 $STD apk add redis msg_ok "Installed PHP/Redis" From 7377f1627b388605957cd09baa4b0b7059fa2077 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 06:44:01 -0500 Subject: [PATCH 2431/3335] Update alpine-nextcloud.sh Nextcloud 28.0 requires sodium and bz2 --- ct/alpine-nextcloud.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index e950f101..92e2d98c 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -74,6 +74,12 @@ function update_script() { case $CHOICE in 1) apk update && apk upgrade + if ! apk -e info php82-sodium >/dev/null 2>&1; then + apk add -q php82-sodium + fi + if ! apk -e info php82-bz2 >/dev/null 2>&1; then + apk add -q php82-bz2 + fi su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade' su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices' exit From e8c61ddea7beca012fa1b75c3ed783394801e090 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 11:25:00 -0500 Subject: [PATCH 2432/3335] Update netdata.sh code refactoring --- misc/netdata.sh | 97 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 72 insertions(+), 25 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 67c6646e..2e02d515 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -5,8 +5,9 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -clear -cat <<"EOF" +function header_info { + clear + cat <<"EOF" _ __ __ ____ __ / | / /__ / /_/ __ \____ _/ /_____ _ / |/ / _ \/ __/ / / / __ `/ __/ __ `/ @@ -14,35 +15,81 @@ cat <<"EOF" /_/ |_/\___/\__/_____/\__,_/\__/\__,_/ EOF +} + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +silent() { "$@" >/dev/null 2>&1; } +set -e +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} install() { -while true; do - read -p "This script will install NetData on Proxmox VE 8+. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done + while true; do + read -p "Are you sure you want to install NetData on Proxmox VE host. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done -wget -q https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo_2-2+debian12_all.deb -dpkg -i netdata-repo_2-2+debian12_all.deb -rm -rf netdata-repo_2-2+debian12_all.deb -apt-get update &>/dev/null -apt-get -y upgrade -apt-get install -y netdata -echo -e "\nInstalled NetData (http://$(hostname -I | awk '{print $1}'):19999)\n" + read -r -p "Verbose mode? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + STD="" + else + STD="silent" + fi + header_info + + msg_info "Setting up repository" + wget -q https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo_2-2+debian12_all.deb + $STD dpkg -i netdata-repo_2-2+debian12_all.deb + rm -rf netdata-repo_2-2+debian12_all.deb + msg_ok "Set up repository" + + msg_info "Installing Netdata" + $STD apt-get update + $STD apt-get install -y netdata + msg_ok "Installed Netdata\n" + msg_ok "Completed Successfully!\n" + echo -e "\n Netdata should be reachable at${BL} http://$(hostname -I | awk '{print $1}'):19999 ${CL}\n" } uninstall() { -systemctl stop netdata -apt-get remove --purge -y netdata netdata-repo -rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/apt/sources.list.d/netdata.list -rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg -systemctl daemon-reload -apt autoremove -y -userdel netdata - echo -e "\nRemoved NetData from Proxmox VE\n" + read -r -p "Verbose mode? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + STD="" + else + STD="silent" + fi + header_info + + msg_info "Uninstalling Netdata" + systemctl stop netdata + rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/netdata/go.d + rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg /etc/apt/sources.list.d/netdata.list + $STD apt-get remove --purge -y netdata netdata-repo + systemctl daemon-reload + $STD apt autoremove -y + $STD userdel netdata + msg_ok "Uninstalled Netdata\n" + msg_ok "Completed Successfully!\n" } if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then From db0abe293d1b7a815d0a0f63b6d6a5f4f6fabb56 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 11:26:26 -0500 Subject: [PATCH 2433/3335] Update install.func tweak --- misc/install.func | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index a15364c2..36b46eaf 100644 --- a/misc/install.func +++ b/misc/install.func @@ -18,7 +18,6 @@ color() { # This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" verb_ip6() { if [ "$VERBOSE" = "yes" ]; then - set -x STD="" else STD="silent"; fi silent() { "$@" >/dev/null 2>&1; } From 7cfb239d70ce9bf8950bd703405f0c095a89673f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 11:32:06 -0500 Subject: [PATCH 2434/3335] Update install.func revert tweak --- misc/install.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/install.func b/misc/install.func index 36b46eaf..a15364c2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -18,6 +18,7 @@ color() { # This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" verb_ip6() { if [ "$VERBOSE" = "yes" ]; then + set -x STD="" else STD="silent"; fi silent() { "$@" >/dev/null 2>&1; } From c2a3eb52caa871f3cc0a66c2a7f3065474bb3e69 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 20:54:09 -0500 Subject: [PATCH 2435/3335] Update hw-acceleration.sh - code refactoring - add an option to install intel-media-va-driver-non-free - add vainfo - add intel-gpu-tools --- misc/hw-acceleration.sh | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 0806bdfa..37ba817e 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -set -eEuo pipefail +set -e function header_info { clear cat <<"EOF" @@ -19,7 +19,7 @@ EOF } header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add HW Acceleration" --yesno "This Will Add HW Acceleration to an existing LXC Container. Proceed?" 10 68 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72 || exit NODE=$(hostname) PREV_MENU=() MSG_MAX_LENGTH=0 @@ -33,7 +33,7 @@ while read -r TAG ITEM; do ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET PREV_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$privileged_containers") -privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add Intel HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit header_info cat <>/etc/pve/lxc/${privileged_container}.conf lxc.cgroup2.devices.allow: c 226:0 rwm @@ -43,7 +43,27 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF -pct exec $privileged_container -- bash -c "apt-get -y install va-driver-all && apt-get -y install ocl-icd-libopencl1 && apt-get install -y intel-opencl-icd && chgrp video /dev/dri && chmod 755 /dev/dri && chmod 660 /dev/dri/* && adduser \$(id -u -n) video && adduser \$(id -u -n) render" +read -r -p "Do you need the intel-media-va-driver-non-free driver (Sources change)? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + header_info + pct exec ${privileged_container} -- bash -c "cat </etc/apt/sources.list + +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware + +deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware + +deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +EOF" + + pct exec ${privileged_container} -- bash -c "apt-get update && apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && adduser \$(id -u -n) video && adduser \$(id -u -n) render" +else + header_info + pct exec ${privileged_container} -- bash -c "apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && adduser \$(id -u -n) video && adduser \$(id -u -n) render" +fi +whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Added tools" "vainfo, execute command 'vainfo'\nintel-gpu-tools, execute command 'intel_gpu_top'" 8 58 header_info echo -e "Completed Successfully!\n" echo -e "Reboot container $privileged_container to apply the new settings\n" From d94dacc53b656efc8cfea05ae0c3eae48d2b7cd6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 22:13:31 -0500 Subject: [PATCH 2436/3335] Update hw-acceleration.sh - code refactoring - add non-verbose option --- misc/hw-acceleration.sh | 47 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 37ba817e..8c9d03dc 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -17,24 +17,55 @@ function header_info { EOF } + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +set -e header_info echo "Loading..." +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72 || exit NODE=$(hostname) PREV_MENU=() MSG_MAX_LENGTH=0 privileged_containers=$(pct list | awk 'NR>1 && system("grep -q \047unprivileged: 1\047 /etc/pve/lxc/" $1 ".conf")') + if [ -z "$privileged_containers" ]; then whiptail --msgbox "No Privileged Containers Found." 10 58 exit fi + while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET PREV_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$privileged_containers") + privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add Intel HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit header_info +read -r -p "Verbose mode? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + STD="" + else + STD="silent" + fi +header_info + cat <>/etc/pve/lxc/${privileged_container}.conf lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm @@ -43,9 +74,11 @@ lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF + read -r -p "Do you need the intel-media-va-driver-non-free driver (Sources change)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then header_info + msg_info "Installing Hardware Acceleration (non-free)" pct exec ${privileged_container} -- bash -c "cat </etc/apt/sources.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware @@ -58,12 +91,16 @@ deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware EOF" - pct exec ${privileged_container} -- bash -c "apt-get update && apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && adduser \$(id -u -n) video && adduser \$(id -u -n) render" + pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" + msg_ok "Installed Hardware Acceleration (non-free)" else header_info - pct exec ${privileged_container} -- bash -c "apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && adduser \$(id -u -n) video && adduser \$(id -u -n) render" + msg_info "Installing Hardware Acceleration" + pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" + msg_ok "Installed Hardware Acceleration" fi +sleep 1 whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Added tools" "vainfo, execute command 'vainfo'\nintel-gpu-tools, execute command 'intel_gpu_top'" 8 58 -header_info -echo -e "Completed Successfully!\n" -echo -e "Reboot container $privileged_container to apply the new settings\n" + +msg_ok "Completed Successfully!\n" +echo -e "Reboot container ${BL}$privileged_container${CL} to apply the new settings\n" From 16a37644bb5db06b3cbdd5c0f77609232ac9dcd7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Dec 2023 17:37:36 -0500 Subject: [PATCH 2437/3335] Update hw-acceleration.sh - Requires PVE Version 8.0 or higher --- misc/hw-acceleration.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 8c9d03dc..8772aba8 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -39,6 +39,14 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 8.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi + whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72 || exit NODE=$(hostname) PREV_MENU=() From 79a542cd5addb36665fdfc4ead51c10b9c8b6450 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Dec 2023 19:45:53 -0500 Subject: [PATCH 2438/3335] Update netdata.sh tweak --- misc/netdata.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 2e02d515..3c0cb81d 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -28,7 +28,7 @@ CM="${GN}✓${CL}" silent() { "$@" >/dev/null 2>&1; } set -e header_info - +echo "Loading..." function msg_info() { local msg="$1" echo -ne " ${HOLD} ${YW}${msg}..." @@ -40,6 +40,7 @@ function msg_ok() { } install() { + header_info while true; do read -p "Are you sure you want to install NetData on Proxmox VE host. Proceed(y/n)?" yn case $yn in @@ -48,7 +49,7 @@ install() { *) echo "Please answer yes or no." ;; esac done - + header_info read -r -p "Verbose mode? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then STD="" @@ -56,7 +57,7 @@ install() { STD="silent" fi header_info - + msg_info "Setting up repository" wget -q https://repo.netdata.cloud/repos/repoconfig/debian/bookworm/netdata-repo_2-2+debian12_all.deb $STD dpkg -i netdata-repo_2-2+debian12_all.deb @@ -66,12 +67,13 @@ install() { msg_info "Installing Netdata" $STD apt-get update $STD apt-get install -y netdata - msg_ok "Installed Netdata\n" + msg_ok "Installed Netdata" msg_ok "Completed Successfully!\n" echo -e "\n Netdata should be reachable at${BL} http://$(hostname -I | awk '{print $1}'):19999 ${CL}\n" } uninstall() { + header_info read -r -p "Verbose mode? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then STD="" @@ -79,8 +81,8 @@ uninstall() { STD="silent" fi header_info - - msg_info "Uninstalling Netdata" + + msg_info "Uninstalling Netdata" systemctl stop netdata rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/netdata/go.d rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg /etc/apt/sources.list.d/netdata.list @@ -88,7 +90,7 @@ uninstall() { systemctl daemon-reload $STD apt autoremove -y $STD userdel netdata - msg_ok "Uninstalled Netdata\n" + msg_ok "Uninstalled Netdata" msg_ok "Completed Successfully!\n" } From 6f0788f220436e67ec334874d267f09d5d8ddc8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Dec 2023 19:51:33 -0500 Subject: [PATCH 2439/3335] Update add-tailscale-lxc.sh tweak --- misc/add-tailscale-lxc.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 301c4a7e..70d77945 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -6,6 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { +clear cat <<"EOF" ______ _ __ __ /_ __/___ _(_) /_____________ _/ /__ @@ -15,8 +16,8 @@ cat <<"EOF" EOF } -clear header_info +set-e while true; do read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn case $yn in @@ -25,23 +26,7 @@ while true; do *) echo "Please answer yes or no." ;; esac done - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -shopt -s expand_aliases -alias die='EXIT=$? LINE=$LINENO error_exit' -trap die ERR - -function error_exit() { - trap - ERR - local reason="Unknown failure occured." - local msg="${1:-$reason}" - local flag="\e[1;31m‼ ERROR\e[0m $EXIT@$LINE" - echo -e "$flag $msg" 1>&2 - exit $EXIT -} +header_info function msg() { local TEXT="$1" echo -e "$TEXT" From 3964789ca383023a3eb11a2bf86527942cef6bd9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Dec 2023 04:54:55 -0500 Subject: [PATCH 2440/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 5656561d..01805961 100644 --- a/misc/build.func +++ b/misc/build.func @@ -66,7 +66,7 @@ check_root() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (Debian 11), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 fi if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" From 6ba8c5e06cf8a94305d4982581c26682a5cf7815 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Dec 2023 06:44:38 -0500 Subject: [PATCH 2441/3335] Update add-tailscale-lxc.sh tweak --- misc/add-tailscale-lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 70d77945..e0f666af 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -17,7 +17,7 @@ cat <<"EOF" EOF } header_info -set-e +set -e while true; do read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn case $yn in From 325288f099ec251b9c5c3c59337d59a99fdb70dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Dec 2023 09:24:52 -0500 Subject: [PATCH 2442/3335] Update add-tailscale-lxc.sh tweak --- misc/add-tailscale-lxc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index e0f666af..68062908 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -8,7 +8,7 @@ function header_info { clear cat <<"EOF" - ______ _ __ __ + ______ _ __ __ /_ __/___ _(_) /_____________ _/ /__ / / / __ `/ / / ___/ ___/ __ `/ / _ \ / / / /_/ / / (__ ) /__/ /_/ / / __/ @@ -27,6 +27,7 @@ while true; do esac done header_info +echo "Loading..." function msg() { local TEXT="$1" echo -e "$TEXT" @@ -56,7 +57,7 @@ cat <>$CTID_CONFIG_PATH lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF - +header_info msg "Installing Tailscale..." lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" &>/dev/null || exit msg "Installed Tailscale" From 36fffde5022549fce80410caa09ef92c420aa8d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 23 Dec 2023 18:42:34 -0500 Subject: [PATCH 2443/3335] Update runtipi.sh add update path --- ct/runtipi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/runtipi.sh b/ct/runtipi.sh index e4eeaba4..5ff66901 100644 --- a/ct/runtipi.sh +++ b/ct/runtipi.sh @@ -53,7 +53,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/runtipi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +cd /opt/runtipi && ./runtipi-cli update latest exit } From 5bf822849e648c7c577f695c8c300725bc1cfd76 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Dec 2023 11:19:05 -0500 Subject: [PATCH 2444/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 5443d59e..0366b11c 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -67,7 +67,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1 | grep -v '^N:'" ;; esac } From b337babee90b982d2dac14810fb8e8140cc21219 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Dec 2023 15:52:59 -0500 Subject: [PATCH 2445/3335] Update alpine-nextcloud.sh Increase RAM --- ct/alpine-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 92e2d98c..c8e73e8f 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="Alpine-Nextcloud" var_disk="2" var_cpu="2" -var_ram="512" +var_ram="1024" var_os="alpine" var_version="3.18" variables From 1de4df71621bfe6724981b36f6010bf2734d7d3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Dec 2023 18:30:12 -0500 Subject: [PATCH 2446/3335] Update uptimekuma-install.sh node 20.x --- install/uptimekuma-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index 47f9ca24..f2a9fef4 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From bbc36a9cbabe1016dc7c319ca990c3100b39a6e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Dec 2023 18:54:57 -0500 Subject: [PATCH 2447/3335] Update zigbee2mqtt-install.sh node 20.x --- install/zigbee2mqtt-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index dc52ffa0..c6c167f4 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -28,7 +28,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 2b02f7d49d48aeb725d8876b7a6faa8ace7d4053 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Dec 2023 19:03:35 -0500 Subject: [PATCH 2448/3335] update to node 20.x --- ct/cronicle.sh | 2 +- install/changedetection-install.sh | 2 +- install/homepage-install.sh | 2 +- install/jellyseerr-install.sh | 2 +- install/n8n-install.sh | 2 +- install/overseerr-install.sh | 2 +- install/scrypted-install.sh | 2 +- install/shinobi-install.sh | 2 +- install/wikijs-install.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 08d6a961..01c863f4 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -80,7 +80,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 91f6e681..ca9990b9 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -56,7 +56,7 @@ msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 457eb796..f26b896b 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 45e29472..4cb55f7d 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 6a250703..9c809a7e 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index 86a4defa..9aa1e207 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 081772fe..620d9e5a 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -68,7 +68,7 @@ msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 52d470b4..375b7f55 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index cc2697c4..d8d0f1ac 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 8c780535a126d0a07730c5d135d00c6e0da01ba7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Dec 2023 20:04:50 -0500 Subject: [PATCH 2449/3335] Update alpine-install.func change repositories to `latest-stable` --- misc/alpine-install.func | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 959d5443..39e76d8f 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -72,10 +72,9 @@ setting_up_container() { echo -e " 🖧 Check Network Settings" exit 1 fi - cat <>/etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/edge/main -https://dl-cdn.alpinelinux.org/alpine/edge/community -https://dl-cdn.alpinelinux.org/alpine/edge/testing + cat </etc/apk/repositories +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" From a9b44432c4ff5810582de9bc11c03e7c8e346d83 Mon Sep 17 00:00:00 2001 From: Jayden <5250189+lukyjay@users.noreply.github.com> Date: Fri, 29 Dec 2023 00:42:10 +0800 Subject: [PATCH 2450/3335] Update changedetection-install.sh V2 doesn't appear to work, so clone v1 instead. --- install/changedetection-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index ca9990b9..217523de 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -72,7 +72,7 @@ msg_ok "Installed Change Detection" msg_info "Installing Browserless & Playwright" mkdir /opt/browserless $STD python3 -m pip install playwright -$STD git clone https://github.com/browserless/chrome /opt/browserless +$STD git clone -b v1 https://github.com/browserless/chrome /opt/browserless $STD npm install --prefix /opt/browserless $STD npm run build --prefix /opt/browserless $STD npm prune production --prefix /opt/browserless From 6f3b33550ec289fd07ef4b54686a94e459fb6e07 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Dec 2023 09:46:07 -0500 Subject: [PATCH 2451/3335] Update build.func passwords cannot start with a hyphen --- misc/build.func | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/misc/build.func b/misc/build.func index 01805961..12a61b14 100644 --- a/misc/build.func +++ b/misc/build.func @@ -200,17 +200,22 @@ advanced_settings() { fi done - if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW="" + while true; do + if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z "$PW1" ]; then + PW1="Automatic Login" + PW="" + elif [[ $PW1 == -* ]]; then + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Invalid Password" "Passwords cannot start with a hyphen. Please try again." 8 59 + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + break + fi else - PW="-password $PW1" + exit-script fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - exit-script - fi + done if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if [ -z "$CT_ID" ]; then From 475edf432d0203717e9bbecbeceafd2885d95ce6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Dec 2023 16:27:58 -0500 Subject: [PATCH 2452/3335] Update build.func revert --- misc/build.func | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/misc/build.func b/misc/build.func index 12a61b14..01805961 100644 --- a/misc/build.func +++ b/misc/build.func @@ -200,22 +200,17 @@ advanced_settings() { fi done - while true; do - if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z "$PW1" ]; then - PW1="Automatic Login" - PW="" - elif [[ $PW1 == -* ]]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Invalid Password" "Passwords cannot start with a hyphen. Please try again." 8 59 - else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - break - fi + if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW="" else - exit-script + PW="-password $PW1" fi - done + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + else + exit-script + fi if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if [ -z "$CT_ID" ]; then From 7beb2105ebeace2f298fb7d06afb28b4cf0c3f53 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Dec 2023 17:21:00 -0500 Subject: [PATCH 2453/3335] Update scrypted-install.sh revert back to node 18.x --- install/scrypted-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 620d9e5a..081772fe 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -68,7 +68,7 @@ msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 77cd36e094401fc6e2f0e5552fd5956a373fcf29 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Dec 2023 17:55:12 -0500 Subject: [PATCH 2454/3335] Update linkwarden.sh make default unprivileged --- ct/linkwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 0a10b1d9..86130c31 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From 109b0893c4f904195e93a89343b59448ab237bb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Dec 2023 07:11:02 -0500 Subject: [PATCH 2455/3335] Update scrypted-install.sh add npm (node 18.x stopped utilizing npm by default) --- install/scrypted-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 081772fe..a9963144 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -71,10 +71,11 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" -msg_info "Installing Node.js" +msg_info "Installing Node.js/npm" $STD apt-get update $STD apt-get install -y nodejs -msg_ok "Installed Node.js" +$STD apt-get install -y npm +msg_ok "Installed Node.js/npm" msg_info "Updating Python3" $STD apt-get install -y \ From f442c1b328cfeb4376150a5e40b3fc5451cf867d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Dec 2023 07:59:11 -0500 Subject: [PATCH 2456/3335] Update update-lxcs.sh - postfix fix fixes https://github.com/tteck/Proxmox/issues/2270 --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 0366b11c..c03f4c1a 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -67,7 +67,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1 | grep -v '^N:'" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1" ;; esac } From 6f8302dc3be8433c76e62ba70aefb525a915d867 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 31 Dec 2023 17:44:52 -0500 Subject: [PATCH 2457/3335] Update debian-vm.sh update url --- vm/debian-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index e74afdc1..63f00be2 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -370,7 +370,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image" -URL=https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-nocloud-amd64-20231013-1532.qcow2 +URL=https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-nocloud-amd64-20231228-1609.qcow2 sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL From 497d629fdc22192f7563a6dbc90e1a56fe524531 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 11:08:24 -0500 Subject: [PATCH 2458/3335] Update zigbee2mqtt.sh (node 18.x has stopped utilizing npm by default) - check if the installed version of Node.js is 18.x and, if so, ensures that npm is also installed. - fixes https://github.com/tteck/Proxmox/issues/2281 --- ct/zigbee2mqtt.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 9f679fe6..abb11a3c 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -57,6 +57,13 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi cd /opt/zigbee2mqtt stop_zigbee2mqtt() { From 0dd9401ed7dd8967d44805b18a57f874479f0514 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 11:35:26 -0500 Subject: [PATCH 2459/3335] Create gotify-install.sh --- install/gotify-install.sh | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 install/gotify-install.sh diff --git a/install/gotify-install.sh b/install/gotify-install.sh new file mode 100644 index 00000000..1b0a3efb --- /dev/null +++ b/install/gotify-install.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Gotify" +RELEASE=$(curl -s https://api.github.com/repos/gotify/server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt/gotify +wget -q https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-amd64.zip +unzip gotify-linux-amd64.zip +rm -rf gotify-linux-amd64.zip +chmod +x gotify-linux-amd64 + +cat </etc/systemd/system/gotify.service +[Unit] +Description=Gotify +Requires=network.target +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/gotify +ExecStart=/opt/gotify/./gotify-linux-amd64 +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now gotify +msg_ok "Installed Gotify" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 96b0a6d172a6fe05ca2aef156a38e37057041732 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 11:37:43 -0500 Subject: [PATCH 2460/3335] Create gotify.sh --- ct/gotify.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/gotify.sh diff --git a/ct/gotify.sh b/ct/gotify.sh new file mode 100644 index 00000000..ccec0eb3 --- /dev/null +++ b/ct/gotify.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2023 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ _ ____ + / ____/___ / /_(_) __/_ __ + / / __/ __ \/ __/ / /_/ / / / +/ /_/ / /_/ / /_/ / __/ /_/ / +\____/\____/\__/_/_/ \__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Gotify" +var_disk="2" +var_cpu="1" +var_ram="512" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/gotify ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP} ${CL} \n" From 0d288a2e66c185ae6c17e9ae556562676325e59e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 11:42:03 -0500 Subject: [PATCH 2461/3335] Update gotify-install.sh create directory --- install/gotify-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/gotify-install.sh b/install/gotify-install.sh index 1b0a3efb..89f7e82e 100644 --- a/install/gotify-install.sh +++ b/install/gotify-install.sh @@ -21,6 +21,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Gotify" RELEASE=$(curl -s https://api.github.com/repos/gotify/server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +mkdir -p /opt/gotify cd /opt/gotify wget -q https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-amd64.zip unzip gotify-linux-amd64.zip From 4eab2fed423ea8de98e4398b04f0200b7665d2e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 11:49:31 -0500 Subject: [PATCH 2462/3335] Update gotify-install.sh tweak --- install/gotify-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/gotify-install.sh b/install/gotify-install.sh index 89f7e82e..dfdd110b 100644 --- a/install/gotify-install.sh +++ b/install/gotify-install.sh @@ -24,7 +24,7 @@ RELEASE=$(curl -s https://api.github.com/repos/gotify/server/releases/latest | g mkdir -p /opt/gotify cd /opt/gotify wget -q https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-amd64.zip -unzip gotify-linux-amd64.zip +$STD unzip gotify-linux-amd64.zip rm -rf gotify-linux-amd64.zip chmod +x gotify-linux-amd64 From 3cfb46c580c315d45b6feeede7ccb1457953fefa Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 12:10:17 -0500 Subject: [PATCH 2463/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc07fadf..4f740213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. +## 2024-01-01 + +### Changed + +- **Gotify LXC** + - NEW Script + ## 2023-12-19 ### Changed From 30c53d695874280f10efa2edb275b0a052ab10f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 12:13:05 -0500 Subject: [PATCH 2464/3335] update year to 2024 --- ct/adguard.sh | 2 +- ct/agentdvr.sh | 2 +- ct/alpine-docker.sh | 2 +- ct/alpine-grafana.sh | 2 +- ct/alpine-nextcloud.sh | 2 +- ct/alpine-vaultwarden.sh | 2 +- ct/alpine-zigbee2mqtt.sh | 2 +- ct/alpine.sh | 2 +- ct/audiobookshelf.sh | 2 +- ct/autobrr.sh | 2 +- ct/bazarr.sh | 2 +- ct/blocky.sh | 2 +- ct/casaos.sh | 2 +- ct/changedetection.sh | 2 +- ct/channels.sh | 2 +- ct/cloudflared.sh | 2 +- ct/create_lxc.sh | 2 +- ct/cronicle.sh | 2 +- ct/daemonsync.sh | 2 +- ct/dashy.sh | 2 +- ct/debian.sh | 2 +- ct/deconz.sh | 2 +- ct/deluge.sh | 2 +- ct/docker.sh | 2 +- ct/dockge.sh | 2 +- ct/emby.sh | 2 +- ct/emqx.sh | 2 +- ct/esphome.sh | 2 +- ct/fhem.sh | 2 +- ct/go2rtc.sh | 2 +- ct/gotify.sh | 2 +- ct/grafana.sh | 2 +- ct/grocy.sh | 2 +- ct/heimdalldashboard.sh | 2 +- ct/homarr.sh | 2 +- ct/homeassistant-core.sh | 2 +- ct/homeassistant.sh | 2 +- ct/homebridge.sh | 2 +- ct/homepage.sh | 2 +- ct/homer.sh | 2 +- ct/hyperion.sh | 2 +- ct/influxdb.sh | 2 +- ct/iobroker.sh | 2 +- ct/jackett.sh | 2 +- ct/jellyfin.sh | 2 +- ct/jellyseerr.sh | 2 +- ct/k0s.sh | 2 +- ct/kavita.sh | 2 +- ct/keycloak.sh | 2 +- ct/lidarr.sh | 2 +- ct/linkwarden.sh | 2 +- ct/magicmirror.sh | 2 +- ct/mariadb.sh | 2 +- ct/meshcentral.sh | 2 +- ct/motioneye.sh | 2 +- ct/mqtt.sh | 2 +- ct/n8n.sh | 2 +- ct/navidrome.sh | 2 +- ct/nextcloudpi.sh | 2 +- ct/nginxproxymanager.sh | 2 +- ct/nocodb.sh | 2 +- ct/node-red.sh | 2 +- ct/octoprint.sh | 2 +- ct/omada.sh | 2 +- ct/ombi.sh | 2 +- ct/omv.sh | 2 +- ct/openhab.sh | 2 +- ct/openobserve.sh | 2 +- ct/overseerr.sh | 2 +- ct/owncast.sh | 2 +- ct/paperless-ngx.sh | 2 +- ct/photoprism.sh | 2 +- ct/pialert.sh | 2 +- ct/pihole.sh | 2 +- ct/pingvin.sh | 2 +- ct/plex.sh | 2 +- ct/podman-homeassistant.sh | 2 +- ct/podman.sh | 2 +- ct/postgresql.sh | 2 +- ct/prometheus.sh | 2 +- ct/prowlarr.sh | 2 +- ct/qbittorrent.sh | 2 +- ct/radarr.sh | 2 +- ct/rdtclient.sh | 2 +- ct/readarr.sh | 2 +- ct/rockylinux.sh | 2 +- ct/rtsptoweb.sh | 2 +- ct/runtipi.sh | 2 +- ct/sabnzbd.sh | 2 +- ct/scrypted.sh | 2 +- ct/shinobi.sh | 2 +- ct/sonarr.sh | 2 +- ct/syncthing.sh | 2 +- ct/tasmoadmin.sh | 2 +- ct/tautulli.sh | 2 +- ct/tdarr.sh | 2 +- ct/technitiumdns.sh | 2 +- ct/transmission.sh | 2 +- ct/trilium.sh | 2 +- ct/ubuntu.sh | 2 +- ct/umbrel.sh | 2 +- ct/unifi.sh | 2 +- ct/unmanic.sh | 2 +- ct/uptimekuma.sh | 2 +- ct/vaultwarden.sh | 2 +- ct/whisparr.sh | 2 +- ct/whoogle.sh | 2 +- ct/wikijs.sh | 2 +- ct/wireguard.sh | 2 +- ct/yunohost.sh | 2 +- ct/zigbee2mqtt.sh | 2 +- ct/zoraxy.sh | 2 +- ct/zwave-js-ui.sh | 2 +- install/adguard-install.sh | 2 +- install/agentdvr-install.sh | 2 +- install/alpine-docker-install.sh | 2 +- install/alpine-grafana-install.sh | 2 +- install/alpine-install.sh | 2 +- install/alpine-nextcloud-install.sh | 2 +- install/alpine-vaultwarden-install.sh | 2 +- install/alpine-zigbee2mqtt-install.sh | 2 +- install/audiobookshelf-install.sh | 2 +- install/autobrr-install.sh | 2 +- install/bazarr-install.sh | 2 +- install/blocky-install.sh | 2 +- install/casaos-install.sh | 2 +- install/changedetection-install.sh | 2 +- install/channels-install.sh | 2 +- install/cloudflared-install.sh | 2 +- install/cronicle-install.sh | 2 +- install/daemonsync-install.sh | 2 +- install/dashy-install.sh | 2 +- install/debian-install.sh | 2 +- install/deconz-install.sh | 2 +- install/deluge-install.sh | 2 +- install/docker-install.sh | 2 +- install/dockge-install.sh | 2 +- install/emby-install.sh | 2 +- install/emqx-install.sh | 2 +- install/esphome-install.sh | 2 +- install/fhem-install.sh | 2 +- install/go2rtc-install.sh | 2 +- install/grafana-install.sh | 2 +- install/grocy-install.sh | 2 +- install/heimdalldashboard-install.sh | 2 +- install/homarr-install.sh | 2 +- install/homeassistant-core-install.sh | 2 +- install/homeassistant-install.sh | 2 +- install/homebridge-install.sh | 2 +- install/homepage-install.sh | 2 +- install/homer-install.sh | 2 +- install/hyperion-install.sh | 2 +- install/influxdb-install.sh | 2 +- install/iobroker-install.sh | 2 +- install/jackett-install.sh | 2 +- install/jellyfin-install.sh | 2 +- install/jellyseerr-install.sh | 2 +- install/k0s-install.sh | 2 +- install/kavita-install.sh | 2 +- install/keycloak-install.sh | 2 +- install/lidarr-install.sh | 2 +- install/linkwarden-install.sh | 2 +- install/magicmirror-install.sh | 2 +- install/mariadb-install.sh | 2 +- install/meshcentral-install.sh | 2 +- install/motioneye-install.sh | 2 +- install/mqtt-install.sh | 2 +- install/n8n-install.sh | 2 +- install/navidrome-install.sh | 2 +- install/nextcloudpi-install.sh | 2 +- install/nginxproxymanager-install.sh | 2 +- install/nocodb-install.sh | 2 +- install/node-red-install.sh | 2 +- install/octoprint-install.sh | 2 +- install/omada-install.sh | 2 +- install/ombi-install.sh | 2 +- install/omv-install.sh | 2 +- install/openhab-install.sh | 2 +- install/openobserve-install.sh | 2 +- install/overseerr-install.sh | 2 +- install/owncast-install.sh | 2 +- install/paperless-ngx-install.sh | 2 +- install/photoprism-install.sh | 2 +- install/pialert-install.sh | 2 +- install/pihole-install.sh | 2 +- install/pingvin-install.sh | 2 +- install/plex-install.sh | 2 +- install/podman-homeassistant-install.sh | 2 +- install/podman-install.sh | 2 +- install/postgresql-install.sh | 2 +- install/prometheus-install.sh | 2 +- install/prowlarr-install.sh | 2 +- install/qbittorrent-install.sh | 2 +- install/radarr-install.sh | 2 +- install/rdtclient-install.sh | 2 +- install/readarr-install.sh | 2 +- install/rtsptoweb-install.sh | 2 +- install/runtipi-install.sh | 2 +- install/sabnzbd-install.sh | 2 +- install/scrypted-install.sh | 2 +- install/shinobi-install.sh | 2 +- install/sonarr-install.sh | 2 +- install/syncthing-install.sh | 2 +- install/tasmoadmin-install.sh | 2 +- install/tautulli-install.sh | 2 +- install/tdarr-install.sh | 2 +- install/technitiumdns-install.sh | 2 +- install/transmission-install.sh | 2 +- install/trilium-install.sh | 2 +- install/ubuntu-install.sh | 2 +- install/umbrel-install.sh | 2 +- install/unifi-install.sh | 2 +- install/unmanic-install.sh | 2 +- install/uptimekuma-install.sh | 2 +- install/vaultwarden-install.sh | 2 +- install/whisparr-install.sh | 2 +- install/whoogle-install.sh | 2 +- install/wikijs-install.sh | 2 +- install/wireguard-install.sh | 2 +- install/yunohost-install.sh | 2 +- install/zigbee2mqtt-install.sh | 2 +- install/zoraxy-install.sh | 2 +- install/zwave-js-ui-install.sh | 2 +- misc/add-tailscale-lxc.sh | 2 +- misc/all-templates.sh | 2 +- misc/clean-lxcs.sh | 2 +- misc/clean.sh | 2 +- misc/code-server.sh | 2 +- misc/container-restore-from-backup.sh | 2 +- ...-assistant-container-copy-data-home-assistant-container.sh | 2 +- .../home-assistant-container-copy-data-home-assistant-core.sh | 2 +- ...ome-assistant-container-copy-data-podman-home-assistant.sh | 2 +- .../home-assistant-core-copy-data-home-assistant-container.sh | 2 +- .../home-assistant-core-copy-data-home-assistant-core.sh | 2 +- misc/copy-data/plex-copy-data-plex.sh | 2 +- ...odman-home-assistant-copy-data-home-assistant-container.sh | 2 +- misc/copy-data/z2m-copy-data-z2m.sh | 2 +- misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh | 2 +- misc/core-restore-from-backup.sh | 2 +- misc/cron-update-lxcs.sh | 2 +- misc/crowdsec.sh | 2 +- misc/edge-kernel.sh | 2 +- misc/filebrowser.sh | 2 +- misc/frigate-support.sh | 2 +- misc/host-backup.sh | 2 +- misc/hw-acceleration.sh | 2 +- misc/kernel-clean.sh | 2 +- misc/microcode.sh | 2 +- misc/monitor-all.sh | 2 +- misc/netdata.sh | 2 +- misc/olivetin.sh | 2 +- misc/pbs3-upgrade.sh | 2 +- misc/post-pbs-install.sh | 2 +- misc/post-pve-install.sh | 2 +- misc/pve8-upgrade.sh | 2 +- misc/pyenv.sh | 4 ++-- misc/scaling-governor.sh | 2 +- misc/update-lxcs-cron.sh | 2 +- misc/update-lxcs.sh | 2 +- misc/usb-passthrough.sh | 2 +- misc/webmin.sh | 2 +- turnkey/turnkey.sh | 2 +- vm/debian-vm.sh | 2 +- vm/haos-vm.sh | 2 +- vm/mikrotik-routeros.sh | 2 +- vm/nextcloud-vm.sh | 2 +- vm/openwrt.sh | 2 +- vm/owncloud-vm.sh | 2 +- vm/pimox-haos-vm.sh | 2 +- vm/ubuntu-vm.sh | 2 +- 270 files changed, 271 insertions(+), 271 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index 807800c3..5c15fca1 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index 25b17e77..caab7c04 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 2a0c46eb..c79f03d1 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index f891e48d..e99bef4e 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index c8e73e8f..bee4bf5f 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 6add4976..359f90c0 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 1a0f92b4..d8941417 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/alpine.sh b/ct/alpine.sh index f134cac0..8da732a5 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 4df74961..78b04add 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 8365bc1a..4fe249e5 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/bazarr.sh b/ct/bazarr.sh index be9cc53a..687445ae 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/blocky.sh b/ct/blocky.sh index e90b66fb..1d6d9858 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/casaos.sh b/ct/casaos.sh index ba4a5aed..3b90d107 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/changedetection.sh b/ct/changedetection.sh index c625e67c..d12ead96 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/channels.sh b/ct/channels.sh index 5a192475..7f05f7ec 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index 59634450..19429bc3 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 1cd31ba0..34b78f09 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 01c863f4..278be46a 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index ba536268..ce3c885a 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/dashy.sh b/ct/dashy.sh index 64016d38..6155bd77 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/debian.sh b/ct/debian.sh index f684369d..edc59f1b 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/deconz.sh b/ct/deconz.sh index 2c59fa20..93bfae2d 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/deluge.sh b/ct/deluge.sh index 35d7eb16..75806917 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/docker.sh b/ct/docker.sh index 81a3a1dc..368d3518 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/dockge.sh b/ct/dockge.sh index fba046b6..39e7eac2 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/emby.sh b/ct/emby.sh index 1491a55c..954bc140 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/emqx.sh b/ct/emqx.sh index ccfbd747..20fd755e 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/esphome.sh b/ct/esphome.sh index a752b0d3..6262cd67 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/fhem.sh b/ct/fhem.sh index 7f9c8ecf..0b4812b7 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 5fd59314..7ad54ab7 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/gotify.sh b/ct/gotify.sh index ccec0eb3..99cbfbee 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/grafana.sh b/ct/grafana.sh index 9b61620b..f3747d05 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/grocy.sh b/ct/grocy.sh index 020971cb..43a123e0 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 8dd31293..c8106cbe 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/homarr.sh b/ct/homarr.sh index 3e247bb2..9f0353c2 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index f3929b14..ea3ea3f1 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 2056f0d6..5b6a858e 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 1c10dd00..28a12a7b 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/homepage.sh b/ct/homepage.sh index 988d0074..9195c0a6 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/homer.sh b/ct/homer.sh index 7d0c8a3a..59670953 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/hyperion.sh b/ct/hyperion.sh index fbd17687..309b8754 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 8f3216d6..dded776f 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/iobroker.sh b/ct/iobroker.sh index f2577806..84edc759 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/jackett.sh b/ct/jackett.sh index c005c552..68d967a2 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 5c8018fd..b56e271e 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index ef320216..68a93218 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/k0s.sh b/ct/k0s.sh index 0591912e..f39b8a77 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/kavita.sh b/ct/kavita.sh index 1b37feda..84afe3fb 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 5d9215b8..0a67f9d3 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 9f2bbb5d..3b800506 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 86130c31..95937e29 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 4fde189e..3b21a8b2 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/mariadb.sh b/ct/mariadb.sh index dcf59e0d..6051169c 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index ff75e93d..16c9a837 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 244738c8..306f6281 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 7c8fa42e..86b5c18d 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/n8n.sh b/ct/n8n.sh index fbf697a8..08abdb78 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 4062fd7f..28e10544 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 1b63695c..7e75d135 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 5a5dd685..016c391c 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/nocodb.sh b/ct/nocodb.sh index b25c2175..6f2c76ea 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/node-red.sh b/ct/node-red.sh index 029bbae8..764d558b 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/octoprint.sh b/ct/octoprint.sh index e0c38fa4..af27fabe 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/omada.sh b/ct/omada.sh index 3d41116a..4d433261 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/ombi.sh b/ct/ombi.sh index 156d7507..d367b165 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/omv.sh b/ct/omv.sh index 063bc49b..8ca264c3 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/openhab.sh b/ct/openhab.sh index 168785b8..14e9bbf4 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/openobserve.sh b/ct/openobserve.sh index d3300770..86828d9f 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 8f3ce0a1..392be917 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/owncast.sh b/ct/owncast.sh index 4049f043..3bf376bf 100644 --- a/ct/owncast.sh +++ b/ct/owncast.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 98c0c556..9b0cfe3f 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 2eefb474..5e8d754b 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/pialert.sh b/ct/pialert.sh index 967b5043..6766107f 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/pihole.sh b/ct/pihole.sh index 9417013d..2d5e8f2f 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/pingvin.sh b/ct/pingvin.sh index cba10c06..c3943725 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/plex.sh b/ct/plex.sh index 77cf02a7..12ab74f4 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index a7a6e7a6..d9cb8573 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/podman.sh b/ct/podman.sh index d5cf7bf6..820b20c3 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/postgresql.sh b/ct/postgresql.sh index b3b9106e..47bf54d1 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/prometheus.sh b/ct/prometheus.sh index c51fb4d3..570eb1bf 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 09c3bdd5..655a73cf 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 40cfa24d..9f0a07f6 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/radarr.sh b/ct/radarr.sh index 8a1d5972..2dc8668b 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index e87c21f4..2df7fede 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/readarr.sh b/ct/readarr.sh index 1a1eb7c2..4a0dcd6a 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index 02a0a090..9e476b5c 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index e0208273..18642616 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/runtipi.sh b/ct/runtipi.sh index 5ff66901..a779a1df 100644 --- a/ct/runtipi.sh +++ b/ct/runtipi.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index be10fb72..427e53f7 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/scrypted.sh b/ct/scrypted.sh index e3c15644..8ffec8b5 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/shinobi.sh b/ct/shinobi.sh index c5ce6ae3..c5488d2a 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/sonarr.sh b/ct/sonarr.sh index dbfb22ea..89409d81 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 0cfce841..9beff817 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh index 7287ed1a..9aa75124 100644 --- a/ct/tasmoadmin.sh +++ b/ct/tasmoadmin.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/tautulli.sh b/ct/tautulli.sh index 5baf342d..3445d79e 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 5210d6c1..89f68c3e 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index fa139dc1..e091db9d 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/transmission.sh b/ct/transmission.sh index 25c07b54..435b4994 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/trilium.sh b/ct/trilium.sh index 7216f249..e0d2d75b 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 1804b96b..c61b90bd 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/umbrel.sh b/ct/umbrel.sh index d5992e0e..40ce605b 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/unifi.sh b/ct/unifi.sh index 188b5f56..f70327b2 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/unmanic.sh b/ct/unmanic.sh index 76d61497..05eb7298 100644 --- a/ct/unmanic.sh +++ b/ct/unmanic.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 108a004a..f4ad1b2b 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 3600f984..f204a484 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/whisparr.sh b/ct/whisparr.sh index df39c2f9..3679741d 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/whoogle.sh b/ct/whoogle.sh index d4cb472a..8334f650 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 44027900..0dfe3b4a 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 828697d9..31a554d6 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/yunohost.sh b/ct/yunohost.sh index b024d239..387a7dad 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index abb11a3c..a4ccac5c 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 354a4434..9633a968 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index de994a7b..e0a3039c 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/adguard-install.sh b/install/adguard-install.sh index 4b03cb71..263aa52b 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh index 7dcd0d0a..8eeaf33d 100644 --- a/install/agentdvr-install.sh +++ b/install/agentdvr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index ac9a0f7e..5fa141b2 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/alpine-grafana-install.sh b/install/alpine-grafana-install.sh index 09dc91ef..7d7e95ad 100644 --- a/install/alpine-grafana-install.sh +++ b/install/alpine-grafana-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/alpine-install.sh b/install/alpine-install.sh index 72830ebb..b904c7a4 100644 --- a/install/alpine-install.sh +++ b/install/alpine-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 64c233b3..9b320546 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index c66c36b3..94956b70 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 322e6e5f..2c805f23 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index b0abeca6..1b26fd10 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh index 5a50883d..c8883ddd 100644 --- a/install/autobrr-install.sh +++ b/install/autobrr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index a8f07da9..812ecefe 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/blocky-install.sh b/install/blocky-install.sh index f7e23b98..86523055 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/casaos-install.sh b/install/casaos-install.sh index 05473132..50027c6c 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 217523de..e670943b 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/channels-install.sh b/install/channels-install.sh index dbb4fb4f..5836812c 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index 3d41a7b9..dc792cee 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index a38bcf06..0763bdd8 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh index 8118f42b..483e27aa 100644 --- a/install/daemonsync-install.sh +++ b/install/daemonsync-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/dashy-install.sh b/install/dashy-install.sh index f4819a83..2962161d 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/debian-install.sh b/install/debian-install.sh index af84fbb8..18fd5940 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 5611b7cc..80d938b3 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/deluge-install.sh b/install/deluge-install.sh index fb6c50e1..eceb49ce 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/docker-install.sh b/install/docker-install.sh index 6425d48e..6744aac8 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/dockge-install.sh b/install/dockge-install.sh index 8509c2ad..d6985afd 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/emby-install.sh b/install/emby-install.sh index e0337e77..9027437a 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/emqx-install.sh b/install/emqx-install.sh index a1d69324..16475d53 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 5b5a8d1f..7c603425 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/fhem-install.sh b/install/fhem-install.sh index e3ce0f67..ea98bf4d 100644 --- a/install/fhem-install.sh +++ b/install/fhem-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh index a5092fd8..e50c6d76 100644 --- a/install/go2rtc-install.sh +++ b/install/go2rtc-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 6f5a3efc..81083b84 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 33f2e31d..526eeaff 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 5fd52cff..afe39d6f 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 94a4d760..0a7db8fa 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index cbb10ed5..3149cb0e 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 958789e4..729fadeb 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 185a970e..b18510ed 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/homepage-install.sh b/install/homepage-install.sh index f26b896b..7e7dc650 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/homer-install.sh b/install/homer-install.sh index f4a8d3eb..82071cf4 100644 --- a/install/homer-install.sh +++ b/install/homer-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index 17971c57..04622a1d 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index b1683824..71e4e0f5 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index ae553a46..8e5feb31 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/jackett-install.sh b/install/jackett-install.sh index e54858d5..bb928687 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index be373996..a8a61d20 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 4cb55f7d..7a0f1a2c 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/k0s-install.sh b/install/k0s-install.sh index 323bbebe..14ec64cb 100644 --- a/install/k0s-install.sh +++ b/install/k0s-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/kavita-install.sh b/install/kavita-install.sh index b3fe9267..17e208ae 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index e5081b8e..ea7d0f91 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh index e03c7680..846b4de0 100644 --- a/install/lidarr-install.sh +++ b/install/lidarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 585d76c7..6ad52ab0 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index e2f5a054..5bb2e3f5 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 19787d93..310b6c26 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 1cd0b903..13ac00db 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index 227cffd0..e3908f4a 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 04ea968a..860c70bb 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 9c809a7e..25cbce47 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index b5a003af..50f68d5b 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index 912e5ad6..9a53a287 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 37656877..fcf6ebc7 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index aaa3b55d..3040f638 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/node-red-install.sh b/install/node-red-install.sh index dc1f8759..6da4981f 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index 3121387c..fd093734 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/omada-install.sh b/install/omada-install.sh index 3bc337ab..ca97a7f3 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/ombi-install.sh b/install/ombi-install.sh index 99a0a554..c5e631e7 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/omv-install.sh b/install/omv-install.sh index 872e9c28..9ea46931 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/openhab-install.sh b/install/openhab-install.sh index 532a6506..d21657e8 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index 48a03e31..7a52415d 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index 9aa1e207..8d752044 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/owncast-install.sh b/install/owncast-install.sh index 8514ae8b..d03683e3 100644 --- a/install/owncast-install.sh +++ b/install/owncast-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index b52064bf..b572f2aa 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 75a03fee..2f80b6cc 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 5f4f7a09..195b16f4 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 881cb233..d6472459 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index b8d31fb2..e271f9e1 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/plex-install.sh b/install/plex-install.sh index 4aec89ce..ca8dca63 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index a0fb4f5e..c74e27cc 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/podman-install.sh b/install/podman-install.sh index 951da53b..78ae842f 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index f85ca562..393d694a 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index f2aad6fd..a04baa6f 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/prowlarr-install.sh b/install/prowlarr-install.sh index b999d9b5..7270f471 100644 --- a/install/prowlarr-install.sh +++ b/install/prowlarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh index 64c63001..3c5b6469 100644 --- a/install/qbittorrent-install.sh +++ b/install/qbittorrent-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/radarr-install.sh b/install/radarr-install.sh index f9e88aa5..4839b90a 100644 --- a/install/radarr-install.sh +++ b/install/radarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index cc48a014..a077cb51 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/readarr-install.sh b/install/readarr-install.sh index 43897970..9ba9bc21 100644 --- a/install/readarr-install.sh +++ b/install/readarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/rtsptoweb-install.sh b/install/rtsptoweb-install.sh index 583137be..a5b669d5 100644 --- a/install/rtsptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/runtipi-install.sh b/install/runtipi-install.sh index c9a2dce8..f39dc1f4 100644 --- a/install/runtipi-install.sh +++ b/install/runtipi-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 368633da..00bd1141 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index a9963144..1e547297 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 375b7f55..4b9a51ab 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 5a1780b0..f9114b20 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 43348999..3709513c 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/tasmoadmin-install.sh b/install/tasmoadmin-install.sh index 0b65b9ce..bc934e24 100644 --- a/install/tasmoadmin-install.sh +++ b/install/tasmoadmin-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index da91ab84..d31ea075 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 702d3203..9c74faaf 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index 01f5fcd8..bc9fade9 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/transmission-install.sh b/install/transmission-install.sh index 969e6aea..10d90352 100644 --- a/install/transmission-install.sh +++ b/install/transmission-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/trilium-install.sh b/install/trilium-install.sh index da811245..cf6a37f0 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 64e6f242..9aa8705c 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index db058225..7ad1d5af 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/unifi-install.sh b/install/unifi-install.sh index cadb6db4..56423f9d 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index be5d336c..6e9a6300 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index f2a9fef4..8c4e90ea 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index 65061b80..64f8a460 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh index 422ae576..66cb5010 100644 --- a/install/whisparr-install.sh +++ b/install/whisparr-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index e513288d..b1bdedbb 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index d8d0f1ac..3a4507a3 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index d74118d6..2b94a801 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index 80fd97c4..606b0e21 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index c6c167f4..7855e7e5 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/zoraxy-install.sh b/install/zoraxy-install.sh index 5e23e065..0938abc2 100644 --- a/install/zoraxy-install.sh +++ b/install/zoraxy-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index a9a05c3e..0b20538c 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 68062908..e5bcfaec 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/all-templates.sh b/misc/all-templates.sh index d376cbf7..ab430e7c 100644 --- a/misc/all-templates.sh +++ b/misc/all-templates.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/clean-lxcs.sh b/misc/clean-lxcs.sh index 99af44a9..17f4fe74 100644 --- a/misc/clean-lxcs.sh +++ b/misc/clean-lxcs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/clean.sh b/misc/clean.sh index 1e73f66d..4f692366 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/code-server.sh b/misc/code-server.sh index cc32de97..869fdad1 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh index efb169d1..c491e18a 100644 --- a/misc/container-restore-from-backup.sh +++ b/misc/container-restore-from-backup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh index 9da8f68a..7b5fe050 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh index 19a0975c..36af3259 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh index 01ac7b82..2423f896 100644 --- a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh +++ b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh index e2ae0eec..387450fc 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index 7603e8a1..c0cf2868 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/plex-copy-data-plex.sh b/misc/copy-data/plex-copy-data-plex.sh index 58ef49f0..dbf80f18 100644 --- a/misc/copy-data/plex-copy-data-plex.sh +++ b/misc/copy-data/plex-copy-data-plex.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh index 0d8a6542..ef65e9e6 100644 --- a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh +++ b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/z2m-copy-data-z2m.sh b/misc/copy-data/z2m-copy-data-z2m.sh index ee69da79..6e804de5 100644 --- a/misc/copy-data/z2m-copy-data-z2m.sh +++ b/misc/copy-data/z2m-copy-data-z2m.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh index c4375761..8d552982 100644 --- a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh +++ b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index 0f41adfc..885eda9c 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/cron-update-lxcs.sh b/misc/cron-update-lxcs.sh index 9fa9b549..97fb4e6c 100644 --- a/misc/cron-update-lxcs.sh +++ b/misc/cron-update-lxcs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index 712e0b19..12a20f04 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 876f5cab..fa24386d 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index 6a7325b4..f15d0537 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/frigate-support.sh b/misc/frigate-support.sh index 88e43ea1..8dbdc563 100644 --- a/misc/frigate-support.sh +++ b/misc/frigate-support.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/host-backup.sh b/misc/host-backup.sh index f2c231d8..31b67bfa 100644 --- a/misc/host-backup.sh +++ b/misc/host-backup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 8772aba8..24d2e2de 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 7918ff81..ca31cc2f 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/microcode.sh b/misc/microcode.sh index 91296a22..083e9c89 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index e7702268..79bf0df0 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/netdata.sh b/misc/netdata.sh index 3c0cb81d..3596f049 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/olivetin.sh b/misc/olivetin.sh index c8015572..f3909ad9 100644 --- a/misc/olivetin.sh +++ b/misc/olivetin.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/pbs3-upgrade.sh b/misc/pbs3-upgrade.sh index 942154df..4565811e 100644 --- a/misc/pbs3-upgrade.sh +++ b/misc/pbs3-upgrade.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index 9f53edc3..550626be 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 97def72d..18b86ca2 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index e2e86cb5..f4a79136 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/pyenv.sh b/misc/pyenv.sh index 675a0344..0a548e78 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE @@ -110,7 +110,7 @@ pip3 install --pre esphome &>/dev/null cat </srv/esphome/start.sh #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 556a3854..3523ab2c 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index 82184365..de5fded8 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index c03f4c1a..3c54ce3f 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/usb-passthrough.sh b/misc/usb-passthrough.sh index 851b3e06..25ceb3e6 100644 --- a/misc/usb-passthrough.sh +++ b/misc/usb-passthrough.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/misc/webmin.sh b/misc/webmin.sh index 881de91a..a7188b01 100644 --- a/misc/webmin.sh +++ b/misc/webmin.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index 795dfbcb..202143cf 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 63f00be2..e390073b 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 005e2ef9..325124c9 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 659f8385..5aba3c29 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index 303910aa..5e3fce87 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 96bca2be..cc920c5e 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # Jon Spriggs (jontheniceguy) # License: MIT diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 40c5c0cb..72ac7ad4 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 41e25281..1347fcf6 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index 4ff0af77..9e19c43d 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2023 tteck +# Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE From 9fda1994d711b00fa03956933f9bc1fc61acd153 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 12:39:57 -0500 Subject: [PATCH 2465/3335] Update iobroker-install.sh - add node.js v20.x - fixes https://github.com/tteck/Proxmox/issues/2282 --- install/iobroker-install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 8e5feb31..09a59a58 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -17,8 +17,21 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg msg_ok "Installed Dependencies" +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + msg_info "Installing ioBroker (Patience)" $STD bash <(curl -fsSL https://iobroker.net/install.sh) msg_ok "Installed ioBroker" From b7a9d517e74beabc4aa2b74deb6b65a59c7c20e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Jan 2024 15:02:21 -0500 Subject: [PATCH 2466/3335] Update node-red.sh (node 18.x has stopped utilizing npm by default) - check if the installed version of Node.js is 18.x and, if so, ensures that npm is also installed. - fixes https://github.com/tteck/Proxmox/issues/2283 --- ct/node-red.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ct/node-red.sh b/ct/node-red.sh index 764d558b..962ab584 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -58,6 +58,13 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + msg_info "Installing NPM" + apt-get install -y npm >/dev/null 2>&1 + msg_ok "Installed NPM" + fi + fi msg_info "Stopping ${APP}" systemctl stop nodered msg_ok "Stopped ${APP}" From 5b02f6639163222e4a727eee4dffcd2624eb171a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Jan 2024 00:23:26 -0500 Subject: [PATCH 2467/3335] Update build.func warn Proxmox VE 7 (EOL 2024-07) --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 01805961..ed04d262 100644 --- a/misc/build.func +++ b/misc/build.func @@ -66,7 +66,7 @@ check_root() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (Debian 11), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 fi if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" From c979faa719d027c24ded606cc0531dcd32712e9b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Jan 2024 00:30:28 -0500 Subject: [PATCH 2468/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index dacb876c..eb514c7f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Problems with a script. -description: Generate a report on an issue pertaining specifically to the script. For other inquires please share them in the Discussions section. Blank issues will be closed immediately. +description: Generate a report on an issue pertaining specifically to a script. For other inquires please share them in the Discussions section. Blank issues will be closed immediately. body: - type: markdown attributes: From d9f27eeff7edad244c3b926a0ce2ba9d58264941 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Jan 2024 13:01:35 -0500 Subject: [PATCH 2469/3335] Update node-red.sh - new packages for Node-RED themes - fixes https://github.com/tteck/Proxmox/issues/2287 --- ct/node-red.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/ct/node-red.sh b/ct/node-red.sh index 962ab584..065e5adf 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -81,19 +81,38 @@ exit fi if [ "$UPD" == "2" ]; then THEME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ + "aurora" "" OFF \ + "cobalt2" "" OFF \ "dark" "" OFF \ "dracula" "" OFF \ + "espresso-libre" "" OFF \ + "github-dark" "" OFF \ + "github-dark-default" "" OFF \ + "github-dark-dimmed" "" OFF \ "midnight-red" "" ON \ + "monoindustrial" "" OFF \ + "monokai" "" OFF \ + "monokai-dimmed" "" OFF \ + "noctis" "" OFF \ + "oceanic-next" "" OFF \ "oled" "" OFF \ + "one-dark-pro" "" OFF \ + "one-dark-pro-darker" "" OFF \ "solarized-dark" "" OFF \ "solarized-light" "" OFF \ + "tokyo-night" "" OFF \ + "tokyo-night-light" "" OFF \ + "tokyo-night-storm" "" OFF \ + "totallyinformation" "" OFF \ + "zenburn" "" OFF \ 3>&1 1>&2 2>&3) header_info msg_info "Installing ${THEME} Theme" cd /root/.node-red -sed -i 's|//theme: "",|theme: "",|g' /root/.node-red/settings.js -npm install @node-red-contrib-themes/${THEME} &>/dev/null +sed -i 's|// theme: ".*",|theme: "",|g' /root/.node-red/settings.js +npm install @node-red-contrib-themes/theme-collection &>/dev/null sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js +systemctl restart nodered msg_ok "Installed ${THEME} Theme" msg_info "Restarting ${APP}" From 91ab250a3de313548f45c229729a957a318e7da8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Jan 2024 13:03:15 -0500 Subject: [PATCH 2470/3335] Update node-red.sh tweak --- ct/node-red.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ct/node-red.sh b/ct/node-red.sh index 065e5adf..bdb8615e 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -114,10 +114,6 @@ npm install @node-red-contrib-themes/theme-collection &>/dev/null sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js systemctl restart nodered msg_ok "Installed ${THEME} Theme" - -msg_info "Restarting ${APP}" -systemctl restart nodered -msg_ok "Restarted ${APP}" exit fi } From dc556414f04fe1fae1f866eac0ef7dabe98d6b37 Mon Sep 17 00:00:00 2001 From: Ryan Winter Date: Tue, 2 Jan 2024 14:53:43 -0800 Subject: [PATCH 2471/3335] Update homeassistant.sh change Portainer port --- ct/homeassistant.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 5b6a858e..66dcafe2 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -136,4 +136,4 @@ msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8123${CL} Portainer should be reachable by going to the following URL. - ${BL}http://${IP}:9000${CL}\n" + ${BL}https://${IP}:9443${CL}\n" From 6e51ac0e69b7b4af72fa2c1b85ea70ebc4dfeb65 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 01:12:19 -0500 Subject: [PATCH 2472/3335] Update uptimekuma.sh (node 18.x has stopped utilizing npm by default) - check if the installed version of Node.js is 18.x and, if so, ensures that npm is also installed. --- ct/uptimekuma.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index f4ad1b2b..4961ee5d 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -54,6 +54,13 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/uptime-kuma ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Stopping ${APP}" sudo systemctl stop uptime-kuma &>/dev/null From ba6eea5346bd185b615c963f388412c23041b68c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 01:25:05 -0500 Subject: [PATCH 2473/3335] Update cronicle.sh check for npm --- ct/cronicle.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 278be46a..fd7ea840 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -59,12 +59,26 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio if [ "$UPD" == "1" ]; then header_info if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi msg_info "Updating ${APP}" /opt/cronicle/bin/control.sh upgrade &>/dev/null msg_ok "Updated ${APP}" exit fi if [ "$UPD" == "2" ]; then + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) IP=$(hostname -I | awk '{print $1}') msg_info "Installing Dependencies" From 913338813ee5e81b2674a7114015a17920b70181 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 01:30:09 -0500 Subject: [PATCH 2474/3335] Update magicmirror.sh check for npm --- ct/magicmirror.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 3b21a8b2..5a547619 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -54,6 +54,13 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/magicmirror ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi msg_info "Updating ${APP} LXC" cd /opt/magicmirror git pull &>/dev/null From ec7772f37580c27f6cab54d32ae6cac883fc15ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 01:31:06 -0500 Subject: [PATCH 2475/3335] Update n8n.sh check for npm --- ct/n8n.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ct/n8n.sh b/ct/n8n.sh index 08abdb78..39be816e 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -54,6 +54,13 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi msg_info "Updating ${APP} LXC" npm update -g n8n &>/dev/null msg_ok "Updated Successfully" From a82f235e3c52e8ec1291974b8d4d246fbb5a1b37 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 01:42:48 -0500 Subject: [PATCH 2476/3335] Update homepage.sh check for npm --- ct/homepage.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ct/homepage.sh b/ct/homepage.sh index 9195c0a6..25bc2c0b 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -53,6 +53,13 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Updating Homepage to v${RELEASE} (Patience)" systemctl stop homepage From 5ecdf143016f853542f5678cecddf61430de209a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 10:02:41 -0500 Subject: [PATCH 2477/3335] Update sonarr-install.sh add sqlite3 --- install/sonarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index f9114b20..f0b76304 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -19,6 +19,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y gnupg $STD apt-get install -y ca-certificates +$STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" read -r -p "Would you like to install v4 (experimental)? " prompt From f2c8792461f3ac1dc6c099228d5dd2b22c783a72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 12:08:10 -0500 Subject: [PATCH 2478/3335] Update sonarr-install.sh - major code refactoring - breaking changes https://github.com/tteck/Proxmox/discussions/1738#discussioncomment-8005107 --- install/sonarr-install.sh | 52 ++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index f0b76304..820b74f1 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -17,29 +17,41 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg -$STD apt-get install -y ca-certificates $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" -read -r -p "Would you like to install v4 (experimental)? " prompt -msg_info "Installing Sonarr" -wget -qO /etc/apt/trusted.gpg.d/sonarr-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2009837cbffd68f45bc180471f4f90de2a9b4bf8" -echo "deb https://apt.sonarr.tv/debian testing-main main" >/etc/apt/sources.list.d/sonarr.list -$STD apt-get update -DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - systemctl stop sonarr.service - wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux' - tar -xzf SonarrV4.tar.gz - cp -r Sonarr/* /usr/lib/sonarr/bin - rm -rf Sonarr SonarrV4.tar.gz - sed -i 's|ExecStart=/usr/bin/mono --debug /usr/lib/sonarr/bin/Sonarr.exe -nobrowser -data=/var/lib/sonarr|ExecStart=/usr/lib/sonarr/bin/Sonarr -nobrowser -data=/var/lib/sonarr|' /lib/systemd/system/sonarr.service - sed -i 's/\(User=\|Group=\).*/\1root/' /lib/systemd/system/sonarr.service - systemctl daemon-reload - systemctl start sonarr.service -fi -msg_ok "Installed Sonarr" +msg_info "Installing Sonarr v4" +$STD groupadd media +$STD adduser --system --no-create-home --ingroup media sonarr +mkdir -p /var/lib/sonarr/ +chown -R sonarr:media /var/lib/sonarr/ +chmod 775 /var/lib/sonarr/ +wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64' +tar -xzf SonarrV4.tar.gz +mv Sonarr /opt +rm -rf SonarrV4.tar.gz + +msg_ok "Installed Sonarr v4" + +msg_info "Creating Service" +cat </etc/systemd/system/sonarr.service +[Unit] +Description=Sonarr Daemon +After=syslog.target network.target +[Service] +User=sonarr +Group=media +UMask=0002 +Type=simple +ExecStart=/opt/Sonarr/Sonarr -nobrowser -data=/var/lib/sonarr/ +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now sonarr.service +msg_ok "Created Service" motd_ssh customize From a3ef98e1f8cc45f6b42cdebadd0553d79fdd7eaa Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 12:10:09 -0500 Subject: [PATCH 2479/3335] Update sonarr.sh - major code refactoring - breaking changes https://github.com/tteck/Proxmox/discussions/1738#discussioncomment-8005107 --- ct/sonarr.sh | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/ct/sonarr.sh b/ct/sonarr.sh index 89409d81..22af05ef 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -8,12 +8,12 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ + _____ / ___/____ ____ ____ __________ \__ \/ __ \/ __ \/ __ `/ ___/ ___/ - ___/ / /_/ / / / / /_/ / / / / -/____/\____/_/ /_/\__,_/_/ /_/ - + ___/ / /_/ / / / / /_/ / / / / +/____/\____/_/ /_/\__,_/_/ /_/ + EOF } header_info @@ -52,23 +52,16 @@ function default_settings() { function update_script() { header_info -if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -read -r -p "Are you updating Sonarr v4? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Updating $APP v4" - systemctl stop sonarr.service - wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux' - tar -xzf SonarrV4.tar.gz - cp -r Sonarr/* /usr/lib/sonarr/bin - rm -rf Sonarr SonarrV4.tar.gz - systemctl start sonarr.service - msg_ok "Updated $APP v4" - exit -fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +if [[ ! -d /opt/Sonarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP v4" +systemctl stop sonarr.service +wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64' +tar -xzf SonarrV4.tar.gz +rm -rf /opt/Sonarr +mv Sonarr /opt +rm -rf SonarrV4.tar.gz +systemctl start sonarr.service +msg_ok "Updated $APP v4" exit } From f9b9b560f1e20a7e4f15aec82f455c8a5a5ca83e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 12:16:57 -0500 Subject: [PATCH 2480/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f740213..800757f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ - 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. +## 2024-01-03 + +### Changed + +- **Sonarr LXC** + - Breaking Change + - Complete recode + - https://github.com/tteck/Proxmox/discussions/1738#discussioncomment-8005107 + ## 2024-01-01 ### Changed From 00f73c7370716629d111bc8a7148de6224dd5dcb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jan 2024 16:09:16 -0500 Subject: [PATCH 2481/3335] Update install.func tweak --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index a15364c2..e3527fb4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -113,7 +113,7 @@ network_check() { update_os() { msg_info "Updating Container OS" $STD apt-get update - $STD apt-get -y upgrade + $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade msg_ok "Updated Container OS" } From 7cbc112a4622b7ff55cc1f47e1853c857849aa2a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Jan 2024 12:08:47 -0500 Subject: [PATCH 2482/3335] Create commafeed-install.sh --- install/commafeed-install.sh | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 install/commafeed-install.sh diff --git a/install/commafeed-install.sh b/install/commafeed-install.sh new file mode 100644 index 00000000..3df462f0 --- /dev/null +++ b/install/commafeed-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Azul Zulu" +wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" +wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb +$STD dpkg -i zulu-repo_1.0.0-3_all.deb +$STD apt-get update +$STD apt-get -y install zulu17-jdk +msg_ok "Installed Azul Zulu" + +msg_info "Installing CommaFeed" +mkdir /opt/commafeed && cd /opt/commafeed +wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar +wget -q https://github.com/Athou/commafeed/releases/latest/download/config.yml.example -O config.yml +msg_ok "Installed CommaFeed" + +msg_info "Creating Service" +cat </etc/systemd/system/commafeed.service +[Unit] +Description=CommaFeed Service +After=network.target + +[Service] +ExecStart=/usr/bin/java -Djava.net.preferIPv4Stack=true -jar /opt/commafeed/commafeed.jar server /opt/commafeed/config.yml +WorkingDirectory=/opt/commafeed/ +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now commafeed.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf zulu-repo_1.0.0-3_all.deb +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 13457886fe4899a0883aff33255d36ffec075586 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Jan 2024 12:09:10 -0500 Subject: [PATCH 2483/3335] Create commafeed.sh --- ct/commafeed.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/commafeed.sh diff --git a/ct/commafeed.sh b/ct/commafeed.sh new file mode 100644 index 00000000..d4eba134 --- /dev/null +++ b/ct/commafeed.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ ______ __ + / ____/___ ____ ___ ____ ___ ____ _/ ____/__ ___ ____/ / + / / / __ \/ __ `__ \/ __ `__ \/ __ `/ /_ / _ \/ _ \/ __ / +/ /___/ /_/ / / / / / / / / / / / /_/ / __/ / __/ __/ /_/ / +\____/\____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ \___/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="CommaFeed" +var_disk="4" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/commafeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8082${CL} \n" From fe960d1e7d6d62654a3dea5e31181327f3ba8a3a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Jan 2024 12:29:45 -0500 Subject: [PATCH 2484/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 800757f4..51161db2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. +## 2024-01-04 + +### Changed + +- **Commafeed LXC** + - NEW Script + ## 2024-01-03 ### Changed From 781d9a0b2aa98c6d49253e56d269e81fa4b15983 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Jan 2024 12:30:00 -0500 Subject: [PATCH 2485/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51161db2..7d4f768d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Changed -- **Commafeed LXC** +- **CommaFeed LXC** - NEW Script ## 2024-01-03 From 72b9e514bcaef24cde7e9336e3b249effc8bb4e9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 12:56:21 -0500 Subject: [PATCH 2486/3335] Update CODE-AUDIT.md --- CODE-AUDIT.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index f1c40e9b..c8d4be26 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -1,11 +1,14 @@ -

Exploring the Scripts and Steps Involved in an Application LXC Installation

+
+ +
+

Exploring the Scripts and Steps Involved in an Application LXC Installation

-In the case of the AdGuard Home LXC, the process involves running multiple scripts for each application or service.
-Initially, the [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) script is executed to collect system parameters.
-Next, the [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func) script adds user settings and integrates all the collected information.
-Then, the [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh) script constructs the LXC container.
-Following that, the [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh) script is executed, which utilizes the functions exported from the [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func) script for installing the required applications.
-Finally, the process returns to the [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) script to display the completion message.
+1) [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh): This script collects system parameters. +2) [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func): Adds user settings and integrates collected information. +3) [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh): Constructs the LXC container. +4) [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh): Executes functions from [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func) to install required applications. +5) [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) (again): To display the completion message. -Thoroughly evaluating the [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh) script is crucial to gain a better understanding of the application installation process.
-Every application installation utilizes the same set of reusable scripts: [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func), [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh), and [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func). These scripts are not specific to any particular application.
+The installation process uses reusable scripts: [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func), [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh), and [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func), which are not specific to any particular application. + +To gain a better understanding, focus on reviewing [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh). This script contains the commands and configurations for installing and configuring AdGuard Home within the LXC container. From 9a897be0e7da93c3a0a4d9d9c2740ab64a4dec30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 13:11:59 -0500 Subject: [PATCH 2487/3335] Update CODE-AUDIT.md tweak --- CODE-AUDIT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index c8d4be26..83992f98 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -6,7 +6,7 @@ 1) [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh): This script collects system parameters. 2) [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func): Adds user settings and integrates collected information. 3) [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh): Constructs the LXC container. -4) [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh): Executes functions from [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func) to install required applications. +4) [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh): Executes functions from [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func), and installs the application. 5) [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh) (again): To display the completion message. The installation process uses reusable scripts: [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func), [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh), and [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func), which are not specific to any particular application. From 9191b26eea3573de189c68d9afcfdb01dcee7e64 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 13:21:19 -0500 Subject: [PATCH 2488/3335] Update CODE-AUDIT.md tweak --- CODE-AUDIT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index 83992f98..46db7c9c 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -3,7 +3,7 @@

Exploring the Scripts and Steps Involved in an Application LXC Installation

-1) [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh): This script collects system parameters. +1) [adguard.sh](https://github.com/tteck/Proxmox/blob/main/ct/adguard.sh): This script collects system parameters. (Also holds the function to update the application.) 2) [build.func](https://github.com/tteck/Proxmox/blob/main/misc/build.func): Adds user settings and integrates collected information. 3) [create_lxc.sh](https://github.com/tteck/Proxmox/blob/main/ct/create_lxc.sh): Constructs the LXC container. 4) [adguard-install.sh](https://github.com/tteck/Proxmox/blob/main/install/adguard-install.sh): Executes functions from [install.func](https://github.com/tteck/Proxmox/blob/main/misc/install.func), and installs the application. From fa31bf2f18d86b5ebee81faf5131e26b3554688e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 13:29:27 -0500 Subject: [PATCH 2489/3335] Update CONTRIBUTING.md tweak --- .github/CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3b61df05..ae0755be 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,9 +1,12 @@ -# Contributing to Proxmox VE Helper Scripts +
+ +
+

Contributing to Proxmox VE Helper Scripts

Everybody is invited and welcome to contribute to Proxmox VE Helper Scripts. - Pull requests submitted against [**main**](https://github.com/tteck/Proxmox/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. By adhering to the established patterns and conventions throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/tteck/Proxmox/tree/main). -- It is important to stress that complaining about the decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. +- It is important to stress that complaining about a decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project. - The repository will only accept Alpine applications that make use of the Alpine Package Keeper. From ce875098bc98151d0a5acdebd4e77b30bd7f0ce6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 13:33:26 -0500 Subject: [PATCH 2490/3335] Update USER_SUBMITTED_GUIDES.md tweak --- USER_SUBMITTED_GUIDES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 11981378..22d9c600 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -1,4 +1,7 @@ -

User Submitted Guides

+
+ +
+

User Submitted Guides

In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. From 5b18995b97043a7286f606d2df688195cdf57b9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 13:39:50 -0500 Subject: [PATCH 2491/3335] Update CHANGELOG.md tweak --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4f768d..7ede93e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ +
+ +
+

Change Log

-# Change Log -**All notable changes to this project will be documented in this file.**
+

All notable changes to this project will be documented in this file.

- 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. From 8e10c14bce6f7c8f32d85fb87e9480de5160fe41 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jan 2024 17:11:48 -0500 Subject: [PATCH 2492/3335] Update code-server.sh fixes https://github.com/tteck/Proxmox/issues/2297 --- misc/code-server.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/code-server.sh b/misc/code-server.sh index 869fdad1..6ae2d024 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -67,8 +67,7 @@ function msg_ok() { } msg_info "Installing Dependencies" -apt-get install -y curl &>/dev/null -apt-get install -y sudo &>/dev/null +apt-get update &>/dev/null apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" From 867a10f03f1049c182fcd008e8e09e554f82e2f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Jan 2024 17:15:45 -0500 Subject: [PATCH 2493/3335] Add new element - add spinner --- ct/create_lxc.sh | 31 +++++++++++++++++++++++++------ misc/build.func | 24 ++++++++++++++++++++++-- misc/install.func | 32 ++++++++++++++++++++++++++------ 3 files changed, 73 insertions(+), 14 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 34b78f09..ee29e706 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -25,6 +25,8 @@ trap 'error_handler $LINENO "$BASH_COMMAND"' ERR # This function handles errors function error_handler() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -32,20 +34,37 @@ function error_handler() { echo -e "\n$error_message\n" } -# This function prints an informational message -function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." +# This function displays a spinner. +function spinner() { + printf "\e[?25l" + spinner="/-\\|/-\\|" + spin_i=0 + while true; do + printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" + sleep 0.1 + done } -# This function prints a success message +# This function displays an informational message with a yellow color. +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! +} + +# This function displays a success message with a green color. function msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -# This function prints an error message +# This function displays a error message with a red color. function msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } diff --git a/misc/build.func b/misc/build.func index ed04d262..37dec4f0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -27,6 +27,8 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -34,20 +36,38 @@ error_handler() { echo -e "\n$error_message\n" } +# This function displays a spinner. +spinner() { + printf "\e[?25l" + spinner="/-\\|/-\\|" + spin_i=0 + while true; do + printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" + sleep 0.1 + done +} + # This function displays an informational message with a yellow color. msg_info() { local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! } + # This function displays a success message with a green color. msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -# This function displays an error message with a red color. +# This function displays a error message with a red color. msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } diff --git a/misc/install.func b/misc/install.func index e3527fb4..66da53d2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -36,6 +36,8 @@ catch_errors() { # This function handles errors error_handler() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -46,20 +48,38 @@ error_handler() { fi } -# This function prints an informational message -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." +# This function displays a spinner. +spinner() { + printf "\e[?25l" + spinner="/-\\|/-\\|" + spin_i=0 + while true; do + printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" + sleep 0.1 + done } -# This function prints a success message +# This function displays an informational message with a yellow color. +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! +} + + +# This function displays a success message with a green color. msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -# This function prints an error message +# This function displays a error message with a red color. msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } From 101c9eb122ca9ab4a74e6aa096f53bd17c1710e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Jan 2024 17:27:00 -0500 Subject: [PATCH 2494/3335] Update haos-vm.sh - add spinner --- vm/haos-vm.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 325124c9..bf11bd43 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -40,7 +40,10 @@ THIN="discard=on,ssd=1," set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT + function error_handler() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -69,17 +72,33 @@ else header_info && echo -e "⚠ User exited script \n" && exit fi +function spinner() { + printf "\e[?25l" + spinner="/-\\|/-\\|" + spin_i=0 + while true; do + printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" + sleep 0.1 + done +} + function msg_info() { local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! } function msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } @@ -146,7 +165,7 @@ function default_settings() { MAC="$GEN_MAC" VLAN="" MTU="" - START_VM="yes" + START_VM="yws" echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" From d76362808662b229ab5d9958ed9deb0f3be53274 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Jan 2024 17:55:01 -0500 Subject: [PATCH 2495/3335] Update haos-vm.sh --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index bf11bd43..dfa476b5 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -165,7 +165,7 @@ function default_settings() { MAC="$GEN_MAC" VLAN="" MTU="" - START_VM="yws" + START_VM="yes" echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" From 9f03c98e8fe8c4d2aaacb353a6821bb1aea6fc26 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 01:45:12 -0500 Subject: [PATCH 2496/3335] Update alpine-install.func add spinner --- misc/alpine-install.func | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 39e76d8f..83b842f3 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -34,6 +34,8 @@ catch_errors() { } error_handler() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -41,17 +43,37 @@ error_handler() { echo -e "\n$error_message\n" } -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." +# This function displays a spinner. +spinner() { + printf "\e[?25l" + spinner="/-\\|/-\\|" + spin_i=0 + while true; do + printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" + sleep 0.1 + done } +# This function displays an informational message with a yellow color. +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! +} + +# This function displays a success message with a green color. msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +# This function displays a error message with a red color. msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } From 767a4ac43394927fe4b414323daec1cb2f7358fb Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sun, 7 Jan 2024 10:35:24 +0100 Subject: [PATCH 2497/3335] Update paperless-ngx.sh (#2299) 2 lines not needed anymore scipy is version 1.11.4 and paperless is working fine with it --- ct/paperless-ngx.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 9b0cfe3f..b7a68ea8 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -81,8 +81,6 @@ function update_script() { cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless - sed -i 's/scipy==1.8.1/scipy==1.10.1/g' requirements.txt - sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt pip install -r requirements.txt &>/dev/null cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null From 8b7820b03a34e08f936e0b9e10fa33ce09dee246 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sun, 7 Jan 2024 10:42:41 +0100 Subject: [PATCH 2498/3335] Update paperless-ngx-install.sh (#2300) not needed anymore, as in the other commit :) --- install/paperless-ngx-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index b572f2aa..5701601a 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -81,9 +81,6 @@ $STD tar -xf paperless-ngx-$Paperlessngx.tar.xz -C /opt/ mv paperless-ngx paperless rm paperless-ngx-$Paperlessngx.tar.xz cd /opt/paperless -sed -i 's/scipy==1.8.1/scipy==1.10.1/g' requirements.txt -## python 3.10+ doesn't like the '-e', so we remove it from this the requirements file -sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://github.com/paperless-ngx/django-q.git|' /opt/paperless/requirements.txt $STD pip install --upgrade pip $STD pip install -r requirements.txt curl -s -o /opt/paperless/paperless.conf https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/paperless.conf.example From e27191e60787b238ec0ce5cd88eddc5ea1a91263 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 09:41:22 -0500 Subject: [PATCH 2499/3335] Update alpine-install.func revert add spinner --- misc/alpine-install.func | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 83b842f3..39e76d8f 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -34,8 +34,6 @@ catch_errors() { } error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -43,37 +41,17 @@ error_handler() { echo -e "\n$error_message\n" } -# This function displays a spinner. -spinner() { - printf "\e[?25l" - spinner="/-\\|/-\\|" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done -} - -# This function displays an informational message with a yellow color. msg_info() { local msg="$1" - echo -ne " ${HOLD} ${YW}${msg} " - spinner & - SPINNER_PID=$! + echo -ne " ${HOLD} ${YW}${msg}..." } -# This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -# This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } From c73a2909f747b92126ac42aa4c8c3968f6c37124 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 10:36:15 -0500 Subject: [PATCH 2500/3335] Update alpine-install.func add spinner, attempt 2 --- misc/alpine-install.func | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 39e76d8f..2d031bdc 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -34,6 +34,8 @@ catch_errors() { } error_handler() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\033[?25h" local exit_code="$?" local line_number="$1" local command="$2" @@ -41,17 +43,37 @@ error_handler() { echo -e "\n$error_message\n" } -msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." +# This function displays a spinner. +spinner() { + printf "\033[?25l" + spinner="/-\\|/-\\|" + spin_i=0 + while true; do + printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" + sleep 0.1 + done } +# This function displays an informational message with a yellow color. +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! +} + +# This function displays a success message with a green color. msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\033[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } +# This function displays a error message with a red color. msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + printf "\033[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } From df25fe94461f752188714f5e5b7a9f32ec98ad06 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 10:43:29 -0500 Subject: [PATCH 2501/3335] Update alpine-install.func add spinner, attempt 3 --- misc/alpine-install.func | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 2d031bdc..e7b8cf08 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -35,7 +35,7 @@ catch_errors() { error_handler() { if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - printf "\033[?25h" + tput cnorm local exit_code="$?" local line_number="$1" local command="$2" @@ -45,7 +45,7 @@ error_handler() { # This function displays a spinner. spinner() { - printf "\033[?25l" + tput civis spinner="/-\\|/-\\|" spin_i=0 while true; do @@ -65,7 +65,7 @@ msg_info() { # This function displays a success message with a green color. msg_ok() { if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - printf "\033[?25h" + tput cnorm local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } @@ -73,7 +73,7 @@ msg_ok() { # This function displays a error message with a red color. msg_error() { if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - printf "\033[?25h" + tput cnorm local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } From 5f3bd5904eb186d315c17e0412b8eec4b881eaef Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 10:50:17 -0500 Subject: [PATCH 2502/3335] Update alpine-install.func no spinner allowed --- misc/alpine-install.func | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index e7b8cf08..39e76d8f 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -34,8 +34,6 @@ catch_errors() { } error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - tput cnorm local exit_code="$?" local line_number="$1" local command="$2" @@ -43,37 +41,17 @@ error_handler() { echo -e "\n$error_message\n" } -# This function displays a spinner. -spinner() { - tput civis - spinner="/-\\|/-\\|" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done -} - -# This function displays an informational message with a yellow color. msg_info() { local msg="$1" - echo -ne " ${HOLD} ${YW}${msg} " - spinner & - SPINNER_PID=$! + echo -ne " ${HOLD} ${YW}${msg}..." } -# This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - tput cnorm local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -# This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - tput cnorm local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } From e79b61c1380d662fa9c19654171d58e95100b004 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 12:00:24 -0500 Subject: [PATCH 2503/3335] Create sftpgo-install.sh --- install/sftpgo-install.sh | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 install/sftpgo-install.sh diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh new file mode 100644 index 00000000..cba32803 --- /dev/null +++ b/install/sftpgo-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y sqlite3 +msg_ok "Installed Dependencies" + +msg_info "Installing Golang" +set +o pipefail +RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) +wget -q https://golang.org/dl/$RELEASE +tar -xzf $RELEASE -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +set -o pipefail +msg_ok "Installed Golang" + +msg_info "Installing SFTPGo" +curl -sS https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt bookworm main" >/etc/apt/sources.list.d/sftpgo.list +$STD apt-get update +$STD apt-get install -y sftpgo +msg_ok "Installed SFTPGo" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $RELEASE +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From e8501df16ecd2faf08a91df7fd938a272e55c217 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 12:01:21 -0500 Subject: [PATCH 2504/3335] Create sftpgo.sh --- ct/sftpgo.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/sftpgo.sh diff --git a/ct/sftpgo.sh b/ct/sftpgo.sh new file mode 100644 index 00000000..7b5415be --- /dev/null +++ b/ct/sftpgo.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ ________________ ______ + / ___// ____/_ __/ __ \/ ____/___ + \__ \/ /_ / / / /_/ / / __/ __ \ + ___/ / __/ / / / ____/ /_/ / /_/ / +/____/_/ /_/ /_/ \____/\____/ + +EOF +} +header_info +echo -e "Loading..." +APP="SFTPGo" +var_disk="4" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080/web/admin ${CL} \n" From 4c5f70b7bf3c8d2f4ffadbb2915daac02e82ed21 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 12:24:55 -0500 Subject: [PATCH 2505/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ede93e6..5e4afc9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,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. +## 2024-01-07 + +### Changed + +- **SFTPGo LXC** + - NEW Script + ## 2024-01-04 ### Changed From 10809204a82d34639acd7f37af133d67fbfe3eaa Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 16:07:51 -0500 Subject: [PATCH 2506/3335] Create stirlingpdf-install.sh --- install/stirlingpdf-install.sh | 110 +++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 install/stirlingpdf-install.sh diff --git a/install/stirlingpdf-install.sh b/install/stirlingpdf-install.sh new file mode 100644 index 00000000..1cefa174 --- /dev/null +++ b/install/stirlingpdf-install.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + automake \ + autoconf \ + libtool \ + libleptonica-dev \ + pkg-config \ + zlib1g-dev \ + make \ + g++ \ + python3 \ + python3-pip \ + libreoffice-writer \ + libreoffice-calc \ + libreoffice-impress \ + unpaper \ + ocrmypdf + +$STD pip3 install \ + uno \ + opencv-python-headless \ + unoconv \ + pngquant \ + WeasyPrint +msg_ok "Installed Dependencies" + +msg_info "Installing Azul Zulu" +wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" +wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb +$STD dpkg -i zulu-repo_1.0.0-3_all.deb +$STD apt-get update +$STD apt-get -y install zulu17-jdk +msg_ok "Installed Azul Zulu" + +msg_info "Installing JBIG2" +$STD git clone https://github.com/agl/jbig2enc /opt/jbig2enc +cd /opt/jbig2enc +$STD bash ./autogen.sh +$STD bash ./configure +$STD make +$STD make install +msg_ok "Installed JBIG2" + +msg_info "Installing Language Pack" +$STD apt-get install -y 'tesseract-ocr-*' +msg_ok "Installed Language Pack" + +msg_info "Install Stirling-PDF" +$STD git clone https://github.com/Stirling-Tools/Stirling-PDF.git +cd Stirling-PDF +chmod +x ./gradlew +$STD ./gradlew build + +mkdir -p /opt/Stirling-PDF +touch /opt/Stirling-PDF/.env +mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ +mv scripts /opt/Stirling-PDF/ +msg_ok "Installed Stirling-PDF" + +msg_info "Creating Service" +cat </etc/systemd/system/stirlingpdf.service +[Unit] +Description=Stirling-PDF service +After=syslog.target network.target + +[Service] +SuccessExitStatus=143 + +User=root +Group=root + +Type=simple +EnvironmentFile=/opt/Stirling-PDF/.env +WorkingDirectory=/opt/Stirling-PDF +ExecStart=/usr/bin/java -jar Stirling-PDF-0.19.0.jar +ExecStop=/bin/kill -15 $MAINPID + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now stirlingpdf.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d11f09050711b1356ab60b7cda46831cd4fdd1cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 16:08:46 -0500 Subject: [PATCH 2507/3335] Create stirlingpdf.sh --- ct/stirlingpdf.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/stirlingpdf.sh diff --git a/ct/stirlingpdf.sh b/ct/stirlingpdf.sh new file mode 100644 index 00000000..a7d9677a --- /dev/null +++ b/ct/stirlingpdf.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ __ _ ___ ____ ____ ______ + / ___// /_(_)____/ (_)___ ____ _ / __ \/ __ \/ ____/ + \__ \/ __/ / ___/ / / __ \/ __ `/_____/ /_/ / / / / /_ + ___/ / /_/ / / / / / / / / /_/ /_____/ ____/ /_/ / __/ +/____/\__/_/_/ /_/_/_/ /_/\__, / /_/ /_____/_/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Stirling-PDF" +var_disk="8" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080 ${CL} \n" From 1bd7b6f7575b36a3a03b174d1b5cf884562014eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 16:24:48 -0500 Subject: [PATCH 2508/3335] Update stirlingpdf.sh --- ct/stirlingpdf.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/stirlingpdf.sh b/ct/stirlingpdf.sh index a7d9677a..15a3758c 100644 --- a/ct/stirlingpdf.sh +++ b/ct/stirlingpdf.sh @@ -8,17 +8,17 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - _____ __ _ ___ ____ ____ ______ - / ___// /_(_)____/ (_)___ ____ _ / __ \/ __ \/ ____/ - \__ \/ __/ / ___/ / / __ \/ __ `/_____/ /_/ / / / / /_ - ___/ / /_/ / / / / / / / / /_/ /_____/ ____/ /_/ / __/ -/____/\__/_/_/ /_/_/_/ /_/\__, / /_/ /_____/_/ + _____ __ _ ___ ____ ____ ______ + / ___// /_(_)____/ (_)___ ____ _ / __ \/ __ \/ ____/ + \__ \/ __/ / ___/ / / __ \/ __ `/___/ /_/ / / / / /_ + ___/ / /_/ / / / / / / / / /_/ /___/ ____/ /_/ / __/ +/____/\__/_/_/ /_/_/_/ /_/\__, / /_/ /_____/_/ /____/ EOF } header_info echo -e "Loading..." -APP="Stirling-PDF" +APP="StirlingPDF" var_disk="8" var_cpu="2" var_ram="2048" From 034f6d6537cffce7fd296a493c0fd003f56f6966 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 16:44:58 -0500 Subject: [PATCH 2509/3335] Update stirlingpdf-install.sh tweak --- install/stirlingpdf-install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install/stirlingpdf-install.sh b/install/stirlingpdf-install.sh index 1cefa174..89e3b02d 100644 --- a/install/stirlingpdf-install.sh +++ b/install/stirlingpdf-install.sh @@ -27,21 +27,24 @@ $STD apt-get install -y \ zlib1g-dev \ make \ g++ \ - python3 \ - python3-pip \ libreoffice-writer \ libreoffice-calc \ libreoffice-impress \ unpaper \ ocrmypdf +msg_ok "Installed Dependencies" +msg_info "Installing Python Dependencies" +$STD apt-get install -y \ + python3 \ + python3-pip $STD pip3 install \ uno \ opencv-python-headless \ unoconv \ pngquant \ WeasyPrint -msg_ok "Installed Dependencies" +msg_ok "Installed Python Dependencies" msg_info "Installing Azul Zulu" wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" @@ -60,16 +63,15 @@ $STD make $STD make install msg_ok "Installed JBIG2" -msg_info "Installing Language Pack" +msg_info "Installing Language Packs (All)" $STD apt-get install -y 'tesseract-ocr-*' msg_ok "Installed Language Pack" -msg_info "Install Stirling-PDF" +msg_info "Installing Stirling-PDF" $STD git clone https://github.com/Stirling-Tools/Stirling-PDF.git cd Stirling-PDF chmod +x ./gradlew $STD ./gradlew build - mkdir -p /opt/Stirling-PDF touch /opt/Stirling-PDF/.env mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ @@ -92,7 +94,7 @@ Type=simple EnvironmentFile=/opt/Stirling-PDF/.env WorkingDirectory=/opt/Stirling-PDF ExecStart=/usr/bin/java -jar Stirling-PDF-0.19.0.jar -ExecStop=/bin/kill -15 $MAINPID +ExecStop=/bin/kill -15 %n [Install] WantedBy=multi-user.target From 7cf643abe70943e5709ae179f8826f65860f7ab6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 16:58:09 -0500 Subject: [PATCH 2510/3335] Update stirlingpdf-install.sh tweak --- install/stirlingpdf-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/stirlingpdf-install.sh b/install/stirlingpdf-install.sh index 89e3b02d..34ee2176 100644 --- a/install/stirlingpdf-install.sh +++ b/install/stirlingpdf-install.sh @@ -65,7 +65,7 @@ msg_ok "Installed JBIG2" msg_info "Installing Language Packs (All)" $STD apt-get install -y 'tesseract-ocr-*' -msg_ok "Installed Language Pack" +msg_ok "Installed Language Packs" msg_info "Installing Stirling-PDF" $STD git clone https://github.com/Stirling-Tools/Stirling-PDF.git From 3ea4ec656ba6b4e0c06de674aaba4a84606b05ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 19:21:20 -0500 Subject: [PATCH 2511/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4afc9f..f99e6d05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ### Changed +- **Stirling-PDF LXC** + - NEW Script - **SFTPGo LXC** - NEW Script From 1789d7af21561d144b0c527306234e73b9885c2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 20:42:08 -0500 Subject: [PATCH 2512/3335] Update stirlingpdf-install.sh tweak --- install/stirlingpdf-install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/install/stirlingpdf-install.sh b/install/stirlingpdf-install.sh index 34ee2176..af527fd6 100644 --- a/install/stirlingpdf-install.sh +++ b/install/stirlingpdf-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" +msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ curl \ sudo \ @@ -27,13 +27,17 @@ $STD apt-get install -y \ zlib1g-dev \ make \ g++ \ - libreoffice-writer \ - libreoffice-calc \ - libreoffice-impress \ unpaper \ ocrmypdf msg_ok "Installed Dependencies" +msg_info "Installing LibreOffice Components" +$STD apt-get install -y \ + libreoffice-writer \ + libreoffice-calc \ + libreoffice-impress +msg_ok "Installed LibreOffice Components" + msg_info "Installing Python Dependencies" $STD apt-get install -y \ python3 \ @@ -63,11 +67,11 @@ $STD make $STD make install msg_ok "Installed JBIG2" -msg_info "Installing Language Packs (All)" +msg_info "Installing Language Packs (Patience)" $STD apt-get install -y 'tesseract-ocr-*' msg_ok "Installed Language Packs" -msg_info "Installing Stirling-PDF" +msg_info "Installing Stirling-PDF (Additional Patience)" $STD git clone https://github.com/Stirling-Tools/Stirling-PDF.git cd Stirling-PDF chmod +x ./gradlew From cd1b7a4c64629d2ab568825a36814419c9d6a3a0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 06:14:47 -0500 Subject: [PATCH 2513/3335] Update stirlingpdf-install.sh - Create a symbolic link from `/opt/Stirling-PDF/Stirling-PDF-*.jar` to `/opt/Stirling-PDF/Stirling-PDF.jar` to ensure that the `stirlingpdf.service` file doesn't have to be updated after each upgrade. - Show installed version --- install/stirlingpdf-install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install/stirlingpdf-install.sh b/install/stirlingpdf-install.sh index af527fd6..63c5763c 100644 --- a/install/stirlingpdf-install.sh +++ b/install/stirlingpdf-install.sh @@ -80,7 +80,10 @@ mkdir -p /opt/Stirling-PDF touch /opt/Stirling-PDF/.env mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ mv scripts /opt/Stirling-PDF/ -msg_ok "Installed Stirling-PDF" +latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) +ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar +current_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)') +msg_ok "Installed Stirling-PDF version $current_version" msg_info "Creating Service" cat </etc/systemd/system/stirlingpdf.service @@ -97,7 +100,7 @@ Group=root Type=simple EnvironmentFile=/opt/Stirling-PDF/.env WorkingDirectory=/opt/Stirling-PDF -ExecStart=/usr/bin/java -jar Stirling-PDF-0.19.0.jar +ExecStart=/usr/bin/java -jar Stirling-PDF.jar ExecStop=/bin/kill -15 %n [Install] @@ -110,7 +113,7 @@ motd_ssh customize msg_info "Cleaning up" -cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb +# cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From ca48993e01e46fb6caf7e67d31ad05ccef44564a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 06:34:39 -0500 Subject: [PATCH 2514/3335] Update stirlingpdf-install.sh tweak --- install/stirlingpdf-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/stirlingpdf-install.sh b/install/stirlingpdf-install.sh index 63c5763c..a99bf679 100644 --- a/install/stirlingpdf-install.sh +++ b/install/stirlingpdf-install.sh @@ -83,7 +83,7 @@ mv scripts /opt/Stirling-PDF/ latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar current_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)') -msg_ok "Installed Stirling-PDF version $current_version" +msg_ok "Installed Stirling-PDF v$current_version" msg_info "Creating Service" cat </etc/systemd/system/stirlingpdf.service @@ -113,7 +113,7 @@ motd_ssh customize msg_info "Cleaning up" -# cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb +rm -rf /zulu-repo_1.0.0-3_all.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From b80c0e422a6f70f3fbf9a7d1a10816b86b7a0385 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 06:38:27 -0500 Subject: [PATCH 2515/3335] Update stirlingpdf.sh - Create update path --- ct/stirlingpdf.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/stirlingpdf.sh b/ct/stirlingpdf.sh index 15a3758c..4004c8b9 100644 --- a/ct/stirlingpdf.sh +++ b/ct/stirlingpdf.sh @@ -53,7 +53,21 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating ${APP}" +systemctl stop stirlingpdf +git clone https://github.com/Stirling-Tools/Stirling-PDF.git +cd Stirling-PDF +chmod +x ./gradlew +./gradlew build +cp -r ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ +cp -r scripts /opt/Stirling-PDF/ +cd ~ +rm -rf Stirling-PDF +latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) +ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar +new_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)') +systemctl start stirlingpdf +msg_ok "Updated ${APP} to v$new_version" exit } From e1247b6d0bbee3efa3297b964e4910e2a17d75b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 06:42:12 -0500 Subject: [PATCH 2516/3335] Update stirlingpdf.sh tweak --- ct/stirlingpdf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/stirlingpdf.sh b/ct/stirlingpdf.sh index 4004c8b9..4947e5d0 100644 --- a/ct/stirlingpdf.sh +++ b/ct/stirlingpdf.sh @@ -64,7 +64,7 @@ cp -r scripts /opt/Stirling-PDF/ cd ~ rm -rf Stirling-PDF latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) -ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar +ln -sf "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar new_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)') systemctl start stirlingpdf msg_ok "Updated ${APP} to v$new_version" From 95a9467ff19d53c63ea01e4317c663bcf5e585ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 08:00:05 -0500 Subject: [PATCH 2517/3335] Update and rename stirlingpdf.sh to stirling-pdf.sh - Rename sh file - Switch update from git to relaese --- ct/{stirlingpdf.sh => stirling-pdf.sh} | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename ct/{stirlingpdf.sh => stirling-pdf.sh} (79%) diff --git a/ct/stirlingpdf.sh b/ct/stirling-pdf.sh similarity index 79% rename from ct/stirlingpdf.sh rename to ct/stirling-pdf.sh index 4947e5d0..4e3373b0 100644 --- a/ct/stirlingpdf.sh +++ b/ct/stirling-pdf.sh @@ -18,7 +18,7 @@ EOF } header_info echo -e "Loading..." -APP="StirlingPDF" +APP="Stirling-PDF" var_disk="8" var_cpu="2" var_ram="2048" @@ -55,19 +55,20 @@ header_info if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" systemctl stop stirlingpdf -git clone https://github.com/Stirling-Tools/Stirling-PDF.git -cd Stirling-PDF +RELEASE=$(curl -s https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v$RELEASE.tar.gz +tar -xzf v$RELEASE.tar.gz +cd Stirling-PDF-$RELEASE chmod +x ./gradlew -./gradlew build +./gradlew build &>/dev/null cp -r ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ cp -r scripts /opt/Stirling-PDF/ cd ~ -rm -rf Stirling-PDF +rm -rf Stirling-PDF-$RELEASE v$RELEASE.tar.gz latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) ln -sf "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar -new_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)') systemctl start stirlingpdf -msg_ok "Updated ${APP} to v$new_version" +msg_ok "Updated ${APP} to v$RELEASE" exit } From aad569dc0d652223412a66623378548af7d681e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 08:02:34 -0500 Subject: [PATCH 2518/3335] Update and rename stirlingpdf-install.sh to stirling-pdf-install.sh - Rename stirlingpdf-install.sh to stirling-pdf-install.sh - Switch from git to release for install --- ...stirlingpdf-install.sh => stirling-pdf-install.sh} | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename install/{stirlingpdf-install.sh => stirling-pdf-install.sh} (86%) diff --git a/install/stirlingpdf-install.sh b/install/stirling-pdf-install.sh similarity index 86% rename from install/stirlingpdf-install.sh rename to install/stirling-pdf-install.sh index a99bf679..353d8269 100644 --- a/install/stirlingpdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -72,8 +72,10 @@ $STD apt-get install -y 'tesseract-ocr-*' msg_ok "Installed Language Packs" msg_info "Installing Stirling-PDF (Additional Patience)" -$STD git clone https://github.com/Stirling-Tools/Stirling-PDF.git -cd Stirling-PDF +RELEASE=$(curl -s https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v$RELEASE.tar.gz +tar -xzf v$RELEASE.tar.gz +cd Stirling-PDF-$RELEASE chmod +x ./gradlew $STD ./gradlew build mkdir -p /opt/Stirling-PDF @@ -82,8 +84,7 @@ mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ mv scripts /opt/Stirling-PDF/ latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar -current_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)') -msg_ok "Installed Stirling-PDF v$current_version" +msg_ok "Installed Stirling-PDF v$RELEASE" msg_info "Creating Service" cat </etc/systemd/system/stirlingpdf.service @@ -113,7 +114,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf /zulu-repo_1.0.0-3_all.deb +rm -rf v$RELEASE.tar.gz /zulu-repo_1.0.0-3_all.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From fd0e3748bf0bba0de62deff7bc17ed0a1812d8e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 08:21:33 -0500 Subject: [PATCH 2519/3335] Update stirling-pdf-install.sh tweak --- install/stirling-pdf-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index 353d8269..43cb89a8 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -82,8 +82,7 @@ mkdir -p /opt/Stirling-PDF touch /opt/Stirling-PDF/.env mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ mv scripts /opt/Stirling-PDF/ -latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) -ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar +ln -s /opt/Stirling-PDF/Stirling-PDF-$RELEASE.jar /opt/Stirling-PDF/Stirling-PDF.jar msg_ok "Installed Stirling-PDF v$RELEASE" msg_info "Creating Service" From 1eaf2b2988badf910aced5e5a6df574553bfac48 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 8 Jan 2024 08:23:08 -0500 Subject: [PATCH 2520/3335] Update stirling-pdf.sh tweak --- ct/stirling-pdf.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/stirling-pdf.sh b/ct/stirling-pdf.sh index 4e3373b0..8e86cbc3 100644 --- a/ct/stirling-pdf.sh +++ b/ct/stirling-pdf.sh @@ -65,8 +65,7 @@ cp -r ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ cp -r scripts /opt/Stirling-PDF/ cd ~ rm -rf Stirling-PDF-$RELEASE v$RELEASE.tar.gz -latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1) -ln -sf "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar +ln -sf /opt/Stirling-PDF/Stirling-PDF-$RELEASE.jar /opt/Stirling-PDF/Stirling-PDF.jar systemctl start stirlingpdf msg_ok "Updated ${APP} to v$RELEASE" exit From 9ca401e30f26815479bd38c9e3bd04ced4d4d445 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Jan 2024 19:44:38 -0500 Subject: [PATCH 2521/3335] Update verbose mode - Remove `set -x` - Only entries with `$STD` will be shown --- ct/create_lxc.sh | 2 +- misc/alpine-install.func | 1 - misc/build.func | 2 +- misc/install.func | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index ee29e706..9d41819d 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -6,7 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE # This sets verbose mode if the global variable is set to "yes" -if [ "$VERBOSE" == "yes" ]; then set -x; fi +# if [ "$VERBOSE" == "yes" ]; then set -x; fi # This function sets color variables for formatting output in the terminal YW=$(echo "\033[33m") diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 39e76d8f..16bde1d4 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -17,7 +17,6 @@ color() { verb_ip6() { if [ "$VERBOSE" = "yes" ]; then - set -x STD="" else STD="silent"; fi silent() { "$@" >/dev/null 2>&1; } diff --git a/misc/build.func b/misc/build.func index 37dec4f0..05a9c0b4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -481,7 +481,7 @@ start() { # This function collects user settings and integrates all the collected information. build_container() { - if [ "$VERB" == "yes" ]; then set -x; fi +# if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then FEATURES="keyctl=1,nesting=1" diff --git a/misc/install.func b/misc/install.func index 66da53d2..d50237f4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -18,7 +18,6 @@ color() { # This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" verb_ip6() { if [ "$VERBOSE" = "yes" ]; then - set -x STD="" else STD="silent"; fi silent() { "$@" >/dev/null 2>&1; } From fb13baee88df9a900215eefee74268420e057b01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Jan 2024 19:58:38 -0500 Subject: [PATCH 2522/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f99e6d05..75936efa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,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. +## 2024-01-09 + +### Changed + +- **Verbose mode** + - Only entries with `$STD` will be shown + ## 2024-01-07 ### Changed From 478b4e1c32ca1f9942d0f4bfd53523af6702c41c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Jan 2024 09:01:07 -0500 Subject: [PATCH 2523/3335] Update agentdvr-install.sh fixes https://github.com/tteck/Proxmox/issues/2322 --- install/agentdvr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh index 8eeaf33d..239a57ff 100644 --- a/install/agentdvr-install.sh +++ b/install/agentdvr-install.sh @@ -22,6 +22,7 @@ $STD apt-get install -y apt-transport-https $STD apt-get install -y alsa-utils $STD apt-get install -y libxext-dev $STD apt-get install -y fontconfig +$STD apt-get install -y libva-drm2 msg_ok "Installed Dependencies" msg_info "Installing AgentDVR" From d72f269ad69418b6923fd89be5e55ef9006559fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 05:14:17 -0500 Subject: [PATCH 2524/3335] Update build.func fixes https://github.com/tteck/Proxmox/issues/2326 --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index 05a9c0b4..56599ad4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -475,6 +475,7 @@ start() { echo -e "⚠ User exited script \n" exit fi + SPINNER_PID="" update_script fi } From 4fc60f8ad04caaa0b66242a21ced926fcd00085f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 10:21:33 -0500 Subject: [PATCH 2525/3335] Create apt-cacher-ng-install.sh --- install/apt-cacher-ng-install.sh | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 install/apt-cacher-ng-install.sh diff --git a/install/apt-cacher-ng-install.sh b/install/apt-cacher-ng-install.sh new file mode 100644 index 00000000..2cdf05a0 --- /dev/null +++ b/install/apt-cacher-ng-install.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Apt-Cacher NG" +DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng +sed -i 's/# \(PassThroughPattern: .* # this would allow CONNECT to everything\)/\1/' /etc/apt-cacher-ng/acng.conf +systemctl enable -q --now apt-cacher-ng +msg_ok "Installed Apt-Cacher NG" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From f72b38f3487b65954177b5cbd810413cf81ddedd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 10:22:56 -0500 Subject: [PATCH 2526/3335] Create apt-cacher-ng.sh --- ct/apt-cacher-ng.sh | 70 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 ct/apt-cacher-ng.sh diff --git a/ct/apt-cacher-ng.sh b/ct/apt-cacher-ng.sh new file mode 100644 index 00000000..6a4439ca --- /dev/null +++ b/ct/apt-cacher-ng.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ ______ __ _ ________ + / | ____ / /_ / ____/___ ______/ /_ ___ _____ / | / / ____/ + / /| | / __ \/ __/__/ / / __ `/ ___/ __ \/ _ \/ ___/__/ |/ / / __ + / ___ |/ /_/ / /_/__/ /___/ /_/ / /__/ / / / __/ / /__/ /| / /_/ / +/_/ |_/ .___/\__/ \____/\__,_/\___/_/ /_/\___/_/ /_/ |_/\____/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Apt-Cacher-NG" +var_disk="2" +var_cpu="1" +var_ram="512" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} maintenance page should be reachable by going to the following URL. + ${BL}http://${IP}:3142/acng-report.html${CL} \n" From d9aedda5afd3e6fb652c0f8805b293e11a4d1641 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 10:29:27 -0500 Subject: [PATCH 2527/3335] Update build.func add option to utilize apt-cacher-ng --- misc/build.func | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/misc/build.func b/misc/build.func index 56599ad4..3beacc87 100644 --- a/misc/build.func +++ b/misc/build.func @@ -135,6 +135,7 @@ echo_default() { echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + echo -e "${DGN}APT-Cacher IP: ${BGN}None${CL}" echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -340,6 +341,18 @@ advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" fi + if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + if [ -z "$APT_CACHER_IP" ]; then + APT_CACHER="no" + APT_CACHER_IP="None" + else + APT_CACHER="yes" + fi + echo -e "${DGN}Using APT-Cacher IP: ${BGN}$APT_CACHER_IP${CL}" + else + exit-script + fi + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" else @@ -498,6 +511,8 @@ build_container() { else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" fi + export CACHER="$APT_CACHER" + export CACHER_IP="$APT_CACHER_IP" export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" From 4cd3cf0e23e084b95234e0bbd6f21745af1fb0b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 10:30:39 -0500 Subject: [PATCH 2528/3335] Update install.func accommodate apt-cacher-ng --- misc/install.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/install.func b/misc/install.func index d50237f4..68be24d7 100644 --- a/misc/install.func +++ b/misc/install.func @@ -131,6 +131,9 @@ network_check() { # This function updates the Container OS by running apt-get update and upgrade update_os() { msg_info "Updating Container OS" + if [[ "$CACHER" == "yes" ]]; then + echo "Acquire::http { Proxy \"http://${CACHER_IP}:3142\"; };" >/etc/apt/apt.conf.d/00aptproxy + fi $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade msg_ok "Updated Container OS" From ea339ecfab52d122b77cf0b6c1887cc5c9a42235 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 11:29:20 -0500 Subject: [PATCH 2529/3335] Update build.func tweak --- misc/build.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/build.func b/misc/build.func index 3beacc87..9bc6c582 100644 --- a/misc/build.func +++ b/misc/build.func @@ -123,6 +123,7 @@ ssh_check() { # This function displays the default values for various settings. echo_default() { + APT_CACHER="" echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}" echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" @@ -511,8 +512,10 @@ build_container() { else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" fi + if [ "$APT_CACHER" == "yes" ]; then export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" + fi export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" From 5196ed8fecde8121bf670ae89e764c561dd4f1e8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 11:48:37 -0500 Subject: [PATCH 2530/3335] Update build.func tweak --- misc/build.func | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index 9bc6c582..cbb7b4e9 100644 --- a/misc/build.func +++ b/misc/build.func @@ -124,6 +124,7 @@ ssh_check() { # This function displays the default values for various settings. echo_default() { APT_CACHER="" + APT_CACHER_IP="" echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}" echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" @@ -511,11 +512,9 @@ build_container() { export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" - fi - if [ "$APT_CACHER" == "yes" ]; then + export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" - fi export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" From 77087f798ad30b42e35c48bff138402f9c6626c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 12:00:37 -0500 Subject: [PATCH 2531/3335] Update build.func tweak --- misc/build.func | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index cbb7b4e9..46a7a94b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -123,8 +123,6 @@ ssh_check() { # This function displays the default values for various settings. echo_default() { - APT_CACHER="" - APT_CACHER_IP="" echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}" echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" From 7122a465a1122462a71b8a717aa1f2ac3dbb33d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 12:04:03 -0500 Subject: [PATCH 2532/3335] Add variables --- ct/adguard.sh | 2 ++ ct/agentdvr.sh | 2 ++ ct/alpine-docker.sh | 2 ++ ct/alpine-grafana.sh | 2 ++ ct/alpine-nextcloud.sh | 2 ++ ct/alpine-vaultwarden.sh | 2 ++ ct/alpine-zigbee2mqtt.sh | 2 ++ ct/alpine.sh | 2 ++ ct/apt-cacher-ng.sh | 2 ++ ct/audiobookshelf.sh | 2 ++ ct/autobrr.sh | 2 ++ ct/bazarr.sh | 2 ++ ct/blocky.sh | 2 ++ ct/casaos.sh | 2 ++ ct/changedetection.sh | 2 ++ ct/channels.sh | 2 ++ ct/cloudflared.sh | 2 ++ ct/commafeed.sh | 2 ++ ct/cronicle.sh | 2 ++ ct/daemonsync.sh | 2 ++ ct/dashy.sh | 2 ++ ct/debian.sh | 2 ++ ct/deconz.sh | 2 ++ ct/deluge.sh | 2 ++ ct/docker.sh | 2 ++ ct/dockge.sh | 2 ++ ct/emby.sh | 2 ++ ct/emqx.sh | 2 ++ ct/esphome.sh | 2 ++ ct/fhem.sh | 2 ++ ct/go2rtc.sh | 2 ++ ct/gotify.sh | 2 ++ ct/grafana.sh | 2 ++ ct/grocy.sh | 2 ++ ct/heimdalldashboard.sh | 2 ++ ct/homarr.sh | 2 ++ ct/homeassistant-core.sh | 2 ++ ct/homeassistant.sh | 2 ++ ct/homebridge.sh | 2 ++ ct/homepage.sh | 2 ++ ct/homer.sh | 2 ++ ct/hyperion.sh | 2 ++ ct/influxdb.sh | 2 ++ ct/iobroker.sh | 2 ++ ct/jackett.sh | 2 ++ ct/jellyfin.sh | 2 ++ ct/jellyseerr.sh | 2 ++ ct/k0s.sh | 2 ++ ct/kavita.sh | 2 ++ ct/keycloak.sh | 2 ++ ct/lidarr.sh | 2 ++ ct/linkwarden.sh | 2 ++ ct/magicmirror.sh | 2 ++ ct/mariadb.sh | 2 ++ ct/meshcentral.sh | 2 ++ ct/motioneye.sh | 2 ++ ct/mqtt.sh | 2 ++ ct/n8n.sh | 2 ++ ct/navidrome.sh | 2 ++ ct/nextcloudpi.sh | 2 ++ ct/nginxproxymanager.sh | 2 ++ ct/nocodb.sh | 2 ++ ct/node-red.sh | 2 ++ ct/octoprint.sh | 2 ++ ct/omada.sh | 2 ++ ct/ombi.sh | 2 ++ ct/omv.sh | 2 ++ ct/openhab.sh | 2 ++ ct/openobserve.sh | 2 ++ ct/overseerr.sh | 2 ++ ct/owncast.sh | 2 ++ ct/paperless-ngx.sh | 2 ++ ct/photoprism.sh | 2 ++ ct/pialert.sh | 2 ++ ct/pihole.sh | 2 ++ ct/pingvin.sh | 2 ++ ct/plex.sh | 2 ++ ct/podman-homeassistant.sh | 2 ++ ct/podman.sh | 2 ++ ct/postgresql.sh | 2 ++ ct/prometheus.sh | 2 ++ ct/prowlarr.sh | 2 ++ ct/qbittorrent.sh | 2 ++ ct/radarr.sh | 2 ++ ct/rdtclient.sh | 2 ++ ct/readarr.sh | 2 ++ ct/rockylinux.sh | 2 ++ ct/rtsptoweb.sh | 2 ++ ct/runtipi.sh | 2 ++ ct/sabnzbd.sh | 2 ++ ct/scrypted.sh | 2 ++ ct/sftpgo.sh | 2 ++ ct/shinobi.sh | 2 ++ ct/sonarr.sh | 2 ++ ct/stirling-pdf.sh | 2 ++ ct/syncthing.sh | 2 ++ ct/tasmoadmin.sh | 2 ++ ct/tautulli.sh | 2 ++ ct/tdarr.sh | 2 ++ ct/technitiumdns.sh | 2 ++ ct/transmission.sh | 2 ++ ct/trilium.sh | 2 ++ ct/ubuntu.sh | 2 ++ ct/umbrel.sh | 2 ++ ct/unifi.sh | 2 ++ ct/unmanic.sh | 2 ++ ct/uptimekuma.sh | 2 ++ ct/vaultwarden.sh | 2 ++ ct/whisparr.sh | 2 ++ ct/whoogle.sh | 2 ++ ct/wikijs.sh | 2 ++ ct/wireguard.sh | 2 ++ ct/yunohost.sh | 2 ++ ct/zigbee2mqtt.sh | 2 ++ ct/zoraxy.sh | 2 ++ ct/zwave-js-ui.sh | 2 ++ 116 files changed, 232 insertions(+) diff --git a/ct/adguard.sh b/ct/adguard.sh index 5c15fca1..da5d39ce 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index caab7c04..2d70e13c 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index c79f03d1..d401fc28 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index e99bef4e..51560661 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index bee4bf5f..bc9814e5 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 359f90c0..c270574f 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index d8941417..32c435a8 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine.sh b/ct/alpine.sh index 8da732a5..6ead34bc 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/apt-cacher-ng.sh b/ct/apt-cacher-ng.sh index 6a4439ca..15d1f140 100644 --- a/ct/apt-cacher-ng.sh +++ b/ct/apt-cacher-ng.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 78b04add..a1a3c0b9 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 4fe249e5..d0a73164 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/bazarr.sh b/ct/bazarr.sh index 687445ae..5371beee 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/blocky.sh b/ct/blocky.sh index 1d6d9858..64311a9c 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/casaos.sh b/ct/casaos.sh index 3b90d107..fcb30fdd 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/changedetection.sh b/ct/changedetection.sh index d12ead96..84448134 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/channels.sh b/ct/channels.sh index 7f05f7ec..6368677f 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index 19429bc3..832dc1b8 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/commafeed.sh b/ct/commafeed.sh index d4eba134..4449c285 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/cronicle.sh b/ct/cronicle.sh index fd7ea840..bbc296d1 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index ce3c885a..859d96d4 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/dashy.sh b/ct/dashy.sh index 6155bd77..309fe40c 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/debian.sh b/ct/debian.sh index edc59f1b..4db9904f 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/deconz.sh b/ct/deconz.sh index 93bfae2d..b3a53756 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/deluge.sh b/ct/deluge.sh index 75806917..385f93c7 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/docker.sh b/ct/docker.sh index 368d3518..7997d026 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/dockge.sh b/ct/dockge.sh index 39e7eac2..e24c74e3 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/emby.sh b/ct/emby.sh index 954bc140..563ecf57 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/emqx.sh b/ct/emqx.sh index 20fd755e..f469e28e 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/esphome.sh b/ct/esphome.sh index 6262cd67..0aee7d7b 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/fhem.sh b/ct/fhem.sh index 0b4812b7..c7a12377 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 7ad54ab7..38e4f55e 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/gotify.sh b/ct/gotify.sh index 99cbfbee..1b5b19d9 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/grafana.sh b/ct/grafana.sh index f3747d05..047807f6 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/grocy.sh b/ct/grocy.sh index 43a123e0..18bca608 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index c8106cbe..70ed090b 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homarr.sh b/ct/homarr.sh index 9f0353c2..f7a516e0 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index ea3ea3f1..086c8468 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 66dcafe2..e6e28ebf 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 28a12a7b..d32e5e51 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homepage.sh b/ct/homepage.sh index 25bc2c0b..bbeef90c 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homer.sh b/ct/homer.sh index 59670953..13a1535a 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 309b8754..402a0615 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/influxdb.sh b/ct/influxdb.sh index dded776f..e732a60b 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 84edc759..eb1cccc6 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/jackett.sh b/ct/jackett.sh index 68d967a2..898cb4e3 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index b56e271e..3f7c9883 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 68a93218..e3af3b80 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/k0s.sh b/ct/k0s.sh index f39b8a77..5c6331bb 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/kavita.sh b/ct/kavita.sh index 84afe3fb..e2238bf1 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 0a67f9d3..73810dc8 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 3b800506..28b1bd3b 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 95937e29..a62a2781 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 5a547619..bbd5c3c3 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 6051169c..70f6ab09 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 16c9a837..03bc929f 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 306f6281..918a3b6c 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 86b5c18d..80d8408d 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/n8n.sh b/ct/n8n.sh index 39be816e..04de7c01 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 28e10544..c009f9c3 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 7e75d135..bcbef6dc 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 016c391c..bd6ea26d 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 6f2c76ea..538641ce 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/node-red.sh b/ct/node-red.sh index bdb8615e..cdd37d15 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/octoprint.sh b/ct/octoprint.sh index af27fabe..ab091834 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/omada.sh b/ct/omada.sh index 4d433261..33273e1c 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/ombi.sh b/ct/ombi.sh index d367b165..b3957aaa 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/omv.sh b/ct/omv.sh index 8ca264c3..d9510fdd 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/openhab.sh b/ct/openhab.sh index 14e9bbf4..60e9d7a7 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/openobserve.sh b/ct/openobserve.sh index 86828d9f..26e36a9c 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -41,6 +41,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 392be917..4f8b271c 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/owncast.sh b/ct/owncast.sh index 3bf376bf..06832850 100644 --- a/ct/owncast.sh +++ b/ct/owncast.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index b7a68ea8..f4773d70 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 5e8d754b..5ff79708 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/pialert.sh b/ct/pialert.sh index 6766107f..a06f2f6a 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/pihole.sh b/ct/pihole.sh index 2d5e8f2f..ad17f550 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/pingvin.sh b/ct/pingvin.sh index c3943725..8d36f98a 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/plex.sh b/ct/plex.sh index 12ab74f4..9ab0b8b3 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index d9cb8573..667e581f 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -43,6 +43,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/podman.sh b/ct/podman.sh index 820b20c3..b8e8e1a4 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 47bf54d1..5ff19c81 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 570eb1bf..6bf41bd1 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 655a73cf..2ad20b7c 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 9f0a07f6..da21d11f 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/radarr.sh b/ct/radarr.sh index 2dc8668b..d481245f 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 2df7fede..78e19112 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/readarr.sh b/ct/readarr.sh index 4a0dcd6a..7b995990 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index 9e476b5c..c9cb151a 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index 18642616..20d9b7f7 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/runtipi.sh b/ct/runtipi.sh index a779a1df..56b513e4 100644 --- a/ct/runtipi.sh +++ b/ct/runtipi.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 427e53f7..b761526d 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/scrypted.sh b/ct/scrypted.sh index 8ffec8b5..15488152 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/sftpgo.sh b/ct/sftpgo.sh index 7b5415be..d3c2d7b3 100644 --- a/ct/sftpgo.sh +++ b/ct/sftpgo.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/shinobi.sh b/ct/shinobi.sh index c5488d2a..3f1cdb6e 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/sonarr.sh b/ct/sonarr.sh index 22af05ef..36a6297a 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/stirling-pdf.sh b/ct/stirling-pdf.sh index 8e86cbc3..29232f59 100644 --- a/ct/stirling-pdf.sh +++ b/ct/stirling-pdf.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 9beff817..ad9fb728 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh index 9aa75124..8b772760 100644 --- a/ct/tasmoadmin.sh +++ b/ct/tasmoadmin.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/tautulli.sh b/ct/tautulli.sh index 3445d79e..8430f04a 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 89f68c3e..51b69f45 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index e091db9d..8e6f042c 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/transmission.sh b/ct/transmission.sh index 435b4994..22638428 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/trilium.sh b/ct/trilium.sh index e0d2d75b..9a090607 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index c61b90bd..bd89172b 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 40ce605b..1638def3 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/unifi.sh b/ct/unifi.sh index f70327b2..352a809d 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/unmanic.sh b/ct/unmanic.sh index 05eb7298..4750f0ee 100644 --- a/ct/unmanic.sh +++ b/ct/unmanic.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 4961ee5d..c0a14a46 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index f204a484..5b8e51fa 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 3679741d..488f8197 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 8334f650..11b127df 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 0dfe3b4a..03feba32 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 31a554d6..f78f4cda 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 387a7dad..2b0c6bbd 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index a4ccac5c..eebc630f 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 9633a968..1f36cbe4 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index e0a3039c..83adbc9d 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -39,6 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="no" + APT_CACHER_IP="none" DISABLEIP6="no" MTU="" SD="" From 371cde2d8a76163283302cb8adef86e5fd08f212 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 12:09:32 -0500 Subject: [PATCH 2533/3335] Update build.func revert --- misc/build.func | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/misc/build.func b/misc/build.func index 46a7a94b..56599ad4 100644 --- a/misc/build.func +++ b/misc/build.func @@ -135,7 +135,6 @@ echo_default() { echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - echo -e "${DGN}APT-Cacher IP: ${BGN}None${CL}" echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -341,18 +340,6 @@ advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" fi - if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then - if [ -z "$APT_CACHER_IP" ]; then - APT_CACHER="no" - APT_CACHER_IP="None" - else - APT_CACHER="yes" - fi - echo -e "${DGN}Using APT-Cacher IP: ${BGN}$APT_CACHER_IP${CL}" - else - exit-script - fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" else @@ -510,9 +497,7 @@ build_container() { export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)" else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" - - export CACHER="$APT_CACHER" - export CACHER_IP="$APT_CACHER_IP" + fi export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" From 50bc9c334a8e9681abc9397521431ff56694ab30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 12:11:16 -0500 Subject: [PATCH 2534/3335] Update install.func revert --- misc/install.func | 3 --- 1 file changed, 3 deletions(-) diff --git a/misc/install.func b/misc/install.func index 68be24d7..d50237f4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -131,9 +131,6 @@ network_check() { # This function updates the Container OS by running apt-get update and upgrade update_os() { msg_info "Updating Container OS" - if [[ "$CACHER" == "yes" ]]; then - echo "Acquire::http { Proxy \"http://${CACHER_IP}:3142\"; };" >/etc/apt/apt.conf.d/00aptproxy - fi $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade msg_ok "Updated Container OS" From 6a83a3eaac874fcc2d54b5ba7f3cca908481b401 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 15:00:42 -0500 Subject: [PATCH 2535/3335] New feature - The option to utilize Apt-Cacher-NG (Advanced settings) when creating LXCs. The added functionality is expected to reduce bandwidth usage and provide faster operating system updates. - Requires the Apt-Cacher-NG LXC --- ct/adguard.sh | 4 ++-- ct/agentdvr.sh | 4 ++-- ct/alpine-docker.sh | 4 ++-- ct/alpine-grafana.sh | 4 ++-- ct/alpine-nextcloud.sh | 4 ++-- ct/alpine-vaultwarden.sh | 4 ++-- ct/alpine-zigbee2mqtt.sh | 4 ++-- ct/alpine.sh | 4 ++-- ct/apt-cacher-ng.sh | 4 ++-- ct/audiobookshelf.sh | 4 ++-- ct/autobrr.sh | 4 ++-- ct/bazarr.sh | 4 ++-- ct/blocky.sh | 4 ++-- ct/casaos.sh | 4 ++-- ct/changedetection.sh | 4 ++-- ct/channels.sh | 4 ++-- ct/cloudflared.sh | 4 ++-- ct/commafeed.sh | 4 ++-- ct/cronicle.sh | 4 ++-- ct/daemonsync.sh | 4 ++-- ct/dashy.sh | 4 ++-- ct/debian.sh | 4 ++-- ct/deconz.sh | 4 ++-- ct/deluge.sh | 4 ++-- ct/docker.sh | 4 ++-- ct/dockge.sh | 4 ++-- ct/emby.sh | 4 ++-- ct/emqx.sh | 4 ++-- ct/esphome.sh | 4 ++-- ct/fhem.sh | 4 ++-- ct/go2rtc.sh | 4 ++-- ct/gotify.sh | 4 ++-- ct/grafana.sh | 4 ++-- ct/grocy.sh | 4 ++-- ct/heimdalldashboard.sh | 4 ++-- ct/homarr.sh | 4 ++-- ct/homeassistant-core.sh | 4 ++-- ct/homeassistant.sh | 4 ++-- ct/homebridge.sh | 4 ++-- ct/homepage.sh | 4 ++-- ct/homer.sh | 4 ++-- ct/hyperion.sh | 4 ++-- ct/influxdb.sh | 4 ++-- ct/iobroker.sh | 4 ++-- ct/jackett.sh | 4 ++-- ct/jellyfin.sh | 4 ++-- ct/jellyseerr.sh | 4 ++-- ct/k0s.sh | 4 ++-- ct/kavita.sh | 4 ++-- ct/keycloak.sh | 4 ++-- ct/lidarr.sh | 4 ++-- ct/linkwarden.sh | 4 ++-- ct/magicmirror.sh | 4 ++-- ct/mariadb.sh | 4 ++-- ct/meshcentral.sh | 4 ++-- ct/motioneye.sh | 4 ++-- ct/mqtt.sh | 4 ++-- ct/n8n.sh | 4 ++-- ct/navidrome.sh | 4 ++-- ct/nextcloudpi.sh | 4 ++-- ct/nginxproxymanager.sh | 4 ++-- ct/nocodb.sh | 4 ++-- ct/node-red.sh | 4 ++-- ct/octoprint.sh | 4 ++-- ct/omada.sh | 4 ++-- ct/ombi.sh | 4 ++-- ct/omv.sh | 4 ++-- ct/openhab.sh | 4 ++-- ct/openobserve.sh | 4 ++-- ct/overseerr.sh | 4 ++-- ct/owncast.sh | 4 ++-- ct/paperless-ngx.sh | 4 ++-- ct/photoprism.sh | 4 ++-- ct/pialert.sh | 4 ++-- ct/pihole.sh | 4 ++-- ct/pingvin.sh | 4 ++-- ct/plex.sh | 4 ++-- ct/podman-homeassistant.sh | 4 ++-- ct/podman.sh | 4 ++-- ct/postgresql.sh | 4 ++-- ct/prometheus.sh | 4 ++-- ct/prowlarr.sh | 4 ++-- ct/qbittorrent.sh | 4 ++-- ct/radarr.sh | 4 ++-- ct/rdtclient.sh | 4 ++-- ct/readarr.sh | 4 ++-- ct/rockylinux.sh | 4 ++-- ct/rtsptoweb.sh | 4 ++-- ct/runtipi.sh | 4 ++-- ct/sabnzbd.sh | 4 ++-- ct/scrypted.sh | 4 ++-- ct/sftpgo.sh | 4 ++-- ct/shinobi.sh | 4 ++-- ct/sonarr.sh | 4 ++-- ct/stirling-pdf.sh | 4 ++-- ct/syncthing.sh | 4 ++-- ct/tasmoadmin.sh | 4 ++-- ct/tautulli.sh | 4 ++-- ct/tdarr.sh | 4 ++-- ct/technitiumdns.sh | 4 ++-- ct/transmission.sh | 4 ++-- ct/trilium.sh | 4 ++-- ct/ubuntu.sh | 4 ++-- ct/umbrel.sh | 4 ++-- ct/unifi.sh | 4 ++-- ct/unmanic.sh | 4 ++-- ct/uptimekuma.sh | 4 ++-- ct/vaultwarden.sh | 4 ++-- ct/whisparr.sh | 4 ++-- ct/whoogle.sh | 4 ++-- ct/wikijs.sh | 4 ++-- ct/wireguard.sh | 4 ++-- ct/yunohost.sh | 4 ++-- ct/zigbee2mqtt.sh | 4 ++-- ct/zoraxy.sh | 4 ++-- ct/zwave-js-ui.sh | 4 ++-- misc/build.func | 14 ++++++++++++-- misc/install.func | 5 ++++- 118 files changed, 248 insertions(+), 235 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index da5d39ce..e9e667c9 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index 2d70e13c..d77921bf 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index d401fc28..49ee7518 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 51560661..4382f131 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index bc9814e5..5e9338ac 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index c270574f..9ce6763a 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 32c435a8..2767d924 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/alpine.sh b/ct/alpine.sh index 6ead34bc..85f3ad55 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/apt-cacher-ng.sh b/ct/apt-cacher-ng.sh index 15d1f140..8d8235a3 100644 --- a/ct/apt-cacher-ng.sh +++ b/ct/apt-cacher-ng.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index a1a3c0b9..4d360634 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/autobrr.sh b/ct/autobrr.sh index d0a73164..8cfc2f3e 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/bazarr.sh b/ct/bazarr.sh index 5371beee..d94543e5 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/blocky.sh b/ct/blocky.sh index 64311a9c..a9c74c4d 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/casaos.sh b/ct/casaos.sh index fcb30fdd..85cc0510 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 84448134..5fe9759a 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/channels.sh b/ct/channels.sh index 6368677f..7e8b0140 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index 832dc1b8..c4f9631c 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/commafeed.sh b/ct/commafeed.sh index 4449c285..0084964a 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/cronicle.sh b/ct/cronicle.sh index bbc296d1..946101f3 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 859d96d4..01ffa4a7 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/dashy.sh b/ct/dashy.sh index 309fe40c..759b8805 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/debian.sh b/ct/debian.sh index 4db9904f..adfd810e 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/deconz.sh b/ct/deconz.sh index b3a53756..bf42af0c 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/deluge.sh b/ct/deluge.sh index 385f93c7..897a3bf8 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/docker.sh b/ct/docker.sh index 7997d026..ce263f9b 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/dockge.sh b/ct/dockge.sh index e24c74e3..b1d943a4 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/emby.sh b/ct/emby.sh index 563ecf57..a063e0af 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/emqx.sh b/ct/emqx.sh index f469e28e..6ec3cab7 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/esphome.sh b/ct/esphome.sh index 0aee7d7b..7a2e0e87 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/fhem.sh b/ct/fhem.sh index c7a12377..a98ce9ae 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 38e4f55e..380ed801 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/gotify.sh b/ct/gotify.sh index 1b5b19d9..15f911df 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/grafana.sh b/ct/grafana.sh index 047807f6..085cb4ee 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/grocy.sh b/ct/grocy.sh index 18bca608..b9c11170 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 70ed090b..b2d0645a 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homarr.sh b/ct/homarr.sh index f7a516e0..a81bad4f 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 086c8468..375024e6 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index e6e28ebf..3f2c63ed 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homebridge.sh b/ct/homebridge.sh index d32e5e51..d252b52b 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homepage.sh b/ct/homepage.sh index bbeef90c..5107f65b 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/homer.sh b/ct/homer.sh index 13a1535a..f6b04d4d 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 402a0615..9bb9a141 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/influxdb.sh b/ct/influxdb.sh index e732a60b..2d995f6b 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/iobroker.sh b/ct/iobroker.sh index eb1cccc6..0bbd1d0f 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/jackett.sh b/ct/jackett.sh index 898cb4e3..096eef89 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 3f7c9883..6f5dfc8b 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index e3af3b80..14768ed1 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/k0s.sh b/ct/k0s.sh index 5c6331bb..3b62bfc6 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/kavita.sh b/ct/kavita.sh index e2238bf1..206778fb 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 73810dc8..5e461722 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 28b1bd3b..9628b885 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index a62a2781..e2bf2fa5 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index bbd5c3c3..bb5e0b7b 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 70f6ab09..2b3eef00 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 03bc929f..1040a700 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 918a3b6c..d5a2579f 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 80d8408d..b79777df 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/n8n.sh b/ct/n8n.sh index 04de7c01..5c5feeae 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/navidrome.sh b/ct/navidrome.sh index c009f9c3..b9af1d6f 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index bcbef6dc..e4312b20 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index bd6ea26d..3456304e 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 538641ce..4f8ff0b7 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/node-red.sh b/ct/node-red.sh index cdd37d15..1f68dc09 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/octoprint.sh b/ct/octoprint.sh index ab091834..75c2ccd9 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/omada.sh b/ct/omada.sh index 33273e1c..282d6508 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/ombi.sh b/ct/ombi.sh index b3957aaa..658182dc 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/omv.sh b/ct/omv.sh index d9510fdd..318a1699 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/openhab.sh b/ct/openhab.sh index 60e9d7a7..9546085a 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/openobserve.sh b/ct/openobserve.sh index 26e36a9c..cea4c29a 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -41,8 +41,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 4f8b271c..a4a76bfc 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/owncast.sh b/ct/owncast.sh index 06832850..c06ccfbb 100644 --- a/ct/owncast.sh +++ b/ct/owncast.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index f4773d70..4d05d1d2 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 5ff79708..26e0c729 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/pialert.sh b/ct/pialert.sh index a06f2f6a..7604d444 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/pihole.sh b/ct/pihole.sh index ad17f550..57c5e9c0 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 8d36f98a..ff582d2f 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/plex.sh b/ct/plex.sh index 9ab0b8b3..998fe17c 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 667e581f..1f02fe7f 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -43,8 +43,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/podman.sh b/ct/podman.sh index b8e8e1a4..e1e65b56 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 5ff19c81..8ca8f172 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 6bf41bd1..ae519078 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 2ad20b7c..a2a54ad1 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index da21d11f..0a8b1db8 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/radarr.sh b/ct/radarr.sh index d481245f..69a75d62 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 78e19112..7168998e 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/readarr.sh b/ct/readarr.sh index 7b995990..2e4494cf 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index c9cb151a..8285e227 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index 20d9b7f7..56484a60 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/runtipi.sh b/ct/runtipi.sh index 56b513e4..279230f3 100644 --- a/ct/runtipi.sh +++ b/ct/runtipi.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index b761526d..c6d0aa26 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/scrypted.sh b/ct/scrypted.sh index 15488152..306ab620 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/sftpgo.sh b/ct/sftpgo.sh index d3c2d7b3..2354fe7d 100644 --- a/ct/sftpgo.sh +++ b/ct/sftpgo.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 3f1cdb6e..410f9433 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/sonarr.sh b/ct/sonarr.sh index 36a6297a..fe2c5939 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/stirling-pdf.sh b/ct/stirling-pdf.sh index 29232f59..f1505054 100644 --- a/ct/stirling-pdf.sh +++ b/ct/stirling-pdf.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/syncthing.sh b/ct/syncthing.sh index ad9fb728..5cf7765c 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh index 8b772760..662c36f1 100644 --- a/ct/tasmoadmin.sh +++ b/ct/tasmoadmin.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/tautulli.sh b/ct/tautulli.sh index 8430f04a..55a628d3 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 51b69f45..b658ec70 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index 8e6f042c..d69c81aa 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/transmission.sh b/ct/transmission.sh index 22638428..a7e234e4 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/trilium.sh b/ct/trilium.sh index 9a090607..d4ade959 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index bd89172b..6572c02c 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 1638def3..62f9a471 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/unifi.sh b/ct/unifi.sh index 352a809d..820930c0 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/unmanic.sh b/ct/unmanic.sh index 4750f0ee..04134cee 100644 --- a/ct/unmanic.sh +++ b/ct/unmanic.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index c0a14a46..17289c24 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 5b8e51fa..53b04287 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 488f8197..1a8b9a01 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 11b127df..5fa40ba2 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 03feba32..dedff2d6 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/wireguard.sh b/ct/wireguard.sh index f78f4cda..c8cc7c6f 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 2b0c6bbd..613de2f5 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index eebc630f..e3ae7ee8 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -40,8 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 1f36cbe4..8d3a771b 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 83adbc9d..3be12b44 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -39,8 +39,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" - APT_CACHER="no" - APT_CACHER_IP="none" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" diff --git a/misc/build.func b/misc/build.func index 56599ad4..96542c16 100644 --- a/misc/build.func +++ b/misc/build.func @@ -134,7 +134,8 @@ echo_default() { echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" + echo -e "${DGN}Using Apt-Cacher IP Address: ${BGN}Default${CL}" echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" @@ -340,6 +341,13 @@ advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" fi + if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + APT_CACHER="${APT_CACHER_IP:+yes}" + echo -e "${DGN}Using APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + else + exit-script + fi + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then DISABLEIP6="yes" else @@ -498,6 +506,8 @@ build_container() { else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)" fi + export CACHER="$APT_CACHER" + export CACHER_IP="$APT_CACHER_IP" export tz="$timezone" export DISABLEIPV6="$DISABLEIP6" export APPLICATION="$APP" @@ -580,4 +590,4 @@ description() { if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi -} +} \ No newline at end of file diff --git a/misc/install.func b/misc/install.func index d50237f4..380392a2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -131,6 +131,9 @@ network_check() { # This function updates the Container OS by running apt-get update and upgrade update_os() { msg_info "Updating Container OS" + if [[ "$CACHER" == "yes" ]]; then + echo "Acquire::http { Proxy \"http://${CACHER_IP}:3142\"; };" >/etc/apt/apt.conf.d/00aptproxy + fi $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade msg_ok "Updated Container OS" @@ -164,4 +167,4 @@ EOF fi echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update -} +} \ No newline at end of file From 5a5265e9c4f1757b89fa96e72f4edde1ae0145eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 15:32:09 -0500 Subject: [PATCH 2536/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75936efa..b54785d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,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. +## 2024-01-12 + +### Changed + +- **Apt-Cacher-NG LXC** + - NEW Script + ## 2024-01-09 ### Changed From fa8c991f94c3823d8b29ffa6e06ef7627115afc2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 16:44:28 -0500 Subject: [PATCH 2537/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b54785d3..938e2fc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ - **Apt-Cacher-NG LXC** - NEW Script +- **New Feature** + - The option to utilize Apt-Cacher-NG (Advanced settings) when creating LXCs. The added functionality is expected to reduce bandwidth usage and provide faster operating system updates. ## 2024-01-09 From 0ef40c100c3c7abc898e5d4fdd6fcfac0a1c1bfd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 17:09:40 -0500 Subject: [PATCH 2538/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 938e2fc0..54c35cba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - **Apt-Cacher-NG LXC** - NEW Script - **New Feature** - - The option to utilize Apt-Cacher-NG (Advanced settings) when creating LXCs. The added functionality is expected to reduce bandwidth usage and provide faster operating system updates. + - The option to utilize Apt-Cacher-NG (Advanced settings) when creating LXCs. The added functionality is expected to decrease bandwidth usage and expedite package installation and updates. ## 2024-01-09 From 20da249d7575d597e9aa2e5d5b7f907e21a01e95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jan 2024 18:24:04 -0500 Subject: [PATCH 2539/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c35cba..70f4235e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - **Apt-Cacher-NG LXC** - NEW Script - **New Feature** - - The option to utilize Apt-Cacher-NG (Advanced settings) when creating LXCs. The added functionality is expected to decrease bandwidth usage and expedite package installation and updates. + - The option to utilize Apt-Cacher-NG (Advanced settings) when creating LXCs. The added functionality is expected to decrease bandwidth usage and expedite package installation and updates. https://github.com/tteck/Proxmox/discussions/2332 ## 2024-01-09 From 8b340be22dbb66e1aecc593e454e079c52b728a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Jan 2024 06:30:23 -0500 Subject: [PATCH 2540/3335] Update zigbee2mqtt-install.sh use shallow clone --- install/zigbee2mqtt-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 7855e7e5..92b847a6 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -37,7 +37,7 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Setting up Zigbee2MQTT Repository" -$STD git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt +$STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt msg_ok "Set up Zigbee2MQTT Repository" read -r -p "Switch to Edge/dev branch? (y/N) " prompt From 242dfe8f730df9c68c017bd7111d3bcbd0198388 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Jan 2024 20:57:10 -0500 Subject: [PATCH 2541/3335] Update haos-vm.sh fixes https://github.com/tteck/Proxmox/issues/2338 --- vm/haos-vm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index dfa476b5..d1494a01 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -37,6 +37,7 @@ HOLD="-" CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" THIN="discard=on,ssd=1," +SPINNER_PID="" set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT From 3c515e9f8e8e6a7982d6252acf5c077ac56739c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Jan 2024 21:11:58 -0500 Subject: [PATCH 2542/3335] Update build.func tweak --- misc/build.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 96542c16..d877d42b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -474,6 +474,7 @@ start() { echo -e "⚠ User exited script \n" exit fi + SPINNER_PID="" install_script fi @@ -590,4 +591,4 @@ description() { if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi -} \ No newline at end of file +} From bf687e884f4972e8dcb85294a93fd63012b986ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Jan 2024 23:00:56 -0500 Subject: [PATCH 2543/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index d877d42b..d892cd66 100644 --- a/misc/build.func +++ b/misc/build.func @@ -582,7 +582,7 @@ EOF # This function sets the description of the container. description() { IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "
+ pct set "$CTID" -description "
# ${APP} LXC From a8eaa376c1736a1df57735ce388768a5f92af2f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Jan 2024 23:04:56 -0500 Subject: [PATCH 2544/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index d892cd66..c4d077ba 100644 --- a/misc/build.func +++ b/misc/build.func @@ -582,7 +582,7 @@ EOF # This function sets the description of the container. description() { IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "
+ pct set "$CTID" -description "
# ${APP} LXC From 7191bcabd24ed464d73f47c833253cc7c9f00c09 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Jan 2024 23:20:36 -0500 Subject: [PATCH 2545/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index c4d077ba..390c1c8e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -582,7 +582,7 @@ EOF # This function sets the description of the container. description() { IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "
+ pct set "$CTID" -description "
" # ${APP} LXC From 72fb5c396ddecc4c083340b23d6a44186dc4a0af Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Jan 2024 23:29:37 -0500 Subject: [PATCH 2546/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 390c1c8e..c4d077ba 100644 --- a/misc/build.func +++ b/misc/build.func @@ -582,7 +582,7 @@ EOF # This function sets the description of the container. description() { IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "
" + pct set "$CTID" -description "
# ${APP} LXC From 87b7fc7a94c23b21ae0ec19c491e36f388d019d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Jan 2024 08:44:35 -0500 Subject: [PATCH 2547/3335] Update apt-cacher-ng-install.sh tweak `sed` command --- install/apt-cacher-ng-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/apt-cacher-ng-install.sh b/install/apt-cacher-ng-install.sh index 2cdf05a0..fa131ef8 100644 --- a/install/apt-cacher-ng-install.sh +++ b/install/apt-cacher-ng-install.sh @@ -21,7 +21,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Apt-Cacher NG" DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng -sed -i 's/# \(PassThroughPattern: .* # this would allow CONNECT to everything\)/\1/' /etc/apt-cacher-ng/acng.conf +sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .* /' /etc/apt-cacher-ng/acng.conf systemctl enable -q --now apt-cacher-ng msg_ok "Installed Apt-Cacher NG" From 04f8092ac4800c4d8cf58d10858e6ab2079f3954 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Jan 2024 11:41:24 -0500 Subject: [PATCH 2548/3335] Create ntfy.sh --- ct/ntfy.sh | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 ct/ntfy.sh diff --git a/ct/ntfy.sh b/ct/ntfy.sh new file mode 100644 index 00000000..d12e4b3d --- /dev/null +++ b/ct/ntfy.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ____ + ____ / /_/ __/_ __ + / __ \/ __/ /_/ / / / + / / / / /_/ __/ /_/ / +/_/ /_/\__/_/ \__, / + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="ntfy" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}${CL} \n" From 1698598a7ecb59d59213ac7cbead290343acdd6b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Jan 2024 11:42:33 -0500 Subject: [PATCH 2549/3335] Create ntfy-install.sh --- install/ntfy-install.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 install/ntfy-install.sh diff --git a/install/ntfy-install.sh b/install/ntfy-install.sh new file mode 100644 index 00000000..2cdd985d --- /dev/null +++ b/install/ntfy-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y apt-transport-https +msg_ok "Installed Dependencies" + +msg_info "Installing ntfy" +mkdir -p /etc/apt/keyrings +curl -fsSL https://archive.heckel.io/apt/pubkey.txt | gpg --dearmor -o /etc/apt/keyrings/archive.heckel.io.gpg +echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/archive.heckel.io.gpg] https://archive.heckel.io/apt debian main" >/etc/apt/sources.list.d/archive.heckel.io.list +$STD apt-get update +$STD apt-get install -y ntfy +systemctl enable -q --now ntfy +msg_ok "Installed ntfy" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From e71f2bf40d02de1d09ca2e5b696ac18350972c6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 03:41:46 -0500 Subject: [PATCH 2550/3335] Update haos-vm.sh tweak --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index d1494a01..d60fd484 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -449,7 +449,7 @@ qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=32G \ -boot order=scsi0 \ - -description "
+ -description "
# Home Assistant OS From fcafbf20778ac9069dddce185b45ee1007d2b4ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 04:44:55 -0500 Subject: [PATCH 2551/3335] Update CHANGELOG.md --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70f4235e..26921c38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ - 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. +## 2024-01-16 + +### Changed + +- **Website Improvements** + - Refine and correct pointers. + - Change hover colors to intuitively indicate categories/items. + - Implement opening links in new tabs for better navigation. + - Enhance the Copy button to better indicate that the command has been successfully copied. + - Introduce a Clear Search button. + - While not directly related to the website, it's worth mentioning that the logo in newly created LXC notes now serves as a link to the website, conveniently opening in a new tab. + ## 2024-01-12 ### Changed From 0c543874c08ade531ed57bf296c83986c3257f49 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 05:48:39 -0500 Subject: [PATCH 2552/3335] Update omada-install.sh tweak --- install/omada-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index ca97a7f3..b54ec2f2 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -37,18 +37,18 @@ $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) -latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//') +latest_version=$(basename "$latest_url") -msg_info "Installing Omada Controller ${latest_version}" +msg_info "Installing Omada Controller" wget -qL ${latest_url} -$STD dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb -msg_ok "Installed Omada Controller ${latest_version}" +$STD dpkg -i ${latest_version} +msg_ok "Installed Omada Controller" motd_ssh customize msg_info "Cleaning up" -rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 693367e2782a6f631a311c8e7641ce7ea6d73284 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 05:53:10 -0500 Subject: [PATCH 2553/3335] Update omada.sh fixes https://github.com/tteck/Proxmox/issues/2349 --- ct/omada.sh | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/ct/omada.sh b/ct/omada.sh index 282d6508..82f28261 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -56,26 +56,17 @@ function update_script() { header_info if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) -latest_version=$(basename "${latest_url}" | sed -e 's/.*ller_//;s/_Li.*//') +latest_version=$(basename "${latest_url}") if [ -z "${latest_version}" ]; then msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time." exit fi -installed_version=$(dpkg -l | grep omada | awk '{print $3}') - -if [ "v${installed_version}" = "${latest_version}" ]; then - msg_info "Installed version (v${installed_version}) is the same as the latest version (${latest_version})" - sleep 2 - msg_ok "Omada Controller is already up to date" - exit -else - echo -e "Updating Omada Controller to ${latest_version}" - wget -qL ${latest_url} - dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb - rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb - echo -e "Updated Omada Controller to ${latest_version}" +echo -e "Updating Omada Controller" +wget -qL ${latest_url} +dpkg -i ${latest_version} +rm -rf ${latest_version} +echo -e "Updated Omada Controller" exit -fi } start From c5e9a48aa3e0cd7cd029ffb6ed696bd2f8f7f396 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 17:14:43 -0500 Subject: [PATCH 2554/3335] Update zigbee2mqtt-install.sh tweak dev branch --- install/zigbee2mqtt-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 92b847a6..e9b354b0 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -50,7 +50,9 @@ fi msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt if [[ $DEV == "y" ]]; then +$STD git fetch origin dev $STD git checkout dev +$STD git pull fi $STD npm ci msg_ok "Installed Zigbee2MQTT" From cbdfb1803ac89bc8e36556e3a77ba7165bf02935 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 17:21:13 -0500 Subject: [PATCH 2555/3335] Update zigbee2mqtt-install.sh remove `dev` option --- install/zigbee2mqtt-install.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index e9b354b0..277ce6ad 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -40,20 +40,8 @@ msg_info "Setting up Zigbee2MQTT Repository" $STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt msg_ok "Set up Zigbee2MQTT Repository" -read -r -p "Switch to Edge/dev branch? (y/N) " prompt -if [[ $prompt == "y" ]]; then - DEV="y" -else - DEV="n" -fi - msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt -if [[ $DEV == "y" ]]; then -$STD git fetch origin dev -$STD git checkout dev -$STD git pull -fi $STD npm ci msg_ok "Installed Zigbee2MQTT" From b816b9fc2df9186a0ed2ae7065755ea067571761 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 17:47:51 -0500 Subject: [PATCH 2556/3335] Update zigbee2mqtt-install.sh test `dev` branch --- install/zigbee2mqtt-install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index 277ce6ad..fa94476f 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -40,8 +40,20 @@ msg_info "Setting up Zigbee2MQTT Repository" $STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt msg_ok "Set up Zigbee2MQTT Repository" +read -r -p "Switch to Edge/dev branch? (y/N) " prompt +if [[ $prompt == "y" ]]; then + DEV="y" +else + DEV="n" +fi + msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt +if [[ $DEV == "y" ]]; then +$STD git fetch origin dev:dev +$STD git checkout dev +$STD git pull +fi $STD npm ci msg_ok "Installed Zigbee2MQTT" From 2997b2f911aad8c564d6162182aa72f24fee4634 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 22:24:33 -0500 Subject: [PATCH 2557/3335] Update build.func fixes https://github.com/tteck/Proxmox/issues/2356 --- misc/build.func | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index c4d077ba..ef3eec77 100644 --- a/misc/build.func +++ b/misc/build.func @@ -572,7 +572,11 @@ EOF pct start "$CTID" msg_ok "Started LXC Container" if [ "$var_os" == "alpine" ]; then - sleep 2 + sleep 3 + pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories +http://dl-cdn.alpinelinux.org/alpine/latest-stable/main +http://dl-cdn.alpinelinux.org/alpine/latest-stable/community +EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit From 79b29951d7fd2e23db42b31b6a90cc5750454bd0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jan 2024 22:29:34 -0500 Subject: [PATCH 2558/3335] Update alpine-install.func moved to `build.func` --- misc/alpine-install.func | 4 ---- 1 file changed, 4 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 16bde1d4..3820d637 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -71,10 +71,6 @@ setting_up_container() { echo -e " 🖧 Check Network Settings" exit 1 fi - cat </etc/apk/repositories -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community -EOF msg_ok "Set up Container OS" msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}" } From 4b723d5a3f6eb4f96682dfd74866545a2c156157 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jan 2024 03:52:36 -0500 Subject: [PATCH 2559/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26921c38..03995e5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,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. +## 2024-01-17 + +### Changed + +- **ntfy LXC** + - NEW Script + ## 2024-01-16 ### Changed From f6e17e85768302d7d3b27a4c9118b4e63624be33 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jan 2024 12:48:15 -0500 Subject: [PATCH 2560/3335] Update sonarr-install.sh Change user:group from sonarr:media to root:root --- install/sonarr-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 820b74f1..7f98864b 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -21,10 +21,7 @@ $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" msg_info "Installing Sonarr v4" -$STD groupadd media -$STD adduser --system --no-create-home --ingroup media sonarr mkdir -p /var/lib/sonarr/ -chown -R sonarr:media /var/lib/sonarr/ chmod 775 /var/lib/sonarr/ wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64' tar -xzf SonarrV4.tar.gz @@ -39,9 +36,6 @@ cat </etc/systemd/system/sonarr.service Description=Sonarr Daemon After=syslog.target network.target [Service] -User=sonarr -Group=media -UMask=0002 Type=simple ExecStart=/opt/Sonarr/Sonarr -nobrowser -data=/var/lib/sonarr/ TimeoutStopSec=20 From 7aa885e220011524df29d29899304c6eb7126a01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jan 2024 14:00:59 -0500 Subject: [PATCH 2561/3335] Create hyperhdr-install.sh --- install/hyperhdr-install.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 install/hyperhdr-install.sh diff --git a/install/hyperhdr-install.sh b/install/hyperhdr-install.sh new file mode 100644 index 00000000..4ced651b --- /dev/null +++ b/install/hyperhdr-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing HyperHDR" +curl -fsSL https://awawa-dev.github.io/hyperhdr.public.apt.gpg.key >/usr/share/keyrings/hyperhdr.public.apt.gpg.key +chmod go+r /usr/share/keyrings/hyperhdr.public.apt.gpg.key +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hyperhdr.public.apt.gpg.key] https://awawa-dev.github.io $(awk -F= '/VERSION_CODENAME/ {print $2}' /etc/os-release) main" >/etc/apt/sources.list.d/hyperhdr.list +$STD apt-get update +$STD apt-get install -y hyperhdr +msg_ok "Installed HyperHDR" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d5d245cf47792ea89efd3589d0083570732b2d65 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jan 2024 14:01:29 -0500 Subject: [PATCH 2562/3335] Create hyperhdr.sh --- ct/hyperhdr.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 ct/hyperhdr.sh diff --git a/ct/hyperhdr.sh b/ct/hyperhdr.sh new file mode 100644 index 00000000..233d7130 --- /dev/null +++ b/ct/hyperhdr.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ ______ ____ + / / / /_ ______ ___ _____/ / / / __ \/ __ \ + / /_/ / / / / __ \/ _ \/ ___/ /_/ / / / / /_/ / + / __ / /_/ / /_/ / __/ / / __ / /_/ / _, _/ +/_/ /_/\__, / .___/\___/_/ /_/ /_/_____/_/ |_| + /____/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="HyperHDR" +var_disk="4" +var_cpu="2" +var_ram="2048" +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="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8090${CL} \n" From 2699f254575b7b91e3627a087412c91d750ace01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jan 2024 14:17:07 -0500 Subject: [PATCH 2563/3335] Update hyperhdr-install.sh Create service file --- install/hyperhdr-install.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/install/hyperhdr-install.sh b/install/hyperhdr-install.sh index 4ced651b..bca1ce2c 100644 --- a/install/hyperhdr-install.sh +++ b/install/hyperhdr-install.sh @@ -28,6 +28,24 @@ $STD apt-get update $STD apt-get install -y hyperhdr msg_ok "Installed HyperHDR" +msg_info "Creating Service" +cat </etc/systemd/system/hyperhdr.service +[Unit] +Description=HyperHDR Service +After=syslog.target network.target + +[Service] +Restart=on-failure +RestartSec=5 +Type=simple +ExecStart=/usr/bin/hyperhdr + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now hyperhdr +msg_ok "Created Service" + motd_ssh customize From ea9fe637c504a41a8b566572ada87f94e763dd55 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jan 2024 14:36:28 -0500 Subject: [PATCH 2564/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03995e5a..c1993d52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ - **ntfy LXC** - NEW Script +- **HyperHDR LXC** + - NEW Script ## 2024-01-16 From 8ef47c526f18010c9cac0d610f3880e86cbe9af1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 Jan 2024 05:06:54 -0500 Subject: [PATCH 2565/3335] Update netdata.sh fixes https://github.com/tteck/Proxmox/issues/2359 --- misc/netdata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 3596f049..885cd42d 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -95,7 +95,7 @@ uninstall() { } if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then - msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE Version 8.0 or higher" echo -e "Exiting..." sleep 2 From c3bc20be71ec481f72bd28a3d6764823855ac513 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 Jan 2024 05:33:17 -0500 Subject: [PATCH 2566/3335] Update hyperhdr.sh tweak --- ct/hyperhdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/hyperhdr.sh b/ct/hyperhdr.sh index 233d7130..c32c168a 100644 --- a/ct/hyperhdr.sh +++ b/ct/hyperhdr.sh @@ -30,7 +30,7 @@ color catch_errors function default_settings() { - CT_TYPE="1" + CT_TYPE="0" PW="" CT_ID=$NEXTID HN=$NSAPP From 1459ffdb6fe99a848fd7e700e073233f73284b30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 Jan 2024 17:15:38 -0500 Subject: [PATCH 2567/3335] Update alpine-zigbee2mqtt-install.sh fix Zigbee2MQTT not starting --- install/alpine-zigbee2mqtt-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 2c805f23..078bc595 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -23,7 +23,8 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Zigbee2MQTT" $STD apk add zigbee2mqtt +sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="zigbee2mqtt"/' /etc/conf.d/zigbee2mqtt msg_ok "Installed Alpine-Zigbee2MQTT" motd_ssh -customize \ No newline at end of file +customize From ba752674f36bd388641056a498ef2a6261241ee2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 Jan 2024 17:25:48 -0500 Subject: [PATCH 2568/3335] Update alpine-zigbee2mqtt-install.sh restart service after `sed` command --- install/alpine-zigbee2mqtt-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 078bc595..cb5bb356 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -24,6 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Zigbee2MQTT" $STD apk add zigbee2mqtt sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="zigbee2mqtt"/' /etc/conf.d/zigbee2mqtt +$STD rc-service zigbee2mqtt restart msg_ok "Installed Alpine-Zigbee2MQTT" motd_ssh From 638babe5c3d8076b456b1f968d2e1a76da48ea9c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 Jan 2024 19:41:25 -0500 Subject: [PATCH 2569/3335] Update alpine-zigbee2mqtt-install.sh tweaks --- install/alpine-zigbee2mqtt-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index cb5bb356..a98f1da5 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -23,7 +23,11 @@ msg_ok "Installed Dependencies" msg_info "Installing Alpine-Zigbee2MQTT" $STD apk add zigbee2mqtt -sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="zigbee2mqtt"/' /etc/conf.d/zigbee2mqtt +mkdir -p /root/.z2m +ln -s /etc/zigbee2mqtt/ /root/.z2m +chown -R root:root /etc/zigbee2mqtt /root/.z2m +sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="root"/' /etc/conf.d/zigbee2mqtt +$STD rc-update add zigbee2mqtt $STD rc-service zigbee2mqtt restart msg_ok "Installed Alpine-Zigbee2MQTT" From 435de786c5873d053aac430f4fd3f6441e9e62ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 18 Jan 2024 23:58:55 -0500 Subject: [PATCH 2570/3335] Update nginxproxymanager.sh fixes https://github.com/tteck/Proxmox/issues/2362 --- ct/nginxproxymanager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 3456304e..bfdcf8bf 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -136,6 +136,7 @@ function update_script() { msg_info "Building Frontend" cd ./frontend export NODE_ENV=development + yarn add -D sass-loader@10.5.2 &>/dev/null yarn install --network-timeout=30000 &>/dev/null yarn build &>/dev/null cp -r dist/* /app/frontend From d2b5fc83447f8e302601835289339d7e27a579bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Jan 2024 00:01:21 -0500 Subject: [PATCH 2571/3335] Update nginxproxymanager-install.sh - set sass-loader version --- install/nginxproxymanager-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index fcf6ebc7..2d0973d8 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -134,6 +134,7 @@ msg_ok "Set up Enviroment" msg_info "Building Frontend" cd ./frontend export NODE_ENV=development +$STD yarn add -D sass-loader@10.5.2 $STD yarn install --network-timeout=30000 $STD yarn build cp -r dist/* /app/frontend From c60490b8ba2ec03d7f3c518622022092a0c329f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Jan 2024 00:03:20 -0500 Subject: [PATCH 2572/3335] Update nginxproxymanager.sh - Reboot LXC if no GUI --- ct/nginxproxymanager.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index bfdcf8bf..675d59a1 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -186,4 +186,5 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} \n" + ${BL}http://${IP}:81${CL} + Reboot LXC if no GUI\n" From 6f4501c7a31f12804dd5ae35ebd4cf33c8931beb Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Jan 2024 00:16:02 -0500 Subject: [PATCH 2573/3335] Update nginxproxymanager.sh tweak --- ct/nginxproxymanager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 675d59a1..98a62e86 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -187,4 +187,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:81${CL} - Reboot LXC if no GUI\n" + ${RD}Reboot LXC if no GUI${CL}\n" From 052b2f398294b5a055276ea5956d61688d0d2ab6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Jan 2024 13:17:58 -0500 Subject: [PATCH 2574/3335] Update haos-vm.sh - Change spinner --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index d60fd484..c4f54130 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -75,7 +75,7 @@ fi function spinner() { printf "\e[?25l" - spinner="/-\\|/-\\|" + spinner="◐◓◑◒" spin_i=0 while true; do printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" From e6e2b988544ce26c20c5056298d499cce5656945 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Jan 2024 20:55:44 -0500 Subject: [PATCH 2575/3335] Update apt-cacher-ng-install.sh remove space in sed command --- install/apt-cacher-ng-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/apt-cacher-ng-install.sh b/install/apt-cacher-ng-install.sh index fa131ef8..1d7572c2 100644 --- a/install/apt-cacher-ng-install.sh +++ b/install/apt-cacher-ng-install.sh @@ -21,7 +21,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Apt-Cacher NG" DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng -sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .* /' /etc/apt-cacher-ng/acng.conf +sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .*/' /etc/apt-cacher-ng/acng.conf systemctl enable -q --now apt-cacher-ng msg_ok "Installed Apt-Cacher NG" From 1e713d7b7b3371502ddd2f1b68f2f6d0de038aba Mon Sep 17 00:00:00 2001 From: Madhur Ahuja Date: Sat, 20 Jan 2024 18:14:00 +0530 Subject: [PATCH 2576/3335] Add Cassandra script (#2367) --------- Co-authored-by: @madhur --- ct/cassandra.sh | 66 ++++++++++++++++++++++++++++++++++++ install/cassandra-install.sh | 66 ++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 ct/cassandra.sh create mode 100644 install/cassandra-install.sh diff --git a/ct/cassandra.sh b/ct/cassandra.sh new file mode 100644 index 00000000..c47f0655 --- /dev/null +++ b/ct/cassandra.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ + / ____/___ _______________ _____ ____/ /________ _ + / / / __ `/ ___/ ___/ __ `/ __ \/ __ / ___/ __ `/ +/ /___/ /_/ (__ |__ ) /_/ / / / / /_/ / / / /_/ / +\____/\__,_/____/____/\__,_/_/ /_/\__,_/_/ \__,_/ +EOF +} +header_info +echo -e "Loading..." +APP="Cassandra" +var_disk="4" +var_cpu="1" +var_ram="2048" +var_os="debian" +var_version="12" +VERBOSE="yes" +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 +if [[ ! -f /etc/systemd/system/cassandra.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh new file mode 100644 index 00000000..15f05f91 --- /dev/null +++ b/install/cassandra-install.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apt-transport-https +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing OpenJDK" +wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg +echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list +$STD apt-get update +$STD apt-get install -y temurin-8-jdk +msg_ok "Installed OpenJDK" + +msg_info "Installing Cassandra" +release=$(curl -s https://cassandra.apache.org/_/download.html | grep -oP '(?<=/cassandra/)[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) +wget -qO- https://dlcdn.apache.org/cassandra/$release/apache-cassandra-${release}-bin.tar.gz | tar -xz -C /opt +mv /opt/apache-cassandra-${release} /opt/cassandra +sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /opt/cassandra/conf/cassandra.yaml +msg_ok "Installed Cassandra" + +msg_info "Creating Service" +cat </etc/systemd/system/cassandra.service +[Unit] +Description=Cassandra +After=network.target + +[Service] +PIDFile=/tmp/cassandra.pid +ExecStart=/opt/cassandra/bin/cassandra -p /tmp/cassandra.pid -R +StandardOutput=append:/tmp/cassandra.log +StandardError=append:/tmp/cassandra-error.log +LimitNOFILE=100000 +LimitMEMLOCK=infinity +LimitNPROC=32768 +LimitAS=infinity + +[Install] +WantedBy=default.target +EOF +systemctl enable -q --now cassandra.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 889ad6bc18262fb2b7cb783488111e4e41875316 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 07:53:49 -0500 Subject: [PATCH 2577/3335] Update cassandra.sh tweak --- ct/cassandra.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/cassandra.sh b/ct/cassandra.sh index c47f0655..ce6d27c2 100644 --- a/ct/cassandra.sh +++ b/ct/cassandra.sh @@ -8,11 +8,12 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ __ + ______ __ / ____/___ _______________ _____ ____/ /________ _ / / / __ `/ ___/ ___/ __ `/ __ \/ __ / ___/ __ `/ -/ /___/ /_/ (__ |__ ) /_/ / / / / /_/ / / / /_/ / -\____/\__,_/____/____/\__,_/_/ /_/\__,_/_/ \__,_/ +/ /___/ /_/ (__ |__ ) /_/ / / / / /_/ / / / /_/ / +\____/\__,_/____/____/\__,_/_/ /_/\__,_/_/ \__,_/ + EOF } header_info From 8f53044d24264ed3427feabfd52a9a0e54110647 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 08:48:48 -0500 Subject: [PATCH 2578/3335] Update cassandra-install.sh test alternative installation method --- install/cassandra-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index 15f05f91..cc045709 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -29,10 +29,14 @@ $STD apt-get install -y temurin-8-jdk msg_ok "Installed OpenJDK" msg_info "Installing Cassandra" -release=$(curl -s https://cassandra.apache.org/_/download.html | grep -oP '(?<=/cassandra/)[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) -wget -qO- https://dlcdn.apache.org/cassandra/$release/apache-cassandra-${release}-bin.tar.gz | tar -xz -C /opt -mv /opt/apache-cassandra-${release} /opt/cassandra -sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /opt/cassandra/conf/cassandra.yaml +#release=$(curl -s https://cassandra.apache.org/_/download.html | grep -oP '(?<=/cassandra/)[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) +#wget -qO- https://dlcdn.apache.org/cassandra/$release/apache-cassandra-${release}-bin.tar.gz | tar -xz -C /opt +#mv /opt/apache-cassandra-${release} /opt/cassandra +#sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /opt/cassandra/conf/cassandra.yaml +wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --dearmor >/etc/apt/trusted.gpg.d/cassandra.gpg +echo "deb https://debian.cassandra.apache.org 41x main" >/etc/apt/sources.list.d/cassandra.sources.list +$STD apt-get update +$STD apt-get cassandra cassandra-tools msg_ok "Installed Cassandra" msg_info "Creating Service" From 9675c2259af126f740f9c8c6b2d33fd18471bc8f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 08:52:42 -0500 Subject: [PATCH 2579/3335] Update cassandra-install.sh --- install/cassandra-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index cc045709..7acf1666 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -36,7 +36,7 @@ msg_info "Installing Cassandra" wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --dearmor >/etc/apt/trusted.gpg.d/cassandra.gpg echo "deb https://debian.cassandra.apache.org 41x main" >/etc/apt/sources.list.d/cassandra.sources.list $STD apt-get update -$STD apt-get cassandra cassandra-tools +$STD apt-get install cassandra cassandra-tools msg_ok "Installed Cassandra" msg_info "Creating Service" From c550d996bb4998e90df02811efa718e1a909e2a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 08:54:08 -0500 Subject: [PATCH 2580/3335] Update cassandra-install.sh --- install/cassandra-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index 7acf1666..e0fb0c40 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -25,7 +25,7 @@ msg_info "Installing OpenJDK" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update -$STD apt-get install -y temurin-8-jdk +$STD apt-get install -y temurin-11-jdk msg_ok "Installed OpenJDK" msg_info "Installing Cassandra" From b1dc1b8ea09b9afc01ba06c8c39938daddbe3b70 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 08:57:31 -0500 Subject: [PATCH 2581/3335] Update cassandra-install.sh --- install/cassandra-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index e0fb0c40..5fb63419 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -36,7 +36,7 @@ msg_info "Installing Cassandra" wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --dearmor >/etc/apt/trusted.gpg.d/cassandra.gpg echo "deb https://debian.cassandra.apache.org 41x main" >/etc/apt/sources.list.d/cassandra.sources.list $STD apt-get update -$STD apt-get install cassandra cassandra-tools +$STD apt-get install -y cassandra cassandra-tools msg_ok "Installed Cassandra" msg_info "Creating Service" From 71cafc9d0f3934085cdcdc2c55ec61802f6f60ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:11:09 -0500 Subject: [PATCH 2582/3335] Update cassandra-install.sh finalize installation --- install/cassandra-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index 5fb63419..a26e7dd1 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -29,14 +29,11 @@ $STD apt-get install -y temurin-11-jdk msg_ok "Installed OpenJDK" msg_info "Installing Cassandra" -#release=$(curl -s https://cassandra.apache.org/_/download.html | grep -oP '(?<=/cassandra/)[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) -#wget -qO- https://dlcdn.apache.org/cassandra/$release/apache-cassandra-${release}-bin.tar.gz | tar -xz -C /opt -#mv /opt/apache-cassandra-${release} /opt/cassandra -#sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /opt/cassandra/conf/cassandra.yaml wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --dearmor >/etc/apt/trusted.gpg.d/cassandra.gpg echo "deb https://debian.cassandra.apache.org 41x main" >/etc/apt/sources.list.d/cassandra.sources.list $STD apt-get update $STD apt-get install -y cassandra cassandra-tools +sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /etc/cassandra/cassandra.yaml msg_ok "Installed Cassandra" msg_info "Creating Service" From 967880c664304a32772fd97fc7d1d04011468333 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:13:32 -0500 Subject: [PATCH 2583/3335] Update cassandra-install.sh test without service file --- install/cassandra-install.sh | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index a26e7dd1..5926b525 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -37,25 +37,8 @@ sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_int msg_ok "Installed Cassandra" msg_info "Creating Service" -cat </etc/systemd/system/cassandra.service -[Unit] -Description=Cassandra -After=network.target -[Service] -PIDFile=/tmp/cassandra.pid -ExecStart=/opt/cassandra/bin/cassandra -p /tmp/cassandra.pid -R -StandardOutput=append:/tmp/cassandra.log -StandardError=append:/tmp/cassandra-error.log -LimitNOFILE=100000 -LimitMEMLOCK=infinity -LimitNPROC=32768 -LimitAS=infinity - -[Install] -WantedBy=default.target -EOF -systemctl enable -q --now cassandra.service +#systemctl enable -q --now cassandra.service msg_ok "Created Service" motd_ssh From d0b60329f619c1a48d7be2da17674494ccf80519 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:23:21 -0500 Subject: [PATCH 2584/3335] Update cassandra-install.sh tweak --- install/cassandra-install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/install/cassandra-install.sh b/install/cassandra-install.sh index 5926b525..76953f73 100644 --- a/install/cassandra-install.sh +++ b/install/cassandra-install.sh @@ -18,7 +18,7 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y apt-transport-https -$STD apt-get install -y gnupg +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing OpenJDK" @@ -36,11 +36,6 @@ $STD apt-get install -y cassandra cassandra-tools sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /etc/cassandra/cassandra.yaml msg_ok "Installed Cassandra" -msg_info "Creating Service" - -#systemctl enable -q --now cassandra.service -msg_ok "Created Service" - motd_ssh customize From 15b22bfc6922c533d327fd9c42755a08abee80d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:35:30 -0500 Subject: [PATCH 2585/3335] Update and rename cassandra.sh to apache-cassandra.sh tweak --- ct/{cassandra.sh => apache-cassandra.sh} | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename ct/{cassandra.sh => apache-cassandra.sh} (68%) diff --git a/ct/cassandra.sh b/ct/apache-cassandra.sh similarity index 68% rename from ct/cassandra.sh rename to ct/apache-cassandra.sh index ce6d27c2..35f83dff 100644 --- a/ct/cassandra.sh +++ b/ct/apache-cassandra.sh @@ -8,17 +8,18 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ __ - / ____/___ _______________ _____ ____/ /________ _ - / / / __ `/ ___/ ___/ __ `/ __ \/ __ / ___/ __ `/ -/ /___/ /_/ (__ |__ ) /_/ / / / / /_/ / / / /_/ / -\____/\__,_/____/____/\__,_/_/ /_/\__,_/_/ \__,_/ + ___ __ ______ __ + / | ____ ____ ______/ /_ ___ / ____/___ _______________ _____ ____/ /________ _ + / /| | / __ \/ __ `/ ___/ __ \/ _ \ / / / __ `/ ___/ ___/ __ `/ __ \/ __ / ___/ __ `/ + / ___ |/ /_/ / /_/ / /__/ / / / __/ / /___/ /_/ (__ |__ ) /_/ / / / / /_/ / / / /_/ / +/_/ |_/ .___/\__,_/\___/_/ /_/\___/ \____/\__,_/____/____/\__,_/_/ /_/\__,_/_/ \__,_/ + /_/ EOF } header_info echo -e "Loading..." -APP="Cassandra" +APP="Apache-Cassandra" var_disk="4" var_cpu="1" var_ram="2048" From 47c52291f729728a4ab8a10d8cd60061e8592295 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:36:13 -0500 Subject: [PATCH 2586/3335] Rename cassandra-install.sh to apache-cassandra-install.sh tweak --- install/{cassandra-install.sh => apache-cassandra-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename install/{cassandra-install.sh => apache-cassandra-install.sh} (100%) diff --git a/install/cassandra-install.sh b/install/apache-cassandra-install.sh similarity index 100% rename from install/cassandra-install.sh rename to install/apache-cassandra-install.sh From 7dec63e129e6621e3b9bb2b2effb2ea78e2130e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:36:52 -0500 Subject: [PATCH 2587/3335] Update apache-cassandra-install.sh tweak --- install/apache-cassandra-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/apache-cassandra-install.sh b/install/apache-cassandra-install.sh index 76953f73..8068e81f 100644 --- a/install/apache-cassandra-install.sh +++ b/install/apache-cassandra-install.sh @@ -28,13 +28,13 @@ $STD apt-get update $STD apt-get install -y temurin-11-jdk msg_ok "Installed OpenJDK" -msg_info "Installing Cassandra" +msg_info "Installing Apache Cassandra" wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --dearmor >/etc/apt/trusted.gpg.d/cassandra.gpg echo "deb https://debian.cassandra.apache.org 41x main" >/etc/apt/sources.list.d/cassandra.sources.list $STD apt-get update $STD apt-get install -y cassandra cassandra-tools sed -i -e 's/^rpc_address: localhost/#rpc_address: localhost/g' -e 's/^# rpc_interface: eth1/rpc_interface: eth0/g' /etc/cassandra/cassandra.yaml -msg_ok "Installed Cassandra" +msg_ok "Installed Apache Cassandra" motd_ssh customize From 54093612da7b8882955754693dbd74595871097c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:45:29 -0500 Subject: [PATCH 2588/3335] Update apache-cassandra-install.sh tweak --- install/apache-cassandra-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/apache-cassandra-install.sh b/install/apache-cassandra-install.sh index 8068e81f..0cc837f0 100644 --- a/install/apache-cassandra-install.sh +++ b/install/apache-cassandra-install.sh @@ -21,12 +21,12 @@ $STD apt-get install -y apt-transport-https $STD apt-get install -y gpg msg_ok "Installed Dependencies" -msg_info "Installing OpenJDK" +msg_info "Installing Eclipse Temurin" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update -$STD apt-get install -y temurin-11-jdk -msg_ok "Installed OpenJDK" +$STD apt-get install -y temurin-11-jdk-headless +msg_ok "Installed Eclipse Temurin" msg_info "Installing Apache Cassandra" wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --dearmor >/etc/apt/trusted.gpg.d/cassandra.gpg From 7c65d49f045e5681cf38eec2fd22d25356e20ff7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 09:47:45 -0500 Subject: [PATCH 2589/3335] Update apache-cassandra-install.sh --- install/apache-cassandra-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/apache-cassandra-install.sh b/install/apache-cassandra-install.sh index 0cc837f0..070a773f 100644 --- a/install/apache-cassandra-install.sh +++ b/install/apache-cassandra-install.sh @@ -25,7 +25,7 @@ msg_info "Installing Eclipse Temurin" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update -$STD apt-get install -y temurin-11-jdk-headless +$STD apt-get install -y temurin-11-jdk msg_ok "Installed Eclipse Temurin" msg_info "Installing Apache Cassandra" From 4653d4f81829d1d7a3f37b0be433031a1764d5ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 10:03:05 -0500 Subject: [PATCH 2590/3335] Update apache-cassandra-install.sh tweak --- install/apache-cassandra-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/apache-cassandra-install.sh b/install/apache-cassandra-install.sh index 070a773f..da0c1f40 100644 --- a/install/apache-cassandra-install.sh +++ b/install/apache-cassandra-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y apt-transport-https $STD apt-get install -y gpg msg_ok "Installed Dependencies" -msg_info "Installing Eclipse Temurin" +msg_info "Installing Eclipse Temurin (Patience)" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update From 2806ab78f5b28b5f968ceaf06bb7f0ff93ffa29f Mon Sep 17 00:00:00 2001 From: Madhur Ahuja Date: Sat, 20 Jan 2024 21:12:09 +0530 Subject: [PATCH 2591/3335] Add script for redis (#2371) --- ct/redis.sh | 67 ++++++++++++++++++++++++++++++++++++++++ install/redis-install.sh | 40 ++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 ct/redis.sh create mode 100644 install/redis-install.sh diff --git a/ct/redis.sh b/ct/redis.sh new file mode 100644 index 00000000..c4621e20 --- /dev/null +++ b/ct/redis.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ___ + / __ \___ ____/ (_)____ + / /_/ / _ \/ __ / / ___/ + / _, _/ __/ /_/ / (__ ) +/_/ |_|\___/\__,_/_/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Redis" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="12" +VERBOSE="yes" +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 +if [[ ! -f /lib/systemd/system/redis-server.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/install/redis-install.sh b/install/redis-install.sh new file mode 100644 index 00000000..d62e7847 --- /dev/null +++ b/install/redis-install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apt-transport-https +$STD apt-get install -y gnupg +$STD apt-get install -y lsb-release +msg_ok "Installed Dependencies" + +msg_info "Installing Redis" +curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list +$STD apt-get update +$STD apt-get install -y redis +sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis/redis.conf +systemctl enable -q --now redis-server.service +msg_ok "Installed Redis" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From b971b48fe184a5cf961cf31e511281c6d3c4fd43 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jan 2024 11:06:11 -0500 Subject: [PATCH 2592/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1993d52..c8106ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ - 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. +## 2024-01-20 + +### Changed + +- **Apache-Cassandra LXC** + - NEW Script +- **Redis LXC** + - NEW Script + ## 2024-01-17 ### Changed From 1a363ef9a579ec5eecb2e641bdd65952da7c9f06 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 04:23:22 -0500 Subject: [PATCH 2593/3335] Update haos-vm.sh tweak --- vm/haos-vm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index c4f54130..65733214 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -43,7 +43,7 @@ trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT function error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -91,14 +91,14 @@ function msg_info() { } function msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" From 0d90ef3ea378cf04b7a4c4a7824888f9108e8de9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 04:28:42 -0500 Subject: [PATCH 2594/3335] Update build.func tweak --- misc/build.func | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index ef3eec77..e526ca57 100644 --- a/misc/build.func +++ b/misc/build.func @@ -27,7 +27,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -58,7 +58,7 @@ msg_info() { # This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" @@ -66,7 +66,7 @@ msg_ok() { # This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" From 1782fad313daa8fef61bc919a63a666efa338e2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 04:30:01 -0500 Subject: [PATCH 2595/3335] Update install.func tweak --- misc/install.func | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/install.func b/misc/install.func index 380392a2..4f98236f 100644 --- a/misc/install.func +++ b/misc/install.func @@ -35,7 +35,7 @@ catch_errors() { # This function handles errors error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -69,7 +69,7 @@ msg_info() { # This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" @@ -77,7 +77,7 @@ msg_ok() { # This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" @@ -167,4 +167,4 @@ EOF fi echo "bash -c \"\$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update -} \ No newline at end of file +} From a6549aef642f037c14b550af2c1bb0344b697bbb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 04:31:14 -0500 Subject: [PATCH 2596/3335] Update create_lxc.sh tweak --- ct/create_lxc.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 9d41819d..010dffb8 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -25,7 +25,7 @@ trap 'error_handler $LINENO "$BASH_COMMAND"' ERR # This function handles errors function error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -55,7 +55,7 @@ function msg_info() { # This function displays a success message with a green color. function msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" @@ -63,7 +63,7 @@ function msg_ok() { # This function displays a error message with a red color. function msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" From 623f0b298b856e0e44138f7439c693b68f2b55b2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 05:43:47 -0500 Subject: [PATCH 2597/3335] Update nginxproxymanager-install.sh apply fixes --- install/nginxproxymanager-install.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 2d0973d8..1c9d2972 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -79,8 +79,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+${RELEASE}+g" backend/package.json -sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json +sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json +sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") @@ -125,17 +125,12 @@ fi mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global -wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-noarch.tar.xz" -wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-x86_64.tar.xz" -tar -C / -Jxpf s6-overlay-noarch.tar.xz -tar -C / -Jxpf s6-overlay-x86_64.tar.xz msg_ok "Set up Enviroment" msg_info "Building Frontend" cd ./frontend -export NODE_ENV=development -$STD yarn add -D sass-loader@10.5.2 -$STD yarn install --network-timeout=30000 +$STD yarn install +$STD yarn upgrade $STD yarn build cp -r dist/* /app/frontend cp -r app-images/* /app/frontend/images @@ -189,12 +184,13 @@ customize msg_info "Starting Services" sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg -$STD systemctl enable --now openresty -$STD systemctl enable --now npm +systemctl enable -q --now openresty +systemctl enable -q --now npm msg_ok "Started Services" msg_info "Cleaning up" rm -rf ../nginx-proxy-manager-* s6-overlay-noarch.tar.xz s6-overlay-x86_64.tar.xz +systemctl restart openresty $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From a45c65cd145a3879a6f3ec8284cf7a0fe6943e50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 05:44:52 -0500 Subject: [PATCH 2598/3335] Update nginxproxymanager.sh apply fixes --- ct/nginxproxymanager.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 98a62e86..1abfd3c6 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -86,8 +86,8 @@ function update_script() { ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx - sed -i "s+0.0.0+${RELEASE}+g" backend/package.json - sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do @@ -126,18 +126,13 @@ function update_script() { mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global - wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-noarch.tar.xz" - wget -q "https://github.com/just-containers/s6-overlay/releases/download/v3.1.5.0/s6-overlay-x86_64.tar.xz" - tar -C / -Jxpf s6-overlay-noarch.tar.xz - tar -C / -Jxpf s6-overlay-x86_64.tar.xz python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null msg_ok "Setup Enviroment" msg_info "Building Frontend" cd ./frontend - export NODE_ENV=development - yarn add -D sass-loader@10.5.2 &>/dev/null - yarn install --network-timeout=30000 &>/dev/null + yarn install &>/dev/null + yarn upgrade &>/dev/null yarn build &>/dev/null cp -r dist/* /app/frontend cp -r app-images/* /app/frontend/images @@ -186,5 +181,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:81${CL} - ${RD}Reboot LXC if no GUI${CL}\n" + ${BL}http://${IP}:81${CL}\n" From edf3803362cb7ad152fb386997def01edf5ef57e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 07:03:52 -0500 Subject: [PATCH 2599/3335] Update nginxproxymanager-install.sh - nvm v0.39.7 - node.js v16.20.2 - Transition to using pnpm instead of yarn. --- install/nginxproxymanager-install.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 1c9d2972..fa50ec9b 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -54,15 +54,15 @@ $STD apt-get -y install openresty msg_ok "Installed Openresty" msg_info "Installing Node.js" -$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh) +$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh) source ~/.bashrc -$STD nvm install 16.20.1 -ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node +$STD nvm install 16.20.2 +ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node msg_ok "Installed Node.js" -msg_info "Installing Yarn" -$STD npm install -g yarn -msg_ok "Installed Yarn" +msg_info "Installing pnpm" +$STD npm install -g pnpm +msg_ok "Installed pnpm" RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | @@ -129,9 +129,9 @@ msg_ok "Set up Enviroment" msg_info "Building Frontend" cd ./frontend -$STD yarn install -$STD yarn upgrade -$STD yarn build +$STD pnpm install +$STD pnpm upgrade +$STD pnpm run build cp -r dist/* /app/frontend cp -r app-images/* /app/frontend/images msg_ok "Built Frontend" @@ -154,8 +154,7 @@ if [ ! -f /app/config/production.json ]; then EOF fi cd /app -export NODE_ENV=development -$STD yarn install --network-timeout=30000 +$STD pnpm install msg_ok "Initialized Backend" msg_info "Creating Service" @@ -189,7 +188,7 @@ systemctl enable -q --now npm msg_ok "Started Services" msg_info "Cleaning up" -rm -rf ../nginx-proxy-manager-* s6-overlay-noarch.tar.xz s6-overlay-x86_64.tar.xz +rm -rf ../nginx-proxy-manager-* systemctl restart openresty $STD apt-get autoremove $STD apt-get autoclean From 9ef0ad7ec7ffce5d2402f971660779f141dab563 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 07:06:01 -0500 Subject: [PATCH 2600/3335] Update nginxproxymanager.sh - Transition to using pnpm instead of yarn. --- ct/nginxproxymanager.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 1abfd3c6..914613fd 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -129,11 +129,17 @@ function update_script() { python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null msg_ok "Setup Enviroment" + if ! command -v pnpm &> /dev/null; then + msg_info "Installing pnpm" + npm install -g pnpm &>/dev/null + msg_ok "Installed pnpm" + fi + msg_info "Building Frontend" cd ./frontend - yarn install &>/dev/null - yarn upgrade &>/dev/null - yarn build &>/dev/null + pnpm install &>/dev/null + pnpm upgrade &>/dev/null + pnpm run build &>/dev/null cp -r dist/* /app/frontend cp -r app-images/* /app/frontend/images msg_ok "Built Frontend" @@ -156,8 +162,7 @@ function update_script() { EOF fi cd /app - export NODE_ENV=development - yarn install --network-timeout=30000 &>/dev/null + pnpm install &>/dev/null msg_ok "Initialized Backend" msg_info "Starting Services" @@ -168,7 +173,7 @@ EOF msg_ok "Started Services" msg_info "Cleaning up" - rm -rf ~/nginx-proxy-manager-* s6-overlay-noarch.tar.xz s6-overlay-x86_64.tar.xz + rm -rf ~/nginx-proxy-manager-* msg_ok "Cleaned" msg_ok "Updated Successfully" From 14f4d9f852428e5ab1b5979387f541d63329c954 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 13:43:10 -0500 Subject: [PATCH 2601/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index fa50ec9b..52ee0e70 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -81,6 +81,8 @@ ln -sf /usr/local/openresty/nginx/ /etc/nginx sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json +sed -i 's|"fork-me": ".*"|"fork-me": "Proxmox VE Helper-Scripts"|' frontend/js/i18n/messages.json +sed -i "s|https://github.com.*source=nginx-proxy-manager|https://helper-scripts.com|g" frontend/js/app/ui/footer/main.ejs sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") From bd3321fd8c55f4fcbb60e0d5a3776a100f216f43 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jan 2024 13:47:23 -0500 Subject: [PATCH 2602/3335] Update nginxproxymanager.sh tweak --- ct/nginxproxymanager.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 914613fd..4e286344 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -88,6 +88,8 @@ function update_script() { ln -sf /usr/local/openresty/nginx/ /etc/nginx sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json + sed -i 's|"fork-me": ".*"|"fork-me": "Proxmox VE Helper-Scripts"|' frontend/js/i18n/messages.json + sed -i "s|https://github.com.*source=nginx-proxy-manager|https://helper-scripts.com|g" frontend/js/app/ui/footer/main.ejs sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do From e690bcf08ff2cd6fa3ae291dbfe1b8fa965cd5e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Jan 2024 04:39:31 -0500 Subject: [PATCH 2603/3335] Update agentdvr-install.sh - change service name - fixes https://github.com/tteck/Proxmox/issues/2379 --- install/agentdvr-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh index 239a57ff..69491da5 100644 --- a/install/agentdvr-install.sh +++ b/install/agentdvr-install.sh @@ -36,7 +36,7 @@ chmod +x ./Agent msg_ok "Installed AgentDVR" msg_info "Creating Service" -cat </etc/systemd/system/agentdvr.service +cat </etc/systemd/system/AgentDVR.service [Unit] Description=AgentDVR @@ -51,7 +51,7 @@ RestartSec=5 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now agentdvr.service +systemctl enable -q --now AgentDVR.service msg_ok "Created Service" motd_ssh From 3f5fc485e632d9552f9615b7fb2a42051e988ea2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Jan 2024 04:44:50 -0500 Subject: [PATCH 2604/3335] Update yunohost-install.sh fixes https://github.com/tteck/Proxmox/issues/2380 --- install/yunohost-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index 606b0e21..0197eadb 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -24,6 +24,7 @@ $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" msg_info "Installing YunoHost (Patience)" +touch /etc/.pve-ignore.resolv.conf curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" From edd6eacdd3763c7eac7df9941505596851d4cd6e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Jan 2024 11:37:23 -0500 Subject: [PATCH 2605/3335] Update commafeed.sh add update path --- ct/commafeed.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ct/commafeed.sh b/ct/commafeed.sh index 0084964a..c5eeecad 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -55,7 +55,19 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/commafeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Stopping CommaFeed" +systemctl stop commafeed +msg_ok "Stopped CommaFeed" + +msg_info "Updating CommaFeed" +cd /opt/commafeed +rm commafeed.jar +wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar +msg_ok "Updated CommaFeed" + +msg_info "Starting CommaFeed" +systemctl start commafeed +msg_ok "Update Completed Successfully" exit } From c1bd8facd14bbed1c33c28b5943207e8050489df Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Jan 2024 04:37:38 -0500 Subject: [PATCH 2606/3335] Update scrypted-install.sh node.js v20 --- install/scrypted-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 1e547297..79f0dba8 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -68,13 +68,12 @@ msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js/npm" $STD apt-get update $STD apt-get install -y nodejs -$STD apt-get install -y npm msg_ok "Installed Node.js/npm" msg_info "Updating Python3" From f227dc86843be23f95fe1ee3fd7e7372f367c381 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Jan 2024 05:22:04 -0500 Subject: [PATCH 2607/3335] Update scrypted-install.sh tweak --- install/scrypted-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 79f0dba8..60c05d38 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -71,10 +71,10 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" -msg_info "Installing Node.js/npm" +msg_info "Installing Node.js" $STD apt-get update $STD apt-get install -y nodejs -msg_ok "Installed Node.js/npm" +msg_ok "Installed Node.js" msg_info "Updating Python3" $STD apt-get install -y \ From ecd7bd5dac99f9cbdf85067d16e31e17b8d2974a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Jan 2024 13:58:38 -0500 Subject: [PATCH 2608/3335] Update hyperhdr.sh fixes https://github.com/tteck/Proxmox/issues/2382 --- ct/hyperhdr.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/hyperhdr.sh b/ct/hyperhdr.sh index c32c168a..7c04a596 100644 --- a/ct/hyperhdr.sh +++ b/ct/hyperhdr.sh @@ -40,6 +40,8 @@ function default_settings() { BRG="vmbr0" NET="dhcp" GATE="" + APT_CACHER="" + APT_CACHER_IP="" DISABLEIP6="no" MTU="" SD="" From 241b7d019a55304071c4c34b6d353559786fee38 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Jan 2024 04:43:40 -0500 Subject: [PATCH 2609/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index eb514c7f..1e718f7d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -7,7 +7,7 @@ body: **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - If the default Linux distribution is not adhered to, script support will be discontinued. - - When encountering the error message `[ERROR] in line 24: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. + - When encountering the error message `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/tteck/Proxmox/discussions) - type: input id: guidelines From acec4f62939b86a1643f0cff0c0274d5d6297adf Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Jan 2024 04:49:08 -0500 Subject: [PATCH 2610/3335] Update install.func tweak --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 4f98236f..739b5884 100644 --- a/misc/install.func +++ b/misc/install.func @@ -42,7 +42,7 @@ error_handler() { local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message" - if [[ "$line_number" -eq 24 ]]; then + if [[ "$line_number" -eq 23 ]]; then echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" fi } From f111479b006a86ee92e97c129a6c96e10dcfdcb9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Jan 2024 12:39:50 -0500 Subject: [PATCH 2611/3335] Create new workflow --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..cbac5777 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI/CD + +on: + push: + branches: + - gh-pages + +jobs: + ci-cd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + cache: npm + + - name: Install dependencies + run: npm install + + - name: Build and test + run: npm run build + + - name: Deploy to GitHub Pages + run: npm run deploy -- -m "Update GitHub Pages" From 2f2f297555c3ef1328c771d0a25710bb7db1e011 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Jan 2024 12:48:18 -0500 Subject: [PATCH 2612/3335] Update ci.yml tweak --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbac5777..8a34ea45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,13 @@ jobs: ci-cd: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Checkout code + uses: actions/checkout@v3 + with: + node-version: 20 + + - name: Set up Node.js + uses: actions/setup-node@v3 with: node-version: 20 registry-url: https://registry.npmjs.org/ From d2f13f794067fa28c3cf7eb02ebf3b3becf68f65 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Jan 2024 12:51:09 -0500 Subject: [PATCH 2613/3335] Update ci.yml tweak --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a34ea45..ad7c8af3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,11 +21,3 @@ jobs: registry-url: https://registry.npmjs.org/ cache: npm - - name: Install dependencies - run: npm install - - - name: Build and test - run: npm run build - - - name: Deploy to GitHub Pages - run: npm run deploy -- -m "Update GitHub Pages" From dc37502d1535945469f0024d0f2367518d6cb9a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 01:15:00 -0500 Subject: [PATCH 2614/3335] Update ci.yml --- .github/workflows/ci.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad7c8af3..dbd6cb68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI/CD +name: CI on: push: @@ -6,18 +6,8 @@ on: - gh-pages jobs: - ci-cd: + ci: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 - with: - node-version: 20 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - cache: npm - + uses: actions/checkout@v4 \ No newline at end of file From d094ffcfd30438d71374977eb20f0c9be74f571b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 01:29:36 -0500 Subject: [PATCH 2615/3335] Update ci.yml --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbd6cb68..2a483775 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,13 @@ name: CI on: push: - branches: - - gh-pages + branches: [ "gh-pages" ] + + workflow_dispatch: jobs: - ci: + build: runs-on: ubuntu-latest + steps: - - name: Checkout code - uses: actions/checkout@v4 \ No newline at end of file + - uses: actions/checkout@v3 From 0c34f2ea9b6c63ef6dd639b6977f51d4c11a5759 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 01:49:53 -0500 Subject: [PATCH 2616/3335] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a483775..6972b44a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,8 @@ name: CI on: push: - branches: [ "gh-pages" ] + branches: + - gh-pages workflow_dispatch: From 86141db5e1ff5f36f35175f79f7b72dbf7cf9049 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 02:06:50 -0500 Subject: [PATCH 2617/3335] Update ci.yml --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6972b44a..8cb50a45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,4 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Checkout code + uses: actions/checkout@v3 From 928d13cb712b268c5d8eb89ffce974699c783ab1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 06:07:39 -0500 Subject: [PATCH 2618/3335] Update runtipi-install.sh fixes https://github.com/tteck/Proxmox/issues/2384 --- install/runtipi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/runtipi-install.sh b/install/runtipi-install.sh index f39dc1f4..584ea16b 100644 --- a/install/runtipi-install.sh +++ b/install/runtipi-install.sh @@ -25,9 +25,9 @@ mkdir -p "$(dirname "$DOCKER_CONFIG_PATH")" echo -e '{\n "log-driver": "journald"\n}' > "$DOCKER_CONFIG_PATH" cd /opt wget -q https://raw.githubusercontent.com/runtipi/runtipi/master/scripts/install.sh -sed -i -e '/newgrp docker/d' -e '/exit 0/d' install.sh chmod +x install.sh $STD ./install.sh +chmod 666 /opt/runtipi/state/settings.json msg_ok "Installed Runtipi" motd_ssh From 09846607f21a7bbc94b6a7a5162419e06550ceb7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 12:15:19 -0500 Subject: [PATCH 2619/3335] Update unifi-install.sh fixes https://github.com/tteck/Proxmox/issues/2386 --- install/unifi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 56423f9d..94807c3f 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -25,7 +25,7 @@ msg_info "Installing OpenJDK" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update -$STD apt-get install -y temurin-17-jre +$STD apt-get install -y temurin-17-jdk msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" From 12c83f056f70a2212e6d903ec9b251504d28ca68 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 13:20:36 -0500 Subject: [PATCH 2620/3335] Create pairdrop-install.sh --- install/pairdrop-install.sh | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 install/pairdrop-install.sh diff --git a/install/pairdrop-install.sh b/install/pairdrop-install.sh new file mode 100644 index 00000000..8f8a8224 --- /dev/null +++ b/install/pairdrop-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing PairDrop" +git clone -q https://github.com/schlagmichdoch/PairDrop.git /opt/pairdrop +cd /opt/pairdrop +$STD npm install +msg_ok "Installed PairDrop" + +msg_info "Creating Service" +cat </etc/systemd/system/pairdrop.service +[Unit] +Description=PairDrop Service +After=network.target + +[Service] +ExecStart=npm start +WorkingDirectory=/opt/pairdrop +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now pairdrop.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9d5d7ed3467cfae0285425c1bfc2d524bf03c272 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 13:21:45 -0500 Subject: [PATCH 2621/3335] Create pairdrop.sh --- ct/pairdrop.sh | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 ct/pairdrop.sh diff --git a/ct/pairdrop.sh b/ct/pairdrop.sh new file mode 100644 index 00000000..a1680a8c --- /dev/null +++ b/ct/pairdrop.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ _ ____ + / __ \____ _(_)____/ __ \_________ ____ + / /_/ / __ `/ / ___/ / / / ___/ __ \/ __ \ + / ____/ /_/ / / / / /_/ / / / /_/ / /_/ / +/_/ \__,_/_/_/ /_____/_/ \____/ .___/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="PairDrop" +var_disk="4" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /opt/pairdrop ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop pairdrop +cd /opt/pairdrop +git pull +npm install +systemctl start pairdrop +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From 702dbc7bbaded6d4a00e60dea5ecbad33f61a05c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jan 2024 13:40:08 -0500 Subject: [PATCH 2622/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8106ee8..5fa38b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,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. +## 2024-01-25 + +### Changed + +- **PairDrop LXC** + - NEW Script + ## 2024-01-20 ### Changed From 1597f560c7138397235dac6ca5dc54d19d96444d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Jan 2024 10:21:54 -0500 Subject: [PATCH 2623/3335] Update changedetection.sh When updating, update playwright also --- ct/changedetection.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 5fe9759a..e5fe9ecb 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -57,6 +57,7 @@ header_info if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" pip3 install changedetection.io --upgrade &>/dev/null +pip3 install playwright --upgrade &>/dev/null msg_ok "Updated Successfully" exit } From 67fa64069479a8fbd1796340425e35270add36be Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jan 2024 13:17:04 -0500 Subject: [PATCH 2624/3335] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36128c63..9a6ee17d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@
- + + +

Proxmox VE Helper-Scripts

From 8a76e0b0d3003d20012294cbbef3098b9f6876f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jan 2024 13:17:39 -0500 Subject: [PATCH 2625/3335] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ae0755be..2b2bf02d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,5 +1,7 @@
- + + +

Contributing to Proxmox VE Helper Scripts

From abac9a1952a42808b7a00e4bd898d16a14b053cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jan 2024 13:18:07 -0500 Subject: [PATCH 2626/3335] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa38b2a..6053f1a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@
- + + +

Change Log

From f7ecf0028582cff40a7cd27c7fa860fd017dc08d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jan 2024 13:18:30 -0500 Subject: [PATCH 2627/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 22d9c600..6e382223 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -1,5 +1,7 @@
- + + +

User Submitted Guides

From 2a2dd14c9a4dd6622f8196193451e360d1978255 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Jan 2024 13:46:33 -0500 Subject: [PATCH 2628/3335] Update pimox-haos-vm.sh check for whiptail --- vm/pimox-haos-vm.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 1347fcf6..f16a6338 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -71,6 +71,11 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null +if ! command -v whiptail &> /dev/null; then + echo "Installing whiptail..." + apt-get update &>/dev/null + apt-get install -y whiptail &>/dev/null +fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then echo "User selected Yes" else From 8d2e215c961fe427ca307eed22a2e41302022d8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 31 Jan 2024 17:27:20 -0500 Subject: [PATCH 2629/3335] Update homeassistant-core-install.sh Python 3.12.1 --- install/homeassistant-core-install.sh | 57 +++++++++++++-------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 3149cb0e..77e000f6 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies, (Patience)" +msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ git \ curl \ @@ -43,38 +43,35 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv - msg_ok "Updated Python3" -if [[ "$PCT_OSVERSION" == "11" ]]; then - msg_info "Installing pyenv" - $STD apt-get install -y \ - make \ - libreadline-dev \ - libsqlite3-dev \ - libncurses5-dev \ - libncursesw5-dev \ - xz-utils \ - tk-dev \ - llvm \ - libbz2-dev \ - libxml2-dev \ - libxmlsec1-dev \ - liblzma-dev - $STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv - set +e - echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc - echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc - echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc - msg_ok "Installed pyenv" - . ~/.bashrc +msg_info "Installing pyenv" +$STD apt-get install -y \ + make \ + libreadline-dev \ + libsqlite3-dev \ + libncurses5-dev \ + libncursesw5-dev \ + xz-utils \ + tk-dev \ + llvm \ + libbz2-dev \ + libxml2-dev \ + libxmlsec1-dev \ + liblzma-dev +$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv +set +e +echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc +msg_ok "Installed pyenv" +. ~/.bashrc - set -e - msg_info "Installing Python 3.11.3 (Patience)" - $STD pyenv install 3.11.3 - pyenv global 3.11.3 - msg_ok "Installed Python 3.11.3" -fi +set -e +msg_info "Installing Python 3.12.1 (Patience)" +$STD pyenv install 3.12.1 +pyenv global 3.12.1 +msg_ok "Installed Python 3.12.1" msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant From 661411d8e8b091183521ee709280079eeb7ea685 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 1 Feb 2024 07:18:04 -0500 Subject: [PATCH 2630/3335] Update pialert-install.sh fixes https://github.com/tteck/Proxmox/issues/2415 --- install/pialert-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 195b16f4..0376ce94 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -19,12 +19,14 @@ $STD apt-get -y install \ mc \ curl \ apt-utils \ + avahi-utils \ lighttpd \ sqlite3 \ mmdb-bin \ arp-scan \ dnsutils \ net-tools \ + nbtscan \ libwww-perl \ nmap \ zip \ From 74c47c8b0793524ab2da45d3360960ea3c458c62 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Feb 2024 07:17:43 -0500 Subject: [PATCH 2631/3335] Create readeck.sh --- ct/readeck.sh | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 ct/readeck.sh diff --git a/ct/readeck.sh b/ct/readeck.sh new file mode 100644 index 00000000..70a014c0 --- /dev/null +++ b/ct/readeck.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ __ + / __ \___ ____ _____/ /__ _____/ /__ + / /_/ / _ \/ __ `/ __ / _ \/ ___/ //_/ + / _, _/ __/ /_/ / /_/ / __/ /__/ ,< +/_/ |_|\___/\__,_/\__,_/\___/\___/_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="Readeck" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /opt/readeck ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000${CL}\n" From 65a9ed0aeaf781a9dd47fc164fe6095cd7a76232 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Feb 2024 07:18:48 -0500 Subject: [PATCH 2632/3335] Create readeck-install.sh --- install/readeck-install.sh | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/readeck-install.sh diff --git a/install/readeck-install.sh b/install/readeck-install.sh new file mode 100644 index 00000000..2a1ead40 --- /dev/null +++ b/install/readeck-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Readeck" +mkdir -p /opt/readeck +cd /opt/readeck +wget -q -O readeck https://codeberg.org/readeck/readeck/releases/download/0.11.2/readeck-0.11.2-linux-amd64 +chmod a+x readeck +msg_ok "Installed Readeck" + +msg_info "Creating Service" +cat </etc/systemd/system/readeck.service +[Unit] +Description=Readeck Service +After=network.target + +[Service] +Environment=READECK_SERVER_HOST=0.0.0.0 +Environment=READECK_SERVER_PORT=8000 +ExecStart=/opt/readeck/./readeck serve +WorkingDirectory=/opt/readeck +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now readeck.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 29e012d282f0976b12f63d533e2c0b8b1f729aaf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Feb 2024 07:33:17 -0500 Subject: [PATCH 2633/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6053f1a5..260110c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-02-02 + +### Changed + +- **Readeck LXC** + - NEW Script + ## 2024-01-25 ### Changed From 72de387b5ca9172208445ae192a479af46a1f9e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Feb 2024 07:40:50 -0500 Subject: [PATCH 2634/3335] Update install.func update the script to include IPv6 connectivity considerations --- misc/install.func | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/misc/install.func b/misc/install.func index 739b5884..ba3c11df 100644 --- a/misc/install.func +++ b/misc/install.func @@ -112,16 +112,38 @@ setting_up_container() { network_check() { set +e trap - ERR - if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" +# Check if IPv4 is being used + if ip -o -4 addr show | grep -q "scope global"; then + if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then + msg_ok "IPv4 Internet Connected"; else - echo -e " 🖧 Check Network Settings" - exit 1 + msg_error "IPv4 Internet Not Connected"; + read -r -p "Would you like to continue anyway? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi fi + +# Check if IPv6 is being used + if ip -o -6 addr show | grep -q "scope global"; then + if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null; then + msg_ok "IPv6 Internet Connected"; + else + msg_error "IPv6 Internet Not Connected"; + read -r -p "Would you like to continue anyway? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi + fi + fi + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi set -e From 5ed56e64d7080d97ccccf06d96f51642e01e01d2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 2 Feb 2024 16:48:56 -0500 Subject: [PATCH 2635/3335] Update homeassistant-core-install.sh add `libavdevice-dev` `libavformat-dev` `libavcodec-dev` `libavutil-dev` `libavfilter-dev` dependencies --- install/homeassistant-core-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 77e000f6..6e4b4908 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -33,6 +33,11 @@ $STD apt-get install -y \ liblapack-dev \ dbus-broker \ libpcap-dev \ + libavdevice-dev \ + libavformat-dev \ + libavcodec-dev \ + libavutil-dev \ + libavfilter-dev \ libmariadb-dev-compat \ libatlas-base-dev msg_ok "Installed Dependencies" From f4b7aa6e4d5b8f0770536b503259cc1d5d645229 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Feb 2024 14:02:13 -0500 Subject: [PATCH 2636/3335] Update dockge-install.sh tweak `homeassistant/compose.yaml` --- install/dockge-install.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index d6985afd..f15949a4 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -62,19 +62,18 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Adding Home Assistant compose.yaml" mkdir -p /opt/stacks/homeassistant cat </opt/stacks/homeassistant/compose.yaml -version: "3.3" +version: "3" services: - home-assistant: + homeassistant: container_name: homeassistant - privileged: true - restart: unless-stopped - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - /dev:/dev - - /etc/localtime:/etc/localtime:ro - - ./config:/config - network_mode: host image: ghcr.io/home-assistant/home-assistant:stable + volumes: + - ./config:/config + - /etc/localtime:/etc/localtime:ro + - /run/dbus:/run/dbus:ro + restart: unless-stopped + privileged: true + network_mode: host EOF msg_ok "Added Home Assistant compose.yaml" fi From 050015872794e556cb03653d13cf7e9894a5319d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Feb 2024 02:37:52 -0500 Subject: [PATCH 2637/3335] Update dockge-install.sh tweak Immich compose files --- install/dockge-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dockge-install.sh b/install/dockge-install.sh index f15949a4..235ae6fd 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -53,7 +53,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then mkdir -p /opt/stacks/immich wget -q -O /opt/stacks/immich/compose.yaml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -q -O /opt/stacks/immich/.env https://github.com/immich-app/immich/releases/latest/download/example.env - wget -q -O /opt/stacks/immich/hwaccel.yml https://github.com/immich-app/immich/releases/latest/download/hwaccel.yml + #wget -q -O /opt/stacks/immich/hwaccel.ml.yml https://github.com/immich-app/immich/releases/latest/download/hwaccel.ml.yml msg_ok "Added Immich compose.yaml" fi From 173b618fc892937e67f72dfd14ddc04376e20741 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Sun, 4 Feb 2024 21:49:15 +0100 Subject: [PATCH 2638/3335] Add option to install Unbound to Pi-hole (#2425) --- install/pihole-install.sh | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index d6472459..f3c52e90 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -42,6 +42,64 @@ EOF $STD bash <(curl -fsSL https://install.pi-hole.net) --unattended msg_ok "Installed Pi-hole" +read -r -p "Would you like to add Unbound? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Unbound" + $STD apt-get install -y unbound + cat </etc/unbound/unbound.conf.d/pi-hole.conf +server: + verbosity: 0 + interface: 0.0.0.0 + port: 5335 + do-ip6: no + do-ip4: yes + do-udp: yes + do-tcp: yes + num-threads: 1 + hide-identity: yes + hide-version: yes + harden-glue: yes + harden-dnssec-stripped: yes + harden-referral-path: yes + use-caps-for-id: no + harden-algo-downgrade: no + qname-minimisation: yes + aggressive-nsec: yes + rrset-roundrobin: yes + cache-min-ttl: 300 + cache-max-ttl: 14400 + msg-cache-slabs: 8 + rrset-cache-slabs: 8 + infra-cache-slabs: 8 + key-cache-slabs: 8 + serve-expired: yes + serve-expired-ttl: 3600 + edns-buffer-size: 1232 + prefetch: yes + prefetch-key: yes + target-fetch-policy: "3 2 1 1 1" + unwanted-reply-threshold: 10000000 + rrset-cache-size: 256m + msg-cache-size: 128m + so-rcvbuf: 1m + private-address: 192.168.0.0/16 + private-address: 169.254.0.0/16 + private-address: 172.16.0.0/12 + private-address: 10.0.0.0/8 + private-address: fd00::/8 + private-address: fe80::/10 +EOF + mkdir -p /etc/dnsmasq.d/ + cat </etc/dnsmasq.d/99-edns.conf +edns-packet-max=1232 +EOF + wget -q https://www.internic.net/domain/named.root >/var/lib/unbound/root.hints + sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e 's/PIHOLE_DNS_2=8.8.4.4/#PIHOLE_DNS_2=8.8.4.4/' /etc/pihole/setupVars.conf + systemctl enable -q --now unbound + systemctl restart pihole-FTL.service + msg_ok "Installed Unbound" +fi + motd_ssh customize From b054b86bf8ac55e67a8b621d309b6d6df8f2a7cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Feb 2024 15:54:17 -0500 Subject: [PATCH 2639/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 260110c5..edb40d35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-02-04 + +### Changed + +- **Pi-hole LXC** + - Option to add Unbound + ## 2024-02-02 ### Changed From 84b91141ff1433443892b4523f7b476540c13125 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Feb 2024 18:17:00 -0500 Subject: [PATCH 2640/3335] Update hyperion-install.sh fixes https://github.com/tteck/Proxmox/issues/2430 --- install/hyperion-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index 04622a1d..19b8a88e 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -20,6 +20,8 @@ $STD apt-get install -y mc $STD apt-get install -y lsb-release $STD apt-get install -y gpg $STD apt-get install -y apt-transport-https +$STD apt-get install -y libpython3.9 + msg_ok "Installed Dependencies" msg_info "Installing Hyperion" From d09f40cfb5fd61964632a9493a8d47b0c00011ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Feb 2024 20:42:36 -0500 Subject: [PATCH 2641/3335] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index edb40d35..b8ddbd14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@

All notable changes to this project will be documented in this file.

- 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. +- 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Following Proxmox VE - Support Lifecycle** ## 2024-02-04 From 201f95fe88d4562286d67edf712bcb4a40bf3330 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Feb 2024 20:48:36 -0500 Subject: [PATCH 2642/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ddbd14..1ac8ee5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@

All notable changes to this project will be documented in this file.

- 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. -- 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Following Proxmox VE - Support Lifecycle** +- 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** ## 2024-02-04 From 4021d7912a46f5b1e7bc13506b5675f53c1be779 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 07:25:09 -0500 Subject: [PATCH 2643/3335] Update technitiumdns.sh .NET 8 runtime --- ct/technitiumdns.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index d69c81aa..85775abd 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -57,11 +57,11 @@ header_info 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 +if ! dpkg -s aspnetcore-runtime-8.0 > /dev/null 2>&1; then + wget -q https://packages.microsoft.com/config/debian/12/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 + apt-get install -y aspnetcore-runtime-8.0 &>/dev/null rm packages-microsoft-prod.deb fi bash <(curl -fsSL https://download.technitium.com/dns/install.sh) &>/dev/null From ac9a98df8c9a5e14ba96d1de48c60be42e0536c7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 07:26:30 -0500 Subject: [PATCH 2644/3335] Update technitiumdns-install.sh .NET 8 runtime --- install/technitiumdns-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index bc9fade9..f157d841 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -24,7 +24,7 @@ wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod. $STD dpkg -i packages-microsoft-prod.deb rm -rf packages-microsoft-prod.deb $STD apt-get update -$STD apt-get install -y aspnetcore-runtime-7.0 +$STD apt-get install -y aspnetcore-runtime-8.0 msg_ok "Installed ASP.NET Core Runtime" msg_info "Installing Technitium DNS" From 082cf8ae6a10040b50c1aef41414dd6f57e9f034 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 11:15:52 -0500 Subject: [PATCH 2645/3335] Create gokapi-install.sh --- install/gokapi-install.sh | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/gokapi-install.sh diff --git a/install/gokapi-install.sh b/install/gokapi-install.sh new file mode 100644 index 00000000..d207aaf0 --- /dev/null +++ b/install/gokapi-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Gokapi" +LATEST=$(curl -sL https://api.github.com/repos/Forceu/Gokapi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +mkdir -p /opt/gokapi/{data,config} +wget -q https://github.com/Forceu/Gokapi/releases/download/$LATEST/gokapi-linux_amd64.zip +unzip -q gokapi-linux_amd64.zip -d /opt/gokapi +rm gokapi-linux_amd64.zip +chmod +x /opt/gokapi/gokapi-linux_amd64 +msg_ok "Installed Gokapi" + +msg_info "Creating Service" +cat </etc/systemd/system/gokapi.service +[Unit] +Description=gokapi + +[Service] +Type=simple +Environment=GOKAPI_DATA_DIR=/opt/gokapi/data +Environment=GOKAPI_CONFIG_DIR=/opt/gokapi/config +ExecStart=/opt/gokapi/gokapi-linux_amd64 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now gokapi +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 36ab1df27d1805d5eefec7ba6500c9eba757def2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 11:16:39 -0500 Subject: [PATCH 2646/3335] Create gokapi.sh --- ct/gokapi.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 ct/gokapi.sh diff --git a/ct/gokapi.sh b/ct/gokapi.sh new file mode 100644 index 00000000..942cc560 --- /dev/null +++ b/ct/gokapi.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ _ + / ____/___ / /______ _____ (_) + / / __/ __ \/ //_/ __ `/ __ \/ / +/ /_/ / /_/ / ,< / /_/ / /_/ / / +\____/\____/_/|_|\__,_/ .___/_/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="Gokapi" +var_disk="4" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /opt/gokapi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +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}:53842/setup${CL} \n" From fb308e2bfd667f045f467845e9b5fa896374977e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 11:33:07 -0500 Subject: [PATCH 2647/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ac8ee5b..8bbe2b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-05 + +### Changed + +- **Gokapi LXC** + - NEW Script + ## 2024-02-04 ### Changed From bfa4cd815e6af95f1a81421ef1be0eab5b58dccb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 18:10:55 -0500 Subject: [PATCH 2648/3335] Update nginxproxymanager-install.sh option to install v2.10.4 --- install/nginxproxymanager-install.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 52ee0e70..5f690584 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -68,22 +68,32 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v${RELEASE}" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz -cd ./nginx-proxy-manager-${RELEASE} -msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" - +read -r -p "Would you like to install an older version (v2.20.4)? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Downloading Nginx Proxy Manager v2.10.4" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.4 -O - | tar -xz + cd ./nginx-proxy-manager-2.10.4 + msg_ok "Downloaded Nginx Proxy Manager v2.10.4" +else + msg_info "Downloading Nginx Proxy Manager v${RELEASE}" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz + cd ./nginx-proxy-manager-${RELEASE} + msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" +fi msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx - -sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json -sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"2.10.4\"|" backend/package.json + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"2.10.4\"|" frontend/package.json +else + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json +fi sed -i 's|"fork-me": ".*"|"fork-me": "Proxmox VE Helper-Scripts"|' frontend/js/i18n/messages.json sed -i "s|https://github.com.*source=nginx-proxy-manager|https://helper-scripts.com|g" frontend/js/app/ui/footer/main.ejs - sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do From 65cf479b99deae11aed4e8fee482c19784790010 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 18:22:04 -0500 Subject: [PATCH 2649/3335] Update nginxproxymanager-install.sh --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 5f690584..48017b6f 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -68,7 +68,7 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -read -r -p "Would you like to install an older version (v2.20.4)? " prompt +read -r -p "Would you like to install an older version (v2.10.4)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Downloading Nginx Proxy Manager v2.10.4" wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.4 -O - | tar -xz From 65970a5c530ad4aadc737b8e26dcfc5d60af49bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 18:38:10 -0500 Subject: [PATCH 2650/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bbe2b96..dbc5c28d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **Gokapi LXC** - NEW Script +- **Nginx Proxy Manager LXC** + - Option to install v2.10.4 ## 2024-02-04 From a1deedd06627d24bb667c0f524f18a97a2cfc0ca Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 05:29:14 -0500 Subject: [PATCH 2651/3335] Update build.func Requires PVE Version 7.4-13 or higher --- misc/build.func | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index e526ca57..4853d771 100644 --- a/misc/build.func +++ b/misc/build.func @@ -88,9 +88,9 @@ pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 fi - if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.0 or higher" + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit From e0f8e23fd70d0724b5781d189dca75257d3a6a54 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 05:42:54 -0500 Subject: [PATCH 2652/3335] Update VMs - The scripts will only work with PVE versions 7.4-13 or higher. --- vm/debian-vm.sh | 4 ++-- vm/haos-vm.sh | 4 ++-- vm/mikrotik-routeros.sh | 4 ++-- vm/nextcloud-vm.sh | 4 ++-- vm/openwrt.sh | 4 ++-- vm/owncloud-vm.sh | 4 ++-- vm/pimox-haos-vm.sh | 4 ++-- vm/ubuntu-vm.sh | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index e390073b..c2efe13c 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -92,9 +92,9 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 65733214..75171c11 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -115,9 +115,9 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 5aba3c29..aca22423 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -62,9 +62,9 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo "Exiting..." sleep 3 exit diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index 5e3fce87..af90b388 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -91,9 +91,9 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit diff --git a/vm/openwrt.sh b/vm/openwrt.sh index cc920c5e..800cf4d4 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -157,9 +157,9 @@ function msg_error() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 72ac7ad4..136a5171 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -91,9 +91,9 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index f16a6338..8c8bebff 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -84,9 +84,9 @@ else exit fi function PVE_CHECK() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index 9e19c43d..5d36ba96 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -92,9 +92,9 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" + echo -e "Requires PVE Version 7.4-13 or higher" echo -e "Exiting..." sleep 2 exit From a4ac3e7065da5e113e3353f945ca30faa54359ad Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 05:53:37 -0500 Subject: [PATCH 2653/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbc5c28d..e075940c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-06 + +### Changed + +- **All Scripts** + - The scripts will only work with PVE versions 7.4-13 or higher. + ## 2024-02-05 ### Changed From ba8b38caebee8833152986ff5ed42776687b3170 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 07:51:52 -0500 Subject: [PATCH 2654/3335] Update nginxproxymanager.sh fixes https://github.com/tteck/Proxmox/issues/2441 --- ct/nginxproxymanager.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 4e286344..4045ff55 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -122,7 +122,6 @@ function update_script() { chown root /tmp/nginx echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - echo -e "${CHECKMARK} \e[1;92m Generating dummy SSL Certificate... \e[0m" openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null fi mkdir -p /app/global /app/frontend/images From 9fb338f6ea30c898a069e49a5a7d90984d840219 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 09:59:27 -0500 Subject: [PATCH 2655/3335] Update unifi-install.sh update libssl --- install/unifi-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 94807c3f..1b2b75ad 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -29,8 +29,8 @@ $STD apt-get install -y temurin-17-jdk msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb +$STD dpkg -i libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list $STD apt-get update @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +rm -rf libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 2ce1c183f45cdbec1129799b52c25a5b41aefb7a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 10:04:12 -0500 Subject: [PATCH 2656/3335] Update unifi-install.sh --- install/unifi-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 1b2b75ad..47c9173c 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -29,8 +29,8 @@ $STD apt-get install -y temurin-17-jdk msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb -$STD dpkg -i libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb +#wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb +#$STD dpkg -i libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list $STD apt-get update From 5bbfe8812e4025ba50b0f0d5a607ed8bf4f0b32a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 10:29:47 -0500 Subject: [PATCH 2657/3335] Update build.func Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later. --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 4853d771..1c34c992 100644 --- a/misc/build.func +++ b/misc/build.func @@ -90,7 +90,7 @@ pve_check() { fi if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit From 465996e7a2d2dc1018fbdd149669ec87730a144b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 10:32:38 -0500 Subject: [PATCH 2658/3335] Update VMs - Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later. --- vm/debian-vm.sh | 2 +- vm/haos-vm.sh | 2 +- vm/mikrotik-routeros.sh | 2 +- vm/nextcloud-vm.sh | 2 +- vm/openwrt.sh | 2 +- vm/owncloud-vm.sh | 2 +- vm/pimox-haos-vm.sh | 2 +- vm/ubuntu-vm.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index c2efe13c..3f2db4f6 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -94,7 +94,7 @@ function check_root() { function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 75171c11..fff4f939 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -117,7 +117,7 @@ function check_root() { function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index aca22423..5c38d9ed 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -64,7 +64,7 @@ TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo "Exiting..." sleep 3 exit diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index af90b388..ff62c7df 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -93,7 +93,7 @@ function check_root() { function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 800cf4d4..5ebb5ec4 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -159,7 +159,7 @@ function msg_error() { function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 136a5171..7fbe8be6 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -93,7 +93,7 @@ function check_root() { function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 8c8bebff..fb0bfb31 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -86,7 +86,7 @@ fi function PVE_CHECK() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index 5d36ba96..be9edc88 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -94,7 +94,7 @@ function check_root() { function pve_check() { if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.4-13 or higher" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit From 57507a583c2d63b0e43e9e838a92e63d4c957163 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 10:42:40 -0500 Subject: [PATCH 2659/3335] Update unifi-install.sh --- install/unifi-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 47c9173c..bc42a295 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -29,8 +29,8 @@ $STD apt-get install -y temurin-17-jdk msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" -#wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb -#$STD dpkg -i libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list $STD apt-get update @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl-dev_1.1.1f-1ubuntu2.21_amd64.deb +rm -rf libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 236f90a1e092fc84a52a2e69bcc05e64572000c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 10:58:10 -0500 Subject: [PATCH 2660/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e075940c..d6953de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ ### Changed - **All Scripts** - - The scripts will only work with PVE versions 7.4-13 or higher. + - The scripts will only work with PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later. ## 2024-02-05 From 345346118b554477cffed206a4c479f0adf22b36 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 12:25:35 -0500 Subject: [PATCH 2661/3335] Update omada-install.sh update libssl --- install/omada-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index b54ec2f2..4e78c5c7 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -30,8 +30,8 @@ $STD apt-get -y install zulu8-jdk msg_ok "Installed Azul Zulu" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 80200dc39da486372c2859766d98f28c952be4c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Feb 2024 12:28:54 -0500 Subject: [PATCH 2662/3335] Update deconz-install.sh update libssl --- install/deconz-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 80d938b3..328a9679 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -26,8 +26,8 @@ echo "deb [arch=amd64] http://phoscon.de/apt/deconz $VERSION main" >/etc/apt/sou msg_ok "Setup Phoscon Repository" msg_info "Installing deConz" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb $STD apt-get update $STD apt-get install -y deconz msg_ok "Installed deConz" @@ -56,7 +56,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb +rm -rf libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 47bc910e8f22bed8df97c71180877bec9108d9ea Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Feb 2024 05:46:19 -0500 Subject: [PATCH 2663/3335] Update readeck-install.sh install the latest version --- install/readeck-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/readeck-install.sh b/install/readeck-install.sh index 2a1ead40..8b1c287b 100644 --- a/install/readeck-install.sh +++ b/install/readeck-install.sh @@ -20,9 +20,10 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Readeck" +LATEST=$(curl -s https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1) mkdir -p /opt/readeck cd /opt/readeck -wget -q -O readeck https://codeberg.org/readeck/readeck/releases/download/0.11.2/readeck-0.11.2-linux-amd64 +wget -q -O readeck https://codeberg.org/readeck/readeck/releases/download/${LATEST}/readeck-${LATEST}-linux-amd64 chmod a+x readeck msg_ok "Installed Readeck" From ee3b69fffecc0f7b6c311ec978cbd084448c418e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Feb 2024 05:56:22 -0500 Subject: [PATCH 2664/3335] Update readeck.sh create update path --- ct/readeck.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ct/readeck.sh b/ct/readeck.sh index 70a014c0..1c01b161 100644 --- a/ct/readeck.sh +++ b/ct/readeck.sh @@ -55,7 +55,16 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/readeck ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating ${APP}" +LATEST=$(curl -s https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1 +) +systemctl stop readeck.service +rm -rf /opt/readeck/readeck +cd /opt/readeck +wget -q -O readeck https://codeberg.org/readeck/readeck/releases/download/${LATEST}/readeck-${LATEST}-linux-amd64 +chmod a+x readeck +systemctl start readeck.service +msg_ok "Updated ${APP}" exit } From f267ee196e4b00cc18cc68719c6e7bcf689138b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Feb 2024 06:21:18 -0500 Subject: [PATCH 2665/3335] Update readeck.sh tweak --- ct/readeck.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/readeck.sh b/ct/readeck.sh index 1c01b161..cc5204ba 100644 --- a/ct/readeck.sh +++ b/ct/readeck.sh @@ -56,8 +56,7 @@ function update_script() { header_info if [[ ! -d /opt/readeck ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" -LATEST=$(curl -s https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1 -) +LATEST=$(curl -s https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1) systemctl stop readeck.service rm -rf /opt/readeck/readeck cd /opt/readeck From c0856c0d0c5ca18aecfab7a4788501ee03e4d53e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Feb 2024 21:12:03 -0500 Subject: [PATCH 2666/3335] Update homeassistant-core-install.sh Compile Python from its source --- install/homeassistant-core-install.sh | 47 ++++++++++----------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 6e4b4908..327c773f 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -42,41 +42,30 @@ $STD apt-get install -y \ libatlas-base-dev msg_ok "Installed Dependencies" -msg_info "Updating Python3" -$STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip \ - python3-venv -msg_ok "Updated Python3" +RELEASE=$(curl -s https://www.python.org/downloads/ | grep -oP 'Download Python \K\d+\.\d+\.\d+' | head -1) -msg_info "Installing pyenv" +msg_info "Compiling Python ${RELEASE} from its source (Additional Patience)" +$STD apt-get remove -y python3 $STD apt-get install -y \ - make \ + checkinstall \ libreadline-dev \ - libsqlite3-dev \ - libncurses5-dev \ libncursesw5-dev \ - xz-utils \ + libssl-dev \ + libsqlite3-dev \ tk-dev \ - llvm \ - libbz2-dev \ - libxml2-dev \ - libxmlsec1-dev \ - liblzma-dev -$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv -set +e -echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc -echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc -echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc -msg_ok "Installed pyenv" -. ~/.bashrc + libgdbm-dev \ + libc6-dev \ + libbz2-dev -set -e -msg_info "Installing Python 3.12.1 (Patience)" -$STD pyenv install 3.12.1 -pyenv global 3.12.1 -msg_ok "Installed Python 3.12.1" +wget -qO- https://www.python.org/ftp/python/${RELEASE}/Python-${RELEASE}.tar.xz | tar -xJ +cd Python-${RELEASE} +$STD ./configure --enable-optimizations +$STD make -j $(nproc) +$STD make altinstall +$STD update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1 +cd ~ +rm -rf Python-${RELEASE} +msg_ok "Installed Python ${RELEASE}" msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant From be47eb1039b7dda6bfeaa83e91789830abfd9982 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Feb 2024 10:23:52 -0500 Subject: [PATCH 2667/3335] Update tdarr-install.sh add handbrake --- install/tdarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 9c74faaf..f666cb55 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y handbrake-cli msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then From e81d51399c71c13f4bdcd3329d57fc54d7ec6192 Mon Sep 17 00:00:00 2001 From: Allard Katstra Date: Fri, 9 Feb 2024 17:06:22 +0100 Subject: [PATCH 2668/3335] Adding the "tools" directory to the backup before updating homer (#2460) --- ct/homer.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ct/homer.sh b/ct/homer.sh index f6b04d4d..7d02e053 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -62,7 +62,8 @@ msg_ok "Stopped ${APP}" msg_info "Backing up config.yml" cd ~ cp -R /opt/homer/assets/config.yml config.yml -msg_ok "Backed up config.yml" +cp -R /opt/homer/assets/tools tools +msg_ok "Backed up config.yml and tools directory" msg_info "Updating ${APP}" rm -rf /opt/homer/* @@ -73,10 +74,11 @@ msg_ok "Updated ${APP}" msg_info "Restoring conf.yml" cd ~ cp -R config.yml /opt/homer/assets -msg_ok "Restored conf.yml" +cp -R tools /opt/homer/assets +msg_ok "Restored config.yml and tools directory" msg_info "Cleaning" -rm -rf config.yml /opt/homer/homer.zip +rm -rf config.yml tools /opt/homer/homer.zip msg_ok "Cleaned" msg_info "Starting ${APP}" From 9f84dbf1bd8823806a17587b950e878c75967a87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Feb 2024 17:34:32 -0500 Subject: [PATCH 2669/3335] Update grocy-install.sh fixes https://github.com/tteck/Proxmox/issues/2463 --- install/grocy-install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 526eeaff..091fa8d8 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -20,18 +20,18 @@ $STD apt-get install -y mc $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -msg_info "Installing PHP 8.1" +msg_info "Installing PHP 8.2" VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update -$STD apt-get install -y php8.1 -$STD apt-get install -y libapache2-mod-php8.1 -$STD apt-get install -y php8.1-sqlite3 -$STD apt-get install -y php8.1-gd -$STD apt-get install -y php8.1-intl -$STD apt-get install -y php8.1-mbstring -msg_ok "Installed PHP 8.1" +$STD apt-get install -y php8.2 +$STD apt-get install -y libapache2-mod-php8.2 +$STD apt-get install -y php8.2-sqlite3 +$STD apt-get install -y php8.2-gd +$STD apt-get install -y php8.2-intl +$STD apt-get install -y php8.2-mbstring +msg_ok "Installed PHP 8.2" msg_info "Installing grocy" latest=$(curl -s https://api.github.com/repos/grocy/grocy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') From f674b8af03102d71ead1ccc2b81c46789b08c5e0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Feb 2024 17:41:00 -0500 Subject: [PATCH 2670/3335] Update adguard.sh fixes https://github.com/tteck/Proxmox/issues/2462 --- ct/adguard.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/adguard.sh b/ct/adguard.sh index e9e667c9..b7a8fdd5 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -56,6 +56,10 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz msg_info "Stopping AdguardHome" systemctl stop AdGuardHome From 5d6007cdd99f754aa3bfb5ccf73788e7aa2008e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Feb 2024 20:37:41 -0500 Subject: [PATCH 2671/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 375024e6..9864695e 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -78,7 +78,7 @@ function update_script() { echo -e "${GN}Updating to Stable Version${CL}" BR="" fi - if [[ "$PY" == "python3.10" ]]; then echo -e "⚠️ Home Assistant now requires Python 3.11 to run."; fi + if [[ "$PY" == "python3.11" ]]; then echo -e "⚠️ Home Assistant will soon require Python 3.12."; fi msg_info "Stopping Home Assistant" systemctl stop homeassistant From 1910de65689fe1b6db6ce595f0def7cb3f3bf1ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 9 Feb 2024 20:55:43 -0500 Subject: [PATCH 2672/3335] Update homeassistant-core.sh remove app daemon --- ct/homeassistant-core.sh | 73 ---------------------------------------- 1 file changed, 73 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 9864695e..b6567eb8 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -63,7 +63,6 @@ function update_script() { "1" "Update Core" ON \ "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ - "4" "Install/Update AppDaemon" OFF \ 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then @@ -136,78 +135,6 @@ WantedBy=default.target" >$service_path ${BL}http://$IP:8080${CL} admin|changeme\n" exit fi - if [ "$UPD" == "4" ]; then - clear - header_info - if [[ ! -d /srv/appdaemon ]]; then - msg_info "Installing AppDaemon" - mkdir /srv/appdaemon - cd /srv/appdaemon - python3 -m venv . - source bin/activate - pip install appdaemon &>/dev/null - mkdir -p /root/.homeassistant/appdaemon/apps - cat >/root/.homeassistant/appdaemon/appdaemon.yaml < - token: -http: - url: http://127.0.0.1:5050 -admin: -api: -EOF - msg_ok "Installed AppDaemon" - - msg_info "Creating Service" - cat >/etc/systemd/system/appdaemon.service </dev/null - msg_ok "Created Service" - - msg_ok "Completed Successfully!\n" - echo -e "AppDaemon should be reachable by going to the following URL. - ${BL}http://$IP:5050${CL}\n" - exit - else - msg_info "Upgrading AppDaemon" - msg_info "Stopping AppDaemon" - systemctl stop appdaemon - msg_ok "Stopped AppDaemon" - - msg_info "Updating AppDaemon" - source /srv/appdaemon/bin/activate - pip install --upgrade appdaemon &>/dev/null - msg_ok "Updated AppDaemon" - - msg_info "Starting AppDaemon" - systemctl start appdaemon - sleep 2 - msg_ok "Started AppDaemon" - msg_ok "Update Successful" - echo -e "\n Go to http://${IP}:5050 \n" - exit - fi - fi } start From 21cdc8306a4cb17160551aeaa665ced42513ec1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Feb 2024 09:38:28 -0500 Subject: [PATCH 2673/3335] Update build.func add Channels to the VAAPI hardware transcoding group --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 1c34c992..77091c5c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -554,7 +554,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm From db3fe0e9ad35187a73c3c2e2e2f173c506883bd0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Feb 2024 09:40:59 -0500 Subject: [PATCH 2674/3335] Update channels-install.sh add Hardware Acceleration --- install/channels-install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install/channels-install.sh b/install/channels-install.sh index 5836812c..7a2c6f7f 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -21,6 +21,20 @@ $STD apt-get install -y chromium $STD apt-get install -y xvfb msg_ok "Installed Dependencies" +if [[ "$CTTYPE" == "0" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install \ + va-driver-all \ + ocl-icd-libopencl1 \ + intel-opencl-icd + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render + msg_ok "Set Up Hardware Acceleration" +fi + msg_info "Installing Channels DVR Server (Patience)" cd /opt $STD bash <(curl -fsSL https://getchannels.com/dvr/setup.sh) From dcd35adf71b3950ca65262151ddc5b65c9bcc641 Mon Sep 17 00:00:00 2001 From: Bartosz Korczak Date: Sat, 10 Feb 2024 08:35:39 -0800 Subject: [PATCH 2675/3335] fix(n8n): add missing installation dependency (#2466) --- install/n8n-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 25cbce47..13aa5104 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -33,6 +33,7 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing n8n (Patience)" +$STD npm install --global patch-package $STD npm install --global n8n msg_ok "Installed n8n" From 37d75286e02c32ac0c1e5c7f5089a2638f3fd78e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Feb 2024 09:23:03 -0500 Subject: [PATCH 2676/3335] Update unifi-install.sh test temurin-17-jre --- install/unifi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index bc42a295..9ff1d08f 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -25,7 +25,7 @@ msg_info "Installing OpenJDK" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list $STD apt-get update -$STD apt-get install -y temurin-17-jdk +$STD apt-get install -y temurin-17-jre msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" From 84c404e632429241a9d50db1f2488d62f7384448 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Feb 2024 10:21:22 -0500 Subject: [PATCH 2677/3335] Create hivemq-install.sh --- install/hivemq-install.sh | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 install/hivemq-install.sh diff --git a/install/hivemq-install.sh b/install/hivemq-install.sh new file mode 100644 index 00000000..46ca5aa0 --- /dev/null +++ b/install/hivemq-install.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing OpenJDK" +wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg +echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list +$STD apt-get update +$STD apt-get install -y temurin-17-jre +msg_ok "Installed OpenJDK" + +msg_info "Installing HiveMQ CE" +RELEASE=$(curl -s https://api.github.com/repos/hivemq/hivemq-community-edition/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q https://github.com/hivemq/hivemq-community-edition/releases/download/${RELEASE}/hivemq-ce-${RELEASE}.zip +unzip -q hivemq-ce-${RELEASE}.zip +mkdir -p /opt/hivemq +mv hivemq-ce-${RELEASE}/* /opt/hivemq +useradd -d /opt/hivemq hivemq +chown -R hivemq:hivemq /opt/hivemq +chmod +x /opt/hivemq/bin/run.sh +cp /opt/hivemq/bin/init-script/hivemq.service /etc/systemd/system/hivemq.service +systemctl enable -q --now hivemq +msg_ok "Installed HiveMQ CE" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf hivemq-ce-${RELEASE}.zip +rm -rf ../hivemq-ce-${RELEASE} +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 1d5a3ddacac5ce7556e21a0a2795d1665e59893f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Feb 2024 10:23:58 -0500 Subject: [PATCH 2678/3335] Create hivemq.sh --- ct/hivemq.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 ct/hivemq.sh diff --git a/ct/hivemq.sh b/ct/hivemq.sh new file mode 100644 index 00000000..80b79c81 --- /dev/null +++ b/ct/hivemq.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ __ _______ ____________ + / / / (_) _____ / |/ / __ \ / ____/ ____/ + / /_/ / / | / / _ \/ /|_/ / / / / / / / __/ + / __ / /| |/ / __/ / / / /_/ / / /___/ /___ +/_/ /_/_/ |___/\___/_/ /_/\___\_\ \____/_____/ + +EOF +} +header_info +echo -e "Loading..." +APP="HiveMQ" +var_disk="4" +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 +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" From e638845ffa6fc04032306fdd9c0a3273aab9ec94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Feb 2024 10:57:26 -0500 Subject: [PATCH 2679/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6953de6..0a636f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-11 + +### Changed + +- **HiveMQ CE LXC** + - NEW Script + ## 2024-02-06 ### Changed From 4164d42b7c18f14b0dc5a46d34d0912dbb7346d1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Feb 2024 13:36:28 -0500 Subject: [PATCH 2680/3335] Update hivemq-install.sh tcp and websockets --- install/hivemq-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/hivemq-install.sh b/install/hivemq-install.sh index 46ca5aa0..8e66f3b2 100644 --- a/install/hivemq-install.sh +++ b/install/hivemq-install.sh @@ -37,6 +37,8 @@ useradd -d /opt/hivemq hivemq chown -R hivemq:hivemq /opt/hivemq chmod +x /opt/hivemq/bin/run.sh cp /opt/hivemq/bin/init-script/hivemq.service /etc/systemd/system/hivemq.service +rm /opt/hivemq/conf/config.xml +mv /opt/hivemq/conf/examples/configuration/config-sample-tcp-and-websockets.xml /opt/hivemq/conf/config.xml systemctl enable -q --now hivemq msg_ok "Installed HiveMQ CE" From d5211aedeccdb3f65f5b9bc98f6933d24c018fbe Mon Sep 17 00:00:00 2001 From: JJ Date: Sun, 11 Feb 2024 22:55:49 +0100 Subject: [PATCH 2681/3335] Add Apache CouchDB (#2473) --- ct/apache-couchdb.sh | 70 +++++++++++++++++++++++++++++++ install/apache-couchdb-install.sh | 47 +++++++++++++++++++++ misc/build.func | 1 - 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 ct/apache-couchdb.sh create mode 100644 install/apache-couchdb-install.sh diff --git a/ct/apache-couchdb.sh b/ct/apache-couchdb.sh new file mode 100644 index 00000000..cd2c00af --- /dev/null +++ b/ct/apache-couchdb.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ ______ __ ____ ____ + / | ____ ____ ______/ /_ ___ / ____/___ __ _______/ /_ / __ \/ __ ) + / /| | / __ \/ __ `/ ___/ __ \/ _ \ / / / __ \/ / / / ___/ __ \/ / / / __ | + / ___ |/ /_/ / /_/ / /__/ / / / __/ / /___/ /_/ / /_/ / /__/ / / / /_/ / /_/ / +/_/ |_/ .___/\__,_/\___/_/ /_/\___/ \____/\____/\__,_/\___/_/ /_/_____/_____/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Apache-CouchDB" +var_disk="10" +var_cpu="2" +var_ram="4096" +var_os="debian" +var_version="12" +VERBOSE="yes" +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 +if [[ ! -f /etc/systemd/system/couchdb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5984/_utils/${CL} \n" diff --git a/install/apache-couchdb-install.sh b/install/apache-couchdb-install.sh new file mode 100644 index 00000000..41cfde57 --- /dev/null +++ b/install/apache-couchdb-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apt-transport-https +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Installing Apache CouchDB" +ERLANG_COOKIE=$(openssl rand -base64 32) +ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" +debconf-set-selections <<< "couchdb couchdb/cookie string $ERLANG_COOKIE" +debconf-set-selections <<< "couchdb couchdb/mode select standalone" +debconf-set-selections <<< "couchdb couchdb/bindaddress string 0.0.0.0" +debconf-set-selections <<< "couchdb couchdb/adminpass password $ADMIN_PASS" +debconf-set-selections <<< "couchdb couchdb/adminpass_again password $ADMIN_PASS" +curl -fsSL https://couchdb.apache.org/repo/keys.asc | gpg --dearmor -o /usr/share/keyrings/couchdb-archive-keyring.gpg +VERSION_CODENAME="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" >/etc/apt/sources.list.d/couchdb.sources.list +$STD apt-get update +$STD apt-get install -y couchdb +echo -e "CouchDB Erlang Cookie: \e[32m$ERLANG_COOKIE\e[0m" >>~/CouchDB.creds +echo -e "CouchDB Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/CouchDB.creds +msg_ok "Installed Apache CouchDB." + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/misc/build.func b/misc/build.func index 77091c5c..6bc7738e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -55,7 +55,6 @@ msg_info() { SPINNER_PID=$! } - # This function displays a success message with a green color. msg_ok() { if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi From 302368a9124a47d9e93e07701c0637b269c6b432 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Feb 2024 17:42:55 -0500 Subject: [PATCH 2682/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a636f18..b4c33cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **HiveMQ CE LXC** - NEW Script +- **Apache-CouchDB LXC** + - NEW Script ## 2024-02-06 From ffd2fc3b868ab802e14f63cd49e0659347c33461 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 05:53:26 -0500 Subject: [PATCH 2683/3335] Update install.func Check to see if the apt-cacher-ng proxy is available before attempting to use it. If it's not available, the system will directly communicate with the apt repositories. --- misc/install.func | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index ba3c11df..f19e7f12 100644 --- a/misc/install.func +++ b/misc/install.func @@ -154,7 +154,16 @@ network_check() { update_os() { msg_info "Updating Container OS" if [[ "$CACHER" == "yes" ]]; then - echo "Acquire::http { Proxy \"http://${CACHER_IP}:3142\"; };" >/etc/apt/apt.conf.d/00aptproxy + echo "Acquire::http::Proxy-Auto-Detect \"/usr/local/bin/apt-proxy-detect.sh\";" >/etc/apt/apt.conf.d/00aptproxy + cat </usr/local/bin/apt-proxy-detect.sh +#!/bin/bash +if nc -w1 -z "${CACHER_IP}" 3142; then + echo -n "http://${CACHER_IP}:3142" +else + echo -n "DIRECT" +fi +EOF + chmod +x /usr/local/bin/apt-proxy-detect.sh fi $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade From 3093af9b4f0294b392f35ffb1302826efc80f4ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 06:47:26 -0500 Subject: [PATCH 2684/3335] Update alpine-docker.sh Alpine 3.19 --- ct/alpine-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index 49ee7518..6fe0c3bf 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -24,7 +24,7 @@ var_disk="2" var_cpu="1" var_ram="1024" var_os="alpine" -var_version="3.18" +var_version="3.19" variables color catch_errors From 749639b1f0da546143899cd0b81431bbabd68e69 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 06:55:25 -0500 Subject: [PATCH 2685/3335] Update to Alpine 3.19 --- ct/alpine-grafana.sh | 2 +- ct/alpine-nextcloud.sh | 2 +- ct/alpine-vaultwarden.sh | 2 +- ct/alpine-zigbee2mqtt.sh | 2 +- ct/alpine.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index 4382f131..b7e89aba 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -24,7 +24,7 @@ var_disk="0.5" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.18" +var_version="3.19" variables color catch_errors diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 5e9338ac..6def6e53 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -23,7 +23,7 @@ var_disk="2" var_cpu="2" var_ram="1024" var_os="alpine" -var_version="3.18" +var_version="3.19" variables color catch_errors diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 9ce6763a..23bb5f26 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -24,7 +24,7 @@ var_disk="0.3" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.18" +var_version="3.19" variables color catch_errors diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 2767d924..eb98903a 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -24,7 +24,7 @@ var_disk="0.3" var_cpu="1" var_ram="256" var_os="alpine" -var_version="3.18" +var_version="3.19" variables color catch_errors diff --git a/ct/alpine.sh b/ct/alpine.sh index 85f3ad55..8a651555 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -24,7 +24,7 @@ var_disk="0.1" var_cpu="1" var_ram="512" var_os="alpine" -var_version="3.18" +var_version="3.19" variables color catch_errors From 453604d1b63c7896b17366bf7e233bc3806d2bad Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 07:17:23 -0500 Subject: [PATCH 2686/3335] Update build.func tweak --- misc/build.func | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index 6bc7738e..daf5dc49 100644 --- a/misc/build.func +++ b/misc/build.func @@ -340,11 +340,13 @@ advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" fi - if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then - APT_CACHER="${APT_CACHER_IP:+yes}" - echo -e "${DGN}Using APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" - else - exit-script + if [ "$var_os" != "alpine" ]; then + if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then + APT_CACHER="${APT_CACHER_IP:+yes}" + echo -e "${DGN}Using APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" + else + exit-script + fi fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then From 25f88d586ca9420aaf5e56b8b34c09bd452c5094 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 10:36:02 -0500 Subject: [PATCH 2687/3335] Update build.func fixes https://github.com/tteck/Proxmox/issues/2478 --- misc/build.func | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index daf5dc49..d9dc8a70 100644 --- a/misc/build.func +++ b/misc/build.func @@ -340,7 +340,9 @@ advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}" fi - if [ "$var_os" != "alpine" ]; then + if [ "$var_os" == "alpine" ]; then + APT_CACHER="" + else if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then APT_CACHER="${APT_CACHER_IP:+yes}" echo -e "${DGN}Using APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" From 1af3b37dd2ba4ae5d08610e43967cfa98f932392 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 10:38:37 -0500 Subject: [PATCH 2688/3335] Update build.func tweak --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index d9dc8a70..ace1a3e6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -342,6 +342,7 @@ advanced_settings() { if [ "$var_os" == "alpine" ]; then APT_CACHER="" + APT_CACHER_IP="" else if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then APT_CACHER="${APT_CACHER_IP:+yes}" From f5a1b23862a8b013fd56d7a7ddd6f8b253a8f978 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Feb 2024 10:53:25 -0500 Subject: [PATCH 2689/3335] Update alpine-docker-install.sh add option to install Portainer Agent --- install/alpine-docker-install.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 5fa141b2..61cc27f7 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -32,12 +32,13 @@ get_latest_release() { } PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") +PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent") read -r -p "Would you like to add Portainer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null - $STD docker run -d \ + $STD docker run -d \ -p 8000:8000 \ -p 9443:9443 \ --name=portainer \ @@ -46,8 +47,20 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -v portainer_data:/data \ portainer/portainer-ce:latest msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +else + read -r -p "Would you like to add the Portainer Agent? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" + $STD docker run -d \ + -p 9001:9001 \ + --name portainer_agent \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /var/lib/docker/volumes:/var/lib/docker/volumes \ + portainer/agent + msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" + fi fi - read -r -p "Would you like to add Docker Compose? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" From 966ab2d26e880b0bfbc554c67f6238344baf56a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Feb 2024 05:35:43 -0500 Subject: [PATCH 2690/3335] Update post-pve-install.sh - add both Quincy and Reef Ceph repositories, both initially disabled - fixes https://github.com/tteck/Proxmox/issues/2484 --- misc/post-pve-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 18b86ca2..9b7380b3 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -99,7 +99,7 @@ EOF esac if [[ "${VERSION}" == "bookworm" ]]; then - CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nCorrect 'ceph package sources?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nCorrect 'ceph package sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in @@ -107,7 +107,9 @@ EOF msg_info "Enabling 'ceph package repositories'" cat </etc/apt/sources.list.d/ceph.list # deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise -deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription +# deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription +# deb http://download.proxmox.com/debian/ceph-reef bookworm enterprise +# deb http://download.proxmox.com/debian/ceph-reef bookworm no-subscription EOF msg_ok "Enabled 'ceph package repositories'" ;; From 5d64448ac20efec2cc0ea6d1c45e5332b87acca2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Feb 2024 05:46:59 -0500 Subject: [PATCH 2691/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 9b7380b3..21409e64 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -104,17 +104,17 @@ EOF "no" " " 3>&2 2>&1 1>&3) case $CHOICE in yes) - msg_info "Enabling 'ceph package repositories'" + msg_info "Correcting 'ceph package repositories'" cat </etc/apt/sources.list.d/ceph.list # deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise # deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription # deb http://download.proxmox.com/debian/ceph-reef bookworm enterprise # deb http://download.proxmox.com/debian/ceph-reef bookworm no-subscription EOF - msg_ok "Enabled 'ceph package repositories'" + msg_ok "Corrected 'ceph package repositories'" ;; no) - msg_error "Selected no to Enabling 'ceph package repositories'" + msg_error "Selected no to Correcting 'ceph package repositories'" ;; esac fi From 12454bdba78970b572505ea2c3412d4678ba39fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 14 Feb 2024 13:27:19 -0500 Subject: [PATCH 2692/3335] Update grocy.sh fixes https://github.com/tteck/Proxmox/issues/2496 --- ct/grocy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ct/grocy.sh b/ct/grocy.sh index b9c11170..f28a9200 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -56,6 +56,11 @@ function update_script() { header_info if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" +php_version=$(php -v | head -n 1 | awk '{print $2}') +if [[ ! $php_version == "8.3"* ]]; then + apt-get install -y php8.3 + update-alternatives --set php /usr/bin/php8.3 +fi bash /var/www/html/update.sh msg_ok "Updated Successfully" exit From 4d06a6019bc2b6fcd7007d43167c5c400db7f866 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Feb 2024 04:47:59 -0500 Subject: [PATCH 2693/3335] Update grocy.sh tweak --- ct/grocy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/grocy.sh b/ct/grocy.sh index f28a9200..153e760a 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -58,6 +58,7 @@ if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} msg_info "Updating ${APP}" php_version=$(php -v | head -n 1 | awk '{print $2}') if [[ ! $php_version == "8.3"* ]]; then + apt-get update apt-get install -y php8.3 update-alternatives --set php /usr/bin/php8.3 fi From c65bd939eb0722538e6d252a89f2cd7a3da17917 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Feb 2024 07:32:28 -0500 Subject: [PATCH 2694/3335] Update homeassistant-core.sh fixes https://github.com/tteck/Proxmox/issues/2501 --- ct/homeassistant-core.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index b6567eb8..dbbfa463 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -107,12 +107,23 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then + read -r -p "Would you like to use No Authentication? " prompt msg_info "Installing FileBrowser" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') - curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser users add admin changeme --perm.admin &>/dev/null + curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null + + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser config init --auth.method=noauth &>/dev/null + filebrowser config set --auth.method=noauth &>/dev/null + filebrowser users add ID 1 --perm.admin &>/dev/null + else + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser users add admin changeme --perm.admin &>/dev/null + fi + fi msg_ok "Installed FileBrowser" msg_info "Creating Service" From 15b8d2ec16a2295602600bc58775faed7ca76135 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Feb 2024 07:37:00 -0500 Subject: [PATCH 2695/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index dbbfa463..884346fb 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -122,8 +122,7 @@ function update_script() { filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null - fi - fi + fi msg_ok "Installed FileBrowser" msg_info "Creating Service" From d514c841932fffac840202c15b4b3b99f5284b47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Feb 2024 08:04:47 -0500 Subject: [PATCH 2696/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 884346fb..d6fac29a 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -107,6 +107,7 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then + set +Eeuo pipefail read -r -p "Would you like to use No Authentication? " prompt msg_info "Installing FileBrowser" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') From 1ccac3050b6a9c94953cd1c7c500f5c0a8db5f7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Feb 2024 08:11:45 -0500 Subject: [PATCH 2697/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index d6fac29a..738e2ea1 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -116,7 +116,6 @@ function update_script() { if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser config init --auth.method=noauth &>/dev/null filebrowser config set --auth.method=noauth &>/dev/null filebrowser users add ID 1 --perm.admin &>/dev/null else From 0002741cde0dc620ac9502f7d7ad736f3970e296 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 15 Feb 2024 23:04:55 -0500 Subject: [PATCH 2698/3335] Create fstrim.sh --- misc/fstrim.sh | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 misc/fstrim.sh diff --git a/misc/fstrim.sh b/misc/fstrim.sh new file mode 100644 index 00000000..74134234 --- /dev/null +++ b/misc/fstrim.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info() { + clear + cat <<"EOF" + _______ __ __ ______ _ + / ____(_) /__ _______ _______/ /____ ____ ___ /_ __/____(_)___ ___ + / /_ / / / _ \/ ___/ / / / ___/ __/ _ \/ __ `__ \ / / / ___/ / __ `__ \ + / __/ / / / __(__ ) /_/ (__ ) /_/ __/ / / / / / / / / / / / / / / / / +/_/ /_/_/\___/____/\__, /____/\__/\___/_/ /_/ /_/ /_/ /_/ /_/_/ /_/ /_/ + /____/ +EOF +} +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +CM='\xE2\x9C\x94\033' +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +header_info +echo "Loading..." + +ROOT_FS=$(df -Th "/" | awk 'NR==2 {print $2}') +if [ "$ROOT_FS" != "ext4" ]; then + echo "Root filesystem is not ext4. Exiting script." + exit 1 +fi + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Filesystem Trim" --yesno "The selected containers will undergo the fstrim command. Proceed?" 10 58 || exit +NODE=$(hostname) +EXCLUDE_MENU=() +MSG_MAX_LENGTH=0 +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') +excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from trimming:\n" \ + 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + +function trim_container() { + local container=$1 + local name=$(pct exec "$container" hostname) + header_info + echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n" + pct fstrim $container + sleep 1 +} + +for container in $(pct list | awk '{if(NR>1) print $1}'); do + if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then + header_info + echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}" + sleep 1 + else + template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + if [ "$template" == "true" ]; then + header_info + echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is a template ${CL} \n" + sleep 1 + continue + fi + trim_container $container + fi +done + +wait +header_info +echo -e "${GN} Finished, Selected Containers Trimmed. ${CL} \n" From 13ebab39971de888911d14a5b879586b6b138d95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 16 Feb 2024 10:49:37 -0500 Subject: [PATCH 2699/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4c33cad..d1439788 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-16 + +### Changed + +- **Proxmox VE LXC Filesystem Trim** + - NEW Script ([more info](https://github.com/tteck/Proxmox/discussions/2505#discussion-6226037)) + ## 2024-02-11 ### Changed From 8ce0ad13ab1618c36cd4a80a894a1bfa4c784645 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Feb 2024 05:47:38 -0500 Subject: [PATCH 2700/3335] Update fstrim.sh tweak --- misc/fstrim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/fstrim.sh b/misc/fstrim.sh index 74134234..d6fcecb1 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -30,7 +30,7 @@ if [ "$ROOT_FS" != "ext4" ]; then exit 1 fi -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Filesystem Trim" --yesno "The selected containers will undergo the fstrim command. Proceed?" 10 58 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Filesystem Trim" --yesno "The LXC containers will undergo the fstrim command. Proceed?" 10 58 || exit NODE=$(hostname) EXCLUDE_MENU=() MSG_MAX_LENGTH=0 @@ -70,4 +70,4 @@ done wait header_info -echo -e "${GN} Finished, Selected Containers Trimmed. ${CL} \n" +echo -e "${GN} Finished, LXC Containers Trimmed. ${CL} \n" From c7cf925187884417b3687085eb368e60f14e7f1f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Feb 2024 13:08:07 -0500 Subject: [PATCH 2701/3335] Update fstrim.sh display the data percentage used before and after trimming --- misc/fstrim.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/fstrim.sh b/misc/fstrim.sh index d6fcecb1..e413961a 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -47,8 +47,12 @@ function trim_container() { local name=$(pct exec "$container" hostname) header_info echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n" + local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}') + echo -e "${RD}Data before trim $before_trim%${CL}" pct fstrim $container - sleep 1 + local after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}') + echo -e "${GN}Data after trim $after_trim%${CL}" + sleep 1.5 } for container in $(pct list | awk '{if(NR>1) print $1}'); do From 86da4aaabb15956aa0cbc10c53d80cb18c4024b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Feb 2024 15:58:34 -0500 Subject: [PATCH 2702/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 21409e64..ad2227a1 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -99,7 +99,7 @@ EOF esac if [[ "${VERSION}" == "bookworm" ]]; then - CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nCorrect 'ceph package sources?" 14 58 2 \ + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories (initially disabled).\n \nCorrect 'ceph package sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) case $CHOICE in From c702652a000056c0d9189bffa8b6111b5088b0bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Feb 2024 15:59:54 -0500 Subject: [PATCH 2703/3335] Update fstrim.sh tweak --- misc/fstrim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/fstrim.sh b/misc/fstrim.sh index e413961a..06430eee 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -44,7 +44,7 @@ excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title " function trim_container() { local container=$1 - local name=$(pct exec "$container" hostname) + local name=$(pct exec "$container" hostname 2>/dev/null || echo "No hostname because the container is not running") header_info echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n" local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}') From 94cf9da7a1b23b5189b2b5a379b13a97bc8be94c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Feb 2024 19:50:07 -0500 Subject: [PATCH 2704/3335] Update mikrotik-routeros.sh add zfspool --- vm/mikrotik-routeros.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 5c38d9ed..20fd1b92 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -251,7 +251,7 @@ nfs | dir) DISK_REF="$VMID/" DISK_IMPORT="-format qcow2" ;; -btrfs) +btrfs | zfspool) DISK_EXT=".raw" DISK_REF="$VMID/" DISK_FORMAT="subvol" From 8d55efd704e321f38aeba19004396e234774b61d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Feb 2024 20:07:03 -0500 Subject: [PATCH 2705/3335] Update mikrotik-routeros.sh tweak --- vm/mikrotik-routeros.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 20fd1b92..6f37776a 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -252,7 +252,7 @@ nfs | dir) DISK_IMPORT="-format qcow2" ;; btrfs | zfspool) - DISK_EXT=".raw" + DISK_EXT="" DISK_REF="$VMID/" DISK_FORMAT="subvol" DISK_IMPORT="-format raw" From a5b3aab72e466e7ec56bd100445777c5b8c54c87 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 09:51:55 -0500 Subject: [PATCH 2706/3335] Update fstrim.sh tweak --- misc/fstrim.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/fstrim.sh b/misc/fstrim.sh index 06430eee..b3fc2c52 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -47,14 +47,16 @@ function trim_container() { local name=$(pct exec "$container" hostname 2>/dev/null || echo "No hostname because the container is not running") header_info echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n" - local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}') + local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') echo -e "${RD}Data before trim $before_trim%${CL}" pct fstrim $container - local after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}') + local after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') echo -e "${GN}Data after trim $after_trim%${CL}" sleep 1.5 } + + for container in $(pct list | awk '{if(NR>1) print $1}'); do if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then header_info From faad7f25cc85ca7a7d5190c389cc8c58376b1353 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 16:39:18 -0500 Subject: [PATCH 2707/3335] Update heimdalldashboard-install.sh test --- install/heimdalldashboard-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index afe39d6f..b909c201 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -27,7 +27,8 @@ $STD apt-get install -y php-xml $STD apt-get install -y php-intl msg_ok "Installed PHP" -RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +#RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +RELEASE=v2.5.8 msg_info "Installing Heimdall Dashboard ${RELEASE}" $STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" $STD tar xvzf ${RELEASE}.tar.gz From d806d87cfd9a033379a658b36abf4589996b1466 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 16:46:21 -0500 Subject: [PATCH 2708/3335] Update heimdalldashboard-install.sh test --- install/heimdalldashboard-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index b909c201..0281b262 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -32,9 +32,8 @@ RELEASE=v2.5.8 msg_info "Installing Heimdall Dashboard ${RELEASE}" $STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" $STD tar xvzf ${RELEASE}.tar.gz -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') +#VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +VER=2.5.8 rm -rf ${RELEASE}.tar.gz mv Heimdall-${VER} /opt/Heimdall msg_ok "Installed Heimdall Dashboard ${RELEASE}" From eb7491c6c19036473cdbf028cda831adc899311e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 17:12:01 -0500 Subject: [PATCH 2709/3335] Update heimdalldashboard-install.sh hard code v2.5.8 --- install/heimdalldashboard-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 0281b262..75a29271 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -28,10 +28,10 @@ $STD apt-get install -y php-intl msg_ok "Installed PHP" #RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -RELEASE=v2.5.8 +RELEASE=V2.5.8 msg_info "Installing Heimdall Dashboard ${RELEASE}" -$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -$STD tar xvzf ${RELEASE}.tar.gz +wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz +tar xzf ${RELEASE}.tar.gz #VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') VER=2.5.8 rm -rf ${RELEASE}.tar.gz @@ -55,7 +55,7 @@ TimeoutStopSec=30 [Install] WantedBy=multi-user.target" >$service_path -$STD sudo systemctl enable --now heimdall.service +systemctl enable -q --now heimdall.service msg_ok "Created Service" motd_ssh From ccadb0d92ea69326ad155d2cb0b3b9bb746fdef1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 17:52:10 -0500 Subject: [PATCH 2710/3335] Update heimdalldashboard-install.sh php8.3 --- install/heimdalldashboard-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 75a29271..18a2cedb 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -17,15 +17,15 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -msg_info "Installing PHP" -$STD apt-get install -y php -$STD apt-get install -y php-sqlite3 -$STD apt-get install -y php-zip -$STD apt-get install -y php-xml -$STD apt-get install -y php-intl -msg_ok "Installed PHP" +msg_info "Installing PHP8.3" +curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg +echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" >/etc/apt/sources.list.d/php.list +$STD apt-get update +$STD apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,zip,xml} +msg_ok "Installed PHP8.3" #RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') RELEASE=V2.5.8 From e880a9d8dbdefab2ab476720b46efeba15b82691 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 18:23:56 -0500 Subject: [PATCH 2711/3335] Update grocy.sh recode update function --- ct/grocy.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ct/grocy.sh b/ct/grocy.sh index 153e760a..fc48644b 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -55,13 +55,18 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" php_version=$(php -v | head -n 1 | awk '{print $2}') if [[ ! $php_version == "8.3"* ]]; then - apt-get update - apt-get install -y php8.3 - update-alternatives --set php /usr/bin/php8.3 + msg_info "Updating PHP" + curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg + echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" >/etc/apt/sources.list.d/php.list + apt-get update + apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} + systemctl reload apache2 + apt autoremove + msg_ok "Updated PHP" fi +msg_info "Updating ${APP}" bash /var/www/html/update.sh msg_ok "Updated Successfully" exit From 147d0ac8db7ac4db73f468f21866c610578a0751 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 18:25:35 -0500 Subject: [PATCH 2712/3335] Update grocy-install.sh php8.3 --- install/grocy-install.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 091fa8d8..015c60ea 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -20,18 +20,13 @@ $STD apt-get install -y mc $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -msg_info "Installing PHP 8.2" +msg_info "Installing PHP8.3" VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update -$STD apt-get install -y php8.2 -$STD apt-get install -y libapache2-mod-php8.2 -$STD apt-get install -y php8.2-sqlite3 -$STD apt-get install -y php8.2-gd -$STD apt-get install -y php8.2-intl -$STD apt-get install -y php8.2-mbstring -msg_ok "Installed PHP 8.2" +$STD apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} +msg_ok "Installed PHP8.3" msg_info "Installing grocy" latest=$(curl -s https://api.github.com/repos/grocy/grocy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') From be77d96cce6b0d1227e57a2238b03221e6f51786 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 18:38:05 -0500 Subject: [PATCH 2713/3335] Update grocy-install.sh tweak --- install/grocy-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 015c60ea..57d38b21 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -25,7 +25,9 @@ VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update -$STD apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} +$STD apt-get install -y php8.3 php8.3-{cli.bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} +a2enconf php8.3-fpm +systemctl reload apache2 msg_ok "Installed PHP8.3" msg_info "Installing grocy" From 75bcbacd9ca996e2b317e0f045c4e4e88b75d9cd Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 18:40:42 -0500 Subject: [PATCH 2714/3335] Update grocy-install.sh --- install/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 57d38b21..54ea2300 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -25,7 +25,7 @@ VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update -$STD apt-get install -y php8.3 php8.3-{cli.bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} +$STD apt-get install -y php8.3 php8.3-{cli,bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} a2enconf php8.3-fpm systemctl reload apache2 msg_ok "Installed PHP8.3" From a804d47d2d14c7486aa4deeb35730c1bfd491d85 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 18:41:59 -0500 Subject: [PATCH 2715/3335] Update grocy-install.sh --- install/grocy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 54ea2300..d86366a9 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -26,7 +26,7 @@ curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/ph echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update $STD apt-get install -y php8.3 php8.3-{cli,bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} -a2enconf php8.3-fpm +$STD a2enconf php8.3-fpm systemctl reload apache2 msg_ok "Installed PHP8.3" From ceb3a131bffe70c71f66360190f6810401bd4b55 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 18:47:07 -0500 Subject: [PATCH 2716/3335] Update grocy-install.sh revert to PHP8.2 --- install/grocy-install.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/install/grocy-install.sh b/install/grocy-install.sh index d86366a9..f3dc7f57 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -20,15 +20,18 @@ $STD apt-get install -y mc $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -msg_info "Installing PHP8.3" +msg_info "Installing PHP8.2" VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg echo -e "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" >/etc/apt/sources.list.d/php.list $STD apt-get update -$STD apt-get install -y php8.3 php8.3-{cli,bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml} -$STD a2enconf php8.3-fpm -systemctl reload apache2 -msg_ok "Installed PHP8.3" +$STD apt-get install -y php8.2 +$STD apt-get install -y libapache2-mod-php8.2 +$STD apt-get install -y php8.2-sqlite3 +$STD apt-get install -y php8.2-gd +$STD apt-get install -y php8.2-intl +$STD apt-get install -y php8.2-mbstring +msg_ok "Installed PHP8.2" msg_info "Installing grocy" latest=$(curl -s https://api.github.com/repos/grocy/grocy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') From 05c8093bd7f51e1586c4cabe732a6fc7b80687fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 19:39:58 -0500 Subject: [PATCH 2717/3335] Update heimdalldashboard.sh add warning --- ct/heimdalldashboard.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index b2d0645a..98ff9f22 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -55,6 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "WARNING" "Currently, v2.6.0 breaks the application." 8 58 msg_info "Stopping ${APP}" systemctl disable heimdall.service &>/dev/null systemctl stop heimdall From b7bfe7df1436f655a3bf3eae24bd210095d96541 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Feb 2024 20:46:59 -0500 Subject: [PATCH 2718/3335] Update heimdalldashboard.sh update warning --- ct/heimdalldashboard.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 98ff9f22..39fd7ba3 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -55,7 +55,11 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "WARNING" "Currently, v2.6.0 breaks the application." 8 58 +if ! whiptail --backtitle "Proxmox VE Helper Scripts" --title "WARNING" --yesno "Currently, v2.6.0 breaks the application. Proceed?" 10 58; then + clear + echo -e "⚠ User exited script \n" + exit +fi msg_info "Stopping ${APP}" systemctl disable heimdall.service &>/dev/null systemctl stop heimdall From b082f8a08e3b4e597bf069306194f597709c469c Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Feb 2024 04:43:10 -0500 Subject: [PATCH 2719/3335] Update fstrim.sh display CTID instead of hostname --- misc/fstrim.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/fstrim.sh b/misc/fstrim.sh index b3fc2c52..6b445667 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -44,9 +44,8 @@ excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title " function trim_container() { local container=$1 - local name=$(pct exec "$container" hostname 2>/dev/null || echo "No hostname because the container is not running") header_info - echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n" + echo -e "${BL}[Info]${GN} Trimming ${container} ${CL} \n" local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') echo -e "${RD}Data before trim $before_trim%${CL}" pct fstrim $container @@ -66,7 +65,7 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") if [ "$template" == "true" ]; then header_info - echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is a template ${CL} \n" + echo -e "${BL}[Info]${GN} Skipping ${container} ${RD}$container is a template ${CL} \n" sleep 1 continue fi From 9478fffd5a0fbf87e869ceececa4377f9d5d3e17 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Feb 2024 13:13:44 -0500 Subject: [PATCH 2720/3335] Update fstrim.sh tweak --- misc/fstrim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/fstrim.sh b/misc/fstrim.sh index 6b445667..5c0e2ae6 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -45,7 +45,7 @@ excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title " function trim_container() { local container=$1 header_info - echo -e "${BL}[Info]${GN} Trimming ${container} ${CL} \n" + echo -e "${BL}[Info]${GN} Trimming ${BL}$container${CL} \n" local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') echo -e "${RD}Data before trim $before_trim%${CL}" pct fstrim $container From 822299b61030cfe291cd6b001be77505e7af40f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Feb 2024 13:27:56 -0500 Subject: [PATCH 2721/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1439788..28ce67a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-19 + +### Changed + +- **PairDrop LXC** + - Removed from the website ([more info](https://github.com/tteck/Proxmox/discussions/2516)) + ## 2024-02-16 ### Changed From 4aa5e12268e6ffad3a38601801c89aeba548f0dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Feb 2024 18:22:38 -0500 Subject: [PATCH 2722/3335] Update heimdalldashboard-install.sh release version hold --- install/heimdalldashboard-install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 18a2cedb..f101ba17 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -27,15 +27,14 @@ $STD apt-get update $STD apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,zip,xml} msg_ok "Installed PHP8.3" -#RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -RELEASE=V2.5.8 +RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') msg_info "Installing Heimdall Dashboard ${RELEASE}" wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz tar xzf ${RELEASE}.tar.gz -#VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -VER=2.5.8 +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') rm -rf ${RELEASE}.tar.gz mv Heimdall-${VER} /opt/Heimdall +$STD apt-get install -y composer msg_ok "Installed Heimdall Dashboard ${RELEASE}" msg_info "Creating Service" @@ -56,6 +55,9 @@ TimeoutStopSec=30 [Install] WantedBy=multi-user.target" >$service_path systemctl enable -q --now heimdall.service +cd /opt/Heimdall +COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null +systemctl restart heimdall.service msg_ok "Created Service" motd_ssh From a4be2339535ad37a84e750739b9beb1d9160f937 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Feb 2024 18:24:40 -0500 Subject: [PATCH 2723/3335] Update heimdalldashboard.sh recode update function --- ct/heimdalldashboard.sh | 68 +++++++---------------------------------- 1 file changed, 11 insertions(+), 57 deletions(-) diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 39fd7ba3..bdc4889c 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -55,82 +55,36 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if ! whiptail --backtitle "Proxmox VE Helper Scripts" --title "WARNING" --yesno "Currently, v2.6.0 breaks the application. Proceed?" 10 58; then - clear - echo -e "⚠ User exited script \n" - exit -fi msg_info "Stopping ${APP}" -systemctl disable heimdall.service &>/dev/null systemctl stop heimdall sleep 1 msg_ok "Stopped ${APP}" msg_info "Backing up Data" -if [ -d "/opt/Heimdall-2.4.6" ]; then - cp -R /opt/Heimdall-2.4.6/database database-backup - cp -R /opt/Heimdall-2.4.6/public public-backup -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - cp -R /opt/Heimdall-2.4.7b/database database-backup - cp -R /opt/Heimdall-2.4.7b/public public-backup -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - cp -R /opt/Heimdall-2.4.8/database database-backup - cp -R /opt/Heimdall-2.4.8/public public-backup -else - cp -R /opt/Heimdall/database database-backup - cp -R /opt/Heimdall/public public-backup -fi +cp -R /opt/Heimdall/database database-backup +cp -R /opt/Heimdall/public public-backup sleep 1 msg_ok "Backed up Data" RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') msg_info "Updating Heimdall Dashboard to ${RELEASE}" -curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null -tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') - -if [ ! -d "/opt/Heimdall" ]; then - mv Heimdall-${VER} /opt/Heimdall -else - cp -R Heimdall-${VER}/* /opt/Heimdall -fi - -service_path="/etc/systemd/system/heimdall.service" -echo "[Unit] -Description=Heimdall -After=network.target -[Service] -Restart=always -RestartSec=5 -Type=simple -User=root -WorkingDirectory=/opt/Heimdall -ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 -TimeoutStopSec=30 -[Install] -WantedBy=multi-user.target" >$service_path +wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz +tar xzf ${RELEASE}.tar.gz +VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cp -R Heimdall-${VER}/* /opt/Heimdall +cd /opt/Heimdall +apt-get install -y composer &>/dev/null +COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null msg_ok "Updated Heimdall Dashboard to ${RELEASE}" msg_info "Restoring Data" +cd ~ cp -R database-backup/* /opt/Heimdall/database cp -R public-backup/* /opt/Heimdall/public sleep 1 msg_ok "Restored Data" msg_info "Cleanup" -if [ -d "/opt/Heimdall-2.4.6" ]; then - rm -rf /opt/Heimdall-2.4.6 - rm -rf /opt/v2.4.6.tar.gz -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - rm -rf /opt/Heimdall-2.4.7b - rm -rf /opt/v2.4.7b.tar.gz -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - rm -rf /opt/Heimdall-2.4.8 - rm -rf /opt/v2.4.8.tar.gz -fi - rm -rf ${RELEASE}.tar.gz rm -rf Heimdall-${VER} rm -rf public-backup @@ -140,7 +94,7 @@ sleep 1 msg_ok "Cleaned" msg_info "Starting ${APP}" -systemctl enable --now heimdall.service &>/dev/null +systemctl start heimdall.service sleep 2 msg_ok "Started ${APP}" msg_ok "Updated Successfully" From 25a9708fe3baca8771d3bb5c7afe210a86a6f121 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Feb 2024 22:03:57 -0500 Subject: [PATCH 2724/3335] Update heimdalldashboard-install.sh use php8.2 --- install/heimdalldashboard-install.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index f101ba17..50515b9c 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -18,15 +18,10 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y apt-transport-https +$STD apt-get install -y composer +$STD apt-get install -y php8.2-{bz2,curl,sqlite3,zip,xml} msg_ok "Installed Dependencies" -msg_info "Installing PHP8.3" -curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg -echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" >/etc/apt/sources.list.d/php.list -$STD apt-get update -$STD apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,zip,xml} -msg_ok "Installed PHP8.3" - RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') msg_info "Installing Heimdall Dashboard ${RELEASE}" wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz @@ -34,7 +29,6 @@ tar xzf ${RELEASE}.tar.gz VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') rm -rf ${RELEASE}.tar.gz mv Heimdall-${VER} /opt/Heimdall -$STD apt-get install -y composer msg_ok "Installed Heimdall Dashboard ${RELEASE}" msg_info "Creating Service" From 2171405dc6db9d683814219ac11336b8e31771c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Feb 2024 07:26:31 -0500 Subject: [PATCH 2725/3335] Update plex-install.sh update keyring location --- install/plex-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/plex-install.sh b/install/plex-install.sh index ca8dca63..394bb6f0 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -38,8 +38,8 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_info "Setting Up Plex Media Server Repository" -wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key >/etc/apt/trusted.gpg.d/PlexSign.asc -echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" >/etc/apt/sources.list.d/plexmediaserver.list +wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key >/usr/share/keyrings/PlexSign.asc +echo "deb [signed-by=/usr/share/keyrings/PlexSign.asc] https://downloads.plex.tv/repo/deb/ public main" >/etc/apt/sources.list.d/plexmediaserver.list msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" From 35b57f4555166842547a99fed3675c4e8ba0c7f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Feb 2024 20:42:47 -0500 Subject: [PATCH 2726/3335] Update emby.sh Ubuntu 22.04 --- ct/emby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/emby.sh b/ct/emby.sh index a063e0af..a8b5618a 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="ubuntu" -var_version="20.04" +var_version="22.04" variables color catch_errors From e23f2c60f8dd6acd75e4fe16bec7a2af0d4c3407 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Feb 2024 21:33:50 -0500 Subject: [PATCH 2727/3335] Update jellyfin-install.sh fix GID mismatch --- install/jellyfin-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index a8a61d20..fc918667 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -58,6 +58,7 @@ EOF # Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5) $STD apt-get update $STD apt-get install -y jellyfin +sed -i '/^render:x:108:root,jellyfin$/d; s/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' /etc/group msg_ok "Installed Jellyfin" motd_ssh From ca280c5fac2db11c0c9758b1a91e767889a20133 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Feb 2024 21:35:20 -0500 Subject: [PATCH 2728/3335] Update emby-install.sh fix GID mismatch --- install/emby-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/emby-install.sh b/install/emby-install.sh index 9027437a..dda49ed9 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -42,6 +42,7 @@ LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releas msg_info "Installing Emby" wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb +sed -i '/^render:x:108:root,emby$/d; s/^ssl-cert:x:104:$/render:x:104:root,emby/' /etc/group msg_ok "Installed Emby" motd_ssh From f4bbf3bac038ef6505529488be88dbcf71a635f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Feb 2024 21:36:45 -0500 Subject: [PATCH 2729/3335] Update plex-install.sh fix GID mismatch --- install/plex-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/plex-install.sh b/install/plex-install.sh index 394bb6f0..64a895f3 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -45,6 +45,7 @@ msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver +sed -i '/^render:x:108:root$/d; s/^ssl-cert:x:104:plex$/render:x:104:root,plex/' /etc/group msg_ok "Installed Plex Media Server" motd_ssh From 8456deb1f8a3beebbe571cc0a7b912f055215882 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Feb 2024 22:41:09 -0500 Subject: [PATCH 2730/3335] Improve GID mismatch fix - Emby - Jellyfin - Plex --- install/emby-install.sh | 2 +- install/jellyfin-install.sh | 2 +- install/plex-install.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/emby-install.sh b/install/emby-install.sh index dda49ed9..b4f6684b 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -42,7 +42,7 @@ LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releas msg_info "Installing Emby" wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb -sed -i '/^render:x:108:root,emby$/d; s/^ssl-cert:x:104:$/render:x:104:root,emby/' /etc/group +sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group msg_ok "Installed Emby" motd_ssh diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index fc918667..269daebd 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -58,7 +58,7 @@ EOF # Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5) $STD apt-get update $STD apt-get install -y jellyfin -sed -i '/^render:x:108:root,jellyfin$/d; s/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' /etc/group +sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group msg_ok "Installed Jellyfin" motd_ssh diff --git a/install/plex-install.sh b/install/plex-install.sh index 64a895f3..88ea2aca 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -45,7 +45,7 @@ msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver -sed -i '/^render:x:108:root$/d; s/^ssl-cert:x:104:plex$/render:x:104:root,plex/' /etc/group +sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:root,plex/' -e 's/^render:x:108:root$/ssl-cert:x:108:plex/' /etc/group msg_ok "Installed Plex Media Server" motd_ssh From 47b581ee38eca2f6952fb5d5e58843a9f5cbdbc5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 09:08:40 -0500 Subject: [PATCH 2731/3335] Update paperless-ngx-install.sh fixes https://github.com/tteck/Proxmox/issues/2525 --- install/paperless-ngx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 5701601a..d4b12ca9 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -97,6 +97,7 @@ $STD python3 -m nltk.downloader -d /usr/share/nltk_data all msg_ok "Installed Natural Language Toolkit" msg_info "Setting up PostgreSQL database" +export LC_ALL=C.UTF-8 DB_NAME=paperlessdb DB_USER=paperless DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" From c0e3edc0c90479922583d98078b8fc43024e0946 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 11:05:58 -0500 Subject: [PATCH 2732/3335] Update install.func The script now checks IPv6 internet connectivity by attempting to ping "google.com" instead of Cloudflare's DNS IPv6 server address. --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index f19e7f12..d6aaf6c4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -130,7 +130,7 @@ network_check() { # Check if IPv6 is being used if ip -o -6 addr show | grep -q "scope global"; then - if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null; then + if ping -6 google.com &>/dev/null; then msg_ok "IPv6 Internet Connected"; else msg_error "IPv6 Internet Not Connected"; From 71ca43c7a2e7ca45f466034d3e2743329e895e7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 12:19:48 -0500 Subject: [PATCH 2733/3335] Update install.func The script now checks for both IPv4 and IPv6 Internet connectivity and displays the results. Only if both IPv4 and IPv6 checks fail, it will then prompt the user. --- misc/install.func | 50 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/misc/install.func b/misc/install.func index d6aaf6c4..3deb63d1 100644 --- a/misc/install.func +++ b/misc/install.func @@ -112,35 +112,33 @@ setting_up_container() { network_check() { set +e trap - ERR -# Check if IPv4 is being used - if ip -o -4 addr show | grep -q "scope global"; then - if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then - msg_ok "IPv4 Internet Connected"; - else - msg_error "IPv4 Internet Not Connected"; - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi - fi + ipv4_connected=false + ipv6_connected=false + +# Check IPv4 connectivity + if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then + msg_ok "IPv4 Internet Connected"; + ipv4_connected=true + else + msg_error "IPv4 Internet Not Connected"; fi -# Check if IPv6 is being used - if ip -o -6 addr show | grep -q "scope global"; then - if ping -6 google.com &>/dev/null; then - msg_ok "IPv6 Internet Connected"; +# Check IPv6 connectivity + if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null; then + msg_ok "IPv6 Internet Connected"; + ipv6_connected=true + else + msg_error "IPv6 Internet Not Connected"; + fi + +# If both IPv4 and IPv6 checks fail, prompt the user + if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then + read -r -p "No Internet detected,would you like to continue anyway? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else - msg_error "IPv6 Internet Not Connected"; - read -r -p "Would you like to continue anyway? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" - else - echo -e " 🖧 Check Network Settings" - exit 1 - fi + echo -e " 🖧 Check Network Settings" + exit 1 fi fi From 35bcc0e89440cf84ce46986098112fd592fb08b3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 13:28:52 -0500 Subject: [PATCH 2734/3335] Update tdarr-install.sh fix GID mismatch --- install/tdarr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index f666cb55..69321662 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -42,6 +42,7 @@ $STD unzip Tdarr_Updater.zip rm -rf Tdarr_Updater.zip chmod +x Tdarr_Updater ./Tdarr_Updater &>/dev/null +sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group msg_ok "Installed Tdarr" msg_info "Creating Service" From 779849f337ff78a8f318862d93f0dba82ab39917 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 13:44:40 -0500 Subject: [PATCH 2735/3335] Update scrypted-install.sh fix GID mismatch --- install/scrypted-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 60c05d38..a85c2271 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -110,6 +110,7 @@ fi msg_info "Installing Scrypted" $STD npx -y scrypted@latest install-server +sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group msg_ok "Installed Scrypted" msg_info "Creating Service" From fc41d79db4a321ce67bdd0e372b75cafddbc5169 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 14:10:55 -0500 Subject: [PATCH 2736/3335] Update channels-install.sh fix GID mismatch --- install/channels-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/channels-install.sh b/install/channels-install.sh index 7a2c6f7f..fcd6a65e 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -38,7 +38,7 @@ fi msg_info "Installing Channels DVR Server (Patience)" cd /opt $STD bash <(curl -fsSL https://getchannels.com/dvr/setup.sh) -# adduser $(id -u -n) video && adduser $(id -u -n) render +sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group msg_ok "Installed Channels DVR Server" motd_ssh From 26036763f7d53ed7a09513150b6bf72444fe4fa9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 14:21:01 -0500 Subject: [PATCH 2737/3335] Update unmanic-install.sh fix GID mismatch --- install/unmanic-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index 6e9a6300..d5d1790a 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -37,6 +37,7 @@ fi msg_info "Installing Unmanic" $STD pip3 install unmanic +sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group msg_ok "Installed Unmanic" msg_info "Creating Service" From 6a0b31aee189598cea88fe6aaf5e61853e62ea24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 15:10:23 -0500 Subject: [PATCH 2738/3335] Update channels-install.sh tweak --- install/channels-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/channels-install.sh b/install/channels-install.sh index fcd6a65e..548628af 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -25,7 +25,7 @@ if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ - ocl-icd-libopencl1 \ + ocl-icd-libopencl1 \ intel-opencl-icd chgrp video /dev/dri chmod 755 /dev/dri From 8a057295938f7c74f67d27844a85ef38004160a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:03:20 -0500 Subject: [PATCH 2739/3335] Update build.func Check if the shell is using bash shell --- misc/build.func | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/build.func b/misc/build.func index ace1a3e6..98b4a97f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -82,6 +82,16 @@ check_root() { fi } +# Check if the shell is using bash +check_shell() { + if [[ "$(basename "$SHELL")" != "bash" ]]; then + msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. + echo -e "\nExiting..." + sleep 2 + exit + fi +} + # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then From 8752a66c0317f49ca22925ead09291244b4be5df Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:21:51 -0500 Subject: [PATCH 2740/3335] Update build.func The use of the Bash shell is mandatory. --- misc/build.func | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index 98b4a97f..410672cc 100644 --- a/misc/build.func +++ b/misc/build.func @@ -72,7 +72,7 @@ msg_error() { } # Run as root only -check_root() { +root_check() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear msg_error "Please run this script as root." @@ -83,7 +83,7 @@ check_root() { } # Check if the shell is using bash -check_shell() { +shell_check() { if [[ "$(basename "$SHELL")" != "bash" ]]; then msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. echo -e "\nExiting..." @@ -460,10 +460,11 @@ advanced_settings() { } install_script() { - check_root - ssh_check - arch_check pve_check + shell_check + root_check + arch_check + ssh_check if systemctl is-active -q ping-instances.service; then systemctl -q stop ping-instances.service fi From 43de9ca99f8f007d01f2894f6e471c994d771455 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:26:12 -0500 Subject: [PATCH 2741/3335] Update build.func revert --- misc/build.func | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/misc/build.func b/misc/build.func index 410672cc..98b4a97f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -72,7 +72,7 @@ msg_error() { } # Run as root only -root_check() { +check_root() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear msg_error "Please run this script as root." @@ -83,7 +83,7 @@ root_check() { } # Check if the shell is using bash -shell_check() { +check_shell() { if [[ "$(basename "$SHELL")" != "bash" ]]; then msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. echo -e "\nExiting..." @@ -460,11 +460,10 @@ advanced_settings() { } install_script() { - pve_check - shell_check - root_check - arch_check + check_root ssh_check + arch_check + pve_check if systemctl is-active -q ping-instances.service; then systemctl -q stop ping-instances.service fi From 998235e92da94844795cdb74e364d0353f1119cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:33:36 -0500 Subject: [PATCH 2742/3335] Update build.func revert --- misc/build.func | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index 98b4a97f..ace1a3e6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -82,16 +82,6 @@ check_root() { fi } -# Check if the shell is using bash -check_shell() { - if [[ "$(basename "$SHELL")" != "bash" ]]; then - msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. - echo -e "\nExiting..." - sleep 2 - exit - fi -} - # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then From 038f70f198c4f8d723b55930c183a0e401a4422b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:40:37 -0500 Subject: [PATCH 2743/3335] Update build.func To utilize these scripts, please switch to the Bash shell. --- misc/build.func | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/misc/build.func b/misc/build.func index ace1a3e6..f053639b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -82,6 +82,16 @@ check_root() { fi } +# Check if the shell is using bash +shell_check() { + if [[ "$(basename "$SHELL")" != "bash" ]]; then + msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. + echo -e "\nExiting..." + sleep 2 + exit + fi +} + # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then @@ -450,6 +460,7 @@ advanced_settings() { } install_script() { + shell_check check_root ssh_check arch_check From f3e3958299d22416ae9e77ad1b4753f137563f02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:47:57 -0500 Subject: [PATCH 2744/3335] Update build.func --- misc/build.func | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/misc/build.func b/misc/build.func index f053639b..ace1a3e6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -82,16 +82,6 @@ check_root() { fi } -# Check if the shell is using bash -shell_check() { - if [[ "$(basename "$SHELL")" != "bash" ]]; then - msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. - echo -e "\nExiting..." - sleep 2 - exit - fi -} - # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then @@ -460,7 +450,6 @@ advanced_settings() { } install_script() { - shell_check check_root ssh_check arch_check From 0b604d204a174e567477e38ef75c6e4f1e90a9a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 19:51:36 -0500 Subject: [PATCH 2745/3335] Update build.func Check if the shell is using bash (retry) --- misc/build.func | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index ace1a3e6..fa98059e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -71,8 +71,19 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# Check if the shell is using bash +shell_check() { + if [[ "$(basename "$SHELL")" != "bash" ]]; then + clear + msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + # Run as root only -check_root() { +root_check() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear msg_error "Please run this script as root." @@ -450,10 +461,12 @@ advanced_settings() { } install_script() { - check_root - ssh_check - arch_check pve_check + shell_check + root_check + arch_check + ssh_check + if systemctl is-active -q ping-instances.service; then systemctl -q stop ping-instances.service fi From 27adffcbcb32c7d8a7e15364400f619f5095612a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 20:47:15 -0500 Subject: [PATCH 2746/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28ce67a6..c90527ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,13 @@ ### Changed +- **All scripts** + - As of today, the scripts require the Bash shell specifically. ([more info](https://github.com/tteck/Proxmox/discussions/2536)) + +## 2024-02-19 + +### Changed + - **PairDrop LXC** - Removed from the website ([more info](https://github.com/tteck/Proxmox/discussions/2516)) From 03fbdbe74fed56a77bff1d2c9043b6a40433753f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Feb 2024 09:31:08 -0500 Subject: [PATCH 2747/3335] Update stirling-pdf-install.sh fixes https://github.com/tteck/Proxmox/issues/2540 --- install/stirling-pdf-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index 43cb89a8..cc26eec7 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -83,6 +83,7 @@ touch /opt/Stirling-PDF/.env mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ mv scripts /opt/Stirling-PDF/ ln -s /opt/Stirling-PDF/Stirling-PDF-$RELEASE.jar /opt/Stirling-PDF/Stirling-PDF.jar +ln -s /usr/share/tesseract-ocr/5/tessdata/ /usr/share/tessdata msg_ok "Installed Stirling-PDF v$RELEASE" msg_info "Creating Service" From 57fca777b6ad390955600bd682eb125b5f61cc4b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Feb 2024 13:44:02 -0500 Subject: [PATCH 2748/3335] Update jellyfin-install.sh - add vainfo and intel-gpu-tools - code refactoring --- install/jellyfin-install.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 269daebd..8b654903 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -22,14 +22,7 @@ msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd - else - $STD apt-get install -y intel-opencl-icd - fi + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* From c6b13d0a36112f1d3906a2c5004c4f202b013f86 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Feb 2024 13:46:23 -0500 Subject: [PATCH 2749/3335] Update plex-install.sh - add vainfo and intel-gpu-tools - code refactoring --- install/plex-install.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/install/plex-install.sh b/install/plex-install.sh index 88ea2aca..fd6f0089 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -21,14 +21,7 @@ msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd - else - $STD apt-get install -y intel-opencl-icd - fi + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* From ffb58a51111ba9aba26ad388724ca415de499a72 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Feb 2024 13:52:27 -0500 Subject: [PATCH 2750/3335] Update emby-install.sh - add vainfo and intel-gpu-tools - code refactoring --- install/emby-install.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/install/emby-install.sh b/install/emby-install.sh index b4f6684b..72158183 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -21,14 +21,7 @@ msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd - else - $STD apt-get install -y intel-opencl-icd - fi + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* From 9d9620249f8f501a6c969d6829f5d0ebec761a05 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 22 Feb 2024 23:44:30 -0500 Subject: [PATCH 2751/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index fa98059e..968cb83e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -75,7 +75,7 @@ msg_error() { shell_check() { if [[ "$(basename "$SHELL")" != "bash" ]]; then clear - msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell." + msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." echo -e "\nExiting..." sleep 2 exit From 2d01721a759fd4401fecb5a1840c880e6aee02a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Feb 2024 01:22:11 -0500 Subject: [PATCH 2752/3335] Update CHANGELOG.md fix date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c90527ba..0f956a7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** -## 2024-02-19 +## 2024-02-21 ### Changed From f5f28231a74693eea6a38dea2b6476e2fb0317a8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Feb 2024 15:12:30 -0500 Subject: [PATCH 2753/3335] Update build.func tweak SSH message --- misc/build.func | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index 968cb83e..604b0468 100644 --- a/misc/build.func +++ b/misc/build.func @@ -119,14 +119,13 @@ arch_check() { # This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. ssh_check() { - if command -v pveversion >/dev/null 2>&1; then - if [ -n "${SSH_CLIENT:+x}" ]; then - if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then - echo "you've been warned" - else - clear - exit - fi + if command -v pveversion >/dev/null 2>&1 && [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's advisable to utilize the Proxmox shell rather than SSH, as there may be potential complications with variable retrieval. Proceed using SSH?" 10 72; then + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proceed using SSH" "You've chosen to proceed using SSH. If any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72 + else + clear + echo "Exiting due to SSH usage. Please consider using the Proxmox shell." + exit fi fi } From e845685b0c1fdce9d00e63c14c8177bb5a9e1a0c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 24 Feb 2024 02:28:02 +0100 Subject: [PATCH 2754/3335] Add Tandoor Recipes LXC (#2551) --- ct/tandoor.sh | 90 +++++++++++++++++++++++ install/tandoor-install.sh | 142 +++++++++++++++++++++++++++++++++++++ 2 files changed, 232 insertions(+) create mode 100644 ct/tandoor.sh create mode 100644 install/tandoor-install.sh diff --git a/ct/tandoor.sh b/ct/tandoor.sh new file mode 100644 index 00000000..3dba8b02 --- /dev/null +++ b/ct/tandoor.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ ____ _ + /_ __/___ _____ ____/ /___ ____ _____ / __ \___ _____(_)___ ___ _____ + / / / __ `/ __ \/ __ / __ \/ __ \/ ___/ / /_/ / _ \/ ___/ / __ \/ _ \/ ___/ + / / / /_/ / / / / /_/ / /_/ / /_/ / / / _, _/ __/ /__/ / /_/ / __(__ ) +/_/ \__,_/_/ /_/\__,_/\____/\____/_/ /_/ |_|\___/\___/_/ .___/\___/____/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="Tandoor" +var_disk="10" +var_cpu="4" +var_ram="4096" +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 +if [[ ! -d /opt/tandoor ]]; then + msg_error "No ${APP} Installation Found!"; + exit; +fi +msg_info "Updating ${APP} LXC" +if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then + msg_error "There is currently no update path available." +else + export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs) + /opt/tandoor/bin/pip3 install -r requirements.txt >/dev/null 2>&1 + /opt/tandoor/bin/python3 manage.py migrate >/dev/null 2>&1 + /opt/tandoor/bin/python3 manage.py collectstatic --no-input >/dev/null 2>&1 + /opt/tandoor/bin/python3 manage.py collectstatic_js_reverse >/dev/null 2>&1 + cd /opt/tandoor/vue + yarn install >/dev/null 2>&1 + yarn build >/dev/null 2>&1 + sudo systemctl restart gunicorn_tandoor +fi +exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +pct set $CTID -cores 2 +msg_ok "Set Container to Normal Resources" + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8002${CL} \n" diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh new file mode 100644 index 00000000..cc5796a5 --- /dev/null +++ b/install/tandoor-install.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/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 --no-install-recommends \ + postgresql \ + build-essential \ + libpq-dev \ + libmagic-dev \ + libzbar0 \ + nginx \ + libsasl2-dev \ + libldap2-dev \ + libssl-dev \ + gpg \ + curl \ + sudo \ + git \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Updating Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-setuptools \ + python3-pip +msg_ok "Updated Python3" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g yarn +msg_ok "Installed Node.js" + +msg_info "Installing Tandoor (Patience)" +$STD git clone https://github.com/vabene1111/recipes.git -b master /opt/tandoor +mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles} +$STD pip3 install -r /opt/tandoor/requirements.txt +cd /opt/tandoor/vue +$STD yarn install +$STD yarn build +wget -q https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O /opt/tandoor/.env +secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g') +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +sed -i "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|; s|POSTGRES_HOST=.*|POSTGRES_HOST=127.0.0.1|; s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|; s|STATIC_URL=.*|STATIC_URL=/staticfiles/|; s|MEDIA_URL=.*|MEDIA_URL=/mediafiles/|" /opt/tandoor/.env +msg_ok "Installed Tandoor" + +msg_info "Setting up PostgreSQL database" +DB_NAME=djangodb +DB_USER=djangouser +DB_ENCODING=utf8 +DB_TIMEZONE=UTC +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;" +$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" +$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO $DB_ENCODING;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO $DB_TIMEZONE;" +$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +echo "" >>~/tandoor.creds +echo -e "Tandoor Database Name: \e[32m$DB_NAME\e[0m" >>~/tandoor.creds +echo -e "Tandoor Database User: \e[32m$DB_USER\e[0m" >>~/tandoor.creds +echo -e "Tandoor Database Password: \e[32m$DB_PASS\e[0m" >>~/tandoor.creds +export $(cat /opt/tandoor/.env |grep "^[^#]" | xargs) +/usr/bin/python3 /opt/tandoor/manage.py migrate >/dev/null 2>&1 +/usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input >/dev/null 2>&1 +/usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse >/dev/null 2>&1 +msg_ok "Set up PostgreSQL database" + +msg_info "Creating Services" +cat </etc/systemd/system/gunicorn_tandoor.service +[Unit] +Description=gunicorn daemon for tandoor +After=network.target + +[Service] +Type=simple +Restart=always +RestartSec=3 +WorkingDirectory=/opt/tandoor +EnvironmentFile=/opt/tandoor/.env +ExecStart=/usr/local/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:/opt/tandoor/tandoor.sock recipes.wsgi:application + +[Install] +WantedBy=multi-user.target +EOF + +cat << 'EOF' >/etc/nginx/conf.d/tandoor.conf +server { + listen 8002; + #access_log /var/log/nginx/access.log; + #error_log /var/log/nginx/error.log; + + # serve media files + location /static/ { + alias /opt/tandoor/staticfiles/; + } + + location /media/ { + alias /opt/tandoor/mediafiles/; + } + + location / { + proxy_set_header Host $http_host; + proxy_pass http://unix:/opt/tandoor/tandoor.sock; + proxy_set_header X-Forwarded-Proto $scheme; + } +} +EOF +systemctl reload nginx +systemctl enable -q --now gunicorn_tandoor +msg_ok "Created Services" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 5860f048fad5aaa5bc3f963932dd0a1e02a37629 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Feb 2024 20:36:27 -0500 Subject: [PATCH 2755/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f956a7d..9e6952e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-23 + +### Changed + +- **Tandoor Recipes LXC** + - NEW Script (Thanks @MickLesk) + ## 2024-02-21 ### Changed From bd94b1523475cd097c1e15edde2ea58d3ffc16b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 04:51:46 -0500 Subject: [PATCH 2756/3335] Update tandoor-install.sh tweak --- install/tandoor-install.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index cc5796a5..08009216 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -61,16 +61,21 @@ cd /opt/tandoor/vue $STD yarn install $STD yarn build wget -q https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O /opt/tandoor/.env +DB_NAME=tandordb +DB_USER=tandoor +DB_ENCODING=utf8 +DB_TIMEZONE=UTC secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g') DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" -sed -i "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|; s|POSTGRES_HOST=.*|POSTGRES_HOST=127.0.0.1|; s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|; s|STATIC_URL=.*|STATIC_URL=/staticfiles/|; s|MEDIA_URL=.*|MEDIA_URL=/mediafiles/|" /opt/tandoor/.env +sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \ + -e "s|POSTGRES_HOST=.*|POSTGRES_HOST=127.0.0.1|g" \ + -e "s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" \ + -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \ + -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ + -e "\$a\STATIC_URL=/staticfiles\\nMEDIA_URL=/mediafiles" /opt/tandoor/.env msg_ok "Installed Tandoor" msg_info "Setting up PostgreSQL database" -DB_NAME=djangodb -DB_USER=djangouser -DB_ENCODING=utf8 -DB_TIMEZONE=UTC $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;" $STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" From 6dc6d3cb14f2f5d51acbead405b5421d3b00b563 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 05:04:29 -0500 Subject: [PATCH 2757/3335] Update tandoor-install.sh tweak --- install/tandoor-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 08009216..822eaa5b 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -61,8 +61,8 @@ cd /opt/tandoor/vue $STD yarn install $STD yarn build wget -q https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O /opt/tandoor/.env -DB_NAME=tandordb -DB_USER=tandoor +DB_NAME=djangodb +DB_USER=djangouser DB_ENCODING=utf8 DB_TIMEZONE=UTC secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g') From b1974f5e0e35cdc4e6355e3891fba1b322823a82 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 05:26:11 -0500 Subject: [PATCH 2758/3335] Update tandoor-install.sh fix sed --- install/tandoor-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 822eaa5b..cc2c4900 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -72,7 +72,7 @@ sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \ -e "s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" \ -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \ -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ - -e "\$a\STATIC_URL=/staticfiles\\nMEDIA_URL=/mediafiles" /opt/tandoor/.env + -e "\$a\\STATIC_URL=/staticfiles/\nMEDIA_URL=/mediafiles/" /opt/tandoor/.env msg_ok "Installed Tandoor" msg_info "Setting up PostgreSQL database" From 50872c6d9f3a2829530ffde70cc2fc2d5fe77afa Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 07:15:47 -0500 Subject: [PATCH 2759/3335] Update tandoor-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Final tweaks 🤞🏻 --- install/tandoor-install.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index cc2c4900..8af16863 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -61,29 +61,23 @@ cd /opt/tandoor/vue $STD yarn install $STD yarn build wget -q https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O /opt/tandoor/.env -DB_NAME=djangodb -DB_USER=djangouser +DB_NAME=db_recipes +DB_USER=tandoor DB_ENCODING=utf8 DB_TIMEZONE=UTC secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g') DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \ - -e "s|POSTGRES_HOST=.*|POSTGRES_HOST=127.0.0.1|g" \ + -e "s|POSTGRES_HOST=.*|POSTGRES_HOST=localhost|g" \ -e "s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" \ -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \ -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ - -e "\$a\\STATIC_URL=/staticfiles/\nMEDIA_URL=/mediafiles/" /opt/tandoor/.env + -e "\$a\STATIC_URL=/staticfiles/" /opt/tandoor/.env msg_ok "Installed Tandoor" msg_info "Setting up PostgreSQL database" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;" -$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" -$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;" -$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO $DB_ENCODING;" -$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" -$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO $DB_TIMEZONE;" -$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" echo "" >>~/tandoor.creds echo -e "Tandoor Database Name: \e[32m$DB_NAME\e[0m" >>~/tandoor.creds echo -e "Tandoor Database User: \e[32m$DB_USER\e[0m" >>~/tandoor.creds From 966517ef447239e2b1cacfb4e36c00b071d66a20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 09:48:47 -0500 Subject: [PATCH 2760/3335] Update tandoor-install.sh Debug off --- install/tandoor-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 8af16863..cb5bfc49 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -72,7 +72,8 @@ sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \ -e "s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" \ -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \ -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ - -e "\$a\STATIC_URL=/staticfiles/" /opt/tandoor/.env + -e "\$a\STATIC_URL=/staticfiles/" \ + -e "\$a\DEBUG=0" /opt/tandoor/.env msg_ok "Installed Tandoor" msg_info "Setting up PostgreSQL database" From 76d43006d6a6588b556a3770f30c775e4988d564 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 10:11:37 -0500 Subject: [PATCH 2761/3335] Update tandoor-install.sh tweak --- install/tandoor-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index cb5bfc49..198b5651 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -73,7 +73,7 @@ sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \ -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \ -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ -e "\$a\STATIC_URL=/staticfiles/" \ - -e "\$a\DEBUG=0" /opt/tandoor/.env + -e "\$a\# DEBUG=0" /opt/tandoor/.env msg_ok "Installed Tandoor" msg_info "Setting up PostgreSQL database" From 526b5e7b54290c6705c0270a5604f2a06d51549c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Feb 2024 11:30:49 -0500 Subject: [PATCH 2762/3335] Update tandoor-install.sh PostgreSQL 16 --- install/tandoor-install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 198b5651..509121e4 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ - postgresql \ build-essential \ libpq-dev \ libmagic-dev \ @@ -72,11 +71,14 @@ sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \ -e "s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" \ -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \ -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \ - -e "\$a\STATIC_URL=/staticfiles/" \ - -e "\$a\# DEBUG=0" /opt/tandoor/.env + -e "\$a\STATIC_URL=/staticfiles/" /opt/tandoor/.env msg_ok "Installed Tandoor" -msg_info "Setting up PostgreSQL database" +msg_info "Install/Set up PostgreSQL Database" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list +$STD apt-get update +$STD apt-get install -y postgresql-16 $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" echo "" >>~/tandoor.creds @@ -87,7 +89,7 @@ export $(cat /opt/tandoor/.env |grep "^[^#]" | xargs) /usr/bin/python3 /opt/tandoor/manage.py migrate >/dev/null 2>&1 /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input >/dev/null 2>&1 /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse >/dev/null 2>&1 -msg_ok "Set up PostgreSQL database" +msg_ok "Set up PostgreSQL Database" msg_info "Creating Services" cat </etc/systemd/system/gunicorn_tandoor.service From ae79d3a3325b65c0a9b032311c8102d3aae28a50 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 26 Feb 2024 16:41:27 +0500 Subject: [PATCH 2763/3335] Add Mafl Dashboard (#2562) --- ct/mafl.sh | 73 +++++++++++++++++++++++++++++++++++++ install/mafl-install.sh | 81 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 ct/mafl.sh create mode 100644 install/mafl-install.sh diff --git a/ct/mafl.sh b/ct/mafl.sh new file mode 100644 index 00000000..19012b6a --- /dev/null +++ b/ct/mafl.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ ___ ______ + / |/ /___ _/ __/ / + / /|_/ / __ `/ /_/ / + / / / / /_/ / __/ / +/_/ /_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Mafl" +var_disk="6" +var_cpu="2" +var_ram="2048" +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 + if [[ ! -d /opt/mafl ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + msg_error "There is currently no update path available." + exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 1024 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/install/mafl-install.sh b/install/mafl-install.sh new file mode 100644 index 00000000..63f30288 --- /dev/null +++ b/install/mafl-install.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y make +$STD apt-get install -y g++ +$STD apt-get install -y gcc +$STD apt-get install -y ca-certificates +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g npm@latest +$STD npm install -g yarn +msg_ok "Installed Node.js" + +RELEASE=$(curl -s https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing Mafl v${RELEASE}" +wget -q https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz +tar -xzf v${RELEASE}.tar.gz +mkdir -p /opt/mafl/data +wget -q -O /opt/mafl/data/config.yml https://raw.githubusercontent.com/hywax/mafl/main/.example/config.yml +mv mafl-${RELEASE}/* /opt/mafl +rm -rf mafl-${RELEASE} +cd /opt/mafl +export NUXT_TELEMETRY_DISABLED=true +$STD yarn install +$STD yarn build +msg_ok "Installed Mafl v${RELEASE}" + +msg_info "Creating Service" +cat </etc/systemd/system/mafl.service +[Unit] +Description=Mafl +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +WorkingDirectory=/opt/mafl/ +ExecStart=yarn preview + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now mafl +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From a31a44b271a0123ca328c23d5f0e99a307f4b004 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Feb 2024 07:03:12 -0500 Subject: [PATCH 2764/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e6952e6..dfb16224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-02-26 + +### Changed + +- **Mafl LXC** + - NEW Script + ## 2024-02-23 ### Changed From b88dc1338313d9eca530adf82a8546b3af192850 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Feb 2024 14:04:12 -0500 Subject: [PATCH 2765/3335] Update changedetection.sh `systemctl restart changedetection` after update --- ct/changedetection.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index e5fe9ecb..4eda7b24 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -58,6 +58,7 @@ if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${ msg_info "Updating ${APP} LXC" pip3 install changedetection.io --upgrade &>/dev/null pip3 install playwright --upgrade &>/dev/null +systemctl restart changedetection msg_ok "Updated Successfully" exit } From 58f69adbd8e4f3b0f64b8e4a77d4483d109fe5e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Feb 2024 15:15:17 -0500 Subject: [PATCH 2766/3335] Update mariadb-install.sh - remove Adminer - fixes https://github.com/tteck/Proxmox/issues/2565 --- install/mariadb-install.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 310b6c26..047d1d05 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -27,15 +27,6 @@ sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf msg_ok "Installed MariaDB" -read -r -p "Would you like to add Adminer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Adminer" - $STD apt install -y adminer - $STD a2enconf adminer - systemctl reload apache2 - msg_ok "Installed Adminer" -fi - motd_ssh customize From 0c963550c49b41a4733004ecb6400f1791044068 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Feb 2024 11:28:05 -0500 Subject: [PATCH 2767/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 6e382223..a78e4099 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -34,3 +34,5 @@ [iGPU Transcoding In Proxmox with Jellyfin](https://www.youtube.com/watch?v=XAa_qpNmzZs) [Proxmox + NetData]() + +[Proxmox Homelab Series]() From d77cffd0068d2a60b03fd620c8fbf39af558bef7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 27 Feb 2024 11:29:22 -0500 Subject: [PATCH 2768/3335] Update USER_SUBMITTED_GUIDES.md --- USER_SUBMITTED_GUIDES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index a78e4099..8ac04a12 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -35,4 +35,4 @@ [Proxmox + NetData]() -[Proxmox Homelab Series]() +[Proxmox Homelab Series]() From 7759ecf7ddc1bbd698140f3ab2434608253785a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Feb 2024 09:06:25 -0500 Subject: [PATCH 2769/3335] Update unifi-install.sh update libssl --- install/unifi-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 9ff1d08f..32327d4d 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -29,8 +29,8 @@ $STD apt-get install -y temurin-17-jre msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list $STD apt-get update @@ -48,7 +48,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +rm -rf libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 7f02d0e51b8b3c4a631b4e1fce85914b2b5f810e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Feb 2024 09:41:51 -0500 Subject: [PATCH 2770/3335] Update unifi-install.sh always download latest libssl --- install/unifi-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 32327d4d..ad1d1efb 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -29,7 +29,8 @@ $STD apt-get install -y temurin-17-jre msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb +libssl=$(curl -fsSL "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/" | grep -o 'libssl1\.1_1\.1\.1f-1ubuntu2\.2[^"]*amd64\.deb' | head -n1) +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/$libssl $STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list From 0567a46afd9660fd37d22fe819dbf35e266437a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Feb 2024 15:37:33 -0500 Subject: [PATCH 2771/3335] Update unifi-install.sh tweak --- install/unifi-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index ad1d1efb..54fbef00 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -31,7 +31,7 @@ msg_ok "Installed OpenJDK" msg_info "Installing MongoDB" libssl=$(curl -fsSL "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/" | grep -o 'libssl1\.1_1\.1\.1f-1ubuntu2\.2[^"]*amd64\.deb' | head -n1) wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/$libssl -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb +$STD dpkg -i $libssl wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list $STD apt-get update @@ -49,7 +49,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb +rm -rf $libssl $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 9cad7288c94889034b612a26d0980b2a5d93bfa6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Feb 2024 17:11:59 -0500 Subject: [PATCH 2772/3335] Update deconz-install.sh fixes https://github.com/tteck/Proxmox/issues/2578 --- install/deconz-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 328a9679..614129e7 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -26,8 +26,9 @@ echo "deb [arch=amd64] http://phoscon.de/apt/deconz $VERSION main" >/etc/apt/sou msg_ok "Setup Phoscon Repository" msg_info "Installing deConz" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +libssl=$(curl -fsSL "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/" | grep -o 'libssl1\.1_1\.1\.1f-1ubuntu2\.2[^"]*amd64\.deb' | head -n1) +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/$libssl +$STD dpkg -i $libssl $STD apt-get update $STD apt-get install -y deconz msg_ok "Installed deConz" @@ -56,7 +57,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +rm -rf $libssl $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From e5ec531d4f1a383ef7d4f9468457e0bb3a08e096 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Feb 2024 17:13:07 -0500 Subject: [PATCH 2773/3335] Update omada-install.sh update libssl --- install/omada-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index 4e78c5c7..b27f3728 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -30,8 +30,9 @@ $STD apt-get -y install zulu8-jdk msg_ok "Installed Azul Zulu" msg_info "Installing MongoDB" -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +libssl=$(curl -fsSL "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/" | grep -o 'libssl1\.1_1\.1\.1f-1ubuntu2\.2[^"]*amd64\.deb' | head -n1) +wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/$libssl +$STD dpkg -i $libssl wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" @@ -48,7 +49,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.21_amd64.deb +rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb $libssl $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From dd4d449c953b95c195dbd7e6b9d8e23ac2f8ab04 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Mar 2024 04:30:17 -0500 Subject: [PATCH 2774/3335] Update omada-install.sh tweak --- install/omada-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index b27f3728..d3768a98 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -37,7 +37,7 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb msg_ok "Installed MongoDB" -latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) +latest_url=$(curl -fsSL "https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) latest_version=$(basename "$latest_url") msg_info "Installing Omada Controller" From 05dc5371243fac3891ff14b1a67cecf03d85b061 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Mar 2024 04:31:17 -0500 Subject: [PATCH 2775/3335] Update omada.sh tweak --- ct/omada.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omada.sh b/ct/omada.sh index 82f28261..c664953e 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -55,7 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) +latest_url=$(curl -fsSL "https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) latest_version=$(basename "${latest_url}") if [ -z "${latest_version}" ]; then msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time." From 57d06ad2bef3e2dc01a4ba16297d830096203d2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Mar 2024 04:48:34 -0500 Subject: [PATCH 2776/3335] Update home-assistant-core-copy-data-home-assistant-core.sh Stop both containers. --- .../home-assistant-core-copy-data-home-assistant-core.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index c0cf2868..68c388ed 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -83,6 +83,10 @@ whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" -- $CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME}) Version: 2022.10.03" 13 50 || exit info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'" +if [ $(pct status $CTID_FROM | sed 's/.* //') == 'running' ]; then + msg "Stopping '$CTID_FROM'..." + pct stop $CTID_FROM +fi if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then msg "Stopping '$CTID_TO'..." pct stop $CTID_TO From 55a107b29ff839a864b5deebc0182d6f4d069d31 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Mar 2024 09:23:54 -0500 Subject: [PATCH 2777/3335] Update emby-install.sh set static version --- install/emby-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/emby-install.sh b/install/emby-install.sh index 72158183..83245643 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -33,8 +33,9 @@ fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" -wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb -$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb +#wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb +wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/4.8.1.0/emby-server-deb_4.8.1.0_amd64.deb +$STD dpkg -i emby-server-deb_4.8.1.0_amd64.deb sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group msg_ok "Installed Emby" @@ -44,5 +45,5 @@ customize msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean -rm emby-server-deb_${LATEST}_amd64.deb +rm emby-server-deb_4.8.1.0_amd64.deb msg_ok "Cleaned" From 89d9b9ca9f0b749243b51b0be3e9bc96f7ce7007 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Mar 2024 09:25:32 -0500 Subject: [PATCH 2778/3335] Update emby.sh set static version --- ct/emby.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/emby.sh b/ct/emby.sh index a8b5618a..b198f002 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -61,9 +61,9 @@ systemctl stop emby-server msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null -dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null -rm emby-server-deb_${LATEST}_amd64.deb +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.8.1.0/emby-server-deb_4.8.1.0_amd64.deb &>/dev/null +dpkg -i emby-server-deb_4.8.1.0_amd64.deb &>/dev/null +rm emby-server-deb_4.8.1.0_amd64.deb msg_ok "Updated ${APP}" msg_info "Starting ${APP}" From 9e7b96e9dfcd3efc7a303205e30b67aaf81e684c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Mar 2024 06:22:50 -0500 Subject: [PATCH 2779/3335] Update grafana.sh tweak --- ct/grafana.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ct/grafana.sh b/ct/grafana.sh index 085cb4ee..b5ea2aa9 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -56,9 +56,6 @@ function update_script() { header_info if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" -apt-key del 4E40DDF6D76E284A4A6780E48C8C34C524098CB6 -wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key -echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated Successfully" From 7b1738ca7b6bb5b022f6cb1dafbb2ef094a85133 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Mar 2024 07:44:41 -0500 Subject: [PATCH 2780/3335] Update nginxproxymanager-install.sh set pnpm version --- install/nginxproxymanager-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 48017b6f..cf7ca741 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -61,7 +61,7 @@ ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing pnpm" -$STD npm install -g pnpm +$STD npm install -g pnpm@8.15 msg_ok "Installed pnpm" RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | From 511fd50ebb53dbb2f5a45f604bc6eff24b7607d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Mar 2024 18:02:12 -0500 Subject: [PATCH 2781/3335] Update emby-install.sh install the latest version --- install/emby-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install/emby-install.sh b/install/emby-install.sh index 83245643..72158183 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -33,9 +33,8 @@ fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" -#wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb -wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/4.8.1.0/emby-server-deb_4.8.1.0_amd64.deb -$STD dpkg -i emby-server-deb_4.8.1.0_amd64.deb +wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb +$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group msg_ok "Installed Emby" @@ -45,5 +44,5 @@ customize msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean -rm emby-server-deb_4.8.1.0_amd64.deb +rm emby-server-deb_${LATEST}_amd64.deb msg_ok "Cleaned" From 912f0e01ba9c90ed295da298ef926925d325b575 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 3 Mar 2024 18:03:28 -0500 Subject: [PATCH 2782/3335] Update emby.sh tweak --- ct/emby.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/emby.sh b/ct/emby.sh index b198f002..a8b5618a 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -61,9 +61,9 @@ systemctl stop emby-server msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.8.1.0/emby-server-deb_4.8.1.0_amd64.deb &>/dev/null -dpkg -i emby-server-deb_4.8.1.0_amd64.deb &>/dev/null -rm emby-server-deb_4.8.1.0_amd64.deb +wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null +dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null +rm emby-server-deb_${LATEST}_amd64.deb msg_ok "Updated ${APP}" msg_info "Starting ${APP}" From c7e4f370c612f2385c38a9d5ed35404f7a5091b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Mar 2024 05:31:07 -0500 Subject: [PATCH 2783/3335] Update prometheus.sh fixes https://github.com/tteck/Proxmox/issues/2607 --- ct/prometheus.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/prometheus.sh b/ct/prometheus.sh index ae519078..b2230eaa 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -55,10 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/prometheus.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" +msg_error "There is currently no update path available." exit } From a6b415bc3691e949edcecc829cf2abf4d1a88956 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Mar 2024 05:50:36 -0500 Subject: [PATCH 2784/3335] Update code-server.sh fixes https://github.com/tteck/Proxmox/issues/2608 --- misc/code-server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/code-server.sh b/misc/code-server.sh index 6ae2d024..cbc140d9 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -47,6 +47,7 @@ function error_exit() { clear header_info if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi +if [ -e /etc/alpine-release ]; then echo -e "⚠️ Can't Install on Alpine"; exit; fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in From 8bbb33b97b51bca78e64bc73d745a309f5405e74 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 6 Mar 2024 13:58:29 +0000 Subject: [PATCH 2785/3335] Update photoprism-install.sh (#2609) add rawtherapee dependency to enable raw image conversion --- install/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 2f80b6cc..d1d950ad 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -25,6 +25,7 @@ $STD apt-get install -y libjpeg-dev $STD apt-get install -y libtiff-dev $STD apt-get install -y imagemagick $STD apt-get install -y darktable +$STD apt-get install -y rawtherapee msg_ok "Installed Dependencies" From ea1e30dfa928debfc513c8e823c1eae5d9e92dd5 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 6 Mar 2024 14:14:05 +0000 Subject: [PATCH 2786/3335] Update photoprism-install.sh (#2610) For some reason it seems as though the binaries as part of `libheif1` install not to `/usr/local/bin` but to `/usr/local` and so were not on the path, therefore the default value of photoprism's `--heifconvert-bin` / `$PHOTOPRISM_HEIFCONVERT_BIN` (`heif-convert`) would not be resolved --- install/photoprism-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index d1d950ad..a7bec81f 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -27,6 +27,8 @@ $STD apt-get install -y imagemagick $STD apt-get install -y darktable $STD apt-get install -y rawtherapee +echo 'export PATH=/usr/local:$PATH' >>~/.bashrc +export PATH=/usr/local:$PATH msg_ok "Installed Dependencies" msg_info "Installing PhotoPrism (Patience)" From 183340bc853089e0a3800a4da527b6b9614bb175 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Mar 2024 18:45:37 -0500 Subject: [PATCH 2787/3335] Update dashy-install.sh fixes https://github.com/tteck/Proxmox/issues/2614 --- install/dashy-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 2962161d..d0709fb5 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing Node.js (Patience)" @@ -35,10 +34,12 @@ ln -sf /usr/local/bin/yarn /usr/bin/yarn msg_ok "Installed Yarn" msg_info "Installing Dashy (Patience)" -$STD git clone https://github.com/Lissy93/dashy.git -cd /dashy +mkdir -p /opt/dashy +#RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +#wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 +wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/2.1.1.tar.gz | tar -xz -C /opt/dashy --strip-components=1 +cd /opt/dashy $STD yarn -export NODE_OPTIONS=--max-old-space-size=1000 $STD yarn build msg_ok "Installed Dashy" @@ -49,7 +50,7 @@ Description=dashy [Service] Type=simple -WorkingDirectory=/dashy +WorkingDirectory=/opt/dashy ExecStart=/usr/bin/yarn start [Install] WantedBy=multi-user.target From 321660487de3d1df302c47e0ba21a999db28020b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 6 Mar 2024 18:48:53 -0500 Subject: [PATCH 2788/3335] Update dashy.sh There is currently no update path available. --- ct/dashy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index 759b8805..23a28334 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -54,7 +54,9 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -d /opt/dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit msg_info "Stopping ${APP}" systemctl stop dashy msg_ok "Stopped ${APP}" From 64bf64ff183c0aed9d19ca08cecee033ba025277 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 10:16:49 -0500 Subject: [PATCH 2789/3335] Update mqtt-install.sh fixes https://github.com/tteck/Proxmox/issues/2617 --- install/mqtt-install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 860c70bb..c9b372b3 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -22,8 +22,11 @@ msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" if [ "$PCT_OSTYPE" == "debian" ]; then VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc - wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list + # wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc + # wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list + gpg --keyserver keyserver.ubuntu.com --recv-keys 779B22DFB3E717B7 >/dev/null 2>&1 + gpg --export 779B22DFB3E717B7 | tee /etc/apt/trusted.gpg.d/mosquitto.gpg >/dev/null 2>&1 + echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mosquitto.gpg] https://repo.mosquitto.org/debian ${VERSION} main" >/etc/apt/sources.list.d/mosquitto-${VERSION}.list $STD apt-get update fi $STD apt-get -y install mosquitto From d9736097bbf8a5f3fbe647a1b1c63c646316004b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 10:25:59 -0500 Subject: [PATCH 2790/3335] Update mqtt-install.sh test --- install/mqtt-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index c9b372b3..48cff6f1 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -21,12 +21,14 @@ msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" if [ "$PCT_OSTYPE" == "debian" ]; then + set +Eeuo pipefail VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" # wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc # wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list gpg --keyserver keyserver.ubuntu.com --recv-keys 779B22DFB3E717B7 >/dev/null 2>&1 gpg --export 779B22DFB3E717B7 | tee /etc/apt/trusted.gpg.d/mosquitto.gpg >/dev/null 2>&1 echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mosquitto.gpg] https://repo.mosquitto.org/debian ${VERSION} main" >/etc/apt/sources.list.d/mosquitto-${VERSION}.list + set -Eeuo pipefail $STD apt-get update fi $STD apt-get -y install mosquitto From 6e0f3742852bec6d02e6ea2b47ea43480fb20957 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 10:29:48 -0500 Subject: [PATCH 2791/3335] Update mqtt-install.sh add gpg --- install/mqtt-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 48cff6f1..1f1d0d31 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -17,18 +17,17 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" if [ "$PCT_OSTYPE" == "debian" ]; then - set +Eeuo pipefail VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" # wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc # wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list gpg --keyserver keyserver.ubuntu.com --recv-keys 779B22DFB3E717B7 >/dev/null 2>&1 gpg --export 779B22DFB3E717B7 | tee /etc/apt/trusted.gpg.d/mosquitto.gpg >/dev/null 2>&1 echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mosquitto.gpg] https://repo.mosquitto.org/debian ${VERSION} main" >/etc/apt/sources.list.d/mosquitto-${VERSION}.list - set -Eeuo pipefail $STD apt-get update fi $STD apt-get -y install mosquitto From 87cee4cd57cb8d2191d6d63a4ad344a2642c048b Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 13:29:01 -0500 Subject: [PATCH 2792/3335] Update changedetection-install.sh add jpeg-dev, libjpeg --- install/changedetection-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index e670943b..8bca81a4 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -23,6 +23,8 @@ $STD apt-get install -y \ dumb-init \ gconf-service \ libatk-bridge2.0-0 \ + jpeg-dev \ + libjpeg \ libasound2 \ libatk1.0-0 \ libcairo2 \ From 1edd9bfb391d22d00377d2c4020cf0a8571df1a2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 13:38:36 -0500 Subject: [PATCH 2793/3335] Update changedetection-install.sh revert --- install/changedetection-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 8bca81a4..e670943b 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -23,8 +23,6 @@ $STD apt-get install -y \ dumb-init \ gconf-service \ libatk-bridge2.0-0 \ - jpeg-dev \ - libjpeg \ libasound2 \ libatk1.0-0 \ libcairo2 \ From 8b03579df9999f8de8c934a5fb609b3ab7981961 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 13:58:07 -0500 Subject: [PATCH 2794/3335] Update tandoor-install.sh fixes https://github.com/tteck/Proxmox/issues/2621 --- install/tandoor-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 509121e4..87fdd91b 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -127,7 +127,6 @@ server { location / { proxy_set_header Host $http_host; proxy_pass http://unix:/opt/tandoor/tandoor.sock; - proxy_set_header X-Forwarded-Proto $scheme; } } EOF From 02afb23aed629f35c98452a75b26a740cee6a4d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 14:17:39 -0500 Subject: [PATCH 2795/3335] Update changedetection-install.sh add libjpeg-dev --- install/changedetection-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index e670943b..d685153a 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -22,6 +22,7 @@ $STD apt-get install -y \ build-essential \ dumb-init \ gconf-service \ + libjpeg-dev \ libatk-bridge2.0-0 \ libasound2 \ libatk1.0-0 \ From a4a692f4495f4ac2b7a480a26821462ce11e20e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 14:24:49 -0500 Subject: [PATCH 2796/3335] Update changedetection.sh if libjpeg-dev is not installed, install it --- ct/changedetection.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 4eda7b24..b6f42369 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -56,6 +56,10 @@ function update_script() { header_info if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" +if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then + apt-get update + apt-get install -y libjpeg-dev +fi pip3 install changedetection.io --upgrade &>/dev/null pip3 install playwright --upgrade &>/dev/null systemctl restart changedetection From f14b6f49d7ec903298829a5e42ecb85f7f4e5479 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 15:10:25 -0500 Subject: [PATCH 2797/3335] Update mqtt-install.sh update keys --- install/mqtt-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 1f1d0d31..c9c9c164 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -25,8 +25,8 @@ if [ "$PCT_OSTYPE" == "debian" ]; then VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" # wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc # wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list - gpg --keyserver keyserver.ubuntu.com --recv-keys 779B22DFB3E717B7 >/dev/null 2>&1 - gpg --export 779B22DFB3E717B7 | tee /etc/apt/trusted.gpg.d/mosquitto.gpg >/dev/null 2>&1 + gpg --keyserver keyserver.ubuntu.com --recv-keys 61611AE430993623 >/dev/null 2>&1 + gpg --export 61611AE430993623 | tee /etc/apt/trusted.gpg.d/mosquitto.gpg >/dev/null 2>&1 echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mosquitto.gpg] https://repo.mosquitto.org/debian ${VERSION} main" >/etc/apt/sources.list.d/mosquitto-${VERSION}.list $STD apt-get update fi From b58ae2b8924b554a9d4fcd404f3dede9c6ed3ba8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 15:22:55 -0500 Subject: [PATCH 2798/3335] Update mqtt-install.sh go back to basic install --- install/mqtt-install.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index c9c9c164..18362faa 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -21,15 +21,6 @@ $STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" -if [ "$PCT_OSTYPE" == "debian" ]; then - VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" - # wget -qO- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/etc/apt/trusted.gpg.d/mosquitto-repo.asc - # wget -qO /etc/apt/sources.list.d/mosquitto-${VERSION}.list http://repo.mosquitto.org/debian/mosquitto-${VERSION}.list - gpg --keyserver keyserver.ubuntu.com --recv-keys 61611AE430993623 >/dev/null 2>&1 - gpg --export 61611AE430993623 | tee /etc/apt/trusted.gpg.d/mosquitto.gpg >/dev/null 2>&1 - echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mosquitto.gpg] https://repo.mosquitto.org/debian ${VERSION} main" >/etc/apt/sources.list.d/mosquitto-${VERSION}.list - $STD apt-get update -fi $STD apt-get -y install mosquitto $STD apt-get -y install mosquitto-clients cat </etc/mosquitto/conf.d/default.conf From 78bc2006bc1519a3aef51f2d51daaf0606fc5922 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 17:09:11 -0500 Subject: [PATCH 2799/3335] Update post-pve-install.sh Requires Proxmox Virtual Environment Version 8.1.1 or later. --- misc/post-pve-install.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index ad2227a1..ea166360 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -46,7 +46,6 @@ msg_error() { start_routines() { header_info - VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \ "yes" " " \ @@ -55,10 +54,11 @@ start_routines() { yes) msg_info "Correcting Proxmox VE Sources" cat </etc/apt/sources.list -deb http://ftp.debian.org/debian ${VERSION} main contrib -deb http://ftp.debian.org/debian ${VERSION}-updates main contrib -deb http://security.debian.org/debian-security ${VERSION}-security main contrib +deb http://deb.debian.org/debian bookworm main contrib +deb http://deb.debian.org/debian bookworm-updates main contrib +deb http://security.debian.org/debian-security bookworm-security main contrib EOF +echo 'APT::Get::Update::SourceListWarnings::NonFreeFirmware "false";' >/etc/apt/apt.conf.d/no-bookworm-firmware.conf msg_ok "Corrected Proxmox VE Sources" ;; no) @@ -73,7 +73,7 @@ EOF yes) msg_info "Disabling 'pve-enterprise' repository" cat </etc/apt/sources.list.d/pve-enterprise.list -# deb https://enterprise.proxmox.com/debian/pve ${VERSION} pve-enterprise +# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise EOF msg_ok "Disabled 'pve-enterprise' repository" ;; @@ -89,7 +89,7 @@ EOF yes) msg_info "Enabling 'pve-no-subscription' repository" cat </etc/apt/sources.list.d/pve-install-repo.list -deb http://download.proxmox.com/debian/pve ${VERSION} pve-no-subscription +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF msg_ok "Enabled 'pve-no-subscription' repository" ;; @@ -98,7 +98,6 @@ EOF ;; esac - if [[ "${VERSION}" == "bookworm" ]]; then CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories (initially disabled).\n \nCorrect 'ceph package sources?" 14 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) @@ -117,7 +116,6 @@ EOF msg_error "Selected no to Correcting 'ceph package repositories'" ;; esac - fi CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \ "yes" " " \ @@ -126,7 +124,7 @@ EOF yes) msg_info "Adding 'pvetest' repository and set disabled" cat </etc/apt/sources.list.d/pvetest-for-beta.list -# deb http://download.proxmox.com/debian/pve ${VERSION} pvetest +# deb http://download.proxmox.com/debian/pve bookworm pvetest EOF msg_ok "Added 'pvetest' repository" ;; @@ -233,9 +231,11 @@ while true; do esac done -if ! command -v pveversion >/dev/null 2>&1; then - header_info - msg_error "\n No PVE Detected!\n" +if ! pveversion | grep -Eq "pve-manager/(8.1.[1-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1.1 or later." + echo -e "Exiting..." + sleep 2 exit fi From 4ea5186921dd846dab6582c71e6d534bcdecf0cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Mar 2024 17:12:21 -0500 Subject: [PATCH 2800/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb16224..76d301a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-03-08 + +### Changed + +- **Proxmox VE Post Install** + - Requires Proxmox Virtual Environment Version 8.1.1 or later. + ## 2024-02-26 ### Changed From b12a98e5a3e647217bb481342041ae9ea6958eb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 9 Mar 2024 12:03:52 -0500 Subject: [PATCH 2801/3335] Update build.func remove Lunar, add Mantic --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 604b0468..f21ad361 100644 --- a/misc/build.func +++ b/misc/build.func @@ -205,7 +205,7 @@ advanced_settings() { if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "20.04" "Focal" OFF \ "22.04" "Jammy" OFF \ - "23.04" "Lunar" OFF \ + "23.10" "Mantic" OFF \ 3>&1 1>&2 2>&3); then if [ -n "$var_version" ]; then echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" From e5010e747b8fea9b9b94024050bd2ab635ab2a20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Mar 2024 07:10:39 -0400 Subject: [PATCH 2802/3335] Update n8n-install.sh Set environment option "N8N_SECURE_COOKIE=false" --- install/n8n-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 13aa5104..32298692 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -44,6 +44,7 @@ Description=n8n [Service] Type=simple +Environment="N8N_SECURE_COOKIE=false" ExecStart=n8n start [Install] WantedBy=multi-user.target From 8e71d636efbe44d8a7fedb017762fdf4aec485fa Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Mar 2024 07:15:41 -0400 Subject: [PATCH 2803/3335] Update n8n.sh add storage --- ct/n8n.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/n8n.sh b/ct/n8n.sh index 5c5feeae..3abc7328 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -20,7 +20,7 @@ EOF header_info echo -e "Loading..." APP="n8n" -var_disk="3" +var_disk="6" var_cpu="2" var_ram="2048" var_os="debian" From afb664eadc91e79c102c1135af279aa392bc4ba3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:59:12 +0100 Subject: [PATCH 2804/3335] Create a Wastebin LXC (#2640) --- ct/wastebin.sh | 107 ++++++++++++++++++++++++++++++++++++ install/wastebin-install.sh | 65 ++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 ct/wastebin.sh create mode 100644 install/wastebin-install.sh diff --git a/ct/wastebin.sh b/ct/wastebin.sh new file mode 100644 index 00000000..be4b5aef --- /dev/null +++ b/ct/wastebin.sh @@ -0,0 +1,107 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/matze/wastebin + + +function header_info { +clear +cat <<"EOF" + _ __ __ __ _ +| | / /___ ______/ /____ / /_ (_)___ +| | /| / / __ `/ ___/ __/ _ \/ __ \/ / __ \ +| |/ |/ / /_/ (__ ) /_/ __/ /_/ / / / / / +|__/|__/\__,_/____/\__/\___/_.___/_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Wastebin" +var_disk="4" +var_cpu="4" +var_ram="2048" +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 +if [[ ! -d /opt/wastebin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +msg_info "Stopping Wastebin" +systemctl stop wastebin +msg_ok "Wastebin Stopped" + +msg_info "Updating Wastebin" +RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /opt +if [ -d wastebin_bak ]; then + rm -rf wastebin_bak +fi +mv wastebin wastebin_bak +wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv wastebin-${RELEASE} /opt/wastebin +cd /opt/wastebin +cargo update -q +cargo build -q --release +msg_ok "Updated Wastebin" + +msg_info "Starting Wastebin" +systemctl start wastebin +msg_ok "Started Wastebin" + +msg_info "Cleaning Up" +cd /opt +rm -R ${RELEASE}.zip +rm -R wastebin_bak +msg_ok "Cleaned" +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -cores 2 +msg_ok "Set Container to Normal Resources" + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:8088${CL} \n" diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh new file mode 100644 index 00000000..5e6827ce --- /dev/null +++ b/install/wastebin-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/matze/wastebin + +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 --no-install-recommends \ + build-essential \ + curl \ + sudo \ + git \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Rust (Patience)" +$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y +source ~/.cargo/env +msg_ok "Installed Rust" + +RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv wastebin-${RELEASE} /opt/wastebin +rm -R ${RELEASE}.zip +cd /opt/wastebin +cargo build -q --release +msg_ok "Installed Wastebin" + +msg_info "Creating Service" +cat </etc/systemd/system/wastebin.service +[Unit] +Description=Start Wastebin Service +After=network.target + +[Service] +User=root +WorkingDirectory=/opt/wastebin +ExecStart=/root/.cargo/bin/cargo run --release --quiet + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now wastebin.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From dfb691ebbcd75f16d1f3054d11daca2800ec9776 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Mar 2024 11:04:26 -0400 Subject: [PATCH 2805/3335] Update wastebin-install.sh maybe I was wrong about `unzip` --- install/wastebin-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh index 5e6827ce..b83bb4fe 100644 --- a/install/wastebin-install.sh +++ b/install/wastebin-install.sh @@ -18,6 +18,7 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ build-essential \ + unzip \ curl \ sudo \ git \ From f38cfcd00278e4acb94d17e6f242430caff7df22 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Mar 2024 11:42:27 -0400 Subject: [PATCH 2806/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76d301a4..d45a4eb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-03-11 + +### Changed + +- **Wastebin LXC** + - NEW Script + ## 2024-03-08 ### Changed From ee82bc777d93d761c9d154594cb2365b27226d4b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Mar 2024 11:55:47 -0400 Subject: [PATCH 2807/3335] Update wastebin-install.sh tweak --- install/wastebin-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh index b83bb4fe..25e5b592 100644 --- a/install/wastebin-install.sh +++ b/install/wastebin-install.sh @@ -31,6 +31,7 @@ $STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y source ~/.cargo/env msg_ok "Installed Rust" +msg_info "Installing Wastebin (Patience)" RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" unzip -q ${RELEASE}.zip From e15d82fb7c9c2a4cd6988c27c8c28d12747a6a92 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Mar 2024 12:47:31 -0400 Subject: [PATCH 2808/3335] Update tandoor.sh fix update function --- ct/tandoor.sh | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/ct/tandoor.sh b/ct/tandoor.sh index 3dba8b02..29085af5 100644 --- a/ct/tandoor.sh +++ b/ct/tandoor.sh @@ -54,26 +54,25 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/tandoor ]]; then - msg_error "No ${APP} Installation Found!"; - exit; -fi -msg_info "Updating ${APP} LXC" -if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then - msg_error "There is currently no update path available." -else + header_info + if [[ ! -d /opt/tandoor ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then + msg_ok "There is currently no update available." + else + msg_info "Updating ${APP} (Patience)" export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs) - /opt/tandoor/bin/pip3 install -r requirements.txt >/dev/null 2>&1 - /opt/tandoor/bin/python3 manage.py migrate >/dev/null 2>&1 - /opt/tandoor/bin/python3 manage.py collectstatic --no-input >/dev/null 2>&1 - /opt/tandoor/bin/python3 manage.py collectstatic_js_reverse >/dev/null 2>&1 + cd /opt/tandoor/ + pip3 install -r requirements.txt >/dev/null 2>&1 + /usr/bin/python3 /opt/tandoor/manage.py migrate >/dev/null 2>&1 + /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input >/dev/null 2>&1 + /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse >/dev/null 2>&1 cd /opt/tandoor/vue yarn install >/dev/null 2>&1 yarn build >/dev/null 2>&1 - sudo systemctl restart gunicorn_tandoor -fi -exit + systemctl restart gunicorn_tandoor + msg_ok "Updated ${APP}" + fi + exit } start From 16070912baccad3e32114bcaff1a0fc34df2b9e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Mar 2024 19:29:59 -0400 Subject: [PATCH 2809/3335] Update homeassistant-core-install.sh tweak --- install/homeassistant-core-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 327c773f..bb0fbba2 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -44,7 +44,7 @@ msg_ok "Installed Dependencies" RELEASE=$(curl -s https://www.python.org/downloads/ | grep -oP 'Download Python \K\d+\.\d+\.\d+' | head -1) -msg_info "Compiling Python ${RELEASE} from its source (Additional Patience)" +msg_info "Compiling Python 3.12 from its source (Additional Patience)" $STD apt-get remove -y python3 $STD apt-get install -y \ checkinstall \ @@ -57,15 +57,16 @@ $STD apt-get install -y \ libc6-dev \ libbz2-dev -wget -qO- https://www.python.org/ftp/python/${RELEASE}/Python-${RELEASE}.tar.xz | tar -xJ -cd Python-${RELEASE} +#wget -qO- https://www.python.org/ftp/python/${RELEASE}/Python-${RELEASE}.tar.xz | tar -xJ +wget -qO- https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tar.xz | tar -xJ +cd Python-3.12.2 $STD ./configure --enable-optimizations $STD make -j $(nproc) $STD make altinstall $STD update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1 cd ~ -rm -rf Python-${RELEASE} -msg_ok "Installed Python ${RELEASE}" +rm -rf Python-3.12.2 +msg_ok "Installed Python 3.12" msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant From 47769455a7495d2fca6f88f772f6c0b86fd1019e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Mar 2024 19:35:15 -0400 Subject: [PATCH 2810/3335] Update homeassistant-core-install.sh tweak --- install/homeassistant-core-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index bb0fbba2..99027611 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -42,7 +42,7 @@ $STD apt-get install -y \ libatlas-base-dev msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://www.python.org/downloads/ | grep -oP 'Download Python \K\d+\.\d+\.\d+' | head -1) +#RELEASE=$(curl -s https://www.python.org/downloads/ | grep -oP 'Download Python \K\d+\.\d+\.\d+' | head -1) msg_info "Compiling Python 3.12 from its source (Additional Patience)" $STD apt-get remove -y python3 From 74b2a1bf2afe4820d7a21bb6b83087bb4582e494 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Mar 2024 19:58:55 -0400 Subject: [PATCH 2811/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 738e2ea1..8c926968 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -20,8 +20,8 @@ header_info echo -e "Loading..." APP="Home Assistant-Core" var_disk="8" -var_cpu="2" -var_ram="1024" +var_cpu="4" +var_ram="2048" var_os="debian" var_version="12" variables @@ -147,6 +147,11 @@ WantedBy=default.target" >$service_path fi } +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 1024 +pct set $CTID -cores 2 +msg_ok "Set Container to Normal Resources" + start build_container description From 89da288a7f01ffdc716b3308ce0400718ca773d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Mar 2024 20:33:47 -0400 Subject: [PATCH 2812/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 8c926968..d56ba5a1 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -147,15 +147,15 @@ WantedBy=default.target" >$service_path fi } +start +build_container +description + msg_info "Setting Container to Normal Resources" pct set $CTID -memory 1024 pct set $CTID -cores 2 msg_ok "Set Container to Normal Resources" -start -build_container -description - msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8123${CL}" From e2bb08fcf722121d50a9476076d893594015ce58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 12 Mar 2024 20:36:08 -0400 Subject: [PATCH 2813/3335] Update homeassistant-core.sh tweak --- ct/homeassistant-core.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index d56ba5a1..738e2ea1 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -20,8 +20,8 @@ header_info echo -e "Loading..." APP="Home Assistant-Core" var_disk="8" -var_cpu="4" -var_ram="2048" +var_cpu="2" +var_ram="1024" var_os="debian" var_version="12" variables @@ -151,11 +151,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8123${CL}" From 46cc3fe9856ce546b1c7c00553efba7d321ad486 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Mar 2024 04:24:42 -0400 Subject: [PATCH 2814/3335] Create flowiseai-install.sh --- install/flowiseai-install.sh | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 install/flowiseai-install.sh diff --git a/install/flowiseai-install.sh b/install/flowiseai-install.sh new file mode 100644 index 00000000..04e97500 --- /dev/null +++ b/install/flowiseai-install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing Node.js" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing FlowiseAI (Patience)" +$STD npm install -g flowise +msg_ok "Installed FlowiseAI" + +msg_info "Creating Service" +cat </etc/systemd/system/flowise.service +[Unit] +Description=FlowiseAI +After=network.target + +[Service] +ExecStart=npx flowise start +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now flowise.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 80b2392f8e120ae7094396d91769d913b7ad9990 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Mar 2024 04:26:51 -0400 Subject: [PATCH 2815/3335] Create flowiseai.sh --- ct/flowiseai.sh | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 ct/flowiseai.sh diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh new file mode 100644 index 00000000..42c70fdd --- /dev/null +++ b/ct/flowiseai.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ _ ___ ____ + / ____/ /___ _ __(_)_______ / | / _/ + / /_ / / __ \ | /| / / / ___/ _ \/ /| | / / + / __/ / / /_/ / |/ |/ / (__ ) __/ ___ |_/ / +/_/ /_/\____/|__/|__/_/____/\___/_/ |_/___/ + +EOF +} +header_info +echo -e "Loading..." +APP="FlowiseAI" +var_disk="10" +var_cpu="2" +var_ram="2048" +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 +if [[ ! -f /etc/systemd/system/flowise.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +systemctl stop flowise +npm install -g flowise --upgrade +systemctl start flowise +msg_ok "Updated ${APP}" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" From e8fcc7ec3d77257774ed02cd99b5c8d61bd810ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Mar 2024 04:55:12 -0400 Subject: [PATCH 2816/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d45a4eb8..d20067ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-03-13 + +### Changed + +- **FlowiseAI LXC** + - NEW Script + ## 2024-03-11 ### Changed From 6a77af66a49fd644ecce879cf4993611db77dcff Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Mar 2024 06:57:42 -0400 Subject: [PATCH 2817/3335] Update flowiseai-install.sh test --- install/flowiseai-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/flowiseai-install.sh b/install/flowiseai-install.sh index 04e97500..0ac6e298 100644 --- a/install/flowiseai-install.sh +++ b/install/flowiseai-install.sh @@ -30,6 +30,8 @@ msg_ok "Installed Node.js" msg_info "Installing FlowiseAI (Patience)" $STD npm install -g flowise +mkdir -p /opt/flowiseai +wget -q https://raw.githubusercontent.com/FlowiseAI/Flowise/main/packages/server/.env.example -O /opt/flowiseai/.env msg_ok "Installed FlowiseAI" msg_info "Creating Service" @@ -39,6 +41,7 @@ Description=FlowiseAI After=network.target [Service] +EnvironmentFile=/opt/flowiseai/.env ExecStart=npx flowise start Restart=always From 58b75e0dd8096ea4225e1c1ba8de2bd32a7d86f6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 13 Mar 2024 17:40:53 -0400 Subject: [PATCH 2818/3335] Update dashy.sh fix update --- ct/dashy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index 23a28334..b06a3955 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -63,11 +63,11 @@ msg_ok "Stopped ${APP}" msg_info "Backing up conf.yml" cd ~ -cp -R /dashy/public/conf.yml conf.yml +cp -R /opt/dashy/public/conf.yml conf.yml msg_ok "Backed up conf.yml" msg_info "Updating Dashy" -cd /dashy +cd /opt/dashy git merge &>/dev/null git pull origin master &>/dev/null yarn &>/dev/null @@ -76,7 +76,7 @@ msg_ok "Updated Dashy" msg_info "Restoring conf.yml" cd ~ -cp -R conf.yml /dashy/public +cp -R conf.yml /opt/dashy/public msg_ok "Restored conf.yml" msg_info "Cleaning" From 019a80d7a1c005ce4726a32e3fb0f17db6eae5cb Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 14 Mar 2024 18:01:34 +0500 Subject: [PATCH 2819/3335] Mafl Dashboard update script (#2657) --- ct/mafl.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ct/mafl.sh b/ct/mafl.sh index 19012b6a..2dfee171 100644 --- a/ct/mafl.sh +++ b/ct/mafl.sh @@ -55,7 +55,19 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/mafl ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - msg_error "There is currently no update path available." + + RELEASE=$(curl -s https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + msg_info "Updating Mafl to v${RELEASE} (Patience)" + systemctl stop mafl + wget -q https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz + tar -xzf v${RELEASE}.tar.gz + cp -r mafl-${RELEASE}/* /opt/mafl/ + rm -rf mafl-${RELEASE} + cd /opt/mafl + yarn install + yarn build + systemctl start mafl + msg_ok "Updated Mafl to v${RELEASE}" exit } From 2dffbc92c8e56db818d280cc6af046f07aadeda8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Mar 2024 09:35:22 -0400 Subject: [PATCH 2820/3335] Update nginxproxymanager.sh move "Installing pnpm" to the top of the script --- ct/nginxproxymanager.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 4045ff55..0abbfc1e 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -59,6 +59,11 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + if ! command -v pnpm &> /dev/null; then + msg_info "Installing pnpm" + npm install -g pnpm &>/dev/null + msg_ok "Installed pnpm" + fi RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') @@ -130,12 +135,6 @@ function update_script() { python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null msg_ok "Setup Enviroment" - if ! command -v pnpm &> /dev/null; then - msg_info "Installing pnpm" - npm install -g pnpm &>/dev/null - msg_ok "Installed pnpm" - fi - msg_info "Building Frontend" cd ./frontend pnpm install &>/dev/null From 8d87cc6aaacd6e5d0609932601fa2074191e8239 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Mar 2024 09:37:32 -0400 Subject: [PATCH 2821/3335] Update nginxproxymanager.sh set pnpm version to 8.15 --- ct/nginxproxymanager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 0abbfc1e..16061a18 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -61,7 +61,7 @@ function update_script() { fi if ! command -v pnpm &> /dev/null; then msg_info "Installing pnpm" - npm install -g pnpm &>/dev/null + npm install -g pnpm@8.15 &>/dev/null msg_ok "Installed pnpm" fi RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | From 6037d381ef3f061357b6d689f5fa89df26310c59 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 14 Mar 2024 12:25:19 -0400 Subject: [PATCH 2822/3335] Update heimdalldashboard-install.sh tweak install --- install/heimdalldashboard-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 50515b9c..644e0c57 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -29,6 +29,9 @@ tar xzf ${RELEASE}.tar.gz VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') rm -rf ${RELEASE}.tar.gz mv Heimdall-${VER} /opt/Heimdall +cd /opt/Heimdall +cp .env.example .env +$STD php artisan key:generate msg_ok "Installed Heimdall Dashboard ${RELEASE}" msg_info "Creating Service" From bbb26ca3fc99fe38a6eff1519a5cdb1116b62f0c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 02:39:57 -0400 Subject: [PATCH 2823/3335] Create welcome.yml --- .github/workflows/welcome.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/welcome.yml diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml new file mode 100644 index 00000000..b53aa90c --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,25 @@ +name: Welcome +on: + pull_request: + types: [opened, closed] + issues: + types: [opened] +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: wow-actions/welcome@v1 + with: + FIRST_ISSUE: | + 👋 @{{ author }} + Thanks for opening your first issue here! Be sure to follow the issue template! + + FIRST_PR: | + 👋 @{{ author }} + Thanks for opening this pull request! Please check out our contributing guidelines. + + FIRST_PR_MERGED: | + 🎉 @{{ author }} + Congrats on merging your first pull request! We here at behaviorbot are proud of you! + + STAR_MESSAGE: If you like this project, please ⭐ our repo. From 66c685425f1265c1028681dbfedc1f7ed253a7b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 02:43:25 -0400 Subject: [PATCH 2824/3335] Create main.yml --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..bfc9cd8c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +on: + issues: + types: [opened, edited] + +jobs: + auto_close_issues: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Automatically close issues that don't follow the issue template + uses: lucasbento/auto-close-issues@v1.0.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property + closed-issues-label: "🙁 Not following issue template" # optional property From a9b9f17aa3bf9e2a523ddec01829d5f6bffc648c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 02:50:50 -0400 Subject: [PATCH 2825/3335] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfc9cd8c..f0d08fd4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,5 @@ jobs: - name: Automatically close issues that don't follow the issue template uses: lucasbento/auto-close-issues@v1.0.2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property closed-issues-label: "🙁 Not following issue template" # optional property From f0da879ae678e764072c85eb5978880ebcd20106 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 03:05:55 -0400 Subject: [PATCH 2826/3335] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f0d08fd4..bfc9cd8c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,5 +11,6 @@ jobs: - name: Automatically close issues that don't follow the issue template uses: lucasbento/auto-close-issues@v1.0.2 with: + github-token: ${{ secrets.GITHUB_TOKEN }} issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property closed-issues-label: "🙁 Not following issue template" # optional property From d503898b77f326856c181b5548c68bbba3a73782 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 03:17:37 -0400 Subject: [PATCH 2827/3335] Update main.yml --- .github/workflows/main.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfc9cd8c..8fea4324 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,8 @@ +# Close any issue that does not match any of the issue templates +name: 🎯 Close Incomplete Issues on: issues: types: [opened, edited] - jobs: auto_close_issues: runs-on: ubuntu-latest @@ -11,6 +12,10 @@ jobs: - name: Automatically close issues that don't follow the issue template uses: lucasbento/auto-close-issues@v1.0.2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property - closed-issues-label: "🙁 Not following issue template" # optional property + github-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + closed-issues-label: '🙁 Auto-Closed' + issue-close-message: | + Hello @${issue.user.login} + Unfortunately your issue does not follow the format outlined in the template, and has therefore been auto-closed. + To ensure that all relevant info is included, please either update or recreate your issue, and complete the sub-headings provided. + Thank you :) From 9e2064b6657b349792c312adf1763cb14a65a9a9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 03:30:01 -0400 Subject: [PATCH 2828/3335] Update and rename main.yml to close-incomplete-issues.yml --- .github/workflows/{main.yml => close-incomplete-issues.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{main.yml => close-incomplete-issues.yml} (91%) diff --git a/.github/workflows/main.yml b/.github/workflows/close-incomplete-issues.yml similarity index 91% rename from .github/workflows/main.yml rename to .github/workflows/close-incomplete-issues.yml index 8fea4324..d97a8a56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/close-incomplete-issues.yml @@ -12,7 +12,7 @@ jobs: - name: Automatically close issues that don't follow the issue template uses: lucasbento/auto-close-issues@v1.0.2 with: - github-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} closed-issues-label: '🙁 Auto-Closed' issue-close-message: | Hello @${issue.user.login} From 7654134e5e8174aabac2cfb1106ebdfb6c81bddb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 04:34:56 -0400 Subject: [PATCH 2829/3335] Update close-incomplete-issues.yml --- .github/workflows/close-incomplete-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close-incomplete-issues.yml b/.github/workflows/close-incomplete-issues.yml index d97a8a56..87e0af60 100644 --- a/.github/workflows/close-incomplete-issues.yml +++ b/.github/workflows/close-incomplete-issues.yml @@ -13,7 +13,7 @@ jobs: uses: lucasbento/auto-close-issues@v1.0.2 with: github-token: ${{ secrets.GITHUB_TOKEN }} - closed-issues-label: '🙁 Auto-Closed' + closed-issues-label: 'Non-conforming Issue' issue-close-message: | Hello @${issue.user.login} Unfortunately your issue does not follow the format outlined in the template, and has therefore been auto-closed. From 3e01ebf221c77b1e6e29bedd63e69969f6464c77 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 05:59:46 -0400 Subject: [PATCH 2830/3335] Create config.yml --- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..09abbdf7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Helper-Scripts Community Support + url: https://github.com/tteck/Proxmox/discussions + about: Please ask and answer questions here. From e1ac6d87f67646e72145d34cffc0ee6d40011c6a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 06:00:59 -0400 Subject: [PATCH 2831/3335] Delete .github/workflows/ci.yml --- .github/workflows/ci.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8cb50a45..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: CI - -on: - push: - branches: - - gh-pages - - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 20 - - - name: Checkout code - uses: actions/checkout@v3 From 3fdffb65407d72d0ec455d2a818002f209c0659a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 06:01:16 -0400 Subject: [PATCH 2832/3335] Delete .github/workflows/close-incomplete-issues.yml --- .github/workflows/close-incomplete-issues.yml | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/close-incomplete-issues.yml diff --git a/.github/workflows/close-incomplete-issues.yml b/.github/workflows/close-incomplete-issues.yml deleted file mode 100644 index 87e0af60..00000000 --- a/.github/workflows/close-incomplete-issues.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Close any issue that does not match any of the issue templates -name: 🎯 Close Incomplete Issues -on: - issues: - types: [opened, edited] -jobs: - auto_close_issues: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Automatically close issues that don't follow the issue template - uses: lucasbento/auto-close-issues@v1.0.2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - closed-issues-label: 'Non-conforming Issue' - issue-close-message: | - Hello @${issue.user.login} - Unfortunately your issue does not follow the format outlined in the template, and has therefore been auto-closed. - To ensure that all relevant info is included, please either update or recreate your issue, and complete the sub-headings provided. - Thank you :) From 39586380af4f79400aed7b8d6e0d962db278e631 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 06:12:05 -0400 Subject: [PATCH 2833/3335] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 1e718f7d..4b2c8bcc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,5 +1,5 @@ name: Problems with a script. -description: Generate a report on an issue pertaining specifically to a script. For other inquires please share them in the Discussions section. Blank issues will be closed immediately. +description: Generate a report on an issue pertaining specifically to a script. For other inquires please share them in the Discussions section. body: - type: markdown attributes: From aed9fdee7fced81daf1da517a99f050858858759 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 06:55:17 -0400 Subject: [PATCH 2834/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 4b2c8bcc..6b73c929 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -35,7 +35,7 @@ body: - Debian 12 - Ubuntu 20.04 - Ubuntu 22.04 - - Ubuntu 23.04 + - Ubuntu 23.10 - type: textarea id: screenshot attributes: From 1d6c0acf0dfa872d1c768818185bfdb1a06426f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 07:20:07 -0400 Subject: [PATCH 2835/3335] Update pull_request_template.md tweak --- .github/pull_request_template.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4bf88433..39173ba0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,7 +10,9 @@ Fixes # (issue) Please delete options that are not relevant. -- [ ] Bug fix -- [ ] New feature -- [ ] New Script +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] New Script (Develop a new script or set of scripts that are fully functional and thoroughly tested) +- [ ] I have performed a self-review of my code, adhering to established codebase patterns and conventions. - [ ] This change requires a documentation update From 2fa12a1b97aaf04c91a3cfb467c37c4d2f48080e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 09:59:56 -0400 Subject: [PATCH 2836/3335] Delete .github/workflows/welcome.yml --- .github/workflows/welcome.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/welcome.yml diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml deleted file mode 100644 index b53aa90c..00000000 --- a/.github/workflows/welcome.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Welcome -on: - pull_request: - types: [opened, closed] - issues: - types: [opened] -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/welcome@v1 - with: - FIRST_ISSUE: | - 👋 @{{ author }} - Thanks for opening your first issue here! Be sure to follow the issue template! - - FIRST_PR: | - 👋 @{{ author }} - Thanks for opening this pull request! Please check out our contributing guidelines. - - FIRST_PR_MERGED: | - 🎉 @{{ author }} - Congrats on merging your first pull request! We here at behaviorbot are proud of you! - - STAR_MESSAGE: If you like this project, please ⭐ our repo. From 75532e028c9b834c5f9632999f698ebdde951506 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 10:47:20 -0400 Subject: [PATCH 2837/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 6b73c929..3de356ea 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -27,10 +27,19 @@ body: validations: required: true attributes: - label: Which Linux distribution are you employing? + label: What settings are you currently utilizing? options: - - Default Settings + - Advanced Settings + - type: dropdown + id: distribution + validations: + required: true + attributes: + label: Which Linux distribution are you employing? + options: + - - Debian 11 - Debian 12 - Ubuntu 20.04 From da027417e9d8d7cc2c2d18a594b34d9b58f0dfaf Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 10:47:55 -0400 Subject: [PATCH 2838/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 3de356ea..6d9be1f5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -23,7 +23,7 @@ body: validations: required: true - type: dropdown - id: distribution + id: settings validations: required: true attributes: From 8e76d536d817d59f7f11a9984ebcf13c0d3956ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 11:35:40 -0400 Subject: [PATCH 2839/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 6d9be1f5..346fb93b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -32,6 +32,9 @@ body: - - Default Settings - Advanced Settings + - type: markdown + attributes: + value: (if Advanced Settings, please try Default Settings before creating an issue) - type: dropdown id: distribution validations: From 8a72055ebe00c4610e29003329ebaaf7341b348f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 19 Mar 2024 22:08:01 -0400 Subject: [PATCH 2840/3335] Update unifi-install.sh - Code refactoring - MongoDB version 7.0.7 --- install/unifi-install.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 54fbef00..29b1b9c6 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -21,26 +21,23 @@ $STD apt-get install -y apt-transport-https $STD apt-get install -y gnupg msg_ok "Installed Dependencies" -msg_info "Installing OpenJDK" +msg_info "Installing Eclipse Temurin JRE" wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg -echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list +echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main" >/etc/apt/sources.list.d/adoptium.list $STD apt-get update $STD apt-get install -y temurin-17-jre -msg_ok "Installed OpenJDK" +msg_ok "Installed Eclipse Temurin JRE" msg_info "Installing MongoDB" -libssl=$(curl -fsSL "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/" | grep -o 'libssl1\.1_1\.1\.1f-1ubuntu2\.2[^"]*amd64\.deb' | head -n1) -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/$libssl -$STD dpkg -i $libssl -wget -qO- https://pgp.mongodb.com/server-4.4.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg -echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main' >/etc/apt/sources.list.d/mongodb-org-4.4.list +wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg +echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list $STD apt-get update $STD apt-get install -y mongodb-org msg_ok "Installed MongoDB" msg_info "Installing UniFi Network Application" wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg -echo 'deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/unifi-repo.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti' >/etc/apt/sources.list.d/100-ubnt-unifi.list +echo "deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/unifi-repo.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti" >/etc/apt/sources.list.d/100-ubnt-unifi.list $STD apt-get update $STD apt-get install -y unifi msg_ok "Installed UniFi Network Application" @@ -49,7 +46,6 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf $libssl $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" From 6d9d710de86531c22cae498b570c628e334d1d52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Mar 2024 05:25:47 -0400 Subject: [PATCH 2841/3335] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 09abbdf7..0eb07a0e 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: false contact_links: + - name: Failure to comply with the following guidelines may result in immediate closure. + about: | + - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. + - If the default Linux distribution is not adhered to, script support will be discontinued. + - When encountering the error message `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. + - For suggestions, questions, or feature/script requests, please share them in Helper-Scripts Community Support. - name: Helper-Scripts Community Support url: https://github.com/tteck/Proxmox/discussions about: Please ask and answer questions here. From 1657890c8e20747d1d1474f22f74f4809075b180 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Mar 2024 05:26:36 -0400 Subject: [PATCH 2842/3335] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0eb07a0e..09abbdf7 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,5 @@ blank_issues_enabled: false contact_links: - - name: Failure to comply with the following guidelines may result in immediate closure. - about: | - - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - - If the default Linux distribution is not adhered to, script support will be discontinued. - - When encountering the error message `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - - For suggestions, questions, or feature/script requests, please share them in Helper-Scripts Community Support. - name: Helper-Scripts Community Support url: https://github.com/tteck/Proxmox/discussions about: Please ask and answer questions here. From 6c5503b5006cd5def5140312cef7b80adfb9b5e9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Mar 2024 14:55:27 -0400 Subject: [PATCH 2843/3335] Update unifi-install.sh tweak --- install/unifi-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 29b1b9c6..61460b7d 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -35,12 +35,12 @@ $STD apt-get update $STD apt-get install -y mongodb-org msg_ok "Installed MongoDB" -msg_info "Installing UniFi Network Application" +msg_info "Installing UniFi Network Server" wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg echo "deb [ arch=amd64 signed-by=/etc/apt/trusted.gpg.d/unifi-repo.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti" >/etc/apt/sources.list.d/100-ubnt-unifi.list $STD apt-get update $STD apt-get install -y unifi -msg_ok "Installed UniFi Network Application" +msg_ok "Installed UniFi Network Server" motd_ssh customize From c5ddb590d771ba3f31335d4723cd5c26994823cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 21 Mar 2024 17:11:00 -0400 Subject: [PATCH 2844/3335] Update tandoor-install.sh fixes https://github.com/tteck/Proxmox/issues/2685 --- install/tandoor-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 87fdd91b..fa0e0ac3 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -114,7 +114,7 @@ server { listen 8002; #access_log /var/log/nginx/access.log; #error_log /var/log/nginx/error.log; - + client_max_body_size 128M; # serve media files location /static/ { alias /opt/tandoor/staticfiles/; From 59dfb89db7e7878f302163ae40341d0193520c7e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Mar 2024 00:01:39 -0400 Subject: [PATCH 2845/3335] Update hyperion-install.sh update install to utilize Debian 12 --- install/hyperion-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index 19b8a88e..3ac24e5a 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -20,13 +20,13 @@ $STD apt-get install -y mc $STD apt-get install -y lsb-release $STD apt-get install -y gpg $STD apt-get install -y apt-transport-https -$STD apt-get install -y libpython3.9 +$STD apt-get install -y libpython3.11 msg_ok "Installed Dependencies" msg_info "Installing Hyperion" -wget -qO- https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg -sh -c 'echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/hyperion.list' +wget -qO- https://releases.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg +echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.releases.hyperion-project.org/ $(lsb_release -cs) main" >/etc/apt/sources.list.d/hyperion.list $STD apt-get update $STD apt-get install -y hyperion $STD systemctl enable --now hyperion@root.service From 9f32d30f6be6c71de1265cce9fec7ddc2ce0352e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 22 Mar 2024 00:02:32 -0400 Subject: [PATCH 2846/3335] Update hyperion.sh default Debian 12 --- ct/hyperion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 9bb9a141..4edd8dd8 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -24,7 +24,7 @@ var_disk="2" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 32904ccfed7e4a2148d15f4d2a3adc1dd07c6ad5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Mar 2024 11:09:09 -0400 Subject: [PATCH 2847/3335] Create smokeping-install.sh --- install/smokeping-install.sh | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 install/smokeping-install.sh diff --git a/install/smokeping-install.sh b/install/smokeping-install.sh new file mode 100644 index 00000000..3a214b6c --- /dev/null +++ b/install/smokeping-install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing SmokePing" +$STD apt-get install -y smokeping +cat </etc/smokeping/config.d/Targets +*** Targets *** +probe = FPing +menu = Top +title = Network Latency Grapher +remark = Welcome to SmokePing. ++ Local +menu = Local +title = Local Network (ICMP) +++ LocalMachine +menu = Local Machine +title = This host +host = localhost ++ DNS +menu = DNS latency +title = DNS latency (ICMP) +++ Google +title = Google +host = 8.8.8.8 +++ Cloudflare +title = Cloudflare +host = 1.1.1.1 +++ Quad9 +title = Quad9 +host = 9.9.9.9 +++ OpenDNS +title = OpenDNS +host = 208.67.222.222 ++ HTTP +menu = HTTP latency +title = HTTP latency (ICMP) +++ Github +host = github.com +++ Discord +host = discord.com +++ Google +host = google.com +++ Cloudflare +host = cloudflare.com +++ Amazon +host = amazon.com +++ Netflix +host = netflix.com +EOF +systemctl restart smokeping +msg_ok "Installed SmokePing" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From d467d4ce5f2792ba8e47f1e8ba97c4f9492e877a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Mar 2024 11:10:19 -0400 Subject: [PATCH 2848/3335] Create Smokeping.sh --- ct/Smokeping.sh | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ct/Smokeping.sh diff --git a/ct/Smokeping.sh b/ct/Smokeping.sh new file mode 100644 index 00000000..8da7d96c --- /dev/null +++ b/ct/Smokeping.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ __ ____ _ + / ___/____ ___ ____ / /_____ / __ \(_)___ ____ _ + \__ \/ __ `__ \/ __ \/ //_/ _ \/ /_/ / / __ \/ __ `/ + ___/ / / / / / / /_/ / ,< / __/ ____/ / / / / /_/ / +/____/_/ /_/ /_/\____/_/|_|\___/_/ /_/_/ /_/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="SmokePing" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if ! command -v smokeping &> /dev/null; then msg_error "No ${APP} Installation Found!"; exit; fi + +msg_info "Updating ${APP}" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/smokeping${CL} \n" From 31b7a8209482329685ebcd37e212741949065507 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Mar 2024 11:12:30 -0400 Subject: [PATCH 2849/3335] Rename Smokeping.sh to smokeping.sh --- ct/{Smokeping.sh => smokeping.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{Smokeping.sh => smokeping.sh} (100%) diff --git a/ct/Smokeping.sh b/ct/smokeping.sh similarity index 100% rename from ct/Smokeping.sh rename to ct/smokeping.sh From 8e129001c728ed6d2cd9d600c45611ef26aa121d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 24 Mar 2024 11:21:00 -0400 Subject: [PATCH 2850/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d20067ea..3bf618bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-03-24 + +### Changed + +- **SmokePing LXC** + - NEW Script + ## 2024-03-13 ### Changed From a807d87e84b855f5b3937b6af33e22c7a8db1d58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 09:48:54 -0400 Subject: [PATCH 2851/3335] Create mediamtx-install.sh --- install/mediamtx-install.sh | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/mediamtx-install.sh diff --git a/install/mediamtx-install.sh b/install/mediamtx-install.sh new file mode 100644 index 00000000..6adbb6ee --- /dev/null +++ b/install/mediamtx-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing MediaMTX" +RELEASE=$(curl -s https://api.github.com/repos/bluenviron/mediamtx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +mkdir -p /opt/mediamtx +cd /opt/mediamtx +wget -q https://github.com/bluenviron/mediamtx/releases/download/${RELEASE}/mediamtx_${RELEASE}_linux_amd64.tar.gz +tar xzf mediamtx_${RELEASE}_linux_amd64.tar.gz +rm -rf mediamtx_${RELEASE}_linux_amd64.tar.gz +msg_ok "Installed MediaMTX" + +msg_info "Creating Service" +cat </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.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 018ab69a33552b693395197e1dde86f534752bfb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 09:49:50 -0400 Subject: [PATCH 2852/3335] Create mediamtx.sh --- ct/mediamtx.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 ct/mediamtx.sh diff --git a/ct/mediamtx.sh b/ct/mediamtx.sh new file mode 100644 index 00000000..db8508ff --- /dev/null +++ b/ct/mediamtx.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ ___ __ __________ __ + / |/ /__ ____/ (_)___ _/ |/ /_ __/ |/ / + / /|_/ / _ \/ __ / / __ `/ /|_/ / / / | / + / / / / __/ /_/ / / /_/ / / / / / / / | +/_/ /_/\___/\__,_/_/\__,_/_/ /_/ /_/ /_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="MediaMTX" +var_disk="2" +var_cpu="2" +var_ram="2048" +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 +if [[ ! -d /opt/mediamtx/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" From 12b0a0bf503e729a08f05e1a20ccea9fc6835529 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 09:58:50 -0400 Subject: [PATCH 2853/3335] Update mediamtx-install.sh add ffmpeg --- install/mediamtx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/mediamtx-install.sh b/install/mediamtx-install.sh index 6adbb6ee..c41d4afd 100644 --- a/install/mediamtx-install.sh +++ b/install/mediamtx-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y ffmpeg msg_ok "Installed Dependencies" msg_info "Installing MediaMTX" From 2f836f4e6dcc5252efa508717e73c926ad9e40d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 10:21:02 -0400 Subject: [PATCH 2854/3335] Update mediamtx.sh add additional storage --- ct/mediamtx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/mediamtx.sh b/ct/mediamtx.sh index db8508ff..83e660eb 100644 --- a/ct/mediamtx.sh +++ b/ct/mediamtx.sh @@ -20,7 +20,7 @@ EOF header_info echo -e "Loading..." APP="MediaMTX" -var_disk="2" +var_disk="4" var_cpu="2" var_ram="2048" var_os="debian" From f25189933db460c7edf281e5cecb7d16ce6fb2e8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 10:36:28 -0400 Subject: [PATCH 2855/3335] Update post-pve-install.sh allow any PVE 8 --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index ea166360..09e89908 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -231,7 +231,7 @@ while true; do esac done -if ! pveversion | grep -Eq "pve-manager/(8.1.[1-9])"; then +if ! pveversion | grep -Eq "pve-manager/8\.[0-2]+\.[0-9]+"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1.1 or later." echo -e "Exiting..." From fe416bc6ff536779787931062a01dba01fd7e289 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 10:48:31 -0400 Subject: [PATCH 2856/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 09e89908..254c6b8b 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -231,7 +231,7 @@ while true; do esac done -if ! pveversion | grep -Eq "pve-manager/8\.[0-2]+\.[0-9]+"; then +if ! pveversion | grep -Eq "pve-manager/8\.[0-2]\.[0-9]"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1.1 or later." echo -e "Exiting..." From d65fd07f508cacd9151c5d0f79a73d0f3741d2fb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 10:49:49 -0400 Subject: [PATCH 2857/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 254c6b8b..1ae4b3b6 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -233,7 +233,7 @@ done if ! pveversion | grep -Eq "pve-manager/8\.[0-2]\.[0-9]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.0 or later." echo -e "Exiting..." sleep 2 exit From cff9b233c7ba8a7e1c641307e65ad64b05f4181e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 10:56:23 -0400 Subject: [PATCH 2858/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf618bf..b447f06a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-03-25 + +### Changed + +- **Proxmox VE Post Install** + - ~Requires Proxmox Virtual Environment Version 8.1.1 or later.~ + - Requires Proxmox Virtual Environment Version 8.0 or later. + ## 2024-03-24 ### Changed From b6f8d7f6241db0d6cdfeb8cf040b3e6cf03197ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 13:16:19 -0400 Subject: [PATCH 2859/3335] Create pbs-install.sh --- install/pbs-install.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 install/pbs-install.sh diff --git a/install/pbs-install.sh b/install/pbs-install.sh new file mode 100644 index 00000000..83978159 --- /dev/null +++ b/install/pbs-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Proxmox Backup Server" +wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg +cat <>/etc/apt/sources.list +deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription +EOF +$STD apt-get update +$STD apt-get install -y proxmox-backup-server +msg_ok "Installed Proxmox Backup Server" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 3b1dd2efc07c5d15279041d2b4069efd78dd13e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 13:17:52 -0400 Subject: [PATCH 2860/3335] Create pbs.sh --- pbs.sh | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 pbs.sh diff --git a/pbs.sh b/pbs.sh new file mode 100644 index 00000000..97ffd5a4 --- /dev/null +++ b/pbs.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ____ __ _____ + / __ \_________ _ ______ ___ ____ _ __ / __ )____ ______/ /____ ______ / ___/___ ______ _____ _____ + / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ / __ / __ `/ ___/ //_/ / / / __ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ + / ____/ / / /_/ /> < / /_/ / /_/ / /__/ ,< / /_/ / /_/ / ___/ / __/ / | |/ / __/ / +/_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| /_____/\__,_/\___/_/|_|\__,_/ .___/ /____/\___/_/ |___/\___/_/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="PBS" +var_disk="10" +var_cpu="2" +var_ram="2048" +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 +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8007${CL} \n" From c0ca12e712e5a1a39bc791b3334b3924c825e5f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 13:21:06 -0400 Subject: [PATCH 2861/3335] Create pbs.sh --- ct/pbs.sh | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 ct/pbs.sh diff --git a/ct/pbs.sh b/ct/pbs.sh new file mode 100644 index 00000000..97ffd5a4 --- /dev/null +++ b/ct/pbs.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ____ __ _____ + / __ \_________ _ ______ ___ ____ _ __ / __ )____ ______/ /____ ______ / ___/___ ______ _____ _____ + / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ / __ / __ `/ ___/ //_/ / / / __ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ + / ____/ / / /_/ /> < / /_/ / /_/ / /__/ ,< / /_/ / /_/ / ___/ / __/ / | |/ / __/ / +/_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| /_____/\__,_/\___/_/|_|\__,_/ .___/ /____/\___/_/ |___/\___/_/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="PBS" +var_disk="10" +var_cpu="2" +var_ram="2048" +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 +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8007${CL} \n" From d5d314e5ebdc80d7ecf203614a10e14edcb09df4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 13:24:13 -0400 Subject: [PATCH 2862/3335] Update pbs-install.sh tweak --- install/pbs-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pbs-install.sh b/install/pbs-install.sh index 83978159..99203391 100644 --- a/install/pbs-install.sh +++ b/install/pbs-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Proxmox Backup Server" -wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg +wget -q https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription EOF From 6445e0eac36b68afb733124ee9a948512efb6ebc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 14:37:08 -0400 Subject: [PATCH 2863/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b447f06a..1a644b76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ - **Proxmox VE Post Install** - ~Requires Proxmox Virtual Environment Version 8.1.1 or later.~ - Requires Proxmox Virtual Environment Version 8.0 or later. +- **Proxmox Backup Server LXC** + - NEW Script ## 2024-03-24 From e1e0b4af9ee5c58b69c4362f697aaedf7299f4ed Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Mar 2024 14:58:49 -0400 Subject: [PATCH 2864/3335] Delete pbs.sh found the stray --- pbs.sh | 72 ---------------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 pbs.sh diff --git a/pbs.sh b/pbs.sh deleted file mode 100644 index 97ffd5a4..00000000 --- a/pbs.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - ____ ____ __ _____ - / __ \_________ _ ______ ___ ____ _ __ / __ )____ ______/ /____ ______ / ___/___ ______ _____ _____ - / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ / __ / __ `/ ___/ //_/ / / / __ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ - / ____/ / / /_/ /> < / /_/ / /_/ / /__/ ,< / /_/ / /_/ / ___/ / __/ / | |/ / __/ / -/_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| /_____/\__,_/\___/_/|_|\__,_/ .___/ /____/\___/_/ |___/\___/_/ - /_/ -EOF -} -header_info -echo -e "Loading..." -APP="PBS" -var_disk="10" -var_cpu="2" -var_ram="2048" -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 -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8007${CL} \n" From 23e6b80a9e7c63beb1c7075822fff143a3522329 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Mar 2024 09:19:43 -0400 Subject: [PATCH 2865/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a644b76..173aca78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-03-26 + +### Changed + +- **MediaMTX LXC** + - NEW Script + ## 2024-03-25 ### Changed From 98e8955ec1db4424df229083a8d1c8d7e513ee3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 27 Mar 2024 12:46:31 -0400 Subject: [PATCH 2866/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 1ae4b3b6..572b4811 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -231,7 +231,7 @@ while true; do esac done -if ! pveversion | grep -Eq "pve-manager/8\.[0-2]\.[0-9]"; then +if ! pveversion | grep -Eq "pve-manager/8\.[0-2]\."; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.0 or later." echo -e "Exiting..." From 21d0e96b56d766467b14ec808db7b421dad0d87d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Mar 2024 13:02:34 -0400 Subject: [PATCH 2867/3335] Update post-pve-install.sh tweak --- misc/post-pve-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 572b4811..ec8d7d98 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -231,7 +231,7 @@ while true; do esac done -if ! pveversion | grep -Eq "pve-manager/8\.[0-2]\."; then +if ! pveversion | grep -Eq "pve-manager/8.[0-2]"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.0 or later." echo -e "Exiting..." From 597162b0a819ff75f0faaef506192479df987e20 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 29 Mar 2024 15:00:38 -0400 Subject: [PATCH 2868/3335] Update tdarr-install.sh Download the latest `Tdarr_Updater` --- install/tdarr-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 69321662..f4f45d04 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -37,7 +37,8 @@ fi msg_info "Installing Tdarr" mkdir -p /opt/tdarr cd /opt/tdarr -wget -q https://f000.backblazeb2.com/file/tdarrs/versions/2.00.15/linux_x64/Tdarr_Updater.zip +RELEASE=$(curl -s https://f000.backblazeb2.com/file/tdarrs/versions.json | grep -oP '(?<="Tdarr_Updater": ")[^"]+' | grep linux_x64 | head -n 1) +wget -q $RELEASE $STD unzip Tdarr_Updater.zip rm -rf Tdarr_Updater.zip chmod +x Tdarr_Updater From 4ba3233dc0d6bd30dedb891db1d99f1ed9874aa8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Mar 2024 08:13:34 -0400 Subject: [PATCH 2869/3335] Update build.func Add Frigate to the VAAPI hardware transcoding group --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index f21ad361..bac97de5 100644 --- a/misc/build.func +++ b/misc/build.func @@ -570,7 +570,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm From f956273fc57f6dc5c0f47724221a5bc79d8151f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Sat, 30 Mar 2024 08:15:03 -0400 Subject: [PATCH 2870/3335] Add Frigate scripts (#2714) --- ct/frigate.sh | 72 +++++++++++++++ install/frigate-install.sh | 181 +++++++++++++++++++++++++++++++++++++ 2 files changed, 253 insertions(+) create mode 100644 ct/frigate.sh create mode 100644 install/frigate-install.sh diff --git a/ct/frigate.sh b/ct/frigate.sh new file mode 100644 index 00000000..77474314 --- /dev/null +++ b/ct/frigate.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Authors: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ______ _ __ + / ____/____(_)___ _____ _/ /____ + / /_ / ___/ / __ `/ __ `/ __/ _ \ + / __/ / / / / /_/ / /_/ / /_/ __/ +/_/ /_/ /_/\__, /\__,_/\__/\___/ + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Frigate" +var_disk="20" +var_cpu="4" +var_ram="4096" +var_os="debian" +var_version="11" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + 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() { + if [[ ! -f /etc/systemd/system/frigate.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + msg_error "There is currently no update path available." + exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 1024 +pct set $CTID -cores 2 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" diff --git a/install/frigate-install.sh b/install/frigate-install.sh new file mode 100644 index 00000000..b30749e8 --- /dev/null +++ b/install/frigate-install.sh @@ -0,0 +1,181 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Authors: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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 {curl,sudo,mc,git,gpg,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev} +msg_ok "Installed Dependencies" + +msg_info "Installing Python3 Dependencies" +$STD apt-get install -y {python3,python3-dev,python3-setuptools,python3-distutils} +wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py +$STD python3 get-pip.py --quiet "pip" +msg_ok "Installed Python3 Dependencies" + +msg_info "Installing Node.js" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing go2rtc" +mkdir -p /usr/local/go2rtc/bin +cd /usr/local/go2rtc/bin +wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64" +chmod +x go2rtc +$STD ln -svf /usr/local/go2rtc/bin/go2rtc /usr/local/bin/go2rtc +msg_ok "Installed go2rtc" + +if [[ "$CTTYPE" == "0" ]]; then + msg_info "Setting Up Hardware Acceleration" + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render + msg_ok "Set Up Hardware Acceleration" +fi + +RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +msg_info "Installing Frigate $RELEASE (Perseverance)" +cd ~ +mkdir -p /opt/frigate/models +wget -q https://github.com/blakeblackshear/frigate/archive/refs/tags/${RELEASE}.tar.gz -O frigate.tar.gz +tar -xzf frigate.tar.gz -C /opt/frigate --strip-components 1 +rm -rf frigate.tar.gz +cd /opt/frigate +$STD pip3 wheel --wheel-dir=/wheels -r /opt/frigate/docker/main/requirements-wheels.txt +cp -a /opt/frigate/docker/main/rootfs/. / +export TARGETARCH="amd64" +echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections +$STD /opt/frigate/docker/main/install_deps.sh +$STD ln -svf /usr/lib/btbn-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg +$STD ln -svf /usr/lib/btbn-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe +$STD pip3 install -U /wheels/*.whl +ldconfig +$STD pip3 install -r /opt/frigate/docker/main/requirements-dev.txt +$STD /opt/frigate/.devcontainer/initialize.sh +$STD make version +cd /opt/frigate/web +$STD npm install +$STD npm run build +cp -r /opt/frigate/web/dist/* /opt/frigate/web/ +cp -r /opt/frigate/config/. /config +sed -i '/^s6-svc -O \.$/s/^/#/' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +msg_ok "Installed Frigate $RELEASE" + +msg_info "Installing Object Detection Models (Resilience)" +$STD pip install -r /opt/frigate/docker/main/requirements-ov.txt +cd /opt/frigate/models +export ENABLE_ANALYTICS=NO +$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 +cd .. +export CCACHE_DIR=/root/.ccache +export CCACHE_MAXSIZE=2G +wget -q https://github.com/libusb/libusb/archive/v1.0.26.zip +unzip -q v1.0.26.zip +cd libusb-1.0.26 +$STD ./bootstrap.sh +$STD ./configure --disable-udev --enable-shared +$STD make -j $(nproc --all) +cd /opt/frigate/libusb-1.0.26/libusb +mkdir -p /usr/local/lib +$STD /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' +mkdir -p /usr/local/include/libusb-1.0 +$STD /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' +ldconfig +cd ~ +wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite +wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite +cp /opt/frigate/labelmap.txt /labelmap.txt +cp -r /opt/frigate/models/public/ssdlite_mobilenet_v2 openvino-model +wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt +sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt +wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite +cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt +msg_ok "Installed Object Detection Models" + +msg_info "Building Nginx with Custom Modules" +$STD /opt/frigate/docker/main/build_nginx.sh +sed -i 's/exec nginx/exec \/usr\/local\/nginx\/sbin\/nginx/g' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +sed -i 's/error_log \/dev\/stdout warn\;/error_log nginx\.err warn\;/' /usr/local/nginx/conf/nginx.conf +sed -i 's/access_log \/dev\/stdout main\;/access_log nginx\.log main\;/' /usr/local/nginx/conf/nginx.conf +msg_ok "Built Nginx" + +msg_info "Creating Services" +cat </etc/systemd/system/go2rtc.service +[Unit] +Description=go2rtc service +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now go2rtc +sleep 3 +cat </etc/systemd/system/frigate.service +[Unit] +Description=Frigate service +After=go2rtc.service +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now frigate +sleep 3 +cat </etc/systemd/system/nginx.service +[Unit] +Description=Nginx service +After=frigate.service +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now nginx +msg_ok "Configured Services" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 90463f5aafbbf31c4b431cc19801a80a2aadc3e4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 30 Mar 2024 11:15:57 -0400 Subject: [PATCH 2871/3335] Update frigate-install.sh Remove libusb zip --- install/frigate-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index b30749e8..0115afbe 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -88,6 +88,7 @@ export CCACHE_DIR=/root/.ccache export CCACHE_MAXSIZE=2G wget -q https://github.com/libusb/libusb/archive/v1.0.26.zip unzip -q v1.0.26.zip +rm v1.0.26.zip cd libusb-1.0.26 $STD ./bootstrap.sh $STD ./configure --disable-udev --enable-shared From a16f31bbcab91571d27e2945d2b03fe7933dc114 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 04:09:29 -0400 Subject: [PATCH 2872/3335] Update bug_report.yaml Add Alpine --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 346fb93b..3789546e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -43,6 +43,7 @@ body: label: Which Linux distribution are you employing? options: - + - Alpine - Debian 11 - Debian 12 - Ubuntu 20.04 From 35837f056d38b0a607402f0afc5ae54b807d8ef9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 06:30:21 -0400 Subject: [PATCH 2873/3335] Update frigate.sh keep 4vCPUs --- ct/frigate.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/frigate.sh b/ct/frigate.sh index 77474314..7ac4e1d6 100644 --- a/ct/frigate.sh +++ b/ct/frigate.sh @@ -65,7 +65,6 @@ description msg_info "Setting Container to Normal Resources" pct set $CTID -memory 1024 -pct set $CTID -cores 2 msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. From 6e3e49337b2e377084549c24052780365e9faa42 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 06:36:57 -0400 Subject: [PATCH 2874/3335] Update frigate-install.sh - Download new input file - Create new config.yml - Link `/config/config.yml` and `/opt/frigate/config/config.yml` - Create log directories - Fix GID mismatch --- install/frigate-install.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 0115afbe..6c5b372d 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -76,6 +76,34 @@ $STD npm run build cp -r /opt/frigate/web/dist/* /opt/frigate/web/ cp -r /opt/frigate/config/. /config sed -i '/^s6-svc -O \.$/s/^/#/' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +wget -qO /media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 +cat </config/config.yml +mqtt: + enabled: false +model: + path: /root/cpu_model.tflite +cameras: + test: + ffmpeg: + inputs: + - path: /media/frigate/person-bicycle-car-detection.mp4 + input_args: -re -stream_loop -1 -fflags +genpts + roles: + - detect + - rtmp + detect: + height: 1080 + width: 1920 + fps: 5 +EOF + +ln -sf /config/config.yml /opt/frigate/config/config.yml + +mkdir -p /dev/shm/logs/{frigate,go2rtc,nginx} +touch /dev/shm/logs/{frigate/current,go2rtc/current,nginx/current} +chmod -R 777 /dev/shm + +sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group msg_ok "Installed Frigate $RELEASE" msg_info "Installing Object Detection Models (Resilience)" From 6c9f829ee9ad62ae37b5d0d838e86a454bdda0db Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 06:48:02 -0400 Subject: [PATCH 2875/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 6c5b372d..fcc94fcb 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -76,7 +76,7 @@ $STD npm run build cp -r /opt/frigate/web/dist/* /opt/frigate/web/ cp -r /opt/frigate/config/. /config sed -i '/^s6-svc -O \.$/s/^/#/' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run -wget -qO /media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 +wget -qO /root/media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 cat </config/config.yml mqtt: enabled: false @@ -96,13 +96,10 @@ cameras: width: 1920 fps: 5 EOF - ln -sf /config/config.yml /opt/frigate/config/config.yml - mkdir -p /dev/shm/logs/{frigate,go2rtc,nginx} touch /dev/shm/logs/{frigate/current,go2rtc/current,nginx/current} chmod -R 777 /dev/shm - sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group msg_ok "Installed Frigate $RELEASE" From 3817e9372fa6517f84799998963c7322badcb8ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 06:58:08 -0400 Subject: [PATCH 2876/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index fcc94fcb..96637a8c 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -76,7 +76,6 @@ $STD npm run build cp -r /opt/frigate/web/dist/* /opt/frigate/web/ cp -r /opt/frigate/config/. /config sed -i '/^s6-svc -O \.$/s/^/#/' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run -wget -qO /root/media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 cat </config/config.yml mqtt: enabled: false @@ -133,6 +132,7 @@ wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/datase sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt +wget -qO /root/media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 msg_ok "Installed Object Detection Models" msg_info "Building Nginx with Custom Modules" From 980fb26b416ae72c696da8dbf2ec28bf88caf66b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 07:05:24 -0400 Subject: [PATCH 2877/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 96637a8c..5542cca0 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -132,7 +132,7 @@ wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/datase sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt -wget -qO /root/media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 +wget -qO /media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 msg_ok "Installed Object Detection Models" msg_info "Building Nginx with Custom Modules" From 3233fbf5f592adcd7fa898e2df7478642de961f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 07:19:13 -0400 Subject: [PATCH 2878/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 5542cca0..c4cb35fd 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -132,6 +132,7 @@ wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/datase sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt +mkdir -p /media/frigate wget -qO /media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 msg_ok "Installed Object Detection Models" From 8ee221974b31ac7480099352656dda7ea0b893b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 08:19:44 -0400 Subject: [PATCH 2879/3335] Update frigate-install.sh Add `hwaccel_args: preset-vaapi` to `config.yml` --- install/frigate-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index c4cb35fd..9170e5f5 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -84,6 +84,7 @@ model: cameras: test: ffmpeg: + #hwaccel_args: preset-vaapi inputs: - path: /media/frigate/person-bicycle-car-detection.mp4 input_args: -re -stream_loop -1 -fflags +genpts From 6dcc29afa7b5697741bd1fc8d3bf404730eef43a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 12:43:15 -0400 Subject: [PATCH 2880/3335] Update frigate-install.sh Fix logs --- install/frigate-install.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 9170e5f5..aba91e05 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -97,9 +97,6 @@ cameras: fps: 5 EOF ln -sf /config/config.yml /opt/frigate/config/config.yml -mkdir -p /dev/shm/logs/{frigate,go2rtc,nginx} -touch /dev/shm/logs/{frigate/current,go2rtc/current,nginx/current} -chmod -R 777 /dev/shm sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group msg_ok "Installed Frigate $RELEASE" @@ -145,10 +142,24 @@ sed -i 's/access_log \/dev\/stdout main\;/access_log nginx\.log main\;/' /usr/lo msg_ok "Built Nginx" msg_info "Creating Services" +cat </etc/systemd/system/create_directories.service +[Unit] +Description=Create necessary directories for logs + +[Service] +Type=oneshot +ExecStart=/bin/bash -c '/bin/mkdir -p /dev/shm/logs/{frigate,go2rtc,nginx} && /bin/touch /dev/shm/logs/{frigate/current,go2rtc/current,nginx/current} && /bin/chmod -R 777 /dev/shm/logs' + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now create_directories +sleep 3 cat </etc/systemd/system/go2rtc.service [Unit] Description=go2rtc service After=network.target +After=create_directories.service StartLimitIntervalSec=0 [Service] @@ -157,6 +168,8 @@ Restart=always RestartSec=1 User=root ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run +StandardOutput=file:/dev/shm/logs/go2rtc/current +StandardError=file:/dev/shm/logs/go2rtc/current [Install] WantedBy=multi-user.target @@ -167,6 +180,7 @@ cat </etc/systemd/system/frigate.service [Unit] Description=Frigate service After=go2rtc.service +After=create_directories.service StartLimitIntervalSec=0 [Service] @@ -175,6 +189,8 @@ Restart=always RestartSec=1 User=root ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +StandardOutput=file:/dev/shm/logs/frigate/current +StandardError=file:/dev/shm/logs/frigate/current [Install] WantedBy=multi-user.target @@ -185,6 +201,7 @@ cat </etc/systemd/system/nginx.service [Unit] Description=Nginx service After=frigate.service +After=create_directories.service StartLimitIntervalSec=0 [Service] @@ -193,6 +210,8 @@ Restart=always RestartSec=1 User=root ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +StandardOutput=file:/dev/shm/logs/nginx/current +StandardError=file:/dev/shm/logs/nginx/current [Install] WantedBy=multi-user.target From ac34991ea7ea9032e6c76236a5333432b28d9913 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 16:01:36 -0400 Subject: [PATCH 2881/3335] Update prowlarr.sh "There is currently no update path available." --- ct/prowlarr.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index a2a54ad1..610928f8 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -55,10 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /var/lib/prowlarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_error "There is currently no update path available." exit } From 4be1d23dcda39a13aa5025a94aec4627ae3ac2aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 16:37:15 -0400 Subject: [PATCH 2882/3335] Update frigate.sh Add go2rtc port --- ct/frigate.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/frigate.sh b/ct/frigate.sh index 7ac4e1d6..f3483013 100644 --- a/ct/frigate.sh +++ b/ct/frigate.sh @@ -69,3 +69,5 @@ msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5000${CL} \n" +echo -e "go2rtc should be reachable by going to the following URL. + ${BL}http://${IP}:1984${CL} \n" From d01a18dbafe4a909c92f1f0610f9cf51e96685f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 Apr 2024 21:24:31 -0400 Subject: [PATCH 2883/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 173aca78..9070bd82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-01 + +### Changed + +- **Frigate LXC** + - NEW Script + ## 2024-03-26 ### Changed From 2e36b903ada6c7ec0b5185e43edaf1e811d3207f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Apr 2024 11:05:06 -0400 Subject: [PATCH 2884/3335] Update install.func slow spinner --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 3deb63d1..578bf0a8 100644 --- a/misc/install.func +++ b/misc/install.func @@ -54,7 +54,7 @@ spinner() { spin_i=0 while true; do printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 + sleep 0.2 done } From 3bcf2cece6474889f149cd09048272f7837a35cc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Apr 2024 02:42:06 -0400 Subject: [PATCH 2885/3335] Update pihole-install.sh tweak --- install/pihole-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index f3c52e90..84649dba 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -93,7 +93,7 @@ EOF cat </etc/dnsmasq.d/99-edns.conf edns-packet-max=1232 EOF - wget -q https://www.internic.net/domain/named.root >/var/lib/unbound/root.hints + wget -qO /var/lib/unbound/root.hints https://www.internic.net/domain/named.root sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e 's/PIHOLE_DNS_2=8.8.4.4/#PIHOLE_DNS_2=8.8.4.4/' /etc/pihole/setupVars.conf systemctl enable -q --now unbound systemctl restart pihole-FTL.service From 4103d40622b4cf80775381595c9ed4b80f9fdbe3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Apr 2024 03:07:32 -0400 Subject: [PATCH 2886/3335] Update pihole-install.sh add root-hints --- install/pihole-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 84649dba..52bb0b09 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -73,6 +73,7 @@ server: infra-cache-slabs: 8 key-cache-slabs: 8 serve-expired: yes + root-hints: /var/lib/unbound/root.hints serve-expired-ttl: 3600 edns-buffer-size: 1232 prefetch: yes From b2136739860380d152dfc6eeb5292b43af1e991a Mon Sep 17 00:00:00 2001 From: MountyMapleSyrup <159492850+MountyMapleSyrup@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:12:03 -0400 Subject: [PATCH 2887/3335] Adding a Script for LazyLibrarian (#2723) --- ct/lazylibrarian.sh | 81 ++++++++++++++++++++++++++++++++ install/lazylibrarian-install.sh | 62 ++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 ct/lazylibrarian.sh create mode 100644 install/lazylibrarian-install.sh diff --git a/ct/lazylibrarian.sh b/ct/lazylibrarian.sh new file mode 100644 index 00000000..9f29dc43 --- /dev/null +++ b/ct/lazylibrarian.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MountyMapleSyrup (MountyMapleSyrup) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ _ __ _ + / / ____ _____ __ __/ / (_) /_ _________ ______(_)___ _____ + / / / __ `/_ / / / / / / / / __ \/ ___/ __ `/ ___/ / __ `/ __ \ + / /___/ /_/ / / /_/ /_/ / /___/ / /_/ / / / /_/ / / / / /_/ / / / / +/_____/\__,_/ /___/\__, /_____/_/_.___/_/ \__,_/_/ /_/\__,_/_/ /_/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="LazyLibrarian" +var_disk="4" +var_cpu="2" +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 +if [[ ! -d /opt/LazyLibrarian/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping LazyLibrarian" +systemctl stop lazylibrarian +msg_ok "LazyLibrarian Stopped" + +msg_info "Updating $APP LXC" +git -C /opt/LazyLibrarian pull origin master &>/dev/null +msg_ok "Updated $APP LXC" + +msg_info "Starting LazyLibrarian" +systemctl start lazylibrarian +msg_ok "Started LazyLibrarian" + +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5299${CL} \n" diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh new file mode 100644 index 00000000..817d63cc --- /dev/null +++ b/install/lazylibrarian-install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MountyMapleSyrup (MountyMapleSyrup) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing Python3 Dependencies" +$STD apt-get install -y pip +$STD apt-get install -y python3-irc +$STD pip install jaraco.stream +$STD pip install python-Levenshtein +$STD pip install soupsieve +msg_ok "Installed Python3 Dependencies" + +msg_info "Installing LazyLibrarian" +mkdir -p /opt/LazyLibrarian/ +chmod 775 /opt/LazyLibrarian/ +$STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian +msg_ok "Installed LazyLibrarian" + +msg_info "Creating Service" +cat </etc/systemd/system/lazylibrarian.service +[Unit] +Description=LazyLibrarian Daemon +After=syslog.target network.target +[Service] +UMask=0002 +Type=simple +ExecStart=/usr/bin/python3 /opt/LazyLibrarian/LazyLibrarian.py +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q lazylibrarian +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 306f2f41210ea97aa75e394dd8b572a64e82e355 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Apr 2024 12:43:17 -0400 Subject: [PATCH 2888/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9070bd82..b024a723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-03 + +### Changed + +- **LazyLibrarian LXC** + - NEW Script + ## 2024-04-01 ### Changed From 3ffdd988f2f389b99524382be90c1f5ca2f424d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Apr 2024 18:01:14 -0400 Subject: [PATCH 2889/3335] Create actualbudget-install.sh --- install/actualbudget-install.sh | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 install/actualbudget-install.sh diff --git a/install/actualbudget-install.sh b/install/actualbudget-install.sh new file mode 100644 index 00000000..0f000ed9 --- /dev/null +++ b/install/actualbudget-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install --global yarn +msg_ok "Installed Node.js" + +msg_info "Installing Actual Budget" +$STD git clone https://github.com/actualbudget/actual-server.git /opt/actualbudget +cd /opt/actualbudget +$STD yarn install +msg_ok "Installed Actual Budget" + +msg_info "Creating Service" +cat </etc/systemd/system/actualbudget.service +[Unit] +Description=Actual Budget Service +After=network.target + +[Service] +Type=exec +WorkingDirectory=/opt/actualbudget +ExecStart=/usr/bin/yarn start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now actualbudget.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From cc7d0920d5e6d7707d6ca7fcf08e7d4e46d7011e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Apr 2024 18:02:35 -0400 Subject: [PATCH 2890/3335] Create actualbudget.sh --- ct/actualbudget.sh | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 ct/actualbudget.sh diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh new file mode 100644 index 00000000..e9fedbf9 --- /dev/null +++ b/ct/actualbudget.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ __ ____ __ __ + / | _____/ /___ ______ _/ / / __ )__ ______/ /___ ____ / /_ + / /| |/ ___/ __/ / / / __ `/ / / __ / / / / __ / __ `/ _ \/ __/ + / ___ / /__/ /_/ /_/ / /_/ / / / /_/ / /_/ / /_/ / /_/ / __/ /_ +/_/ |_\___/\__/\__,_/\__,_/_/ /_____/\__,_/\__,_/\__, /\___/\__/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Actual Budget" +var_disk="4" +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 +if [[ ! -d /opt/actualbudget ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +systemctl stop actualbudget.service +/opt/actualbudget +git pull +yarn install +systemctl start actualbudget.service +msg_ok "Successfully Updated ${APP}" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5006${CL} \n" From 6f7427ff0e929ef742f477042a880cad83bf5f41 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Apr 2024 18:31:23 -0400 Subject: [PATCH 2891/3335] Update lazylibrarian-install.sh tweak --- install/lazylibrarian-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh index 817d63cc..98595c26 100644 --- a/install/lazylibrarian-install.sh +++ b/install/lazylibrarian-install.sh @@ -30,8 +30,6 @@ $STD pip install soupsieve msg_ok "Installed Python3 Dependencies" msg_info "Installing LazyLibrarian" -mkdir -p /opt/LazyLibrarian/ -chmod 775 /opt/LazyLibrarian/ $STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian msg_ok "Installed LazyLibrarian" From 957aaf8fa13e6cc8b1428e30bd9c079d077909ba Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Apr 2024 10:18:49 -0400 Subject: [PATCH 2892/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b024a723..52aefbaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-04 + +### Changed + +- **Actual Budget LXC** + - NEW Script + ## 2024-04-03 ### Changed From 43c369f3d24cb7d9281eb757d50cb48c6661abfd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Apr 2024 13:43:42 -0400 Subject: [PATCH 2893/3335] Create medusa-install.sh --- install/medusa-install.sh | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 install/medusa-install.sh diff --git a/install/medusa-install.sh b/install/medusa-install.sh new file mode 100644 index 00000000..93952a53 --- /dev/null +++ b/install/medusa-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y git-core +$STD apt-get install -y mediainfo +cat </etc/apt/sources.list.d/non-free.list +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +EOF +$STD apt-get update +$STD apt-get install -y unrar +rm /etc/apt/sources.list.d/non-free.list +msg_ok "Installed Dependencies" + +msg_info "Installing MiroTalk" +$STD git clone https://github.com/pymedusa/Medusa.git /opt/medusa +msg_ok "Installed MiroTalk" + +msg_info "Creating Service" +cat </etc/systemd/system/medusa.service +[Unit] +Description=Medusa Daemon +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/python3 /opt/medusa/start.py -q --nolaunch --datadir=/opt/medusa +TimeoutStopSec=25 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now medusa.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From e471e0f1627f2dc9da982c836be54cc4a727f139 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Apr 2024 13:44:34 -0400 Subject: [PATCH 2894/3335] Create medusa.sh --- ct/medusa.sh | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ct/medusa.sh diff --git a/ct/medusa.sh b/ct/medusa.sh new file mode 100644 index 00000000..d617a114 --- /dev/null +++ b/ct/medusa.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ __ + / |/ /__ ____/ /_ ___________ _ + / /|_/ / _ \/ __ / / / / ___/ __ `/ + / / / / __/ /_/ / /_/ (__ ) /_/ / +/_/ /_/\___/\__,_/\__,_/____/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Medusa" +var_disk="6" +var_cpu="2" +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 +if [[ ! -d /opt/medusa ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +systemctl stop medusa.service +/opt/medusa +git pull +systemctl start medusa.service +msg_ok "Successfully Updated ${APP}" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8081${CL} \n" From d127e4dfeb172df7d9265d1957511decbce77070 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Apr 2024 13:47:55 -0400 Subject: [PATCH 2895/3335] Update medusa-install.sh tweak --- install/medusa-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/medusa-install.sh b/install/medusa-install.sh index 93952a53..c2152c07 100644 --- a/install/medusa-install.sh +++ b/install/medusa-install.sh @@ -28,9 +28,9 @@ $STD apt-get install -y unrar rm /etc/apt/sources.list.d/non-free.list msg_ok "Installed Dependencies" -msg_info "Installing MiroTalk" +msg_info "Installing Medusa" $STD git clone https://github.com/pymedusa/Medusa.git /opt/medusa -msg_ok "Installed MiroTalk" +msg_ok "Installed Medusa" msg_info "Creating Service" cat </etc/systemd/system/medusa.service From 05c3945097981d22e160fd68cbb5c66759f22e95 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Apr 2024 04:05:47 -0400 Subject: [PATCH 2896/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52aefbaa..8a288a4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-05 + +### Changed + +- **Medusa LXC** + - NEW Script + ## 2024-04-04 ### Changed From f74e5e9a11fbad5813a3c59af80d11cdce7a8e1c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Apr 2024 05:07:46 -0400 Subject: [PATCH 2897/3335] Update nginxproxymanager.sh Maintain compatibility with older versions of Node.js fixes https://github.com/tteck/Proxmox/issues/2733 --- ct/nginxproxymanager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 16061a18..a65e8623 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -61,6 +61,7 @@ function update_script() { fi if ! command -v pnpm &> /dev/null; then msg_info "Installing pnpm" + export NODE_OPTIONS=--openssl-legacy-provider npm install -g pnpm@8.15 &>/dev/null msg_ok "Installed pnpm" fi From 463641e544eafb7ab318768042415d15e8ab1b1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Apr 2024 06:43:16 -0400 Subject: [PATCH 2898/3335] Create watchyourlan-install.sh --- install/watchyourlan-install.sh | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 install/watchyourlan-install.sh diff --git a/install/watchyourlan-install.sh b/install/watchyourlan-install.sh new file mode 100644 index 00000000..78fcf57a --- /dev/null +++ b/install/watchyourlan-install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y {curl,sudo,mc,gpg,arp-scan,ieee-data,libwww-perl} +msg_ok "Installed Dependencies" + +msg_info "Installing WatchYourLAN" +RELEASE=$(curl -s https://api.github.com/repos/aceberg/WatchYourLAN/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +wget -q https://github.com/aceberg/WatchYourLAN/releases/download/$RELEASE/watchyourlan_${RELEASE}_linux_amd64.deb +$STD dpkg -i watchyourlan_${RELEASE}_linux_amd64.deb +rm watchyourlan_${RELEASE}_linux_amd64.deb +mkdir /data +cat </data/config.yaml +arp_timeout: "500" +auth: false +auth_expire: 7d +auth_password: "" +auth_user: "" +color: dark +dbpath: /data/db.sqlite +guiip: 0.0.0.0 +guiport: "8840" +history_days: "30" +iface: eth0 +ignoreip: "no" +loglevel: verbose +shoutrrr_url: "" +theme: solar +timeout: 60 +EOF +msg_ok "Installed WatchYourLAN" + +msg_info "Creating Service" +sed -i 's|/etc/watchyourlan/config.yaml|/data/config.yaml|' /lib/systemd/system/watchyourlan.service +systemctl enable -q --now watchyourlan.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From 9f184bd9c99e9cc2b9ff26ab6ba80cc91bdea8dc Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Apr 2024 06:44:37 -0400 Subject: [PATCH 2899/3335] Create watchyourlan.sh --- ct/watchyourlan.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 ct/watchyourlan.sh diff --git a/ct/watchyourlan.sh b/ct/watchyourlan.sh new file mode 100644 index 00000000..93eba4d1 --- /dev/null +++ b/ct/watchyourlan.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ ____ __ __ ___ _ __ +| | / /___ _/ /______/ /\ \/ /___ __ _______/ / / | / | / / +| | /| / / __ `/ __/ ___/ __ \ / __ \/ / / / ___/ / / /| | / |/ / +| |/ |/ / /_/ / /_/ /__/ / / / / /_/ / /_/ / / / /___/ ___ |/ /| / +|__/|__/\__,_/\__/\___/_/ /_/_/\____/\__,_/_/ /_____/_/ |_/_/ |_/ + +EOF +} +header_info +echo -e "Loading..." +APP="WatchYourLAN" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -f /lib/systemd/system/watchyourlan.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop watchyourlan.service +cp -R /data/config.yaml config.yaml +RELEASE=$(curl -s https://api.github.com/repos/aceberg/WatchYourLAN/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +wget -q https://github.com/aceberg/WatchYourLAN/releases/download/$RELEASE/watchyourlan_${RELEASE}_linux_amd64.deb +dpkg -i watchyourlan_${RELEASE}_linux_amd64.deb +cp -R config.yaml /data/config.yaml +sed -i 's|/etc/watchyourlan/config.yaml|/data/config.yaml|' /lib/systemd/system/watchyourlan.service +rm watchyourlan_${RELEASE}_linux_amd64.deb config.yaml +systemctl enable -q --now watchyourlan.service +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8840${CL} \n" From 466fae49a30cb20f10580e81819ccfac32e6dfb9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Apr 2024 08:43:31 -0400 Subject: [PATCH 2900/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index aba91e05..b22fbb9d 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -121,7 +121,7 @@ $STD /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/us mkdir -p /usr/local/include/libusb-1.0 $STD /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' ldconfig -cd ~ +cd / wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite cp /opt/frigate/labelmap.txt /labelmap.txt From fe0b379ed1526adccfb5c0f7488eba1a05fce866 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Apr 2024 16:19:04 -0400 Subject: [PATCH 2901/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a288a4c..4f39f106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **Medusa LXC** - NEW Script +- **WatchYourLAN LXC** + - NEW Script ## 2024-04-04 From 932b69a8c47299048d49cb1167d7726091223008 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 6 Apr 2024 09:05:33 -0400 Subject: [PATCH 2902/3335] Update sabnzbd-install.sh fixes https://github.com/tteck/Proxmox/issues/2739 --- install/sabnzbd-install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 00bd1141..b206c82f 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -19,10 +19,12 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y par2 $STD apt-get install -y p7zip-full -RELEASE=$(curl -s http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/ | grep -oP 'href="\K[^"]*unrar_7\.\d+\.\d+-\d+_amd64\.deb' | head -1) -wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/$RELEASE -$STD dpkg -i unrar*.deb -rm unrar*.deb +cat </etc/apt/sources.list.d/non-free.list +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +EOF +$STD apt-get update +$STD apt-get install -y unrar +rm /etc/apt/sources.list.d/non-free.list msg_ok "Installed Dependencies" msg_info "Updating Python3" From 2847d9cc9a121c2eba55cccc93b1413f1a3a652a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Mon, 8 Apr 2024 14:44:02 -0400 Subject: [PATCH 2903/3335] Fix CPU model path in basic config (model now downloaded at root of filesystem) (#2758) --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index b22fbb9d..84b5dcc0 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -80,7 +80,7 @@ cat </config/config.yml mqtt: enabled: false model: - path: /root/cpu_model.tflite + path: /cpu_model.tflite cameras: test: ffmpeg: From 1cded8c053f9f1bb202881b95d714faaa68b6399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Mon, 8 Apr 2024 21:21:08 -0400 Subject: [PATCH 2904/3335] Fix openvino model generation in Frigate install script (#2762) * get pip from APT * Add openvino model conversion to make it readily available --- install/frigate-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 84b5dcc0..63830910 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -18,9 +18,7 @@ $STD apt-get install -y {curl,sudo,mc,git,gpg,automake,build-essential,xz-utils, msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" -$STD apt-get install -y {python3,python3-dev,python3-setuptools,python3-distutils} -wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py -$STD python3 get-pip.py --quiet "pip" +$STD apt-get install -y {python3,python3-dev,python3-setuptools,python3-distutils,python3-pip} msg_ok "Installed Python3 Dependencies" msg_info "Installing Node.js" @@ -104,7 +102,8 @@ msg_info "Installing Object Detection Models (Resilience)" $STD pip install -r /opt/frigate/docker/main/requirements-ov.txt cd /opt/frigate/models export ENABLE_ANALYTICS=NO -$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 +$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2 +$STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo cd .. export CCACHE_DIR=/root/.ccache export CCACHE_MAXSIZE=2G From 55175f9b315372cf961be494c9125f0bfaacbf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Mon, 8 Apr 2024 21:41:54 -0400 Subject: [PATCH 2905/3335] Update default config to leverage openvino (#2763) --- install/frigate-install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 63830910..98141d85 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -77,8 +77,18 @@ sed -i '/^s6-svc -O \.$/s/^/#/' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s cat </config/config.yml mqtt: enabled: false +detectors: + ov: + type: openvino + device: AUTO + model: + path: /openvino-model/FP16/ssdlite_mobilenet_v2.xml model: - path: /cpu_model.tflite + width: 300 + height: 300 + input_tensor: nhwc + input_pixel_format: bgr + labelmap_path: /openvino-model/coco_91cl_bkgr.txt cameras: test: ffmpeg: From 112353334dd384d7bee5cc88bac375bc07e39f4d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 17:22:24 -0400 Subject: [PATCH 2906/3335] Update linkwarden.sh Add `yarn prisma generate` to the update process. --- ct/linkwarden.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index e2bf2fa5..ba109a09 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -66,6 +66,7 @@ fi git pull yarn npx playwright install-deps +yarn prisma generate yarn build yarn prisma migrate deploy systemctl start linkwarden From a6add9a72767f05f5eced7c2fa193fe7f88a30de Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 17:56:35 -0400 Subject: [PATCH 2907/3335] Update linkwarden.sh Tweak `function update_script()` --- ct/linkwarden.sh | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index ba109a09..e5c0494a 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -55,22 +55,31 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/linkwarden ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" -systemctl stop linkwarden -cd /opt/linkwarden -if git pull | grep -q 'Already up to date'; then - msg_ok "Already up to date" + +RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping ${APP}" + systemctl stop linkwarden + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt/linkwarden + git pull + yarn + npx playwright install-deps + yarn prisma generate + yarn build + yarn prisma migrate deploy + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting ${APP}" systemctl start linkwarden - exit + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}." fi -git pull -yarn -npx playwright install-deps -yarn prisma generate -yarn build -yarn prisma migrate deploy -systemctl start linkwarden -msg_ok "Updated $APP" exit } From 1ccb2de7f6d68e2c0f0b3e341c88ee26eb0aef5f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 18:33:28 -0400 Subject: [PATCH 2908/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f39f106..856fed84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-09 + +### Changed + +- **PairDrop LXC** + - Add back to website + ## 2024-04-05 ### Changed From c52eec1a8e607cf5ec4b5b8c3f6fcbad65ac1efe Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 19:35:36 -0400 Subject: [PATCH 2909/3335] Update ombi-install.sh tweak --- install/ombi-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/ombi-install.sh b/install/ombi-install.sh index c5e631e7..f2659917 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -20,9 +20,9 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Ombi" -LATEST=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -# wget -q https://github.com/Ombi-app/Ombi/releases/download/${LATEST}/linux-x64.tar.gz -wget -q https://github.com/Ombi-app/Ombi/releases/download/v4.43.2/linux-x64.tar.gz +RELEASE=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +wget -q https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-x64.tar.gz +#wget -q https://github.com/Ombi-app/Ombi/releases/download/v4.43.2/linux-x64.tar.gz mkdir -p /opt/ombi tar -xzf linux-x64.tar.gz -C /opt/ombi msg_ok "Installed Ombi" From 98ee62bca03837bfad36a689359a0ea4035514b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 19:36:46 -0400 Subject: [PATCH 2910/3335] Update ombi.sh Add update path --- ct/ombi.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ct/ombi.sh b/ct/ombi.sh index 658182dc..27da5680 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -55,7 +55,25 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/ombi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +RELEASE=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping ${APP}" + systemctl stop ombi + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP} to ${RELEASE}" + wget -q https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-x64.tar.gz + tar -xzf linux-x64.tar.gz -C /opt/ombi + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting ${APP}" + systemctl start ombi + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} ia already at ${RELEASE}." +fi exit } From 38bca8fe176476b07594abd39489aa45f69181d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 19:43:59 -0400 Subject: [PATCH 2911/3335] Update ombi-install.sh tweak --- install/ombi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ombi-install.sh b/install/ombi-install.sh index f2659917..624beeda 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Ombi" RELEASE=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) wget -q https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-x64.tar.gz -#wget -q https://github.com/Ombi-app/Ombi/releases/download/v4.43.2/linux-x64.tar.gz +echo "${RELEASE}" >/opt/${APP}_version.txt mkdir -p /opt/ombi tar -xzf linux-x64.tar.gz -C /opt/ombi msg_ok "Installed Ombi" From 0e02de596fea6747227dd74612ccaea40f15c972 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 19:49:55 -0400 Subject: [PATCH 2912/3335] Update ombi-install.sh revert --- install/ombi-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ombi-install.sh b/install/ombi-install.sh index 624beeda..9f29d972 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Ombi" RELEASE=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) wget -q https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-x64.tar.gz -echo "${RELEASE}" >/opt/${APP}_version.txt +#echo "${RELEASE}" >/opt/${app}_version.txt mkdir -p /opt/ombi tar -xzf linux-x64.tar.gz -C /opt/ombi msg_ok "Installed Ombi" From ba68b641de1f1c0e5a742537e7f85b40a1d3424a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 20:18:26 -0400 Subject: [PATCH 2913/3335] Update ombi-install.sh tweak --- install/ombi-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ombi-install.sh b/install/ombi-install.sh index 9f29d972..ff313504 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -22,9 +22,10 @@ msg_ok "Installed Dependencies" msg_info "Installing Ombi" RELEASE=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) wget -q https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-x64.tar.gz -#echo "${RELEASE}" >/opt/${app}_version.txt +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt mkdir -p /opt/ombi tar -xzf linux-x64.tar.gz -C /opt/ombi +rm -rf linux-x64.tar.gz msg_ok "Installed Ombi" msg_info "Creating Service" From f77d5f01fb32fef64654837e870d9796fc4afe3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 20:21:39 -0400 Subject: [PATCH 2914/3335] Update ombi.sh Remove `.tar.gz` --- ct/ombi.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/ombi.sh b/ct/ombi.sh index 27da5680..4e53aa6b 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -64,6 +64,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} msg_info "Updating ${APP} to ${RELEASE}" wget -q https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-x64.tar.gz tar -xzf linux-x64.tar.gz -C /opt/ombi + rm -rf linux-x64.tar.gz echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" From 594dc7e19ca081d6ea3a309dd303dcb6659572df Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 9 Apr 2024 20:27:12 -0400 Subject: [PATCH 2915/3335] Update linkwarden-install.sh tweak --- install/linkwarden-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 6ad52ab0..c01c289f 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -70,6 +70,8 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi msg_info "Installing Linkwarden (Patience)" +RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt $STD yarn $STD npx playwright install-deps IP=$(hostname -I | awk '{print $1}') From a9742f18cdd098dad51c225235af3d9d816c8945 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 06:56:56 -0400 Subject: [PATCH 2916/3335] Update heimdalldashboard.sh tweak update function --- ct/heimdalldashboard.sh | 79 +++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index bdc4889c..d79ac706 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -55,49 +55,50 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP}" -systemctl stop heimdall -sleep 1 -msg_ok "Stopped ${APP}" - -msg_info "Backing up Data" -cp -R /opt/Heimdall/database database-backup -cp -R /opt/Heimdall/public public-backup -sleep 1 -msg_ok "Backed up Data" - RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -msg_info "Updating Heimdall Dashboard to ${RELEASE}" -wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz -tar xzf ${RELEASE}.tar.gz -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -cp -R Heimdall-${VER}/* /opt/Heimdall -cd /opt/Heimdall -apt-get install -y composer &>/dev/null -COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null -msg_ok "Updated Heimdall Dashboard to ${RELEASE}" +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping ${APP}" + systemctl stop heimdall + sleep 1 + msg_ok "Stopped ${APP}" -msg_info "Restoring Data" -cd ~ -cp -R database-backup/* /opt/Heimdall/database -cp -R public-backup/* /opt/Heimdall/public -sleep 1 -msg_ok "Restored Data" + msg_info "Backing up Data" + cp -R /opt/Heimdall/database database-backup + cp -R /opt/Heimdall/public public-backup + sleep 1 + msg_ok "Backed up Data" -msg_info "Cleanup" -rm -rf ${RELEASE}.tar.gz -rm -rf Heimdall-${VER} -rm -rf public-backup -rm -rf database-backup -rm -rf Heimdall -sleep 1 -msg_ok "Cleaned" + msg_info "Updating Heimdall Dashboard to ${RELEASE}" + echo "${RELEASE}" >/opt/${APP}_version.txt + wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz + tar xzf ${RELEASE}.tar.gz + VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + cp -R Heimdall-${VER}/* /opt/Heimdall + cd /opt/Heimdall + apt-get install -y composer &>/dev/null + COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null + msg_ok "Updated Heimdall Dashboard to ${RELEASE}" -msg_info "Starting ${APP}" -systemctl start heimdall.service -sleep 2 -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" + msg_info "Restoring Data" + cd ~ + cp -R database-backup/* /opt/Heimdall/database + cp -R public-backup/* /opt/Heimdall/public + sleep 1 + msg_ok "Restored Data" + + msg_info "Cleanup" + rm -rf {${RELEASE}.tar.gz,Heimdall-${VER},public-backup,database-backup,Heimdall} + sleep 1 + msg_ok "Cleaned" + + msg_info "Starting ${APP}" + systemctl start heimdall.service + sleep 2 + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} ia already at ${RELEASE}." +fi exit } From a6e5eefb3450c2cae57203af97e2de0c8f022bd8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 07:00:25 -0400 Subject: [PATCH 2917/3335] Update heimdalldashboard.sh tweak --- ct/heimdalldashboard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index d79ac706..338251c0 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -18,7 +18,7 @@ EOF } header_info echo -e "Loading..." -APP="Heimdall Dashboard" +APP="Heimdall-Dashboard" var_disk="2" var_cpu="1" var_ram="512" From 9c0f6b6a0c8fa1ae8f178633857790727feb4ddc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 07:07:48 -0400 Subject: [PATCH 2918/3335] Update and rename heimdalldashboard-install.sh to heimdall-dashboard-install.sh --- ...eimdalldashboard-install.sh => heimdall-dashboard-install.sh} | 1 + 1 file changed, 1 insertion(+) rename install/{heimdalldashboard-install.sh => heimdall-dashboard-install.sh} (97%) diff --git a/install/heimdalldashboard-install.sh b/install/heimdall-dashboard-install.sh similarity index 97% rename from install/heimdalldashboard-install.sh rename to install/heimdall-dashboard-install.sh index 644e0c57..a7d87559 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdall-dashboard-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y php8.2-{bz2,curl,sqlite3,zip,xml} msg_ok "Installed Dependencies" RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_info "Installing Heimdall Dashboard ${RELEASE}" wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz tar xzf ${RELEASE}.tar.gz From 2ef0f9f5c6d984cd2dd1e1341bde0ef319c346f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 07:13:55 -0400 Subject: [PATCH 2919/3335] Rename heimdalldashboard.sh to heimdall-dashboard.sh --- ct/{heimdalldashboard.sh => heimdall-dashboard.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{heimdalldashboard.sh => heimdall-dashboard.sh} (100%) diff --git a/ct/heimdalldashboard.sh b/ct/heimdall-dashboard.sh similarity index 100% rename from ct/heimdalldashboard.sh rename to ct/heimdall-dashboard.sh From a38c9f84e09fe72d17e8b37dabe992fd440a5ae1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 07:20:01 -0400 Subject: [PATCH 2920/3335] Update heimdall-dashboard.sh fix fat finger --- ct/heimdall-dashboard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/heimdall-dashboard.sh b/ct/heimdall-dashboard.sh index 338251c0..68843941 100644 --- a/ct/heimdall-dashboard.sh +++ b/ct/heimdall-dashboard.sh @@ -97,7 +97,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} msg_ok "Started ${APP}" msg_ok "Updated Successfully" else - msg_ok "No update required. ${APP} ia already at ${RELEASE}." + msg_ok "No update required. ${APP} is already at ${RELEASE}." fi exit } From de9beedd52d30e84841bdd437e736abffc794911 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 07:34:23 -0400 Subject: [PATCH 2921/3335] Update heimdall-dashboard.sh tweak --- ct/heimdall-dashboard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/heimdall-dashboard.sh b/ct/heimdall-dashboard.sh index 68843941..04db1ea7 100644 --- a/ct/heimdall-dashboard.sh +++ b/ct/heimdall-dashboard.sh @@ -69,7 +69,6 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} msg_ok "Backed up Data" msg_info "Updating Heimdall Dashboard to ${RELEASE}" - echo "${RELEASE}" >/opt/${APP}_version.txt wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz tar xzf ${RELEASE}.tar.gz VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') @@ -77,6 +76,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} cd /opt/Heimdall apt-get install -y composer &>/dev/null COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated Heimdall Dashboard to ${RELEASE}" msg_info "Restoring Data" From 4fecdcaa6a438bf024701a0f1773e31104922475 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 10 Apr 2024 20:02:02 -0400 Subject: [PATCH 2922/3335] Update filebrowser.sh add `curl` --- misc/filebrowser.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index f15d0537..c4cc0e8d 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -65,6 +65,7 @@ function msg_ok() { read -r -p "Would you like to use No Authentication? " prompt msg_info "Installing ${APP}" +apt-get install -y curl &>/dev/null RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null From 9c19734b5b3e0910bc2fa3dc60867251003b58bd Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Apr 2024 14:43:56 -0400 Subject: [PATCH 2923/3335] Update actualbudget.sh Increase build resources for weak CPUs --- ct/actualbudget.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index e9fedbf9..20ee5cdc 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -20,8 +20,8 @@ header_info echo -e "Loading..." APP="Actual Budget" var_disk="4" -var_cpu="1" -var_ram="1024" +var_cpu="2" +var_ram="2048" var_os="debian" var_version="12" variables @@ -68,7 +68,10 @@ exit start build_container description - +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 1024 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5006${CL} \n" From 42bd22d96d3d164373db62948e8f855ecea1fc5a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 11 Apr 2024 19:14:56 -0400 Subject: [PATCH 2924/3335] Update pimox-haos-vm.sh fix `function PVE_CHECK()` --- vm/pimox-haos-vm.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index fb0bfb31..3810f14c 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -84,9 +84,8 @@ else exit fi function PVE_CHECK() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/7.[0-4]"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." sleep 2 exit From 170066a73bde55f1e8ec7e48bb826f769cd7038a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Apr 2024 06:30:20 -0400 Subject: [PATCH 2925/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 856fed84..eb93dad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-12 + +### Changed + +- **OpenMediaVault LXC** + - Removed from website + ## 2024-04-09 ### Changed From f956428321918506ea213c28dbb67baf6e88c4fa Mon Sep 17 00:00:00 2001 From: Ryan Freeman Date: Fri, 12 Apr 2024 17:13:39 +0100 Subject: [PATCH 2926/3335] Update pihole.sh to update PiHole service (#2781) Add pihole update functionality --- ct/pihole.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ct/pihole.sh b/ct/pihole.sh index 57c5e9c0..a9f23124 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -55,11 +55,12 @@ function default_settings() { function update_script() { header_info if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" +msg_info "Updating ${APP}" +set +e +pihole -up +msg_ok "Updated ${APP}" exit +fi } start From f984003ea8d53df515e57ac9cc0eca3e85d7dbef Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Apr 2024 17:04:27 -0400 Subject: [PATCH 2927/3335] Update pihole.sh Fixes https://github.com/tteck/Proxmox/issues/2783 --- ct/pihole.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/pihole.sh b/ct/pihole.sh index a9f23124..bd66c313 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -60,7 +60,6 @@ set +e pihole -up msg_ok "Updated ${APP}" exit -fi } start From 02efa7c07a807af0f57215ef2eb09efad9ae4333 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Apr 2024 23:53:22 -0400 Subject: [PATCH 2928/3335] Update homarr-install.sh fix install --- install/homarr-install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 0a7db8fa..2eb0ab4e 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -36,13 +36,15 @@ $STD npm install -g yarn msg_ok "Installed Node.js/Yarn" msg_info "Installing Homarr (Patience)" -mkdir -p /opt/homarr -RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | $STD tar -xz -C /opt && mv /opt/homarr-${RELEASE}/* /opt/homarr -rm -rf /opt/homarr-${RELEASE} +$STD git clone -b dev https://github.com/ajnart/homarr.git /opt/homarr +cat </opt/homarr/.env +DATABASE_URL="file:./database/db.sqlite" +NEXTAUTH_URL="http://localhost:3000" +NEXTAUTH_SECRET="$(openssl rand -base64 32)" +NEXT_PUBLIC_DISABLE_ANALYTICS="true" +DEFAULT_COLOR_SCHEME="dark" +EOF cd /opt/homarr -wget -q -O /opt/homarr/.env https://raw.githubusercontent.com/ajnart/homarr/dev/.env.example -sed -i 's|NEXTAUTH_SECRET="[^"]*"|NEXTAUTH_SECRET="'"$(openssl rand -base64 32)"'"|' /opt/homarr/.env $STD yarn install $STD yarn build $STD yarn db:migrate From 9f8c93a41627ad6b3fc546559e0f70c848fb95e2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 14 Apr 2024 23:53:59 -0400 Subject: [PATCH 2929/3335] Update homarr.sh modify `function update_script()` --- ct/homarr.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index a81bad4f..a42089f9 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -57,19 +57,15 @@ header_info if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP (Patience)" systemctl stop homarr -rm -rf /root/data-homarr-backup -rm -rf /root/database-homarr-backup -cp -R /opt/homarr/data /root/data-homarr-backup -cp -R /opt/homarr/database /root/database-homarr-backup -RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q -O- https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.tar.gz | tar -xz -C /opt -cp -R /opt/homarr-${RELEASE}/* /opt/homarr -cp -R /root/data-homarr-backup/* /opt/homarr/data -cp -R /root/database-homarr-backup/* /opt/homarr/database -rm -rf /opt/homarr-${RELEASE} cd /opt/homarr -yarn install &>/dev/null -yarn build &>/dev/null +if ! git pull; then + echo "Already up to date." + systemctl start homarr + echo "No update required." + exit +fi +yarn install +yarn build systemctl start homarr msg_ok "Updated $APP" exit From 42a256ca0eb62d85ec1bb9e33f7e70a0800a1886 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 00:03:10 -0400 Subject: [PATCH 2930/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb93dad0..f94d0f1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,13 @@ ### Changed +- **Homarr LXC** + - Add back to website + +## 2024-04-12 + +### Changed + - **OpenMediaVault LXC** - Removed from website From a256d4f9b608ea9a719bfe5f5a1a08b95dd19cb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 00:33:25 -0400 Subject: [PATCH 2931/3335] Update umbrel-install.sh tweak --- install/umbrel-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index 7ad1d5af..f0411f49 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -32,6 +32,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +#$STD apt-get autoremove +#$STD apt-get autoclean msg_ok "Cleaned" From 95573a728547eef48773032774e3831b4521d32e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 00:49:15 -0400 Subject: [PATCH 2932/3335] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f94d0f1f..51c26620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,14 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** -## 2024-04-12 +## 2024-04-15 ### Changed - **Homarr LXC** - Add back to website +- **Umbrel LXC** + - Add back to website ## 2024-04-12 From 4efb41620cf48224b91ae31b2eaf61c4be517353 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 01:01:45 -0400 Subject: [PATCH 2933/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51c26620..922ba2fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ - Add back to website - **Umbrel LXC** - Add back to website +- **OpenMediaVault LXC** + - Add back to website ## 2024-04-12 From edbaa1fbdc28d32662f5c5e6a895905bca1dd45b Mon Sep 17 00:00:00 2001 From: Ryan Freeman Date: Mon, 15 Apr 2024 13:27:12 +0100 Subject: [PATCH 2934/3335] iVentoy - updated (#2790) * Create iventoy.sh * Create iventoy-install.sh --- ct/iventoy.sh | 85 ++++++++++++++++++++++++++++++++++++++ install/iventoy-install.sh | 60 +++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 ct/iventoy.sh create mode 100644 install/iventoy-install.sh diff --git a/ct/iventoy.sh b/ct/iventoy.sh new file mode 100644 index 00000000..54e3dc6d --- /dev/null +++ b/ct/iventoy.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ _ __ __ + (_) | / /__ ____ / /_____ __ __ + / /| | / / _ \/ __ \/ __/ __ \/ / / / + / / | |/ / __/ / / / /_/ /_/ / /_/ / +/_/ |___/\___/_/ /_/\__/\____/\__, / + /____/ + +EOF +} +header_info +echo -e "Loading..." +APP="iVentoy" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /opt/iventoy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP} LXC" +systemctl stop iventoy.service +msg_ok "Stopped ${APP} LXC" + +msg_info "Updating ${APP} LXC" +rm -rf /opt/iventoy +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +wget -q $(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep download | grep linux-free | cut -d\" -f4) +tar -C /opt/iventoy -xzf iventoy*.tar.gz +rm -rf iventoy*.tar.gz +msg_ok "Updated ${APP} LXC" + +msg_info "Starting ${APP} LXC" +systemctl start iventoy.service +msg_ok "Started ${APP} LXC" +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:26000/ ${CL} \n" diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh new file mode 100644 index 00000000..791438e5 --- /dev/null +++ b/install/iventoy-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing iVentoy" +mkdir -p /opt/iventoy/ + +wget -q $(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep download | grep linux-free | cut -d\" -f4) +tar -C /opt/iventoy -xzf iventoy*.tar.gz +rm -rf iventoy*.tar.gz + +msg_ok "Installed iVentoy" + +msg_info "Creating Service" +service_path="/etc/systemd/system/iventoy.service" +echo "# /etc/systemd/system/iventoy.service +[Unit] +Description=iVentoy PXE Booter +Documentation=https://www.iventoy.com +Wants=network-online.target + +[Service] +Type=forking +Environment=IVENTOY_API_ALL=1 +Environment=IVENTOY_AUTO_RUN=1 +Environment=LIBRARY_PATH=/opt/iventoy/lib/lin64 +Environment=LD_LIBRARY_PATH=/opt/iventoy/lib/lin64 +ExecStart=sh ./iventoy.sh -R start +WorkingDirectory=/opt/iventoy +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q iventoy.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From dbe21ab5396ecdba8776cb4cd6334687aa45ab62 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 08:35:06 -0400 Subject: [PATCH 2935/3335] Update iventoy-install.sh tweak --- install/iventoy-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh index 791438e5..6c48ab46 100644 --- a/install/iventoy-install.sh +++ b/install/iventoy-install.sh @@ -29,8 +29,7 @@ rm -rf iventoy*.tar.gz msg_ok "Installed iVentoy" msg_info "Creating Service" -service_path="/etc/systemd/system/iventoy.service" -echo "# /etc/systemd/system/iventoy.service +cat </etc/systemd/system/iventoy.service [Unit] Description=iVentoy PXE Booter Documentation=https://www.iventoy.com @@ -47,8 +46,9 @@ WorkingDirectory=/opt/iventoy Restart=on-failure [Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q iventoy.service +WantedBy=multi-user.target +EOF +systemctl enable -q --now iventoy.service msg_ok "Created Service" motd_ssh From 6d296e0fdf655ea950faca8bb553386d2b0a23f3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 08:55:40 -0400 Subject: [PATCH 2936/3335] Update iventoy-install.sh tweak --- install/iventoy-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh index 6c48ab46..d5534e59 100644 --- a/install/iventoy-install.sh +++ b/install/iventoy-install.sh @@ -21,11 +21,10 @@ msg_ok "Installed Dependencies" msg_info "Installing iVentoy" mkdir -p /opt/iventoy/ - wget -q $(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep download | grep linux-free | cut -d\" -f4) -tar -C /opt/iventoy -xzf iventoy*.tar.gz +tar -xzf iventoy*.tar.gz +mv iventoy-* /opt/iventoy rm -rf iventoy*.tar.gz - msg_ok "Installed iVentoy" msg_info "Creating Service" From 22d755d66f25170bb5f6c1d428cf2ccdecc5eebb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 09:00:29 -0400 Subject: [PATCH 2937/3335] Delete install/iventoy-install.sh non-functional --- install/iventoy-install.sh | 59 -------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 install/iventoy-install.sh diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh deleted file mode 100644 index d5534e59..00000000 --- a/install/iventoy-install.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/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" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -msg_ok "Installed Dependencies" - -msg_info "Installing iVentoy" -mkdir -p /opt/iventoy/ -wget -q $(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep download | grep linux-free | cut -d\" -f4) -tar -xzf iventoy*.tar.gz -mv iventoy-* /opt/iventoy -rm -rf iventoy*.tar.gz -msg_ok "Installed iVentoy" - -msg_info "Creating Service" -cat </etc/systemd/system/iventoy.service -[Unit] -Description=iVentoy PXE Booter -Documentation=https://www.iventoy.com -Wants=network-online.target - -[Service] -Type=forking -Environment=IVENTOY_API_ALL=1 -Environment=IVENTOY_AUTO_RUN=1 -Environment=LIBRARY_PATH=/opt/iventoy/lib/lin64 -Environment=LD_LIBRARY_PATH=/opt/iventoy/lib/lin64 -ExecStart=sh ./iventoy.sh -R start -WorkingDirectory=/opt/iventoy -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now iventoy.service -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" From 9fc3901444fbbd3f7f1145568127ec9df539f58e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 Apr 2024 09:00:55 -0400 Subject: [PATCH 2938/3335] Delete ct/iventoy.sh non-functional --- ct/iventoy.sh | 85 --------------------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 ct/iventoy.sh diff --git a/ct/iventoy.sh b/ct/iventoy.sh deleted file mode 100644 index 54e3dc6d..00000000 --- a/ct/iventoy.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - _ _ __ __ - (_) | / /__ ____ / /_____ __ __ - / /| | / / _ \/ __ \/ __/ __ \/ / / / - / / | |/ / __/ / / / /_/ /_/ / /_/ / -/_/ |___/\___/_/ /_/\__/\____/\__, / - /____/ - -EOF -} -header_info -echo -e "Loading..." -APP="iVentoy" -var_disk="2" -var_cpu="1" -var_ram="512" -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 -if [[ ! -d /opt/iventoy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP} LXC" -systemctl stop iventoy.service -msg_ok "Stopped ${APP} LXC" - -msg_info "Updating ${APP} LXC" -rm -rf /opt/iventoy -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -wget -q $(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep download | grep linux-free | cut -d\" -f4) -tar -C /opt/iventoy -xzf iventoy*.tar.gz -rm -rf iventoy*.tar.gz -msg_ok "Updated ${APP} LXC" - -msg_info "Starting ${APP} LXC" -systemctl start iventoy.service -msg_ok "Started ${APP} LXC" -msg_ok "Updated Successfully" -exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:26000/ ${CL} \n" From 9cfad87e3ba0ba91f6fc324d202af81a42ac76ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Mon, 15 Apr 2024 12:47:22 -0400 Subject: [PATCH 2939/3335] Mount frigate video cache into memory to avoid hard drive overheating and overuse (#2795) --- install/frigate-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 98141d85..85b07c87 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -106,6 +106,7 @@ cameras: EOF ln -sf /config/config.yml /opt/frigate/config/config.yml sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group +echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab msg_ok "Installed Frigate $RELEASE" msg_info "Installing Object Detection Models (Resilience)" From 049a8096d339bec4fdedcb9c84b6d40aae91ea90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Tue, 16 Apr 2024 05:39:00 -0400 Subject: [PATCH 2940/3335] Check CPU AVX instruction support before installing OpenVino model (#2796) --- install/frigate-install.sh | 53 ++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 85b07c87..fef31f83 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -77,18 +77,6 @@ sed -i '/^s6-svc -O \.$/s/^/#/' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s cat </config/config.yml mqtt: enabled: false -detectors: - ov: - type: openvino - device: AUTO - model: - path: /openvino-model/FP16/ssdlite_mobilenet_v2.xml -model: - width: 300 - height: 300 - input_tensor: nhwc - input_pixel_format: bgr - labelmap_path: /openvino-model/coco_91cl_bkgr.txt cameras: test: ffmpeg: @@ -109,13 +97,38 @@ sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/ echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab msg_ok "Installed Frigate $RELEASE" -msg_info "Installing Object Detection Models (Resilience)" -$STD pip install -r /opt/frigate/docker/main/requirements-ov.txt -cd /opt/frigate/models -export ENABLE_ANALYTICS=NO -$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2 -$STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo -cd .. +if grep -q -o -m1 'avx[^ ]*' /proc/cpuinfo; then + echo -e "AVX support detected" + msg_info "Installing Openvino Object Detection Model (Resilience)" + $STD pip install -r /opt/frigate/docker/main/requirements-ov.txt + cd /opt/frigate/models + export ENABLE_ANALYTICS=NO + $STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2 + $STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo + cat <>/config/config.yml +detectors: + ov: + type: openvino + device: AUTO + model: + path: /openvino-model/FP16/ssdlite_mobilenet_v2.xml +model: + width: 300 + height: 300 + input_tensor: nhwc + input_pixel_format: bgr + labelmap_path: /openvino-model/coco_91cl_bkgr.txt +EOF + msg_ok "Installed Openvino Object Detection Model (Resilience)" +else + cat <>/config/config.yml +model: + path: /cpu_model.tflite +EOF +fi + +msg_info "Installing Coral Object Detection Model (Resilience)" +cd /opt/frigate export CCACHE_DIR=/root/.ccache export CCACHE_MAXSIZE=2G wget -q https://github.com/libusb/libusb/archive/v1.0.26.zip @@ -142,7 +155,7 @@ wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/class cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt mkdir -p /media/frigate wget -qO /media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 -msg_ok "Installed Object Detection Models" +msg_ok "Installed Coral Object Detection Model" msg_info "Building Nginx with Custom Modules" $STD /opt/frigate/docker/main/build_nginx.sh From b6b1e8db4afe55ba91606f477dde2526964c7eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Tue, 16 Apr 2024 16:09:11 -0400 Subject: [PATCH 2941/3335] Move the remaining openvino commands in the AVX conditional block (copy the model and labels in the appropriate folder) (#2801) --- install/frigate-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index fef31f83..500320a9 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -105,6 +105,10 @@ if grep -q -o -m1 'avx[^ ]*' /proc/cpuinfo; then export ENABLE_ANALYTICS=NO $STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2 $STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo + cd / + cp -r /opt/frigate/models/public/ssdlite_mobilenet_v2 openvino-model + wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt + sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt cat <>/config/config.yml detectors: ov: @@ -148,9 +152,6 @@ cd / wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite cp /opt/frigate/labelmap.txt /labelmap.txt -cp -r /opt/frigate/models/public/ssdlite_mobilenet_v2 openvino-model -wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt -sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt mkdir -p /media/frigate From 77c92e0102fc110fdb0ce4826903df5506c1fe9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Apr 2024 23:39:56 -0400 Subject: [PATCH 2942/3335] Update hw-acceleration.sh tweak --- misc/hw-acceleration.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 24d2e2de..7b61a0a1 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -4,6 +4,8 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE +# Execute within the Proxmox shell +# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hw-acceleration.sh)" set -e function header_info { @@ -39,9 +41,9 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then +if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 8.0 or higher" + echo -e "Requires PVE Version 8.1 or higher" echo -e "Exiting..." sleep 2 exit @@ -83,11 +85,11 @@ lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF -read -r -p "Do you need the intel-media-va-driver-non-free driver (Sources change)? " prompt +read -r -p "Do you need the intel-media-va-driver-non-free driver (Non-free Sources Added)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then header_info msg_info "Installing Hardware Acceleration (non-free)" - pct exec ${privileged_container} -- bash -c "cat </etc/apt/sources.list + pct exec ${privileged_container} -- bash -c "cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware @@ -99,7 +101,7 @@ deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware EOF" - pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" + pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" msg_ok "Installed Hardware Acceleration (non-free)" else header_info From 07a3a8aa79d532b3b48055b148ac000bf22124d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Apr 2024 00:00:49 -0400 Subject: [PATCH 2943/3335] Update hw-acceleration.sh tweak --- misc/hw-acceleration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/hw-acceleration.sh b/misc/hw-acceleration.sh index 7b61a0a1..19a0b140 100644 --- a/misc/hw-acceleration.sh +++ b/misc/hw-acceleration.sh @@ -85,7 +85,7 @@ lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF -read -r -p "Do you need the intel-media-va-driver-non-free driver (Non-free Sources Added)? " prompt +read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then header_info msg_info "Installing Hardware Acceleration (non-free)" From 00f661c9f54d0539694ad824998120419601656b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Wed, 17 Apr 2024 13:21:26 -0400 Subject: [PATCH 2944/3335] [Frigate] Update Nginx config to output access and error logs to the service log file (/dev/shm) (#2808) --- install/frigate-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 500320a9..f8a4aa62 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -161,8 +161,8 @@ msg_ok "Installed Coral Object Detection Model" msg_info "Building Nginx with Custom Modules" $STD /opt/frigate/docker/main/build_nginx.sh sed -i 's/exec nginx/exec \/usr\/local\/nginx\/sbin\/nginx/g' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run -sed -i 's/error_log \/dev\/stdout warn\;/error_log nginx\.err warn\;/' /usr/local/nginx/conf/nginx.conf -sed -i 's/access_log \/dev\/stdout main\;/access_log nginx\.log main\;/' /usr/local/nginx/conf/nginx.conf +sed -i 's/error_log \/dev\/stdout warn\;/error_log \/dev\/shm\/logs\/nginx\/current warn\;/' /usr/local/nginx/conf/nginx.conf +sed -i 's/access_log \/dev\/stdout main\;/access_log \/dev\/shm\/logs\/nginx\/current main\;/' /usr/local/nginx/conf/nginx.conf msg_ok "Built Nginx" msg_info "Creating Services" From 39a1c119402cd8ebff8b5f1cdf9ebf99807257cd Mon Sep 17 00:00:00 2001 From: Marc Cizeron <60599068+marc-cizeron@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:21:36 +0200 Subject: [PATCH 2945/3335] Update actualbudget.sh (#2817) Fix update function --- ct/actualbudget.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 20ee5cdc..b4ff4d62 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -57,7 +57,7 @@ header_info if [[ ! -d /opt/actualbudget ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" systemctl stop actualbudget.service -/opt/actualbudget +cd /opt/actualbudget git pull yarn install systemctl start actualbudget.service From fb4fdab433790bf6a1871fa4f1ab76c5355c16c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Fri, 19 Apr 2024 10:48:10 -0400 Subject: [PATCH 2946/3335] Clear log files upon service restart to avoid misleading log rewrites (#2819) --- install/frigate-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index f8a4aa62..ce3c81a0 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -191,6 +191,7 @@ Type=simple Restart=always RestartSec=1 User=root +ExecStartPre=+rm /dev/shm/logs/go2rtc/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run StandardOutput=file:/dev/shm/logs/go2rtc/current StandardError=file:/dev/shm/logs/go2rtc/current @@ -212,6 +213,7 @@ Type=simple Restart=always RestartSec=1 User=root +ExecStartPre=+rm /dev/shm/logs/frigate/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run StandardOutput=file:/dev/shm/logs/frigate/current StandardError=file:/dev/shm/logs/frigate/current @@ -233,6 +235,7 @@ Type=simple Restart=always RestartSec=1 User=root +ExecStartPre=+rm /dev/shm/logs/nginx/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run StandardOutput=file:/dev/shm/logs/nginx/current StandardError=file:/dev/shm/logs/nginx/current From ff3216aa92749f702ca344e9dd605b34fafc422c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Apr 2024 11:04:50 -0400 Subject: [PATCH 2947/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index ce3c81a0..2d9598f3 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -98,7 +98,7 @@ echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab msg_ok "Installed Frigate $RELEASE" if grep -q -o -m1 'avx[^ ]*' /proc/cpuinfo; then - echo -e "AVX support detected" + msg_ok "AVX support detected" msg_info "Installing Openvino Object Detection Model (Resilience)" $STD pip install -r /opt/frigate/docker/main/requirements-ov.txt cd /opt/frigate/models From 6f6d83c2617f15a931faaeb831b0867270c5076e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Apr 2024 11:06:40 -0400 Subject: [PATCH 2948/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 2d9598f3..5166413e 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -123,7 +123,7 @@ model: input_pixel_format: bgr labelmap_path: /openvino-model/coco_91cl_bkgr.txt EOF - msg_ok "Installed Openvino Object Detection Model (Resilience)" + msg_ok "Installed Openvino Object Detection Model" else cat <>/config/config.yml model: From 45205da9a621f2166b88a29cd6eb07416e291366 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 19 Apr 2024 11:30:27 -0400 Subject: [PATCH 2949/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 5166413e..383b8370 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -98,7 +98,7 @@ echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab msg_ok "Installed Frigate $RELEASE" if grep -q -o -m1 'avx[^ ]*' /proc/cpuinfo; then - msg_ok "AVX support detected" + msg_ok "AVX Support Detected" msg_info "Installing Openvino Object Detection Model (Resilience)" $STD pip install -r /opt/frigate/docker/main/requirements-ov.txt cd /opt/frigate/models @@ -131,7 +131,7 @@ model: EOF fi -msg_info "Installing Coral Object Detection Model (Resilience)" +msg_info "Installing Coral Object Detection Model (Patience)" cd /opt/frigate export CCACHE_DIR=/root/.ccache export CCACHE_MAXSIZE=2G From da964fcacc3227ef1f5c84e90cf1ee4c997261c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Sat, 20 Apr 2024 03:17:37 -0400 Subject: [PATCH 2950/3335] Add scripts for Calibre-web (#2812) --- ct/calibre-web.sh | 166 +++++++++++++++++++++++++++++++++ install/calibre-web-install.sh | 64 +++++++++++++ 2 files changed, 230 insertions(+) create mode 100644 ct/calibre-web.sh create mode 100644 install/calibre-web-install.sh diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh new file mode 100644 index 00000000..d4ae2740 --- /dev/null +++ b/ct/calibre-web.sh @@ -0,0 +1,166 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ ___ __ __ + / ____/___ _/ (_) /_ ________ _ _____ / /_ + / / / __ `/ / / __ \/ ___/ _ \_____| | /| / / _ \/ __ \ +/ /___/ /_/ / / / /_/ / / / __/_____/ |/ |/ / __/ /_/ / +\____/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Calibre-web" +var_disk="4" +var_cpu="2" +var_ram="2048" +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() { + if [[ ! -f /etc/systemd/system/cps.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + header_info + msg_info "Updating $APP LXC" + systemctl stop cps + cd /opt/kepubify + rm kepubify-linux-64bit + curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null + chmod +x kepubify-linux-64bit + rm /opt/calibre-web/metadata.db + wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web + menu_array=("1" "Enables gdrive as storage backend for your ebooks" OFF \ + "2" "Enables sending emails via a googlemail account without enabling insecure apps" OFF \ + "3" "Enables displaying of additional author infos on the authors page" OFF \ + "4" "Enables login via LDAP server" OFF \ + "5" "Enables login via google or github oauth" OFF \ + "6" "Enables extracting of metadata from epub, fb2, pdf files, and also extraction of covers from cbr, cbz, cbt files" OFF \ + "7" "Enables extracting of metadata from cbr, cbz, cbt files" OFF \ + "8" "Enables syncing with your kobo reader" OFF ) + if [ -f "/opt/calibre-web/options.txt" ]; then + cps_options="$(cat /opt/calibre-web/options.txt)" + IFS=',' read -ra ADDR <<< "$cps_options" + for i in "${ADDR[@]}"; do + if [ $i == "gdrive" ]; then + line=0 + elif [ $i == "gmail" ]; then + line=1 + elif [ $i == "goodreads" ]; then + line=2 + elif [ $i == "ldap" ]; then + line=3 + elif [ $i == "oauth" ]; then + line=4 + elif [ $i == "metadata" ]; then + line=5 + elif [ $i == "comics" ]; then + line=6 + elif [ $i == "kobo" ]; then + line=7 + fi + array_index=$(( 3*line + 2 )) + menu_array[$array_index]=ON + done + fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + CHOICES=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CALIBRE-WEB OPTIONS" --separate-output --checklist "Choose Additional Options" 15 125 8 "${menu_array[@]}" 3>&1 1>&2 2>&3) + spinner & + SPINNER_PID=$! + if [ ! -z "$CHOICES" ]; then + declare -a options + for CHOICE in $CHOICES; do + case "$CHOICE" in + "1") + options+=( gdrive ) + ;; + "2") + options+=( gmail ) + ;; + "3") + options+=( goodreads ) + ;; + "4") + options+=( ldap ) + apt-get install -qqy libldap2-dev libsasl2-dev + ;; + "5") + options+=( oauth ) + ;; + "6") + options+=( metadata ) + ;; + "7") + options+=( comics ) + ;; + "8") + options+=( kobo ) + ;; + *) + echo "Unsupported item $CHOICE!" >&2 + exit 1 + ;; + esac + done + fi + if [ ! -z "$options" ] && [ ${#options[@]} -gt 0 ]; then + cps_options=$(IFS=, ; echo "${options[*]}") + echo $cps_options > /opt/calibre-web/options.txt + pip install --upgrade calibreweb[$cps_options] + else + rm /opt/calibre-web/options.txt 2> /dev/null + pip install --upgrade calibreweb + fi + systemctl start cps + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 512 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8083${CL} \n" diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh new file mode 100644 index 00000000..1e2be2f6 --- /dev/null +++ b/install/calibre-web-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y python3 python3-pip imagemagick +msg_ok "Installed Dependencies" + +msg_info "Installing calibre-web" +mkdir -p /opt/kepubify +cd /opt/kepubify +curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null +chmod +x kepubify-linux-64bit +mkdir -p /opt/calibre-web +$STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web +$STD pip install calibreweb +msg_ok "Installed calibre-web" + +msg_info "Creating Service" +service_path="/etc/systemd/system/cps.service" +echo "[Unit] +Description=Calibre-Web Server +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/calibre-web +ExecStart=/usr/local/bin/cps +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target" >$service_path +systemctl enable --now -q cps.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" + +echo -e "Default login for Calibre-web: + user: ${BL}admin${CL} + password: ${BL}admin123${CL}" +echo -e "${YW}Run the update script inside the container to install calibre-web optional dependencies (such as ldap or kobo support).${CL}" \ No newline at end of file From e3b4543ef5e069d1323e1eff8d5aee9c1247b86c Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Sat, 20 Apr 2024 17:18:51 +1000 Subject: [PATCH 2951/3335] Aria2 LXC - Updated (#2826) --- ct/aria2.sh | 74 ++++++++++++++++++++++++++++++ install/aria2-install.sh | 98 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 ct/aria2.sh create mode 100644 install/aria2-install.sh diff --git a/ct/aria2.sh b/ct/aria2.sh new file mode 100644 index 00000000..51f601f9 --- /dev/null +++ b/ct/aria2.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ _ ___ + / | _____(_)___ |__ \ + / /| | / ___/ / __ `/_/ / + / ___ |/ / / / /_/ / __/ +/_/ |_/_/ /_/\__,_/____/ + + +EOF +} +header_info +echo -e "Loading..." +APP="Aria2" +var_disk="8" +var_cpu="2" +var_ram="1028" +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 +if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be accessible via the following IP. + ${BL}http://${IP}:6800${CL}" +echo -e "AriaNG should be reachable by going to the following URL. + ${BL}http://${IP}:6880${CL} \n" diff --git a/install/aria2-install.sh b/install/aria2-install.sh new file mode 100644 index 00000000..e57b9e8a --- /dev/null +++ b/install/aria2-install.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Aria2" +$STD apt-get install -y aria2 +msg_ok "Installed Aria2" + +read -r -p "Would you like to add AriaNG? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing AriaNG" + $STD apt-get install -y nginx + systemctl disable -q --now nginx + wget -q "$(curl -s https://api.github.com/repos/mayswind/ariang/releases/latest | grep download | grep AllInOne.zip | cut -d\" -f4)" + $STD unzip AriaNg-*-AllInOne.zip -d /var/www + rm /etc/nginx/sites-enabled/* + cat </etc/nginx/conf.d/ariang.conf +server { + listen 6880 default_server; + listen [::]:6880 default_server; + + server_name _; + + root /var/www; + index index.html; + + location / { + try_files \$uri \$uri/ =404; + } +} +EOF + cp /lib/systemd/system/nginx.service /lib/systemd/system/ariang.service + msg_ok "Installed AriaNG" +fi + +msg_info "Creating Service" +mkdir /root/downloads +rpc_secret=$(openssl rand -base64 8) +echo "rpc-secret: $rpc_secret" >>~/rpc.secret +cat </root/aria2.daemon +dir=/root/downloads +file-allocation=falloc +max-connection-per-server=4 +max-concurrent-downloads=2 +max-overall-download-limit=0 +min-split-size=25M +rpc-allow-origin-all=true +rpc-secret=${rpc_secret} +input-file=/var/tmp/aria2c.session +save-session=/var/tmp/aria2c.session +EOF + +cat </etc/systemd/system/aria2.service +[Unit] +Description=Aria2c download manager +After=network.target + +[Service] +Type=simple +User=root +Group=root +ExecStartPre=/usr/bin/env touch /var/tmp/aria2c.session +ExecStart=/usr/bin/aria2c --console-log-level=warn --enable-rpc --rpc-listen-all --conf-path=/root/aria2.daemon +TimeoutStopSec=20 +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now aria2.service +systemctl enable -q --now ariang +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm AriaNg-*-AllInOne.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" \ No newline at end of file From 337c1c700ab258cad54c6d095de27184ce4e4d9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Apr 2024 03:20:54 -0400 Subject: [PATCH 2952/3335] Update aria2.sh tweak --- ct/aria2.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ct/aria2.sh b/ct/aria2.sh index 51f601f9..c04ecc5d 100644 --- a/ct/aria2.sh +++ b/ct/aria2.sh @@ -8,13 +8,11 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ___ _ ___ + ___ _ ___ / | _____(_)___ |__ \ / /| | / ___/ / __ `/_/ / - / ___ |/ / / / /_/ / __/ -/_/ |_/_/ /_/\__,_/____/ - - + / ___ |/ / / / /_/ / __/ +/_/ |_/_/ /_/\__,_/____/ EOF } header_info @@ -70,5 +68,3 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be accessible via the following IP. ${BL}http://${IP}:6800${CL}" -echo -e "AriaNG should be reachable by going to the following URL. - ${BL}http://${IP}:6880${CL} \n" From 7a72c82ece3a6b21fc630cb615db5d704b123bc2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Apr 2024 03:22:18 -0400 Subject: [PATCH 2953/3335] Update calibre-web.sh tweak --- ct/calibre-web.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index d4ae2740..6f309f54 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -9,12 +9,12 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ ___ __ __ - / ____/___ _/ (_) /_ ________ _ _____ / /_ + ______ ___ __ __ + / ____/___ _/ (_) /_ ________ _ _____ / /_ / / / __ `/ / / __ \/ ___/ _ \_____| | /| / / _ \/ __ \ / /___/ /_/ / / / /_/ / / / __/_____/ |/ |/ / __/ /_/ / -\____/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/ - +\____/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/ + EOF } header_info From b7051d1fc01ff8c4b74b5bf78439a36b6e91c4ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Apr 2024 03:34:32 -0400 Subject: [PATCH 2954/3335] Update calibre-web-install.sh tweak --- install/calibre-web-install.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh index 1e2be2f6..834c989f 100644 --- a/install/calibre-web-install.sh +++ b/install/calibre-web-install.sh @@ -18,22 +18,29 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y python3 python3-pip imagemagick +$STD apt-get install -y imagemagick msg_ok "Installed Dependencies" -msg_info "Installing calibre-web" +msg_info "Installing Python Dependencies" +$STD apt-get -y install python3-pip +msg_ok "Installed Python Dependencies" + +msg_info "Installing Kepubify" mkdir -p /opt/kepubify cd /opt/kepubify curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null chmod +x kepubify-linux-64bit +msg_ok "Installed Kepubify" + +msg_info "Installing Calibre-Web" mkdir -p /opt/calibre-web $STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web $STD pip install calibreweb -msg_ok "Installed calibre-web" +msg_ok "Installed Calibre-Web" msg_info "Creating Service" -service_path="/etc/systemd/system/cps.service" -echo "[Unit] +cat </etc/systemd/system/cps.service +[Unit] Description=Calibre-Web Server After=network.target @@ -46,8 +53,9 @@ KillMode=process Restart=on-failure [Install] -WantedBy=multi-user.target" >$service_path -systemctl enable --now -q cps.service +WantedBy=multi-user.target +EOF +systemctl enable -q --now cps.service msg_ok "Created Service" motd_ssh @@ -57,8 +65,3 @@ msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned" - -echo -e "Default login for Calibre-web: - user: ${BL}admin${CL} - password: ${BL}admin123${CL}" -echo -e "${YW}Run the update script inside the container to install calibre-web optional dependencies (such as ldap or kobo support).${CL}" \ No newline at end of file From 486041a4d0299ab421affc8ef21cce9068f2afb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Apr 2024 03:38:08 -0400 Subject: [PATCH 2955/3335] Update calibre-web.sh tweak --- ct/calibre-web.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index 6f309f54..bee859ab 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -9,11 +9,11 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ ___ __ __ - / ____/___ _/ (_) /_ ________ _ _____ / /_ - / / / __ `/ / / __ \/ ___/ _ \_____| | /| / / _ \/ __ \ -/ /___/ /_/ / / / /_/ / / / __/_____/ |/ |/ / __/ /_/ / -\____/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/ + ______ ___ __ _ __ __ + / ____/___ _/ (_) /_ ________ | | / /__ / /_ + / / / __ `/ / / __ \/ ___/ _ \___| | /| / / _ \/ __ \ +/ /___/ /_/ / / / /_/ / / / __/___/ |/ |/ / __/ /_/ / +\____/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/ EOF } From 96230582748bc9881cc201963932e3b9a44fd638 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Apr 2024 03:38:40 -0400 Subject: [PATCH 2956/3335] Update calibre-web.sh --- ct/calibre-web.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index bee859ab..69752501 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -19,7 +19,7 @@ EOF } header_info echo -e "Loading..." -APP="Calibre-web" +APP="Calibre-Web" var_disk="4" var_cpu="2" var_ram="2048" From 82b6e743f140b62ae218ffca78438baa265449fe Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Apr 2024 04:01:18 -0400 Subject: [PATCH 2957/3335] Update pimox-haos-vm.sh Remove `function PVE_CHECK()` --- vm/pimox-haos-vm.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 3810f14c..4e1c4766 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -83,14 +83,6 @@ else echo -e "⚠ User exited script \n" exit fi -function PVE_CHECK() { - if ! pveversion | grep -Eq "pve-manager/7.[0-4]"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Exiting..." - sleep 2 - exit - fi -} function ARCH_CHECK() { ARCH=$(dpkg --print-architecture) if [[ "$ARCH" == "amd64" ]]; then @@ -257,7 +249,6 @@ function START_SCRIPT() { fi } ARCH_CHECK -PVE_CHECK START_SCRIPT while read -r line; do TAG=$(echo $line | awk '{print $1}') From 4ccf823d7abf445c9aac43e217504f9386426b96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 09:11:46 -0400 Subject: [PATCH 2958/3335] Update install.func Spinner update --- misc/install.func | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/install.func b/misc/install.func index 578bf0a8..ab0b7d5d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -12,7 +12,7 @@ color() { CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" - HOLD="-" + HOLD=" " } # This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" @@ -49,13 +49,13 @@ error_handler() { # This function displays a spinner. spinner() { - printf "\e[?25l" - spinner="/-\\|/-\\|" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.2 - done + local chars="/-\|" + local spin_i=0 + printf "\e[?25l" + while true; do + printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" + sleep 0.1 + done } # This function displays an informational message with a yellow color. From bdb7126a38c3dfe40e34de65f0da2621107cc702 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 09:12:55 -0400 Subject: [PATCH 2959/3335] Update create_lxc.sh Spinner update --- ct/create_lxc.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 010dffb8..f5218600 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -17,7 +17,7 @@ CL=$(echo "\033[m") CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" -HOLD="-" +HOLD=" " # This sets error handling options and defines the error_handler function to handle errors set -Eeuo pipefail @@ -36,13 +36,13 @@ function error_handler() { # This function displays a spinner. function spinner() { - printf "\e[?25l" - spinner="/-\\|/-\\|" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done + local chars="/-\|" + local spin_i=0 + printf "\e[?25l" + while true; do + printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" + sleep 0.1 + done } # This function displays an informational message with a yellow color. From dafa19a6086abb41d8c3f9656f26169ba2ef34b3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 09:14:33 -0400 Subject: [PATCH 2960/3335] Update build.func Spinner update --- misc/build.func | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index bac97de5..c259eeaa 100644 --- a/misc/build.func +++ b/misc/build.func @@ -16,7 +16,7 @@ color() { CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" BFR="\\r\\033[K" - HOLD="-" + HOLD=" " } # This function enables error handling in the script by setting options and defining a trap for the ERR signal. @@ -38,13 +38,13 @@ error_handler() { # This function displays a spinner. spinner() { - printf "\e[?25l" - spinner="/-\\|/-\\|" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done + local chars="/-\|" + local spin_i=0 + printf "\e[?25l" + while true; do + printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" + sleep 0.1 + done } # This function displays an informational message with a yellow color. From 80482414c4f8596b7c234f451f1fe4a70a84c714 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 10:34:30 -0400 Subject: [PATCH 2961/3335] Update aria2.sh Correct port --- ct/aria2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/aria2.sh b/ct/aria2.sh index c04ecc5d..a0ad7ac5 100644 --- a/ct/aria2.sh +++ b/ct/aria2.sh @@ -67,4 +67,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be accessible via the following IP. - ${BL}http://${IP}:6800${CL}" + ${BL}http://${IP}:6880${CL}" From f17592cfc73109ea5873da0f5bfe9dce9615a1d7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 10:35:54 -0400 Subject: [PATCH 2962/3335] Update aria2.sh tweak --- ct/aria2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/aria2.sh b/ct/aria2.sh index a0ad7ac5..7fc96b97 100644 --- a/ct/aria2.sh +++ b/ct/aria2.sh @@ -66,5 +66,5 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${APP} should be accessible via the following IP. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:6880${CL}" From 7ebc6ea84f402e20a706debf0a2986cf7ece84a4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 11:25:36 -0400 Subject: [PATCH 2963/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 922ba2fa..6cae7987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-21 + +### Changed + +- **Aria2 LXC** + - NEW Script + ## 2024-04-15 ### Changed From 1fb93b326fd028b7fb15fd7d6a6e5f245e787be6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 23:11:42 -0400 Subject: [PATCH 2964/3335] Update dashy.sh Update `function update_script()` --- ct/dashy.sh | 65 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index b06a3955..314802db 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -55,38 +55,49 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." -exit -msg_info "Stopping ${APP}" -systemctl stop dashy -msg_ok "Stopped ${APP}" -msg_info "Backing up conf.yml" -cd ~ -cp -R /opt/dashy/public/conf.yml conf.yml -msg_ok "Backed up conf.yml" +RELEASE=$(curl -sL https://api.github.com/repos/Lissy93/dashy/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping ${APP}" + systemctl stop dashy + msg_ok "Stopped ${APP}" -msg_info "Updating Dashy" -cd /opt/dashy -git merge &>/dev/null -git pull origin master &>/dev/null -yarn &>/dev/null -yarn build &>/dev/null -msg_ok "Updated Dashy" + msg_info "Backing up conf.yml" + cd ~ + if [[ -f /opt/dashy/public/conf.yml ]]; then + cp -R /opt/dashy/public/conf.yml conf.yml + else + cp -R /opt/dashy/user-data/conf.yml conf.yml + fi + msg_ok "Backed up conf.yml" -msg_info "Restoring conf.yml" -cd ~ -cp -R conf.yml /opt/dashy/public -msg_ok "Restored conf.yml" + msg_info "Updating ${APP} to ${RELEASE}" + rm -rf /opt/dashy + mkdir -p /opt/dashy + wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 + sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json + cd /opt/dashy + yarn &>/dev/null + yarn build &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" -msg_info "Cleaning" -rm -rf conf.yml -msg_ok "Cleaned" + msg_info "Restoring conf.yml" + cd ~ + cp -R conf.yml /opt/dashy/user-data + msg_ok "Restored conf.yml" -msg_info "Starting Dashy" -systemctl start dashy -msg_ok "Started Dashy" -msg_ok "Updated Successfully" + msg_info "Cleaning" + rm -rf conf.yml /opt/dashy/public/conf.yml + msg_ok "Cleaned" + + msg_info "Starting Dashy" + systemctl start dashy + msg_ok "Started Dashy" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi exit } From 67cad1583bd862f558fdd29f91acf7a05f927c12 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Apr 2024 23:13:45 -0400 Subject: [PATCH 2965/3335] Update dashy-install.sh tweak --- install/dashy-install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index d0709fb5..fce07cc5 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -29,19 +29,20 @@ ln -sf /usr/local/bin/node /usr/bin/node msg_ok "Installed Node.js" msg_info "Installing Yarn" -$STD npm install --global yarn +$STD npm install -g yarn ln -sf /usr/local/bin/yarn /usr/bin/yarn msg_ok "Installed Yarn" -msg_info "Installing Dashy (Patience)" +RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +msg_info "Installing Dashy ${RELEASE} (Patience)" mkdir -p /opt/dashy -#RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -#wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 -wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/2.1.1.tar.gz | tar -xz -C /opt/dashy --strip-components=1 +wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 cd /opt/dashy +sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json $STD yarn $STD yarn build -msg_ok "Installed Dashy" +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Dashy ${RELEASE}" msg_info "Creating Service" cat </etc/systemd/system/dashy.service From c042b7c5278f503712c628622d6da2d9c5b0301a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Apr 2024 06:38:43 -0400 Subject: [PATCH 2966/3335] Update haos-vm.sh Spinner update --- vm/haos-vm.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index fff4f939..ceb9f0d8 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -33,7 +33,7 @@ GN=$(echo "\033[1;92m") DGN=$(echo "\033[32m") CL=$(echo "\033[m") BFR="\\r\\033[K" -HOLD="-" +HOLD=" " CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" THIN="discard=on,ssd=1," @@ -74,13 +74,13 @@ else fi function spinner() { - printf "\e[?25l" - spinner="◐◓◑◒" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done + local chars="/-\|" + local spin_i=0 + printf "\e[?25l" + while true; do + printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" + sleep 0.1 + done } function msg_info() { @@ -396,6 +396,8 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + printf "\e[?25h" STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ From bf4a04528b971288994d38b5fcd5ff468ea20c88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Apr 2024 06:55:18 -0400 Subject: [PATCH 2967/3335] Update build.func - Check for spaces and length in passwords - fixes https://github.com/tteck/Proxmox/issues/2843 --- misc/build.func | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/misc/build.func b/misc/build.func index c259eeaa..785fb6a6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -230,17 +230,24 @@ advanced_settings() { fi done - if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW="" + while true; do + if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z "$PW1" ]; then + PW1="Automatic Login" + PW="" + elif [[ "$PW1" == *" "* ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [ "${#PW1}" -lt 5 ]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + break + fi else - PW="-password $PW1" + exit-script fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - else - exit-script - fi + done if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if [ -z "$CT_ID" ]; then From cfd4c979a1fb6e1733a53a1c47066d788d27708e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Apr 2024 07:23:12 -0400 Subject: [PATCH 2968/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 785fb6a6..93d99410 100644 --- a/misc/build.func +++ b/misc/build.func @@ -237,7 +237,7 @@ advanced_settings() { PW="" elif [[ "$PW1" == *" "* ]]; then whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [ "${#PW1}" -lt 5 ]; then + elif [ ${#PW1} -ge 1 ] && [ ${#PW1} -lt 5 ]; then whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 else PW="-password $PW1" From c073351b4c9bd91c1fbb7f7172c3b9a79d47de61 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Apr 2024 07:35:57 -0400 Subject: [PATCH 2969/3335] Update build.func tweak --- misc/build.func | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 93d99410..439055ff 100644 --- a/misc/build.func +++ b/misc/build.func @@ -232,15 +232,19 @@ advanced_settings() { while true; do if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z "$PW1" ]; then + if [[ ! -z "$PW1" ]]; then + if [[ "$PW1" == *" "* ]]; then + whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 + elif [ ${#PW1} -lt 5 ]; then + whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 + else + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" + break + fi + else PW1="Automatic Login" PW="" - elif [[ "$PW1" == *" "* ]]; then - whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 - elif [ ${#PW1} -ge 1 ] && [ ${#PW1} -lt 5 ]; then - whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 - else - PW="-password $PW1" echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" break fi @@ -249,6 +253,7 @@ advanced_settings() { fi done + if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if [ -z "$CT_ID" ]; then CT_ID="$NEXTID" From dc6c21a85f5f6917fb6f2f90392fa4d260914116 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Apr 2024 10:34:50 -0400 Subject: [PATCH 2970/3335] Update homepage-install.sh Refactor --- install/homepage-install.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 7e7dc650..8d2bf340 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -17,11 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -47,11 +43,12 @@ cd /opt/homepage cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install $STD pnpm build +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Homepage v${RELEASE}" msg_info "Creating Service" -service_path="/etc/systemd/system/homepage.service" -echo "[Unit] +cat </etc/systemd/system/homepage.service +[Unit] Description=Homepage After=network.target StartLimitIntervalSec=0 @@ -63,8 +60,9 @@ User=root WorkingDirectory=/opt/homepage/ ExecStart=pnpm start [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now homepage +WantedBy=multi-user.target +EOF +systemctl enable -q --now homepage msg_ok "Created Service" motd_ssh From f20d65a606f6b6cd5f524f3f6151a9045591767d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Apr 2024 10:36:16 -0400 Subject: [PATCH 2971/3335] Update homepage.sh Refactor --- ct/homepage.sh | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/ct/homepage.sh b/ct/homepage.sh index 5107f65b..dca0e9c4 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -55,26 +55,31 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then - if ! command -v npm >/dev/null 2>&1; then - echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 - echo "Installed NPM..." - fi +if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + npm install -g pnpm >/dev/null 2>&1 + echo "Installed NPM..." fi +fi RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Updating Homepage to v${RELEASE} (Patience)" -systemctl stop homepage -wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz -tar -xzf v${RELEASE}.tar.gz -cp -r homepage-${RELEASE}/* /opt/homepage/ -rm -rf homepage-${RELEASE} -cd /opt/homepage -npx update-browserslist-db@latest -pnpm install -pnpm build -systemctl start homepage -msg_ok "Updated Homepage to v${RELEASE}" +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating Homepage to v${RELEASE} (Patience)" + systemctl stop homepage + wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz + tar -xzf v${RELEASE}.tar.gz + cp -r homepage-${RELEASE}/* /opt/homepage/ + rm -rf homepage-${RELEASE} + cd /opt/homepage + npx update-browserslist-db@latest + pnpm install + pnpm build + systemctl start homepage + msg_ok "Updated Homepage to v${RELEASE}" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi exit } From 3ff48e3dae61fa813f224f61dad9e1d498d43ae8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Apr 2024 09:11:59 -0400 Subject: [PATCH 2972/3335] Update build.func Add 8.2 to `pve_check()` --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 439055ff..d23bc2a2 100644 --- a/misc/build.func +++ b/misc/build.func @@ -98,7 +98,7 @@ pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 fi - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[0-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." From 93f791e59246c6805abaaf08747ab7afe94335d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Apr 2024 09:43:00 -0400 Subject: [PATCH 2973/3335] Add PVE 8.2 to `pve_check()` --- misc/build.func | 2 +- vm/debian-vm.sh | 2 +- vm/haos-vm.sh | 2 +- vm/nextcloud-vm.sh | 2 +- vm/openwrt.sh | 2 +- vm/owncloud-vm.sh | 2 +- vm/ubuntu-vm.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index d23bc2a2..8d09d8fa 100644 --- a/misc/build.func +++ b/misc/build.func @@ -98,7 +98,7 @@ pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 fi - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[0-2])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 3f2db4f6..6a20b717 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -92,7 +92,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index ceb9f0d8..4c82712a 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -115,7 +115,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index ff62c7df..23cc5606 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -91,7 +91,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 5ebb5ec4..0afca1cb 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -157,7 +157,7 @@ function msg_error() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 7fbe8be6..006a4649 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -91,7 +91,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu-vm.sh index be9edc88..5fffcf0d 100644 --- a/vm/ubuntu-vm.sh +++ b/vm/ubuntu-vm.sh @@ -92,7 +92,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo -e "Exiting..." From c828d38ba4611f3483082badc944cb944cd2a47e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Apr 2024 10:29:14 -0400 Subject: [PATCH 2974/3335] Create traccar-install.sh --- install/traccar-install.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 install/traccar-install.sh diff --git a/install/traccar-install.sh b/install/traccar-install.sh new file mode 100644 index 00000000..3a9b9eea --- /dev/null +++ b/install/traccar-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/traccar/traccar/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing Traccar v${RELEASE}" +wget -q https://github.com/traccar/traccar/releases/download/v${RELEASE}/traccar-linux-64-${RELEASE}.zip +$STD unzip traccar-linux-64-${RELEASE}.zip +$STD ./traccar.run +systemctl enable -q --now traccar +rm -rf README.txt traccar-linux-64-${RELEASE}.zip traccar.run +msg_ok "Installed Traccar v${RELEASE}" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From ef6abf4bd6b20d94d00828e0dc659a976340a540 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Apr 2024 10:30:09 -0400 Subject: [PATCH 2975/3335] Create traccar.sh --- ct/traccar.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/traccar.sh diff --git a/ct/traccar.sh b/ct/traccar.sh new file mode 100644 index 00000000..1b62939a --- /dev/null +++ b/ct/traccar.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ + /_ __/________ _______________ ______ + / / / ___/ __ `/ ___/ ___/ __ `/ ___/ + / / / / / /_/ / /__/ /__/ /_/ / / +/_/ /_/ \__,_/\___/\___/\__,_/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Traccar" +var_disk="2" +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 +if [[ ! -d /opt/traccar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8082${CL} \n" From 18bdaad1090a719e99d71b26d8372bf2dfdf30d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 24 Apr 2024 11:50:31 -0400 Subject: [PATCH 2976/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cae7987..f11c828c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-24 + +### Changed + +- **Traccar LXC** + - NEW Script +- **Calibre-Web LXC** + - NEW Script + ## 2024-04-21 ### Changed From 8651919e59c9b0a8a39f9da10bbe18942ad1b867 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 14:36:47 -0400 Subject: [PATCH 2977/3335] Update build.func Refactor for future unprivileged hardware transcoding --- misc/build.func | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/misc/build.func b/misc/build.func index 8d09d8fa..656dfedb 100644 --- a/misc/build.func +++ b/misc/build.func @@ -593,6 +593,22 @@ lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card0,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + else + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card1,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + fi + fi fi # This starts the container and executes -install.sh From faf98bc1f8ada8d141078322ad1be06cb1a46cc5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 14:42:39 -0400 Subject: [PATCH 2978/3335] Update jellyfin-install.sh Refactor to support unprivileged hardware transcoding. --- install/jellyfin-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 8b654903..ab6bf92d 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -20,16 +20,16 @@ $STD apt-get install -y gnupg $STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" msg_info "Installing Jellyfin" VERSION="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )" @@ -51,7 +51,11 @@ EOF # Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5) $STD apt-get update $STD apt-get install -y jellyfin -sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group +if [[ "$CTTYPE" == "0" ]]; then + sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group +else + sed -i -e 's/^ssl-cert:x:104:$/render:x:104:jellyfin/' -e 's/^render:x:108:jellyfin$/ssl-cert:x:108:/' /etc/group +fi msg_ok "Installed Jellyfin" motd_ssh From 781a2094019498bc6e1a63fff2c8d9737a2857ac Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 14:44:43 -0400 Subject: [PATCH 2979/3335] Update jellyfin.sh Default settings are now unprivileged --- ct/jellyfin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 6f5dfc8b..079836c2 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -30,7 +30,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From b9a45ab5a60e8b33fb8a878f56ab5aa16686362d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 14:57:04 -0400 Subject: [PATCH 2980/3335] Update CHANGELOG.md --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f11c828c..984a4523 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,17 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-25 + +### Changed + +- **Jellyfin LXC** + - Default settings are now **Unprivileged** + - Unprivileged Hardware Acceleration + - Groups are set automatically + - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` + - Set the GID for `/dev/dri/renderD128` to `104` + ## 2024-04-24 ### Changed From 6280950c31b79147187c633b989fde0f12bf7bf2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 14:58:59 -0400 Subject: [PATCH 2981/3335] Update plex-install.sh Refactor to support unprivileged hardware transcoding. --- install/plex-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install/plex-install.sh b/install/plex-install.sh index fd6f0089..e253be5a 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -19,16 +19,16 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" msg_info "Setting Up Plex Media Server Repository" wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key >/usr/share/keyrings/PlexSign.asc @@ -38,7 +38,11 @@ msg_ok "Set Up Plex Media Server Repository" msg_info "Installing Plex Media Server" $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver -sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:root,plex/' -e 's/^render:x:108:root$/ssl-cert:x:108:plex/' /etc/group +if [[ "$CTTYPE" == "0" ]]; then + sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:root,plex/' -e 's/^render:x:108:root$/ssl-cert:x:108:plex/' /etc/group +else + sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:plex/' -e 's/^render:x:108:$/ssl-cert:x:108:/' /etc/group +fi msg_ok "Installed Plex Media Server" motd_ssh From 7d7dd643fa48133ac985afb17f2d2125cf50c7e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 14:59:54 -0400 Subject: [PATCH 2982/3335] Update plex.sh Default settings are now unprivileged --- ct/plex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/plex.sh b/ct/plex.sh index 998fe17c..c112078e 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From b2b32c826e83194f6623fe8608dcc1d0c108ddcf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 15:01:40 -0400 Subject: [PATCH 2983/3335] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 984a4523..0f0853d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,12 @@ - Groups are set automatically - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` - Set the GID for `/dev/dri/renderD128` to `104` +- **Plex LXC** + - Default settings are now **Unprivileged** + - Unprivileged Hardware Acceleration + - Groups are set automatically + - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` + - Set the GID for `/dev/dri/renderD128` to `104` ## 2024-04-24 From 8f243c444e8cca7c0090d4b00311665ac55d075b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Apr 2024 15:15:31 -0400 Subject: [PATCH 2984/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f0853d6..58c83fbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,12 +20,14 @@ - Groups are set automatically - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` - Set the GID for `/dev/dri/renderD128` to `104` + - Not tested <8.2 - **Plex LXC** - Default settings are now **Unprivileged** - Unprivileged Hardware Acceleration - Groups are set automatically - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` - Set the GID for `/dev/dri/renderD128` to `104` + - Not tested <8.2 ## 2024-04-24 From 105fa6e8c458f85f6a3e951db730615b0bbb1505 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:25:27 +0200 Subject: [PATCH 2985/3335] Updated PostgreSQL (#2860) Updated Setup lines for PostgreSQL to match the ones from tandoor directly => https://docs.tandoor.dev/install/manual/#setup-postgresql. --- install/tandoor-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index fa0e0ac3..e317b9ab 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -81,6 +81,9 @@ $STD apt-get update $STD apt-get install -y postgresql-16 $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" echo "" >>~/tandoor.creds echo -e "Tandoor Database Name: \e[32m$DB_NAME\e[0m" >>~/tandoor.creds echo -e "Tandoor Database User: \e[32m$DB_USER\e[0m" >>~/tandoor.creds From afe93a2b48675ad2032216e36423004a153d5d96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 00:47:18 -0400 Subject: [PATCH 2986/3335] Update code-server.sh Add `curl` --- misc/code-server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/code-server.sh b/misc/code-server.sh index cbc140d9..919ea863 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -69,6 +69,7 @@ function msg_ok() { msg_info "Installing Dependencies" apt-get update &>/dev/null +apt-get install -y curl &>/dev/null apt-get install -y git &>/dev/null msg_ok "Installed Dependencies" From e857886838ead3254d3f4ec82b6d8274e11c298e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 01:04:05 -0400 Subject: [PATCH 2987/3335] Update code-server.sh tweak --- misc/code-server.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/code-server.sh b/misc/code-server.sh index 919ea863..0eb46dcf 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -79,17 +79,17 @@ VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest msg_info "Installing Code-Server v${VERSION}" curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb &>/dev/null -sudo dpkg -i code-server_${VERSION}_amd64.deb &>/dev/null +dpkg -i code-server_${VERSION}_amd64.deb &>/dev/null rm -rf code-server_${VERSION}_amd64.deb mkdir -p ~/.config/code-server/ -sudo systemctl enable --now code-server@$USER &>/dev/null +systemctl enable -q --now code-server@$USER cat <~/.config/code-server/config.yaml bind-addr: 0.0.0.0:8680 auth: none password: cert: false EOF -sudo systemctl restart code-server@$USER +systemctl restart code-server@$USER msg_ok "Installed Code-Server v${VERSION} on $hostname" echo -e "${APP} should be reachable by going to the following URL. From 4883cd7afeb2498e9fcb5e1918d9a41f484f90af Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 02:29:25 -0400 Subject: [PATCH 2988/3335] Create glances.sh --- misc/glances.sh | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 misc/glances.sh diff --git a/misc/glances.sh b/misc/glances.sh new file mode 100644 index 00000000..88bcf576 --- /dev/null +++ b/misc/glances.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ________ + / ____/ /___ _____ ________ _____ + / / __/ / __ `/ __ \/ ___/ _ \/ ___/ +/ /_/ / / /_/ / / / / /__/ __(__ ) +\____/_/\__,_/_/ /_/\___/\___/____/ + +EOF +} +IP=$(hostname -I | awk '{print $1}') +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD=" " +CM="${GN}✓${CL}" +APP="Glances" +hostname="$(hostname)" + +header_info +while true; do + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +spinner() { + local chars="/-\|" + local spin_i=0 + printf "\e[?25l" + while true; do + printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" + sleep 0.1 + done +} + +msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg} " + spinner & + SPINNER_PID=$! +} + +msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +msg_info "Installing $APP" +bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh)" &>/dev/null +cat </etc/systemd/system/glances.service +[Unit] +Description=Glances - An eye on your system +After=network.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/glances -w +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now glances.service +msg_ok "Installed $APP on $hostname" + +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://$IP:61208${CL} \n" From 8895888df211b0af4347248d77e3dafa31e8b3dd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 02:33:40 -0400 Subject: [PATCH 2989/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58c83fbf..e50e96b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-26 + +### Changed + +- **Glances** + - NEW Script + ## 2024-04-25 ### Changed From 95b7607d4eb77f0f81066c22edeccb53979907db Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 16:36:39 -0400 Subject: [PATCH 2990/3335] Update nginxproxymanager-install.sh Add certbot-dns-multi 4.16.1 --- install/nginxproxymanager-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index cf7ca741..0adf8f10 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -37,9 +37,8 @@ $STD apt-get install -y \ python3-pip \ python3-venv \ python3-cffi \ - python3-certbot \ - python3-certbot-dns-cloudflare -$STD pip3 install certbot_dns_porkbun + python3-certbot +$STD pip3 install certbot-dns-multi $STD pip3 install certbot-dns-duckdns $STD python3 -m venv /opt/certbot/ msg_ok "Installed Python Dependencies" From ccc91c033727ab23d2e824860d3a1af47213926f Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 16:53:52 -0400 Subject: [PATCH 2991/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 0adf8f10..714aae70 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -39,7 +39,6 @@ $STD apt-get install -y \ python3-cffi \ python3-certbot $STD pip3 install certbot-dns-multi -$STD pip3 install certbot-dns-duckdns $STD python3 -m venv /opt/certbot/ msg_ok "Installed Python Dependencies" From 1672c7fc0eb6e61a51f6a93c21fedb962efafcec Mon Sep 17 00:00:00 2001 From: Luke Hoggatt <37279082+hoggatt@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:28:52 -0500 Subject: [PATCH 2992/3335] Allow Updating WGDashboard (#2866) --- ct/wireguard.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index c8cc7c6f..1fb935f1 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -68,7 +68,11 @@ exit fi if [ "$UPD" == "2" ]; then if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then - msg_error "Existing WGDashboard Installation Found!"; + msg_info "Updating WGDashboard" + cd /etc/wgdashboard/src + yes "Y" | sudo ./wgd.sh update &>/dev/null + sudo chmod u+x wgd.sh + msg_ok "Updated Successfully" exit fi IP=$(hostname -I | awk '{print $1}') From aacc2b76e44e719fa04ec55b97baa1553f78a5be Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Apr 2024 22:36:31 -0400 Subject: [PATCH 2993/3335] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e50e96b9..eebf34e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,14 +27,14 @@ - Groups are set automatically - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` - Set the GID for `/dev/dri/renderD128` to `104` - - Not tested <8.2 + - Not tested <8.1.11 - **Plex LXC** - Default settings are now **Unprivileged** - Unprivileged Hardware Acceleration - Groups are set automatically - Checks for the existence of `/dev/dri/card0` if not found, use `/dev/dri/card1`. Set the GID to `44` - Set the GID for `/dev/dri/renderD128` to `104` - - Not tested <8.2 + - Not tested <8.1.11 ## 2024-04-24 From d22dd105fbb2795e6a7340e288a0af0a3e49c7ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 06:39:42 -0400 Subject: [PATCH 2994/3335] Update frigate-install.sh - Set up Unprivileged Hardware Acceleration - Use GUI Device Passthrough for TPU Devices --- install/frigate-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 383b8370..e5fe5f09 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -37,16 +37,16 @@ chmod +x go2rtc $STD ln -svf /usr/local/go2rtc/bin/go2rtc /usr/local/bin/go2rtc msg_ok "Installed go2rtc" +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) msg_info "Installing Frigate $RELEASE (Perseverance)" @@ -93,7 +93,11 @@ cameras: fps: 5 EOF ln -sf /config/config.yml /opt/frigate/config/config.yml -sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group +if [[ "$CTTYPE" == "0" ]]; then + sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group +else + sed -i -e 's/^kvm:x:104:$/render:x:104:frigate/' -e 's/^render:x:105:$/kvm:x:105:/' /etc/group +fi echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab msg_ok "Installed Frigate $RELEASE" From 38c144951f4f805ecf7455372019024b2138d4a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 07:02:40 -0400 Subject: [PATCH 2995/3335] Rename ubuntu-vm.sh to ubuntu2204-vm.sh --- vm/{ubuntu-vm.sh => ubuntu2204-vm.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename vm/{ubuntu-vm.sh => ubuntu2204-vm.sh} (100%) diff --git a/vm/ubuntu-vm.sh b/vm/ubuntu2204-vm.sh similarity index 100% rename from vm/ubuntu-vm.sh rename to vm/ubuntu2204-vm.sh From 0f9d3dea8a117705272bb05b8e40c88ca9e013d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 07:13:49 -0400 Subject: [PATCH 2996/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eebf34e3..7eecae7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-27 + +### Changed + +- **Frigate LXC** + - Unprivileged Hardware Acceleration (https://github.com/tteck/Proxmox/discussions/2711#discussioncomment-9244629) + ## 2024-04-26 ### Changed From 0ea0ee56f494fd368ff73c873d879d6496a904d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 07:17:35 -0400 Subject: [PATCH 2997/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eecae7f..73899557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ ### Changed - **Frigate LXC** - - Unprivileged Hardware Acceleration (https://github.com/tteck/Proxmox/discussions/2711#discussioncomment-9244629) + - Unprivileged Hardware Acceleration https://github.com/tteck/Proxmox/discussions/2711#discussioncomment-9244629 ## 2024-04-26 From a07e2e9dc676e57970682af51af824cf442faba3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 10:47:51 -0400 Subject: [PATCH 2998/3335] Update mikrotik-routeros.sh fix pve check --- vm/mikrotik-routeros.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 6f37776a..15e702f5 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -62,7 +62,7 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then echo "⚠ This version of Proxmox Virtual Environment is not supported" echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." echo "Exiting..." From fff310fe16c69d6e3dde508b5eb18d8403139ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Ruz=20Nieto?= <40019177+aruznieto@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:58:18 +0200 Subject: [PATCH 2999/3335] Create ubuntu2404-vm.sh (#2868) --- vm/ubuntu2404-vm.sh | 428 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 428 insertions(+) create mode 100644 vm/ubuntu2404-vm.sh diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh new file mode 100644 index 00000000..7869d189 --- /dev/null +++ b/vm/ubuntu2404-vm.sh @@ -0,0 +1,428 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ ____ __ ___ __ __ ____ __ __ _ ____ ___ + / / / / /_ __ ______ / /___ __ |__ \/ // / / __ \/ // / | | / / |/ / + / / / / __ \/ / / / __ \/ __/ / / / __/ / // /_ / / / / // /_ | | / / /|_/ / +/ /_/ / /_/ / /_/ / / / / /_/ /_/ / / __/__ __// /_/ /__ __/ | |/ / / / / +\____/_.___/\__,_/_/ /_/\__/\__,_/ /____/ /_/ (_)____/ /_/ |___/_/ /_/ + +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.04 VM" --yesno "This will create a New Ubuntu 24.04 VM. Proceed?" 10 58; then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + msg_error "This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="ubuntu" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="2048" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="no" + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}" + echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + echo -e "${BL}Creating an Ubuntu 24.04 VM using the above default settings${CL}" +} + +function advanced_settings() { + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 ubuntu --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="ubuntu" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="2048" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create an Ubuntu 24.04 VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating an Ubuntu 24.04 VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the Ubuntu 24.04 Disk Image" +URL=https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=$(basename $URL) +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a Ubuntu 24.04 VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ + -ide2 ${STORAGE}:cloudinit \ + -boot order=scsi0 \ + -serial0 socket \ + -description "
+ + # Ubuntu 24.04 VM + + +
" >/dev/null +msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting Ubuntu 24.04 VM" + qm start $VMID + msg_ok "Started Ubuntu 24.04 VM" +fi +msg_ok "Completed Successfully!\n" +echo -e "Setup Cloud-Init before starting \n +More info at https://github.com/tteck/Proxmox/discussions/2072 \n" From 93aa096169306d99939bd6c919ac1216dcb31674 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 11:06:02 -0400 Subject: [PATCH 3000/3335] Update glances.sh fixes https://github.com/tteck/Proxmox/issues/2870 --- misc/glances.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/glances.sh b/misc/glances.sh index 88bcf576..c40af8b4 100644 --- a/misc/glances.sh +++ b/misc/glances.sh @@ -65,6 +65,7 @@ msg_ok() { } msg_info "Installing $APP" +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh)" &>/dev/null cat </etc/systemd/system/glances.service [Unit] From 51b39f269bbc2ea3a72dcbcbde986c5f4121cb93 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Apr 2024 11:14:30 -0400 Subject: [PATCH 3001/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73899557..8c2bd0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **Frigate LXC** - Unprivileged Hardware Acceleration https://github.com/tteck/Proxmox/discussions/2711#discussioncomment-9244629 +- **Ubuntu 24.04 VM** + - NEW Script ## 2024-04-26 From 39ac55d024a76525468bfde6f94be33b88ef1bbc Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Sat, 27 Apr 2024 17:45:08 +0200 Subject: [PATCH 3002/3335] feat: script improvement on routerOS and OpenWRT (#2869) --- vm/openwrt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 0afca1cb..e3e32e9e 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -475,6 +475,7 @@ qm set $VMID \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -scsi0 ${DISK1_REF},size=512M \ -boot order=scsi0 \ + -tags proxmox-helper-scripts \ -description "
# OpenWRT From 5d6cec1dd7925cba2ef94a20596721d98d71216e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Apr 2024 06:25:43 -0400 Subject: [PATCH 3003/3335] Update scrypted-install.sh Add Unprivileged Hardware Acceleration --- install/scrypted-install.sh | 38 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index a85c2271..6e54f790 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -35,22 +35,20 @@ $STD apt-get -y install \ sudo \ mc \ ca-certificates \ - gnupg + gpg msg_ok "Installed Dependencies" +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - intel-opencl-icd chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" + msg_info "Installing GStreamer (Patience)" $STD apt-get -y install \ gstreamer1.0-tools \ @@ -98,24 +96,19 @@ $STD python3 -m pip install --upgrade pip $STD python3 -m pip install aiofiles debugpy typing_extensions typing msg_ok "Installed Python3 Dependencies" -read -r -p "Would you like to add Coral Edge TPU support? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Adding Coral Edge TPU Support" -wget -qO /etc/apt/trusted.gpg.d/coral-repo.asc "https://packages.cloud.google.com/apt/doc/apt-key.gpg" -echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" >/etc/apt/sources.list.d/coral-edgetpu.list -$STD apt-get -y update -$STD apt-get -y install libedgetpu1-std -msg_ok "Coral Edge TPU Support Added" -fi - msg_info "Installing Scrypted" $STD npx -y scrypted@latest install-server -sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group + +if [[ "$CTTYPE" == "0" ]]; then + sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group +else + sed -i -e 's/^sgx:x:104:$/render:x:104:/' -e 's/^render:x:106:$/sgx:x:106:/' /etc/group +fi msg_ok "Installed Scrypted" msg_info "Creating Service" -service_path="/etc/systemd/system/scrypted.service" -echo "[Unit] +cat </etc/systemd/system/scrypted.service +[Unit] Description=Scrypted service After=network.target @@ -128,8 +121,9 @@ Restart=on-failure RestartSec=3 [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now scrypted.service +WantedBy=multi-user.target +EOF +systemctl enable -q --now scrypted.service msg_ok "Created Service" motd_ssh From 90f696461e8c4b68a6196963904a48c64122dafb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Apr 2024 06:56:08 -0400 Subject: [PATCH 3004/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c2bd0dd..a2646902 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-28 + +### Changed + +- **Scrypted LXC** + - Unprivileged Hardware Acceleration + ## 2024-04-27 ### Changed From 6c3c39b79ca19f5fc0dea2d21bc695135fed54ca Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Apr 2024 09:06:03 -0400 Subject: [PATCH 3005/3335] Update emby-install.sh Add Unprivileged Hardware Acceleration --- install/emby-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install/emby-install.sh b/install/emby-install.sh index 72158183..99f5ebfe 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -19,23 +19,27 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb -sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group +if [[ "$CTTYPE" == "0" ]]; then + sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group +else + sed -i -e 's/^ssl-cert:x:104:$/render:x:104:emby/' -e 's/^render:x:108:emby$/ssl-cert:x:108:/' /etc/group +fi msg_ok "Installed Emby" motd_ssh From a75f383568f70ecc5178f01b1a576020efc1bdb9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Apr 2024 09:07:07 -0400 Subject: [PATCH 3006/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2646902..79b0c035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **Scrypted LXC** - Unprivileged Hardware Acceleration +- **Emby LXC** + - Unprivileged Hardware Acceleration ## 2024-04-27 From 869a95d22137bfc491d958263d602b1f283f477b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Apr 2024 17:42:47 -0400 Subject: [PATCH 3007/3335] Update glances.sh Add uninstall function --- misc/glances.sh | 84 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 19 deletions(-) diff --git a/misc/glances.sh b/misc/glances.sh index c40af8b4..8a0309be 100644 --- a/misc/glances.sh +++ b/misc/glances.sh @@ -29,17 +29,8 @@ HOLD=" " CM="${GN}✓${CL}" APP="Glances" hostname="$(hostname)" - -header_info -while true; do - read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - +silent() { "$@" >/dev/null 2>&1; } +set -e spinner() { local chars="/-\|" local spin_i=0 @@ -64,10 +55,27 @@ msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -msg_info "Installing $APP" -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh)" &>/dev/null -cat </etc/systemd/system/glances.service +install() { + header_info + while true; do + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + header_info + read -r -p "Verbose mode? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + STD="" + else + STD="silent" + fi + msg_info "Installing $APP" + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + $STD bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh)" + cat </etc/systemd/system/glances.service [Unit] Description=Glances - An eye on your system After=network.target @@ -80,8 +88,46 @@ Restart=on-failure [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now glances.service -msg_ok "Installed $APP on $hostname" + systemctl enable -q --now glances.service + msg_ok "Installed $APP on $hostname" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://$IP:61208${CL} \n" + echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://$IP:61208${CL} \n" +} +uninstall() { + header_info + read -r -p "Verbose mode? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + STD="" + else + STD="silent" + fi + header_info + + msg_info "Uninstalling $APP" + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + systemctl disable -q --now glances + bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/uninstall.sh)" + rm -rf /etc/systemd/system/glances.service + msg_ok "Uninstalled $APP" + msg_ok "Completed Successfully!\n" +} + +OPTIONS=(Install "Install $APP" \ + Uninstall "Uninstall $APP") + +CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$APP" --menu "Select an option:" 10 58 2 \ + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + +case $CHOICE in + "Install") + install + ;; + "Uninstall") + uninstall + ;; + *) + echo "Exiting..." + exit 0 + ;; +esac From 01c54ab916ee39b064fbc46b06739f88ee867819 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Apr 2024 17:49:04 -0400 Subject: [PATCH 3008/3335] Update glances.sh tweak --- misc/glances.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/misc/glances.sh b/misc/glances.sh index 8a0309be..31840977 100644 --- a/misc/glances.sh +++ b/misc/glances.sh @@ -96,14 +96,6 @@ EOF } uninstall() { header_info - read -r -p "Verbose mode? " prompt - if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - STD="" - else - STD="silent" - fi - header_info - msg_info "Uninstalling $APP" if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi systemctl disable -q --now glances From 169201a7517ed18a7066628e8df1c3b317efe80b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:10:05 +0200 Subject: [PATCH 3009/3335] Add new LXC: ErsatzTV (#2876) --- ct/ersatztv.sh | 91 +++++++++++++++++++++++++++++++++++++ install/ersatztv-install.sh | 64 ++++++++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 ct/ersatztv.sh create mode 100644 install/ersatztv-install.sh diff --git a/ct/ersatztv.sh b/ct/ersatztv.sh new file mode 100644 index 00000000..de21b8ef --- /dev/null +++ b/ct/ersatztv.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/ErsatzTV/ErsatzTV/ + + +function header_info { +clear +cat <<"EOF" + ______ __ _______ __ + / ____/_____________ _/ /_____/_ __/ | / / + / __/ / ___/ ___/ __ `/ __/_ / / / | | / / + / /___/ / (__ ) /_/ / /_ / /_/ / | |/ / +/_____/_/ /____/\__,_/\__/ /___/_/ |___/ + +EOF +} +header_info +echo -e "Loading..." +APP="ErsatzTV" +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 +if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +msg_info "Stopping ErsatzTV" +systemctl stop ersatzTV +msg_ok "Stopped ErsatzTV" + +msg_info "Updating ErsatzTV" +RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1) +if [ -d /opt/ErsatzTV/ErsatzTV_bak ]; then + rm -rf /opt/ErsatzTV/ErsatzTV_bak +fi +mv /opt/ErsatzTV/ErsatzTV /opt/ErsatzTV/ErsatzTV_bak +wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt +mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV +msg_ok "Updated ErsatzTV" + +msg_info "Starting ErsatzTV" +systemctl start ersatzTV +msg_ok "Started ErsatzTV" +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}:8409${CL} \n" diff --git a/install/ersatztv-install.sh b/install/ersatztv-install.sh new file mode 100644 index 00000000..53a9c3ed --- /dev/null +++ b/install/ersatztv-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/ErsatzTV/ErsatzTV + +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 --no-install-recommends \ + ffmpeg \ + build-essential \ + unzip \ + pkg-config \ + curl \ + sudo \ + git \ + make \ + mc +msg_ok "Installed Dependencies" + + +msg_info "Installing ErsatzTV " +RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1) +wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt +mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV +msg_ok "Installed ErsatzTV" + +msg_info "Creating Service" +cat </etc/systemd/system/ersatzTV.service +[Unit] +Description=ErsatzTV Service +After=multi-user.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/ErsatzTV +ExecStart=/opt/ErsatzTV/ErsatzTV +Restart=always +RestartSec=30 + +[Install] +WantedBy=multi-user.target +EOF +systemctl -q --now enable ersatzTV.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" From cae357cc262d2b26a39a81249faa469225c43188 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 29 Apr 2024 10:39:51 -0400 Subject: [PATCH 3010/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79b0c035..a538c184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-29 + +### Changed + +- **ErsatzTV LXC** + - NEW Script + ## 2024-04-28 ### Changed From 90003e72f383b116439270dbd74593b5ef7bb78a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Apr 2024 05:48:46 -0400 Subject: [PATCH 3011/3335] Update tdarr-install.sh Add Unprivileged Hardware Acceleration --- install/tdarr-install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index f4f45d04..adf423cb 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -20,19 +20,16 @@ $STD apt-get install -y mc $STD apt-get install -y handbrake-cli msg_ok "Installed Dependencies" +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - intel-opencl-icd chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" msg_info "Installing Tdarr" mkdir -p /opt/tdarr @@ -43,7 +40,12 @@ $STD unzip Tdarr_Updater.zip rm -rf Tdarr_Updater.zip chmod +x Tdarr_Updater ./Tdarr_Updater &>/dev/null -sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group +if [[ "$CTTYPE" == "0" ]]; then + sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group +else + sed -i -e 's/^sgx:x:104:$/render:x:104:/' -e 's/^render:x:106:$/sgx:x:106:/' /etc/group +fi + msg_ok "Installed Tdarr" msg_info "Creating Service" From f041d5edead43360d8ae571376d97e87a6df59cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Apr 2024 05:49:53 -0400 Subject: [PATCH 3012/3335] Update tdarr.sh Default settings are now Unprivileged --- ct/tdarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/tdarr.sh b/ct/tdarr.sh index b658ec70..11bc2880 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From bd029543c89672b8cded1d3470667847ffc8515f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Apr 2024 05:59:53 -0400 Subject: [PATCH 3013/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a538c184..5237884c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-04-30 + +### Changed + +- **Tdarr LXC** + - Default settings are now **Unprivileged** + - Unprivileged Hardware Acceleration + ## 2024-04-29 ### Changed From 46be5a9b744cfc8691dab056f819572be84139c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Apr 2024 06:07:35 -0400 Subject: [PATCH 3014/3335] Update emby.sh Default settings are now Unprivileged --- ct/emby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/emby.sh b/ct/emby.sh index a8b5618a..092a44a4 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From e13303d2fc564c5748ef28f6f99f3fd8d3fa6973 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 May 2024 14:01:24 -0400 Subject: [PATCH 3015/3335] Update nextcloudpi-install.sh - Add `lbzip2` - testing --- install/nextcloudpi-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index 9a53a287..9a846d45 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y lbzip2 msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" From adb7bc55f4831c927ac71d658ce40b630d35857d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 May 2024 14:16:32 -0400 Subject: [PATCH 3016/3335] Update nextcloudpi.sh Default Debian 12 --- ct/nextcloudpi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index e4312b20..7255de3d 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -23,7 +23,7 @@ var_disk="8" var_cpu="2" var_ram="2048" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From ace4a8e43f1d83444a272357125965487cbb79b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 1 May 2024 14:38:15 -0400 Subject: [PATCH 3017/3335] Update build.func fixes https://github.com/tteck/Proxmox/issues/2894 --- misc/build.func | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 656dfedb..f58149c1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -595,18 +595,20 @@ EOF fi else if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then - if [[ -e "/dev/dri/card0" ]]; then + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card0,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF - else + else cat <>$LXC_CONFIG # VAAPI hardware transcoding dev0: /dev/dri/card1,gid=44 dev1: /dev/dri/renderD128,gid=104 EOF + fi fi fi fi From ee8fea07be3f2e8a7e4290c33656d9d22eac85a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 08:18:52 -0400 Subject: [PATCH 3018/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5237884c..de034739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-02 + +### Changed + +- **NextCloudPi LXC** + - Removed from website + ## 2024-04-30 ### Changed From c8205964310dbf72a08b1e182a28fd65a3f7c034 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 12:25:07 -0400 Subject: [PATCH 3019/3335] Update nextcloudpi-install.sh test --- install/nextcloudpi-install.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index 9a846d45..24306f24 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -17,15 +17,20 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y lbzip2 msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" +$STD apt-get install -y systemd-resolved +systemctl enable -q --now systemd-resolved +cat <<'EOF' >/etc/systemd/resolved.conf +[Resolve] +DNS=8.8.8.8 +FallbackDNS=8.8.4.4 +EOF +systemctl restart systemd-resolved $STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) -sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php -sed -i '{s|root:/usr/sbin/nologin|root:/bin/bash|g}' /etc/passwd -sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.1/fpm/php.ini /etc/php/8.1/cli/php.ini -service apache2 restart +systemctl disable -q --now systemd-resolved +$STD apt-get remove -y systemd-resolved msg_ok "Installed NextCloudPi" motd_ssh From f5ceaccd6dfdb3118cc81938ba30e259b198e659 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 12:37:15 -0400 Subject: [PATCH 3020/3335] Update nextcloudpi-install.sh tweak --- install/nextcloudpi-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index 24306f24..ca1871dd 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -37,6 +37,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" From 1ed8a8b5b3a1485a2b541bd56c53950547d05768 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 13:08:23 -0400 Subject: [PATCH 3021/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de034739..5237884c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,13 +10,6 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** -## 2024-05-02 - -### Changed - -- **NextCloudPi LXC** - - Removed from website - ## 2024-04-30 ### Changed From 64a33de1189d08ef4dd1ca05ff773ab258c8bebc Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 13:26:16 -0400 Subject: [PATCH 3022/3335] Add '-y` flag --- install/actualbudget-install.sh | 4 ++-- install/adguard-install.sh | 4 ++-- install/agentdvr-install.sh | 4 ++-- install/apache-cassandra-install.sh | 4 ++-- install/apache-couchdb-install.sh | 4 ++-- install/apt-cacher-ng-install.sh | 4 ++-- install/audiobookshelf-install.sh | 4 ++-- install/autobrr-install.sh | 4 ++-- install/blocky-install.sh | 4 ++-- install/calibre-web-install.sh | 4 ++-- install/casaos-install.sh | 4 ++-- install/changedetection-install.sh | 4 ++-- install/channels-install.sh | 4 ++-- install/cloudflared-install.sh | 4 ++-- install/cronicle-install.sh | 4 ++-- install/dashy-install.sh | 4 ++-- install/debian-install.sh | 4 ++-- install/deluge-install.sh | 4 ++-- install/docker-install.sh | 4 ++-- install/dockge-install.sh | 4 ++-- install/ersatztv-install.sh | 4 ++-- install/esphome-install.sh | 4 ++-- install/fhem-install.sh | 4 ++-- install/flowiseai-install.sh | 4 ++-- install/frigate-install.sh | 4 ++-- install/go2rtc-install.sh | 4 ++-- install/gokapi-install.sh | 4 ++-- install/gotify-install.sh | 4 ++-- install/grafana-install.sh | 4 ++-- install/heimdall-dashboard-install.sh | 4 ++-- install/homarr-install.sh | 4 ++-- install/homeassistant-core-install.sh | 4 ++-- install/homeassistant-install.sh | 4 ++-- install/homebridge-install.sh | 4 ++-- install/homepage-install.sh | 4 ++-- install/homer-install.sh | 4 ++-- install/hyperhdr-install.sh | 4 ++-- install/influxdb-install.sh | 4 ++-- install/iobroker-install.sh | 4 ++-- install/jackett-install.sh | 4 ++-- install/jellyfin-install.sh | 4 ++-- install/jellyseerr-install.sh | 4 ++-- install/k0s-install.sh | 4 ++-- install/kavita-install.sh | 4 ++-- install/keycloak-install.sh | 4 ++-- install/lazylibrarian-install.sh | 4 ++-- install/linkwarden-install.sh | 4 ++-- install/mafl-install.sh | 4 ++-- install/magicmirror-install.sh | 4 ++-- install/mariadb-install.sh | 4 ++-- install/mediamtx-install.sh | 4 ++-- install/medusa-install.sh | 4 ++-- install/meshcentral-install.sh | 4 ++-- install/motioneye-install.sh | 4 ++-- install/mqtt-install.sh | 4 ++-- install/n8n-install.sh | 4 ++-- install/nocodb-install.sh | 4 ++-- install/node-red-install.sh | 4 ++-- install/ntfy-install.sh | 4 ++-- install/octoprint-install.sh | 4 ++-- install/ombi-install.sh | 4 ++-- install/omv-install.sh | 4 ++-- install/openhab-install.sh | 4 ++-- install/openobserve-install.sh | 4 ++-- install/overseerr-install.sh | 4 ++-- install/owncast-install.sh | 4 ++-- install/pairdrop-install.sh | 4 ++-- install/pbs-install.sh | 4 ++-- install/photoprism-install.sh | 4 ++-- install/pialert-install.sh | 4 ++-- install/pihole-install.sh | 4 ++-- install/pingvin-install.sh | 4 ++-- install/plex-install.sh | 4 ++-- install/podman-homeassistant-install.sh | 4 ++-- install/podman-install.sh | 4 ++-- install/postgresql-install.sh | 4 ++-- install/qbittorrent-install.sh | 4 ++-- install/rdtclient-install.sh | 4 ++-- install/readeck-install.sh | 4 ++-- install/redis-install.sh | 4 ++-- install/rtsptoweb-install.sh | 4 ++-- install/sabnzbd-install.sh | 4 ++-- install/scrypted-install.sh | 4 ++-- install/shinobi-install.sh | 4 ++-- install/smokeping-install.sh | 4 ++-- install/sonarr-install.sh | 4 ++-- install/syncthing-install.sh | 4 ++-- install/tandoor-install.sh | 4 ++-- install/tasmoadmin-install.sh | 4 ++-- install/tautulli-install.sh | 4 ++-- install/technitiumdns-install.sh | 4 ++-- install/traccar-install.sh | 4 ++-- install/transmission-install.sh | 4 ++-- install/ubuntu-install.sh | 4 ++-- install/unifi-install.sh | 4 ++-- install/unmanic-install.sh | 4 ++-- install/uptimekuma-install.sh | 4 ++-- install/vaultwarden-install.sh | 4 ++-- install/wastebin-install.sh | 4 ++-- install/watchyourlan-install.sh | 4 ++-- install/whoogle-install.sh | 4 ++-- install/wikijs-install.sh | 4 ++-- install/wireguard-install.sh | 4 ++-- install/yunohost-install.sh | 4 ++-- install/zigbee2mqtt-install.sh | 4 ++-- 105 files changed, 210 insertions(+), 210 deletions(-) diff --git a/install/actualbudget-install.sh b/install/actualbudget-install.sh index 0f000ed9..fbd07867 100644 --- a/install/actualbudget-install.sh +++ b/install/actualbudget-install.sh @@ -60,6 +60,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/adguard-install.sh b/install/adguard-install.sh index 263aa52b..ef3688cf 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -51,6 +51,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh index 69491da5..f0c431a0 100644 --- a/install/agentdvr-install.sh +++ b/install/agentdvr-install.sh @@ -58,6 +58,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/apache-cassandra-install.sh b/install/apache-cassandra-install.sh index da0c1f40..35c49486 100644 --- a/install/apache-cassandra-install.sh +++ b/install/apache-cassandra-install.sh @@ -40,6 +40,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/apache-couchdb-install.sh b/install/apache-couchdb-install.sh index 41cfde57..94902056 100644 --- a/install/apache-couchdb-install.sh +++ b/install/apache-couchdb-install.sh @@ -42,6 +42,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/apt-cacher-ng-install.sh b/install/apt-cacher-ng-install.sh index 1d7572c2..b8e29316 100644 --- a/install/apt-cacher-ng-install.sh +++ b/install/apt-cacher-ng-install.sh @@ -29,6 +29,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index 1b26fd10..cd9346e3 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -31,6 +31,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh index c8883ddd..510d1c0a 100644 --- a/install/autobrr-install.sh +++ b/install/autobrr-install.sh @@ -52,6 +52,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 86523055..d3ba2b50 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -285,6 +285,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh index 834c989f..6d2b1445 100644 --- a/install/calibre-web-install.sh +++ b/install/calibre-web-install.sh @@ -62,6 +62,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/casaos-install.sh b/install/casaos-install.sh index 50027c6c..e7e07a61 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -30,6 +30,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index d685153a..95050bd7 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -157,6 +157,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/channels-install.sh b/install/channels-install.sh index 548628af..3c5e2d9d 100644 --- a/install/channels-install.sh +++ b/install/channels-install.sh @@ -45,6 +45,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index dc792cee..abd45e47 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -32,6 +32,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index 0763bdd8..c3ea5a8a 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -50,6 +50,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/dashy-install.sh b/install/dashy-install.sh index fce07cc5..d2bbc833 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -63,6 +63,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/debian-install.sh b/install/debian-install.sh index 18fd5940..bb89300e 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -23,6 +23,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" \ No newline at end of file diff --git a/install/deluge-install.sh b/install/deluge-install.sh index eceb49ce..a08580fc 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -71,6 +71,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/docker-install.sh b/install/docker-install.sh index 6744aac8..b6b110ae 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -76,6 +76,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/dockge-install.sh b/install/dockge-install.sh index 235ae6fd..3cb46245 100644 --- a/install/dockge-install.sh +++ b/install/dockge-install.sh @@ -82,6 +82,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/ersatztv-install.sh b/install/ersatztv-install.sh index 53a9c3ed..e4068612 100644 --- a/install/ersatztv-install.sh +++ b/install/ersatztv-install.sh @@ -59,6 +59,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/esphome-install.sh b/install/esphome-install.sh index 7c603425..a5732a84 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -54,6 +54,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/fhem-install.sh b/install/fhem-install.sh index ea98bf4d..ccc078fe 100644 --- a/install/fhem-install.sh +++ b/install/fhem-install.sh @@ -35,6 +35,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/flowiseai-install.sh b/install/flowiseai-install.sh index 0ac6e298..31807365 100644 --- a/install/flowiseai-install.sh +++ b/install/flowiseai-install.sh @@ -55,6 +55,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/frigate-install.sh b/install/frigate-install.sh index e5fe5f09..ed9be712 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -254,6 +254,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh index e50c6d76..8c5f1072 100644 --- a/install/go2rtc-install.sh +++ b/install/go2rtc-install.sh @@ -46,6 +46,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/gokapi-install.sh b/install/gokapi-install.sh index d207aaf0..26fe6338 100644 --- a/install/gokapi-install.sh +++ b/install/gokapi-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/gotify-install.sh b/install/gotify-install.sh index dfdd110b..674013f8 100644 --- a/install/gotify-install.sh +++ b/install/gotify-install.sh @@ -52,6 +52,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 81083b84..88627730 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -38,6 +38,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/heimdall-dashboard-install.sh b/install/heimdall-dashboard-install.sh index a7d87559..951bef8b 100644 --- a/install/heimdall-dashboard-install.sh +++ b/install/heimdall-dashboard-install.sh @@ -62,6 +62,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 2eb0ab4e..c1dcf22e 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -72,6 +72,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 99027611..126d62e4 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -102,6 +102,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 729fadeb..8d78d316 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -85,6 +85,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index b18510ed..76ac86fc 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -35,6 +35,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 8d2bf340..4f6d5d91 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -69,6 +69,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/homer-install.sh b/install/homer-install.sh index 82071cf4..cab3080c 100644 --- a/install/homer-install.sh +++ b/install/homer-install.sh @@ -48,6 +48,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/hyperhdr-install.sh b/install/hyperhdr-install.sh index bca1ce2c..05759f54 100644 --- a/install/hyperhdr-install.sh +++ b/install/hyperhdr-install.sh @@ -50,6 +50,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 71e4e0f5..c43ba7fb 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -58,6 +58,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 09a59a58..8673c135 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -40,6 +40,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/jackett-install.sh b/install/jackett-install.sh index bb928687..36fcc7c0 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index ab6bf92d..0b91e060 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -62,6 +62,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 7a0f1a2c..6cc2d14c 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -73,6 +73,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/k0s-install.sh b/install/k0s-install.sh index 14ec64cb..8ad44b52 100644 --- a/install/k0s-install.sh +++ b/install/k0s-install.sh @@ -38,6 +38,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/kavita-install.sh b/install/kavita-install.sh index 17e208ae..b354f171 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index ea7d0f91..536a2bb8 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -47,6 +47,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh index 98595c26..ce10041e 100644 --- a/install/lazylibrarian-install.sh +++ b/install/lazylibrarian-install.sh @@ -55,6 +55,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index c01c289f..eaae6bfd 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -107,6 +107,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/mafl-install.sh b/install/mafl-install.sh index 63f30288..da27b266 100644 --- a/install/mafl-install.sh +++ b/install/mafl-install.sh @@ -76,6 +76,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 5bb2e3f5..5ba0dff2 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -156,6 +156,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 047d1d05..46ecf9df 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -31,6 +31,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/mediamtx-install.sh b/install/mediamtx-install.sh index c41d4afd..66db3047 100644 --- a/install/mediamtx-install.sh +++ b/install/mediamtx-install.sh @@ -50,6 +50,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/medusa-install.sh b/install/medusa-install.sh index c2152c07..34bed0af 100644 --- a/install/medusa-install.sh +++ b/install/medusa-install.sh @@ -55,6 +55,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 13ac00db..c482f9a2 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -43,6 +43,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index e3908f4a..fe854002 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -57,6 +57,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 18362faa..61a01fbe 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -35,6 +35,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 32298692..811c166d 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -56,6 +56,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 3040f638..612d7983 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -47,6 +47,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 6da4981f..8ca280be 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -72,6 +72,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/ntfy-install.sh b/install/ntfy-install.sh index 2cdd985d..578e8966 100644 --- a/install/ntfy-install.sh +++ b/install/ntfy-install.sh @@ -34,6 +34,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index fd093734..1cbcf0ae 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -74,6 +74,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/ombi-install.sh b/install/ombi-install.sh index ff313504..f42e528b 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/omv-install.sh b/install/omv-install.sh index 9ea46931..29482264 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -47,6 +47,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/openhab-install.sh b/install/openhab-install.sh index d21657e8..40661c6c 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -44,6 +44,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index 7a52415d..7fff763e 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -55,6 +55,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index 8d752044..dd65cd67 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -65,6 +65,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/owncast-install.sh b/install/owncast-install.sh index d03683e3..ca6f30c3 100644 --- a/install/owncast-install.sh +++ b/install/owncast-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/pairdrop-install.sh b/install/pairdrop-install.sh index 8f8a8224..75070cd7 100644 --- a/install/pairdrop-install.sh +++ b/install/pairdrop-install.sh @@ -59,6 +59,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/pbs-install.sh b/install/pbs-install.sh index 99203391..5f5dc017 100644 --- a/install/pbs-install.sh +++ b/install/pbs-install.sh @@ -32,6 +32,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index a7bec81f..e16cb6ee 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -76,6 +76,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 0376ce94..f90ea6b8 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -96,6 +96,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 52bb0b09..7f79ff8c 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -105,6 +105,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index e271f9e1..c848cfb3 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -53,6 +53,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/plex-install.sh b/install/plex-install.sh index e253be5a..1ca8b0d9 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index c74e27cc..a82d852e 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/podman-install.sh b/install/podman-install.sh index 78ae842f..1ef11fdd 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -29,6 +29,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 393d694a..3cf51532 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -146,6 +146,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh index 3c5b6469..a1c0064f 100644 --- a/install/qbittorrent-install.sh +++ b/install/qbittorrent-install.sh @@ -49,6 +49,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index a077cb51..652998aa 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -58,6 +58,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/readeck-install.sh b/install/readeck-install.sh index 8b1c287b..dbc1d5e8 100644 --- a/install/readeck-install.sh +++ b/install/readeck-install.sh @@ -50,6 +50,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/redis-install.sh b/install/redis-install.sh index d62e7847..053e2088 100644 --- a/install/redis-install.sh +++ b/install/redis-install.sh @@ -35,6 +35,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/rtsptoweb-install.sh b/install/rtsptoweb-install.sh index a5b669d5..d8e5ecab 100644 --- a/install/rtsptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -56,6 +56,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index b206c82f..63e919c9 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -62,6 +62,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 6e54f790..2ac2d72e 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -130,6 +130,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 4b9a51ab..82545835 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -80,6 +80,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/smokeping-install.sh b/install/smokeping-install.sh index 3a214b6c..0df5c842 100644 --- a/install/smokeping-install.sh +++ b/install/smokeping-install.sh @@ -72,6 +72,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index 7f98864b..79060e79 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -51,6 +51,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 3709513c..11b45673 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -36,6 +36,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index e317b9ab..abbf06e7 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -141,6 +141,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/tasmoadmin-install.sh b/install/tasmoadmin-install.sh index bc934e24..f0302945 100644 --- a/install/tasmoadmin-install.sh +++ b/install/tasmoadmin-install.sh @@ -59,6 +59,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index d31ea075..d431918d 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -61,6 +61,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index f157d841..12ea927d 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -35,6 +35,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/traccar-install.sh b/install/traccar-install.sh index 3a9b9eea..f68d365e 100644 --- a/install/traccar-install.sh +++ b/install/traccar-install.sh @@ -32,6 +32,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/transmission-install.sh b/install/transmission-install.sh index 10d90352..2550bb00 100644 --- a/install/transmission-install.sh +++ b/install/transmission-install.sh @@ -31,6 +31,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 9aa8705c..841dd3f3 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -23,6 +23,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 61460b7d..5341ee58 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -46,6 +46,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/unmanic-install.sh b/install/unmanic-install.sh index d5d1790a..70b73dc8 100644 --- a/install/unmanic-install.sh +++ b/install/unmanic-install.sh @@ -64,6 +64,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index 8c4e90ea..4a429191 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -61,6 +61,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index 64f8a460..c76297e3 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -114,6 +114,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh index 25e5b592..227b1095 100644 --- a/install/wastebin-install.sh +++ b/install/wastebin-install.sh @@ -62,6 +62,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/watchyourlan-install.sh b/install/watchyourlan-install.sh index 78fcf57a..c54342c5 100644 --- a/install/watchyourlan-install.sh +++ b/install/watchyourlan-install.sh @@ -52,6 +52,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index b1bdedbb..fac08400 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -48,6 +48,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 3a4507a3..fe95122e 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -78,6 +78,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 2b94a801..7cd00403 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -44,6 +44,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index 0197eadb..75cdc55c 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -33,6 +33,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index fa94476f..55acdcbc 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -79,6 +79,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" From c476436a9d21be33979f91cd722c5a780bca87d2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 16:40:23 -0400 Subject: [PATCH 3023/3335] Update omv-install.sh OMV 7 --- install/omv-install.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/install/omv-install.sh b/install/omv-install.sh index 29482264..64f6b955 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -17,22 +17,14 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing OpenMediaVault (Patience)" wget -qO- https://packages.openmediavault.org/public/archive.key | gpg --dearmor >"/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.gpg" cat </etc/apt/sources.list.d/openmediavault.list -deb https://packages.openmediavault.org/public shaitan main -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan main -## Uncomment the following line to add software from the proposed repository. -# deb https://packages.openmediavault.org/public shaitan-proposed main -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main -## This software is not part of OpenMediaVault, but is offered by third-party -## developers as a service to OpenMediaVault users. -# deb https://packages.openmediavault.org/public shaitan partner -# deb https://downloads.sourceforge.net/project/openmediavault/packages shaitan partner +deb [signed-by=/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public sandworm main EOF export LANG=C.UTF-8 From 1320434a1a66c1e787e9a0932956282335f76e52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 16:40:57 -0400 Subject: [PATCH 3024/3335] Update omv.sh Default Debian 12 --- ct/omv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omv.sh b/ct/omv.sh index 318a1699..525a35db 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -24,7 +24,7 @@ var_disk="4" var_cpu="2" var_ram="1024" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors From 817d51a4eee4b92264ae99313724c3f56007be94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 17:04:52 -0400 Subject: [PATCH 3025/3335] Update omv-install.sh tweak --- install/omv-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/omv-install.sh b/install/omv-install.sh index 64f6b955..2fb700ae 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -32,7 +32,7 @@ export DEBIAN_FRONTEND=noninteractive export APT_LISTCHANGES_FRONTEND=none $STD apt-get update apt-get -y --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends --option DPkg::Options::="--force-confdef" --option DPkg::Options::="--force-confold" install openmediavault-keyring openmediavault &>/dev/null -omv-confdbadm populate +omv-confdbadm populate &>/dev/null msg_ok "Installed OpenMediaVault" motd_ssh From 39d8721d367b7a5e5ee0045e13ac1c1834f2ab58 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 May 2024 17:20:44 -0400 Subject: [PATCH 3026/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5237884c..9837da10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-02 + +### Changed + +- **OpenMediaVault LXC** + - Set Debian 12 as default + - OpenMediaVault 7 (sandworm) + ## 2024-04-30 ### Changed From 7faf0443b1106fe47b1f500940ea0607cb0563f2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 May 2024 03:02:49 -0400 Subject: [PATCH 3027/3335] Update alpine-grafana.sh Add storage --- ct/alpine-grafana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index b7e89aba..97e5ebde 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -20,7 +20,7 @@ EOF header_info echo -e "Loading..." APP="Alpine-Grafana" -var_disk="0.5" +var_disk="1" var_cpu="1" var_ram="256" var_os="alpine" From c349da6859444c1f95b0b8c8ec61fdf1572d7a4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 May 2024 03:07:02 -0400 Subject: [PATCH 3028/3335] Update build.func Add Ubuntu 24.04 --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index f58149c1..ff2410c5 100644 --- a/misc/build.func +++ b/misc/build.func @@ -205,7 +205,7 @@ advanced_settings() { if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \ "20.04" "Focal" OFF \ "22.04" "Jammy" OFF \ - "23.10" "Mantic" OFF \ + "24.04" "Noble" OFF \ 3>&1 1>&2 2>&3); then if [ -n "$var_version" ]; then echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}" From bb965d681caae2962573e008d4f5a5682a2079ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 May 2024 03:51:09 -0400 Subject: [PATCH 3029/3335] Update nginxproxymanager-install.sh Add back `python3-certbot-dns-cloudflare` --- install/nginxproxymanager-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 714aae70..ae267817 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -37,7 +37,8 @@ $STD apt-get install -y \ python3-pip \ python3-venv \ python3-cffi \ - python3-certbot + python3-certbot \ + python3-certbot-dns-cloudflare $STD pip3 install certbot-dns-multi $STD python3 -m venv /opt/certbot/ msg_ok "Installed Python Dependencies" From 6cb9e1db0aa317926e040ca53cb61adb821e0784 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 May 2024 05:32:14 -0400 Subject: [PATCH 3030/3335] Update flowiseai.sh fixes https://github.com/tteck/Proxmox/issues/2906 --- ct/flowiseai.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index 42c70fdd..4dc58f6b 100644 --- a/ct/flowiseai.sh +++ b/ct/flowiseai.sh @@ -20,8 +20,8 @@ header_info echo -e "Loading..." APP="FlowiseAI" var_disk="10" -var_cpu="2" -var_ram="2048" +var_cpu="4" +var_ram="4096" var_os="debian" var_version="12" variables @@ -67,6 +67,10 @@ start build_container description +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +pct set $CTID -cores 2 +msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" From 4a1ccb5d3dea601ef8d97d1719605d0b05a683cf Mon Sep 17 00:00:00 2001 From: Scorpoon <22363852+Scorpoon@users.noreply.github.com> Date: Sat, 4 May 2024 13:10:28 +0200 Subject: [PATCH 3031/3335] Write version into Homepage_version.txt file after update (#2908) --- ct/homepage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homepage.sh b/ct/homepage.sh index dca0e9c4..54efa660 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -76,6 +76,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} pnpm install pnpm build systemctl start homepage + echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated Homepage to v${RELEASE}" else msg_ok "No update required. ${APP} is already at ${RELEASE}" From dc222ec2517441521b1941ff5fe044382cb9e5a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 4 May 2024 15:07:46 -0400 Subject: [PATCH 3032/3335] Update nginxproxymanager.sh Increase vCPUs to 2 during build --- ct/nginxproxymanager.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index a65e8623..75969716 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -21,7 +21,7 @@ header_info echo -e "Loading..." APP="Nginx Proxy Manager" var_disk="4" -var_cpu="1" +var_cpu="2" var_ram="1024" var_os="debian" var_version="12" @@ -185,6 +185,9 @@ start build_container description +msg_info "Setting Container to Normal Resources" +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:81${CL}\n" From 43ee7501adb36fceec6ae8207c271081e8e31888 Mon Sep 17 00:00:00 2001 From: Scorpoon <22363852+Scorpoon@users.noreply.github.com> Date: Sun, 5 May 2024 15:05:44 +0200 Subject: [PATCH 3033/3335] New LXC: Fenrus - another personal home page / dashboard (#2913) --- ct/fenrus.sh | 92 +++++++++++++++++++++++++++++++++++++++ install/fenrus-install.sh | 69 +++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 ct/fenrus.sh create mode 100644 install/fenrus-install.sh diff --git a/ct/fenrus.sh b/ct/fenrus.sh new file mode 100644 index 00000000..596f8f48 --- /dev/null +++ b/ct/fenrus.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: Scorpoon +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/revenz/Fenrus + +function header_info { +clear +cat <<"EOF" + ______ + / ____/__ ____ _______ _______ + / /_ / _ \/ __ \/ ___/ / / / ___/ + / __/ / __/ / / / / / /_/ (__ ) +/_/ \___/_/ /_/_/ \__,_/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Fenrus" +var_disk="4" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /opt/${APP} ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +systemctl stop ${APP} +git clone https://github.com/revenz/Fenrus.git +cd Fenrus || exit +gitVersionNumber=$(git rev-parse HEAD) + +if [[ "${gitVersionNumber}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + mkdir /opt/fenrus-data-backup + cp -r "/opt/${APP}/data/" /opt/fenrus-data-backup/data + if [[ ! -d /opt/fenrus-data-backup/data ]]; then msg_error "Backup of data folder failed! exiting..."; rm -r /opt/fenrus-data-backup/; exit; fi + export DOTNET_CLI_TELEMETRY_OPTOUT=1 + dotnet publish -c Release -o "/opt/${APP}/" Fenrus.csproj + cp -r /opt/fenrus-data-backup/data/ "/opt/${APP}/" + echo "${gitVersionNumber}" >"/opt/${APP}_version.txt" + rm -r /opt/fenrus-data-backup/ + msg_ok "Updated $APP" +else + msg_ok "No update required. ${APP} is already up to date" +fi +cd .. +rm -r Fenrus/ + +systemctl start ${APP} +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5000${CL} \n" \ No newline at end of file diff --git a/install/fenrus-install.sh b/install/fenrus-install.sh new file mode 100644 index 00000000..2ef110e6 --- /dev/null +++ b/install/fenrus-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: Scorpoon +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/revenz/Fenrus + + + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y curl +$STD apt-get install -y git +msg_ok "Installed Dependencies" + +msg_info "Installing ASP.NET Core 7 SDK" +var_os=$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | tr -d '"') +var_version=$(grep "^VERSION_ID=" /etc/os-release | cut -d'=' -f2 | tr -d '"') +if [ "${var_os}" = "debian" ]; then + wget -q "https://packages.microsoft.com/config/debian/$var_version/packages-microsoft-prod.deb" + $STD dpkg -i packages-microsoft-prod.deb + rm packages-microsoft-prod.deb +fi +$STD apt-get update +$STD apt-get install -y dotnet-sdk-7.0 +msg_ok "Installed ASP.NET Core 7 SDK" + +msg_info "Installing ${APPLICATION}" +git clone -q https://github.com/revenz/Fenrus.git /opt/${APPLICATION} +cd /opt/${APPLICATION} +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +dotnet publish -c Release -o "/opt/${APPLICATION}/" Fenrus.csproj +msg_ok "Installed ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/"${APPLICATION}".service +[Unit] +Description=${APPLICATION} + +[Service] +WorkingDirectory=/opt/${APPLICATION} +ExecStart=/usr/bin/dotnet Fenrus.dll --urls=http://*:5000 +SyslogIdentifier=${APPLICATION} +User=root + +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable -q --now ${APPLICATION} +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From e4d8b624526121a6370927952d88a98fd283016e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 May 2024 09:06:59 -0400 Subject: [PATCH 3034/3335] Update fenrus.sh tweak --- ct/fenrus.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/fenrus.sh b/ct/fenrus.sh index 596f8f48..1b0e1848 100644 --- a/ct/fenrus.sh +++ b/ct/fenrus.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # Co-Author: Scorpoon # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -# Source: https://github.com/revenz/Fenrus function header_info { clear @@ -89,4 +88,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5000${CL} \n" \ No newline at end of file + ${BL}http://${IP}:5000${CL} \n" From b9cc6a09a3c5372417efdb6564e6c2c70f8970f7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 May 2024 09:16:40 -0400 Subject: [PATCH 3035/3335] Update fenrus-install.sh tweak --- install/fenrus-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/fenrus-install.sh b/install/fenrus-install.sh index 2ef110e6..4e4c249d 100644 --- a/install/fenrus-install.sh +++ b/install/fenrus-install.sh @@ -39,8 +39,8 @@ msg_ok "Installed ASP.NET Core 7 SDK" msg_info "Installing ${APPLICATION}" git clone -q https://github.com/revenz/Fenrus.git /opt/${APPLICATION} cd /opt/${APPLICATION} -export DOTNET_CLI_TELEMETRY_OPTOUT=1 -dotnet publish -c Release -o "/opt/${APPLICATION}/" Fenrus.csproj +#export DOTNET_CLI_TELEMETRY_OPTOUT=1 +$STD dotnet publish -c Release -o "/opt/${APPLICATION}/" Fenrus.csproj msg_ok "Installed ${APPLICATION}" msg_info "Creating Service" @@ -66,4 +66,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From 410794f05554e3c719c204f7dc0bad9983a5bcff Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 May 2024 09:25:30 -0400 Subject: [PATCH 3036/3335] Update fenrus-install.sh tweak --- install/fenrus-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/fenrus-install.sh b/install/fenrus-install.sh index 4e4c249d..fa0f9500 100644 --- a/install/fenrus-install.sh +++ b/install/fenrus-install.sh @@ -39,7 +39,6 @@ msg_ok "Installed ASP.NET Core 7 SDK" msg_info "Installing ${APPLICATION}" git clone -q https://github.com/revenz/Fenrus.git /opt/${APPLICATION} cd /opt/${APPLICATION} -#export DOTNET_CLI_TELEMETRY_OPTOUT=1 $STD dotnet publish -c Release -o "/opt/${APPLICATION}/" Fenrus.csproj msg_ok "Installed ${APPLICATION}" From 3c463d4ce157f07451c044d26d5c26fbb81c05f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 May 2024 09:29:21 -0400 Subject: [PATCH 3037/3335] Update fenrus.sh Add "There is currently no update path available." until fully tested --- ct/fenrus.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ct/fenrus.sh b/ct/fenrus.sh index 1b0e1848..0f5e4d17 100644 --- a/ct/fenrus.sh +++ b/ct/fenrus.sh @@ -9,12 +9,12 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ______ + ______ / ____/__ ____ _______ _______ / /_ / _ \/ __ \/ ___/ / / / ___/ - / __/ / __/ / / / / / /_/ (__ ) -/_/ \___/_/ /_/_/ \__,_/____/ - + / __/ / __/ / / / / / /_/ (__ ) +/_/ \___/_/ /_/_/ \__,_/____/ + EOF } header_info @@ -56,6 +56,8 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/${APP} ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit msg_info "Updating ${APP}" systemctl stop ${APP} git clone https://github.com/revenz/Fenrus.git From 831d62390d36fc43ff444d5ecad1b2ac11aef06d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 May 2024 09:55:41 -0400 Subject: [PATCH 3038/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9837da10..bf0fb4a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-05 + +### Changed + +- **Fenrus LXC** + - NEW Script + ## 2024-05-02 ### Changed From a5c5628bed898f4ed0d23a220dd40656dab7da61 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 5 May 2024 14:29:05 -0400 Subject: [PATCH 3039/3335] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 733d43ad..86316b3f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021-2023 tteck +Copyright (c) 2021-2024 tteck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 830fddb2a92236080f192966cc8185e7c0f09227 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 May 2024 13:23:52 -0400 Subject: [PATCH 3040/3335] Update wireguard.sh fixes https://github.com/tteck/Proxmox/issues/2919 --- ct/wireguard.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 1fb935f1..b8efa7cc 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -70,8 +70,8 @@ if [ "$UPD" == "2" ]; then if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then msg_info "Updating WGDashboard" cd /etc/wgdashboard/src - yes "Y" | sudo ./wgd.sh update &>/dev/null - sudo chmod u+x wgd.sh + chmod u+x wgd.sh + ./wgd.sh update msg_ok "Updated Successfully" exit fi @@ -91,9 +91,9 @@ WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/lat git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null cd /etc/wgdashboard/src -sudo chmod u+x wgd.sh -sudo ./wgd.sh install &>/dev/null -sudo chmod -R 755 /etc/wireguard +chmod u+x wgd.sh +./wgd.sh install &>/dev/null +chmod -R 755 /etc/wireguard msg_ok "Installed WGDashboard" msg_info "Creating Service" From 5793283ea4b8e48daece9b55a7dcd392c6bcbc51 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 May 2024 13:25:19 -0400 Subject: [PATCH 3041/3335] Update wireguard.sh --- ct/wireguard.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index b8efa7cc..b5137ca6 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -68,7 +68,6 @@ exit fi if [ "$UPD" == "2" ]; then if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then - msg_info "Updating WGDashboard" cd /etc/wgdashboard/src chmod u+x wgd.sh ./wgd.sh update From cfc6ca13effd79cdd8a27c31bb171f2b37f88491 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 6 May 2024 13:26:03 -0400 Subject: [PATCH 3042/3335] Update wireguard.sh tweak --- ct/wireguard.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index b5137ca6..23e75b80 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -63,7 +63,6 @@ if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" exit fi if [ "$UPD" == "2" ]; then From b950a06b5f1ef01e4500589502c708e3aa9b794e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 11:41:57 -0400 Subject: [PATCH 3043/3335] Update paperless-ngx.sh Clean old code. --- ct/paperless-ngx.sh | 55 +++++++++------------------------------------ 1 file changed, 11 insertions(+), 44 deletions(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 4d05d1d2..7b5c8304 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -59,7 +59,6 @@ function update_script() { exit fi RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - SER=/etc/systemd/system/paperless-task-queue.service UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update Paperless-ngx to $RELEASE" ON \ @@ -67,64 +66,32 @@ function update_script() { 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then - msg_info "Stopping Paperless-ngx" - systemctl stop paperless-consumer paperless-webserver paperless-scheduler - if [ -f "$SER" ]; then - systemctl stop paperless-task-queue.service - fi - sleep 1 - msg_ok "Stopped Paperless-ngx" + echo -e "Stopping all Paperless-ngx Services" + systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service + msg_ok "Stopped all Paperless-ngx Services" - msg_info "Updating to ${RELEASE}" + echo -e "Updating to ${RELEASE}" cd ~ - if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }' | wc -l)" != 1 ]; then apt-get install -y libmariadb-dev-compat; fi &>/dev/null - wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null - tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null + wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz + tar -xf paperless-ngx-$RELEASE.tar.xz cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless - pip install -r requirements.txt &>/dev/null + pip install -r requirements.txt cd /opt/paperless/src - /usr/bin/python3 manage.py migrate &>/dev/null - if [ -f "$SER" ]; then - msg_ok "paperless-task-queue.service Exists." - else - cat </etc/systemd/system/paperless-task-queue.service -[Unit] -Description=Paperless Celery Workers -Requires=redis.service -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless worker --loglevel INFO -[Install] -WantedBy=multi-user.target -EOF - systemctl enable paperless-task-queue &>/dev/null - msg_ok "paperless-task-queue.service Created." - fi - cat </etc/systemd/system/paperless-scheduler.service -[Unit] -Description=Paperless Celery beat -Requires=redis.service -[Service] -WorkingDirectory=/opt/paperless/src -ExecStart=celery --app paperless beat --loglevel INFO -[Install] -WantedBy=multi-user.target -EOF + /usr/bin/python3 manage.py migrate msg_ok "Updated to ${RELEASE}" - msg_info "Cleaning up" + echo -e "Cleaning up" cd ~ rm paperless-ngx-$RELEASE.tar.xz rm -rf paperless-ngx msg_ok "Cleaned" - msg_info "Starting Paperless-ngx" - systemctl daemon-reload + echo -e "Starting all Paperless-ngx Services" systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service sleep 1 - msg_ok "Started Paperless-ngx" + msg_ok "Started all Paperless-ngx Services" msg_ok "Updated Successfully!\n" exit fi From 3e6c0944fbec08c0e2cc3047d555bc20b0066719 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 12:13:47 -0400 Subject: [PATCH 3044/3335] Update paperless-ngx.sh test removing `migrate` --- ct/paperless-ngx.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 7b5c8304..caaf0fe8 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -78,8 +78,8 @@ function update_script() { cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless pip install -r requirements.txt - cd /opt/paperless/src - /usr/bin/python3 manage.py migrate + #cd /opt/paperless/src + #/usr/bin/python3 manage.py migrate msg_ok "Updated to ${RELEASE}" echo -e "Cleaning up" From afd070a691460afeb2f0e31f835f1551a1585fe6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 12:35:00 -0400 Subject: [PATCH 3045/3335] Update paperless-ngx-install.sh set db to `utf8` --- install/paperless-ngx-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index d4b12ca9..b462cfd4 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -97,13 +97,15 @@ $STD python3 -m nltk.downloader -d /usr/share/nltk_data all msg_ok "Installed Natural Language Toolkit" msg_info "Setting up PostgreSQL database" -export LC_ALL=C.UTF-8 DB_NAME=paperlessdb DB_USER=paperless DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" echo "" >>~/paperless.creds echo -e "Paperless-ngx Database User: \e[32m$DB_USER\e[0m" >>~/paperless.creds echo -e "Paperless-ngx Database Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds From aa96a47efccdc123460d84b3e725c8fb77a3210a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 12:40:52 -0400 Subject: [PATCH 3046/3335] Update paperless-ngx-install.sh tweak --- install/paperless-ngx-install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index b462cfd4..23d8aa1b 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -13,15 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Python3" -$STD apt-get install -y --no-install-recommends \ - python3 \ - python3-pip \ - python3-dev \ - python3-setuptools \ - python3-wheel -msg_ok "Installed Python3" - msg_info "Installing Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ redis \ @@ -49,6 +40,15 @@ $STD apt-get install -y --no-install-recommends \ mc msg_ok "Installed Dependencies" +msg_info "Installing Python3 Dependencies" +$STD apt-get install -y --no-install-recommends \ + python3 \ + python3-pip \ + python3-dev \ + python3-setuptools \ + python3-wheel +msg_ok "Installed Python3 Dependencies" + msg_info "Installing OCR Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ unpaper \ From e62f657d31b0095505b1c818b2366ca63bc6ad3f Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 12:54:28 -0400 Subject: [PATCH 3047/3335] Update paperless-ngx.sh set none verbose --- ct/paperless-ngx.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index caaf0fe8..fdb49961 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -66,29 +66,29 @@ function update_script() { 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then - echo -e "Stopping all Paperless-ngx Services" + msg_info "Stopping all Paperless-ngx Services" systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service msg_ok "Stopped all Paperless-ngx Services" - echo -e "Updating to ${RELEASE}" + msg_info "Updating to ${RELEASE}" cd ~ - wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz + wget -q https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz tar -xf paperless-ngx-$RELEASE.tar.xz cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless - pip install -r requirements.txt - #cd /opt/paperless/src - #/usr/bin/python3 manage.py migrate + pip install -r requirements.txt &>/dev/null + cd /opt/paperless/src + /usr/bin/python3 manage.py migrate &>/dev/null msg_ok "Updated to ${RELEASE}" - echo -e "Cleaning up" + msg_info "Cleaning up" cd ~ rm paperless-ngx-$RELEASE.tar.xz rm -rf paperless-ngx msg_ok "Cleaned" - echo -e "Starting all Paperless-ngx Services" + msg_info "Starting all Paperless-ngx Services" systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service sleep 1 msg_ok "Started all Paperless-ngx Services" From 897c7bd867ce36b9595f78f9d6f45db6e616a455 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 13:12:26 -0400 Subject: [PATCH 3048/3335] Update frigate-install.sh another attempt to fix `Segmentation fault` --- install/frigate-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index ed9be712..b5b53ca7 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -43,8 +43,6 @@ if [[ "$CTTYPE" == "0" ]]; then chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* - $STD adduser $(id -u -n) video - $STD adduser $(id -u -n) render fi msg_ok "Set Up Hardware Acceleration" From 7924744bc25c3058cb38cc5c038483acbeecdc7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 14:01:21 -0400 Subject: [PATCH 3049/3335] Update omada.sh set default unprivileged --- ct/omada.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/omada.sh b/ct/omada.sh index c664953e..5c637de8 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From 450c2a6d24b861f4e6269e6d22765ffdf20062c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 14:01:44 -0400 Subject: [PATCH 3050/3335] Update ubuntu.sh set default unprivileged --- ct/ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 6572c02c..448ca243 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -29,7 +29,7 @@ color catch_errors function default_settings() { - CT_TYPE="0" + CT_TYPE="1" PW="" CT_ID=$NEXTID HN=$NSAPP From 9b96a64401a6592d80f58eb9d0e4a8384912b9cc Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Tue, 7 May 2024 23:13:55 +0200 Subject: [PATCH 3051/3335] Pocketbase LXC script (#2929) --- ct/pocketbase.sh | 62 +++++++++++++++++++++++++++++++++++ install/pocketbase-install.sh | 54 ++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 ct/pocketbase.sh create mode 100644 install/pocketbase-install.sh diff --git a/ct/pocketbase.sh b/ct/pocketbase.sh new file mode 100644 index 00000000..f3f8e7e0 --- /dev/null +++ b/ct/pocketbase.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ + ____ ____ _____/ /_____ / /_/ /_ ____ _________ + / __ \/ __ \/ ___/ //_/ _ \/ __/ __ \/ __ `/ ___/ _ \ + / /_/ / /_/ / /__/ ,< / __/ /_/ /_/ / /_/ (__ ) __/ + / .___/\____/\___/_/|_|\___/\__/_.___/\__,_/____/\___/ +/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Pocketbase" +var_disk="8" +var_cpu="1" +var_ram="512" +var_os="ubuntu" +var_version="22.04" +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 +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080/_" diff --git a/install/pocketbase-install.sh b/install/pocketbase-install.sh new file mode 100644 index 00000000..29bf8813 --- /dev/null +++ b/install/pocketbase-install.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Pocketbase" +RELEASE=$(curl -s https://api.github.com/repos/pocketbase/pocketbase/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/pocketbase/pocketbase/releases/download/v${RELEASE}/pocketbase_${RELEASE}_linux_amd64.zip -O /tmp/pocketbase.zip +mkdir -p /opt/pocketbase/{pb_public,pb_migrations,pb_hooks} +unzip -q -o /tmp/pocketbase.zip -d /opt/pocketbase + +cat </etc/systemd/system/pocketbase.service +[Unit] +Description = pocketbase + +[Service] +Type = simple +LimitNOFILE = 4096 +Restart = always +RestartSec = 5s +StandardOutput = append:/opt/pocketbase/errors.log +StandardError = append:/opt/pocketbase/errors.log +ExecStart = /opt/pocketbase/pocketbase serve --http=0.0.0.0:8080 + +[Install] +WantedBy = multi-user.target +EOF + +systemctl enable -q --now pocketbase.service +msg_ok "Installed Pocketbase" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From c3cd3636e6f01be17faaa58b7b8e2d991fa648bc Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 17:19:03 -0400 Subject: [PATCH 3052/3335] Update pocketbase.sh tweak --- ct/pocketbase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/pocketbase.sh b/ct/pocketbase.sh index f3f8e7e0..31e281ed 100644 --- a/ct/pocketbase.sh +++ b/ct/pocketbase.sh @@ -59,4 +59,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080/_" + ${BL}http://${IP}:8080/_${CL}" From 0209c9a7cd78adb50a1234a458573e8f518dc403 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 17:22:49 -0400 Subject: [PATCH 3053/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf0fb4a0..30f4dce1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-07 + +### Changed + +- **pocketbase LXC** + - NEW Script + ## 2024-05-05 ### Changed From 4a3616692910fb31083e00bf6afaf3502ab30c47 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 17:25:53 -0400 Subject: [PATCH 3054/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30f4dce1..e50fb838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ ### Changed -- **pocketbase LXC** +- **Pocketbase LXC** - NEW Script ## 2024-05-05 From 1aff71d17f51b674c350f4a9f84ad8a5591e9224 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 7 May 2024 21:22:04 -0400 Subject: [PATCH 3055/3335] Update pocketbase.sh tweak --- ct/pocketbase.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ct/pocketbase.sh b/ct/pocketbase.sh index 31e281ed..df3858c3 100644 --- a/ct/pocketbase.sh +++ b/ct/pocketbase.sh @@ -8,12 +8,11 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - __ __ __ - ____ ____ _____/ /_____ / /_/ /_ ____ _________ - / __ \/ __ \/ ___/ //_/ _ \/ __/ __ \/ __ `/ ___/ _ \ - / /_/ / /_/ / /__/ ,< / __/ /_/ /_/ / /_/ (__ ) __/ - / .___/\____/\___/_/|_|\___/\__/_.___/\__,_/____/\___/ -/_/ + ____ __ __ __ + / __ \____ _____/ /_____ / /_/ /_ ____ _________ + / /_/ / __ \/ ___/ //_/ _ \/ __/ __ \/ __ `/ ___/ _ \ + / ____/ /_/ / /__/ ,< / __/ /_/ /_/ / /_/ (__ ) __/ +/_/ \____/\___/_/|_|\___/\__/_.___/\__,_/____/\___/ EOF } From fc997a9f366abeb26d41b8306ee2c733234dbba7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 00:08:39 -0400 Subject: [PATCH 3056/3335] Create kernel-pin.sh --- misc/kernel-pin.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 misc/kernel-pin.sh diff --git a/misc/kernel-pin.sh b/misc/kernel-pin.sh new file mode 100644 index 00000000..a2a15ede --- /dev/null +++ b/misc/kernel-pin.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + __ __ __ ____ _ + / //_/__ _________ ___ / / / __ \(_)___ + / ,< / _ \/ ___/ __ \/ _ \/ / / /_/ / / __ \ + / /| / __/ / / / / / __/ / / ____/ / / / / +/_/ |_\___/_/ /_/ /_/\___/_/ /_/ /_/_/ /_/ + +EOF +} +YW=$(echo "\033[33m") +RD=$(echo "\033[01;31m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +current_kernel=$(uname -r) +available_kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 16, length($2)-22)}') +header_info + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Pin" --yesno "This will Pin/Unpin Kernel Images, Proceed?" 10 68 || exit + + KERNEL_MENU=() + MSG_MAX_LENGTH=0 +while read -r TAG ITEM; do + OFFSET=2 + ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET + KERNEL_MENU+=("$TAG" "$ITEM " "OFF") +done < <(echo "$available_kernels") + +pin_kernel=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --radiolist "\nSelect Kernel to pin:\nCancel to Unpin any Kernel" 16 $((MSG_MAX_LENGTH + 58)) 6 "${KERNEL_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit +[ -z "$pin_kernel" ] && { + whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Kernel Selected" --msgbox "It appears that no Kernel was selected\nUnpinning any pinned Kernel" 10 68 + msg_info "Unpinning any Kernel" + proxmox-boot-tool kernel unpin &>/dev/null + msg_ok "Unpinned any Kernel\n" + proxmox-boot-tool kernel list + echo "" + msg_ok "Finished\n" + echo -e "${RD} REBOOT${CL}" + exit +} +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Pin" --yesno "Would you like to pin the $pin_kernel Kernel?" 10 68 || exit + +msg_info "Pinning $pin_kernel" +proxmox-boot-tool kernel pin $pin_kernel &>/dev/null +msg_ok "Successfully Pinned $pin_kernel\n" +proxmox-boot-tool kernel list +echo "" +msg_ok "Finished\n" +echo -e "${RD} REBOOT${CL}" From d5b91a44d0ff90ddedb01d43ba3b2e5910a1c6e9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 00:26:06 -0400 Subject: [PATCH 3057/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e50fb838..0321be19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-08 + +### Changed + +- **Kernel Pin** + - NEW Script + ## 2024-05-07 ### Changed From f830b228a80b6a0098649cee3ec1b544d8b1f100 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 01:18:26 -0400 Subject: [PATCH 3058/3335] Update homeassistant-core-install.sh Add Python wrapper for the Google WebRTC Voice Activity Detector --- install/homeassistant-core-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 126d62e4..f9d8de47 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -74,6 +74,7 @@ cd /srv/homeassistant python3 -m venv . source bin/activate $STD pip install --upgrade pip +$STD pip install webrtcvad $STD python3 -m pip install wheel $STD pip install homeassistant $STD pip install mysqlclient From ee97a5f73440bde6ab1913f3c9c0a967d7272f35 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 01:22:57 -0400 Subject: [PATCH 3059/3335] Update homeassistant-core-install.sh Make changes to use Ubuntu 24.04 only --- install/homeassistant-core-install.sh | 56 +-------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index f9d8de47..abaee900 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -14,66 +14,14 @@ network_check update_os msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y \ - git \ - curl \ - sudo \ - mc \ - bluez \ - libffi-dev \ - libssl-dev \ - libjpeg-dev \ - zlib1g-dev \ - autoconf \ - build-essential \ - libopenjp2-7 \ - libturbojpeg0-dev \ - ffmpeg \ - liblapack3 \ - liblapack-dev \ - dbus-broker \ - libpcap-dev \ - libavdevice-dev \ - libavformat-dev \ - libavcodec-dev \ - libavutil-dev \ - libavfilter-dev \ - libmariadb-dev-compat \ - libatlas-base-dev +$STD apt-get install -y {git,curl,sudo,mc,bluez,libffi-dev,libssl-dev,libjpeg-dev,zlib1g-dev,autoconf,build-essential,libopenjp2-7,libturbojpeg0-dev,ffmpeg,liblapack3,liblapack-dev,dbus-broker,libpcap-dev,libavdevice-dev,libavformat-dev,libavcodec-dev,libavutil-dev,libavfilter-dev,libmariadb-dev-compat,libatlas-base-dev,python3-pip,python3.12-venv} msg_ok "Installed Dependencies" -#RELEASE=$(curl -s https://www.python.org/downloads/ | grep -oP 'Download Python \K\d+\.\d+\.\d+' | head -1) - -msg_info "Compiling Python 3.12 from its source (Additional Patience)" -$STD apt-get remove -y python3 -$STD apt-get install -y \ - checkinstall \ - libreadline-dev \ - libncursesw5-dev \ - libssl-dev \ - libsqlite3-dev \ - tk-dev \ - libgdbm-dev \ - libc6-dev \ - libbz2-dev - -#wget -qO- https://www.python.org/ftp/python/${RELEASE}/Python-${RELEASE}.tar.xz | tar -xJ -wget -qO- https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tar.xz | tar -xJ -cd Python-3.12.2 -$STD ./configure --enable-optimizations -$STD make -j $(nproc) -$STD make altinstall -$STD update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1 -cd ~ -rm -rf Python-3.12.2 -msg_ok "Installed Python 3.12" - msg_info "Installing Home Assistant-Core" mkdir /srv/homeassistant cd /srv/homeassistant python3 -m venv . source bin/activate -$STD pip install --upgrade pip $STD pip install webrtcvad $STD python3 -m pip install wheel $STD pip install homeassistant @@ -96,7 +44,7 @@ RestartForceExitStatus=100 [Install] WantedBy=multi-user.target EOF -$STD systemctl enable --now homeassistant +systemctl enable -q --now homeassistant msg_ok "Created Service" motd_ssh From 497994381f2a65259cd313a20045a6a65ad9daae Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 01:23:59 -0400 Subject: [PATCH 3060/3335] Update homeassistant-core.sh Default Ubuntu 24.04 --- ct/homeassistant-core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 738e2ea1..01c1c36f 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -22,8 +22,8 @@ APP="Home Assistant-Core" var_disk="8" var_cpu="2" var_ram="1024" -var_os="debian" -var_version="12" +var_os="ubuntu" +var_version="24.04" variables color catch_errors From 98aaaf5bd1bb50f8da0b6aa02ace05e810d97400 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 01:34:34 -0400 Subject: [PATCH 3061/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0321be19..4433fd31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **Kernel Pin** - NEW Script +- **Home Assistant Core LXC** + - Ubuntu 24.04 ONLY ## 2024-05-07 From c1a3b142b038430c8e3dd1436fcc19bb58fcda53 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Wed, 8 May 2024 15:43:17 +0200 Subject: [PATCH 3062/3335] avoid warning messages in cron logs (#2932) --- misc/update-lxcs-cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index de5fded8..ebd6e972 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -22,7 +22,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt-get upgrade --dry-run && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y" ;; esac } From 0a392dc70ae4b0b337e7a03617d0385d31728c83 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 10:03:34 -0400 Subject: [PATCH 3063/3335] Delete misc/edge-kernel.sh No longer needed --- misc/edge-kernel.sh | 168 -------------------------------------------- 1 file changed, 168 deletions(-) delete mode 100644 misc/edge-kernel.sh diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh deleted file mode 100644 index fa24386d..00000000 --- a/misc/edge-kernel.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" -function header_info { -cat <<"EOF" - ____ _ ________ ______ __ __ __ __ - / __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____ - / /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/ - / ____/| |/ / /___ / /___/ /_/ / /_/ / __/ / /| / __/ / / / / / __/ (__ ) -/_/ |___/_____/ /_____/\__,_/\__, /\___/ /_/ |_\___/_/ /_/ /_/\___/_/____/ - /____/ - -EOF -} -set -e -KERNEL_ON=$(uname -r) -PVE_KERNEL=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) -EDGE_KERNEL=$(dpkg --list | grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1) -VER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-9) }') -KER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-6) }') -clear -header_info -while true; do - read -p "This is a Proxmox Edge Kernel Tool, USE AT YOUR OWN RISK. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -header_info -show_menu() { - normal=$(echo "\033[m") - safe=$(echo "\033[32m") - menu=$(echo "\033[36m") - number=$(echo "\033[33m") - bgred=$(echo "\033[41m") - fgred=$(echo "\033[31m") - proxmox-boot-tool kernel list - echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}" - printf "\n${menu}*********************************************${normal}\n" - printf "${menu}**${number} 1)${normal} Install Proxmox Edge Kernel ${menu}${KER}${normal} & Reboot\n" - printf "${menu}**${number} 2)${normal} Switch to Proxmox VE 7 ${menu}${PVE_KERNEL}${normal} Kernel & Reboot\n" - printf "${menu}**${number} 3)${normal} Switch to Proxmox Edge ${menu}${EDGE_KERNEL}${normal} Kernel & Reboot\n" - printf "${menu}**${number} 4)${normal} Unpin Current Kernel\n" - printf "${menu}**${number} 5)${normal} Remove All Current ${menu}${VER}*${normal} Proxmox Edge Kernels & Reboot\n" - printf "${menu}*********************************************${normal}\n" - printf "Please choose an option from the menu, or ${fgred}x${normal} to exit." - read opt -} -option_picked() { - msgcolor=$(echo "\033[01;31m") - normal=$(echo "\033[00;00m") - message=${@:-"${normal}Error: No message passed"} - printf "${msgcolor}${message}${normal}\n" -} -clear -header_info -show_menu -while [ "$opt" != "" ]; do - if [ "$opt" = "" ]; then - exit - else - case $opt in - 1) - while true; do - read -p "Are you sure you want to Install Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac - done - clear - option_picked "Installing Proxmox Edge Kernel & Rebooting" - apt-get install -y gnupg - curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add - - echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" >/etc/apt/sources.list.d/pve-edge-kernel.list - apt-get -y update - apt-get -y install pve-kernel-${VER}-edge - reboot - break - ;; - 2) - while true; do - read -p "Are you sure you want to Switch to Proxmox VE 7 ${PVE_KERNEL} Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac - done - clear - option_picked "Switching to Proxmox VE 7 Kernel & Rebooting" - proxmox-boot-tool kernel pin ${PVE_KERNEL} - reboot - break - ;; - 3) - while true; do - read -p "Are you sure you want to Switch to Proxmox ${EDGE_KERNEL} Edge Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac - done - clear - option_picked "Switching to Proxmox Edge Kernel & Rebooting" - proxmox-boot-tool kernel pin ${EDGE_KERNEL} - reboot - break - ;; - 4) - while true; do - read -p "Are you sure you want to Unpin the Current Kernel? Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac - done - clear - option_picked "Unpinning Current Kernel" - proxmox-boot-tool kernel unpin - clear - break - ;; - 5) - while true; do - read -p "Are you sure you want to Remove Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac - done - clear - option_picked "Removing Proxmox Edge Kernel & Rebooting" - apt --purge remove -y pve-kernel-${VER}*edge pve-headers-${VER}*edge - rm -rf /etc/apt/sources.list.d/pve-edge-kernel.list - proxmox-boot-tool kernel unpin - reboot - break - ;; - x) - exit - ;; - \n) - exit - ;; - *) - clear - option_picked "Please choose an option from the menu" - header_info - show_menu - ;; - esac - fi -done -header_info -show_menu From c13b868ddaf4ac13a589c6176bd383a0fa2c3aed Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 12:40:27 -0400 Subject: [PATCH 3064/3335] Update paperless-ngx-install.sh ensure UTF8 --- install/paperless-ngx-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 23d8aa1b..2dfee033 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -102,7 +102,7 @@ DB_USER=paperless DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" From d0439cde1cc908faffcc49413f7aca4d05df57a0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 13:30:07 -0400 Subject: [PATCH 3065/3335] Update paperless-ngx-install.sh tweak --- install/paperless-ngx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 2dfee033..44df6824 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -90,6 +90,7 @@ sed -i -e "s|#PAPERLESS_CONSUMPTION_DIR=../consume|PAPERLESS_CONSUMPTION_DIR=/op sed -i -e "s|#PAPERLESS_DATA_DIR=../data|PAPERLESS_DATA_DIR=/opt/paperless/data|" /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_MEDIA_ROOT=../media|PAPERLESS_MEDIA_ROOT=/opt/paperless/media|" /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_STATICDIR=../static|PAPERLESS_STATICDIR=/opt/paperless/static|" /opt/paperless/paperless.conf +echo "${Paperlessngx}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Paperless-ngx" msg_info "Installing Natural Language Toolkit (Patience)" From 5204ad7e16cd9c7cbed5850e89a04ea8e52c07cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 13:34:01 -0400 Subject: [PATCH 3066/3335] Update paperless-ngx.sh add version check --- ct/paperless-ngx.sh | 52 ++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index fdb49961..0e3b90d5 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -66,33 +66,37 @@ function update_script() { 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then - msg_info "Stopping all Paperless-ngx Services" - systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service - msg_ok "Stopped all Paperless-ngx Services" + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping all Paperless-ngx Services" + systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service + msg_ok "Stopped all Paperless-ngx Services" - msg_info "Updating to ${RELEASE}" - cd ~ - wget -q https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz - tar -xf paperless-ngx-$RELEASE.tar.xz - cp -r /opt/paperless/paperless.conf paperless-ngx/ - cp -r paperless-ngx/* /opt/paperless/ - cd /opt/paperless - pip install -r requirements.txt &>/dev/null - cd /opt/paperless/src - /usr/bin/python3 manage.py migrate &>/dev/null - msg_ok "Updated to ${RELEASE}" + msg_info "Updating to ${RELEASE}" + cd ~ + wget -q https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz + tar -xf paperless-ngx-$RELEASE.tar.xz + cp -r /opt/paperless/paperless.conf paperless-ngx/ + cp -r paperless-ngx/* /opt/paperless/ + cd /opt/paperless + pip install -r requirements.txt &>/dev/null + cd /opt/paperless/src + /usr/bin/python3 manage.py migrate &>/dev/null + msg_ok "Updated to ${RELEASE}" - msg_info "Cleaning up" - cd ~ - rm paperless-ngx-$RELEASE.tar.xz - rm -rf paperless-ngx - msg_ok "Cleaned" + msg_info "Cleaning up" + cd ~ + rm paperless-ngx-$RELEASE.tar.xz + rm -rf paperless-ngx + msg_ok "Cleaned" - msg_info "Starting all Paperless-ngx Services" - systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service - sleep 1 - msg_ok "Started all Paperless-ngx Services" - msg_ok "Updated Successfully!\n" + msg_info "Starting all Paperless-ngx Services" + systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service + sleep 1 + msg_ok "Started all Paperless-ngx Services" + msg_ok "Updated Successfully!\n" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit fi if [ "$UPD" == "2" ]; then From ef4d18f8705a22d1b8f2e8152bd5b4a2b60cfc5b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 13:48:08 -0400 Subject: [PATCH 3067/3335] Update paperless-ngx.sh tweak --- ct/paperless-ngx.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 0e3b90d5..d23986b1 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -81,6 +81,7 @@ function update_script() { pip install -r requirements.txt &>/dev/null cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated to ${RELEASE}" msg_info "Cleaning up" From bd94aad7fa7d54f75c680af47fb01896046d9d8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 14:42:24 -0400 Subject: [PATCH 3068/3335] Update paperless-ngx.sh tweak --- ct/paperless-ngx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index d23986b1..07badf17 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -66,7 +66,7 @@ function update_script() { 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt 2>/dev/null ]]; then msg_info "Stopping all Paperless-ngx Services" systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service msg_ok "Stopped all Paperless-ngx Services" From d46076cab98ea07325e767d1668efd5a8be01266 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 8 May 2024 15:48:02 -0400 Subject: [PATCH 3069/3335] Update paperless-ngx.sh - fix syntax error in conditional expression - fixes https://github.com/tteck/Proxmox/issues/2938 --- ct/paperless-ngx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 07badf17..d23986b1 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -66,7 +66,7 @@ function update_script() { 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt 2>/dev/null ]]; then + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping all Paperless-ngx Services" systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service msg_ok "Stopped all Paperless-ngx Services" From bd564168981e62973670de354de496b04ede9efb Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 03:32:09 -0400 Subject: [PATCH 3070/3335] Update bug_report.yaml tweak --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 3789546e..26e62e89 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -48,7 +48,7 @@ body: - Debian 12 - Ubuntu 20.04 - Ubuntu 22.04 - - Ubuntu 23.10 + - Ubuntu 24.04 - type: textarea id: screenshot attributes: From 12bd10bef3a2682acc1868960ef219ad49b6cc9a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 09:13:13 -0400 Subject: [PATCH 3071/3335] Update wireguard.sh "There is currently no update path available." --- ct/wireguard.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 23e75b80..f2dc848a 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -60,9 +60,7 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null +msg_error "There is currently no update path available." exit fi if [ "$UPD" == "2" ]; then From 0e01ceb460c72f096402c4f44e67471de6ef6628 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 09:26:17 -0400 Subject: [PATCH 3072/3335] Update wireguard.sh fix update --- ct/wireguard.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index f2dc848a..5feee4ac 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -60,7 +60,10 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio 3>&1 1>&2 2>&3) header_info if [ "$UPD" == "1" ]; then -msg_error "There is currently no update path available." +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" exit fi if [ "$UPD" == "2" ]; then From 91985329f6ec95cc969f8af27ac319daf442d941 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Thu, 9 May 2024 18:01:00 +0200 Subject: [PATCH 3073/3335] New LXC: umami (#2946) --- ct/umami.sh | 61 ++++++++++++++++++++++++++++ install/umami-install.sh | 85 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 ct/umami.sh create mode 100644 install/umami-install.sh diff --git a/ct/umami.sh b/ct/umami.sh new file mode 100644 index 00000000..312a504f --- /dev/null +++ b/ct/umami.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ + __ ______ ___ ____ _____ ___ (_) + / / / / __ `__ \/ __ `/ __ `__ \/ / +/ /_/ / / / / / / /_/ / / / / / / / +\__,_/_/ /_/ /_/\__,_/_/ /_/ /_/_/ + +EOF +} +header_info +echo -e "Loading..." +APP="umami" +var_disk="8" +var_cpu="1" +var_ram="512" +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 +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" \ No newline at end of file diff --git a/install/umami-install.sh b/install/umami-install.sh new file mode 100644 index 00000000..ce8f008d --- /dev/null +++ b/install/umami-install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y gpg +$STD apt-get install -y postgresql +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g yarn +msg_ok "Installed Node.js" + +msg_info "Setting up postgresql" +DB_NAME=umamidb +DB_USER=umami +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" +sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +echo "" >umami.creds +echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>umami.creds +echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>umami.creds +echo -e "umami Database Name: \e[32m$DB_NAME\e[0m" >>umami.creds +msg_ok "Set up postgresql" + +msg_info "Installing Umami (Patience)" +git clone -q https://github.com/umami-software/umami.git /opt/umami +cd /opt/umami +$STD yarn install +echo -e "DATABASE_URL=postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" >>/opt/umami/.env +$STD yarn run build +msg_ok "Installed Umami" + +msg_info "Creating Service" +cat </etc/systemd/system/umami.service +echo "[Unit] +Description=umami + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/umami +ExecStart=/usr/bin/yarn run start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now umami.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From 9483d83c5ed4a4d1168448a8e98a223bb225d484 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 12:08:07 -0400 Subject: [PATCH 3074/3335] Update umami-install.sh silent postgres commands --- install/umami-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/umami-install.sh b/install/umami-install.sh index ce8f008d..1ac1c1ca 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -39,11 +39,11 @@ DB_NAME=umamidb DB_USER=umami DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" -sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" -sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" -sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" -sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" -sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" echo "" >umami.creds echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>umami.creds echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>umami.creds @@ -82,4 +82,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From afe90a8417912d543e5aa0fafe5fd77a8c9c6cca Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 12:11:23 -0400 Subject: [PATCH 3075/3335] Update umami.sh adjust resources --- ct/umami.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/umami.sh b/ct/umami.sh index 312a504f..c921f892 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -19,9 +19,9 @@ EOF header_info echo -e "Loading..." APP="umami" -var_disk="8" -var_cpu="1" -var_ram="512" +var_disk="12" +var_cpu="2" +var_ram="1024" var_os="debian" var_version="12" variables @@ -58,4 +58,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" \ No newline at end of file + ${BL}http://${IP}:3000${CL} \n" From f8b5fbe3deb2a4f68fbef4bae941c071f354fbec Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 12:25:01 -0400 Subject: [PATCH 3076/3335] Update umami.sh adjust resources for the build --- ct/umami.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/umami.sh b/ct/umami.sh index c921f892..3ea2d323 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="umami" var_disk="12" var_cpu="2" -var_ram="1024" +var_ram="2048" var_os="debian" var_version="12" variables @@ -56,6 +56,10 @@ start build_container description +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 1024 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" From 5ecfd4e1b5dfdc707756ab732e9546ffde3a5f6d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 13:07:09 -0400 Subject: [PATCH 3077/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4433fd31..d1e6b77f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-09 + +### Changed + +- **Umami LXC** + - NEW Script + ## 2024-05-08 ### Changed From 4bce8ff991850a463905e614a8f1ec1864f1347b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 9 May 2024 15:02:29 -0400 Subject: [PATCH 3078/3335] Update install.func tweak --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index ab0b7d5d..80a5c2e2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -171,7 +171,7 @@ EOF # This function modifies the message of the day (motd) and SSH settings motd_ssh() { echo "export TERM='xterm-256color'" >>/root/.bashrc - echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd + echo -e "$APPLICATION LXC provided by https://helper-scripts.com/\n" >/etc/motd chmod -x /etc/update-motd.d/* if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config From 549f8484109ab747b00c120307de7f46158b8c8c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 May 2024 14:21:33 -0400 Subject: [PATCH 3079/3335] Update umami.sh tweak --- ct/umami.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/umami.sh b/ct/umami.sh index 3ea2d323..9f94d0b9 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -18,7 +18,7 @@ EOF } header_info echo -e "Loading..." -APP="umami" +APP="Umami" var_disk="12" var_cpu="2" var_ram="2048" From d80084b9a6694f564d0393dbaae35a18eb2207f1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 10 May 2024 18:00:42 -0400 Subject: [PATCH 3080/3335] Update pocketbase.sh switch distribution to Debian 12 --- ct/pocketbase.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/pocketbase.sh b/ct/pocketbase.sh index df3858c3..d7cae744 100644 --- a/ct/pocketbase.sh +++ b/ct/pocketbase.sh @@ -22,8 +22,8 @@ APP="Pocketbase" var_disk="8" var_cpu="1" var_ram="512" -var_os="ubuntu" -var_version="22.04" +var_os="debian" +var_version="12" variables color catch_errors From f1ef008fccbcaad09da7fadc855f646ce73ef737 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 May 2024 19:22:24 -0400 Subject: [PATCH 3081/3335] Create caddy-install.sh --- install/caddy-install.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 install/caddy-install.sh diff --git a/install/caddy-install.sh b/install/caddy-install.sh new file mode 100644 index 00000000..88fb8b1a --- /dev/null +++ b/install/caddy-install.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y {debian-keyring,debian-archive-keyring,apt-transport-https,gpg,curl,sudo,mc} +msg_ok "Installed Dependencies" + +msg_info "Installing Caddy" +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' >/etc/apt/sources.list.d/caddy-stable.list +$STD apt-get update +$STD apt-get install -y caddy +msg_ok "Installed Caddy" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 9a3f19eece34b94375f84b4f2ccca0819cf39aa6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 May 2024 19:23:25 -0400 Subject: [PATCH 3082/3335] Create caddy.sh --- ct/caddy.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/caddy.sh diff --git a/ct/caddy.sh b/ct/caddy.sh new file mode 100644 index 00000000..6df98d39 --- /dev/null +++ b/ct/caddy.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ __ + / ____/___ _____/ /___/ /_ __ + / / / __ `/ __ / __ / / / / +/ /___/ /_/ / /_/ / /_/ / /_/ / +\____/\__,_/\__,_/\__,_/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Caddy" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /etc/caddy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" From 3fb1a23cd3e67eae21b96d4ce33f6f1f9749648d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 May 2024 19:29:59 -0400 Subject: [PATCH 3083/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e6b77f..4664ad7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-11 + +### Changed + +- **Caddy LXC** + - NEW Script + ## 2024-05-09 ### Changed From 218c3b2cc97acc284e4a30e32f620b0699e2b27a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 12 May 2024 06:36:55 -0400 Subject: [PATCH 3084/3335] Update zoraxy.sh Adjust build resources --- ct/zoraxy.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 8d3a771b..efcd250a 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -19,8 +19,8 @@ EOF header_info echo -e "Loading..." APP="Zoraxy" -var_disk="4" -var_cpu="2" +var_disk="6" +var_cpu="4" var_ram="2048" var_os="debian" var_version="12" @@ -63,6 +63,9 @@ start build_container description +msg_info "Setting Container to Normal Resources" +pct set $CTID -cores 2 +msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8000${CL} \n" From 368e8f2d58ba1fa0743452dd071b4eb18eda0caf Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 May 2024 05:28:18 -0400 Subject: [PATCH 3085/3335] Create headscale-install.sh --- install/headscale-install.sh | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 install/headscale-install.sh diff --git a/install/headscale-install.sh b/install/headscale-install.sh new file mode 100644 index 00000000..cead9fb7 --- /dev/null +++ b/install/headscale-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/juanfont/headscale/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing ${APPLICATION} v${RELEASE}" +wget -q https://github.com/juanfont/headscale/releases/download/v${RELEASE}/headscale_${RELEASE}_linux_amd64.deb +$STD dpkg -i headscale_${RELEASE}_linux_amd64.deb +systemctl enable -q --now headscale +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed ${APPLICATION} v${RELEASE}" + +motd_ssh +customize + +msg_info "Cleaning up" +rm headscale_${RELEASE}_linux_amd64.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 12173c3d14b4de234bcc0a9e7e032690ac0b4901 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 May 2024 05:29:24 -0400 Subject: [PATCH 3086/3335] Create headscale.sh --- ct/headscale.sh | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 ct/headscale.sh diff --git a/ct/headscale.sh b/ct/headscale.sh new file mode 100644 index 00000000..f50347eb --- /dev/null +++ b/ct/headscale.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ __ + / / / /__ ____ _____/ /_____________ _/ /__ + / /_/ / _ \/ __ `/ __ / ___/ ___/ __ `/ / _ \ + / __ / __/ /_/ / /_/ (__ ) /__/ /_/ / / __/ +/_/ /_/\___/\__,_/\__,_/____/\___/\__,_/_/\___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Headscale" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -d /etc/headscale ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + +RELEASE=$(curl -s https://api.github.com/repos/juanfont/headscale/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping ${APP}" + systemctl stop headscale + msg_ok "Stopped ${APP}" + + msg_info "Updating $APP to v${RELEASE}" + wget -q https://github.com/juanfont/headscale/releases/download/v${RELEASE}/headscale_${RELEASE}_linux_amd64.deb + dpkg -i headscale_${RELEASE}_linux_amd64.deb + rm headscale_${RELEASE}_linux_amd64.deb + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Starting ${APP}" + systemctl start headscale + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" From b3cf19141f9a680412df4a1079f6d8226659481a Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 May 2024 05:44:58 -0400 Subject: [PATCH 3087/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4664ad7d..fbadff7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-13 + +### Changed + +- **Headscale LXC** + - NEW Script + ## 2024-05-11 ### Changed From a04fd986dcded900f52a654ffd33427154f9e798 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 May 2024 11:09:27 -0400 Subject: [PATCH 3088/3335] Update vaultwarden.sh - increase RAM during build to 5GB - fixes https://github.com/tteck/Proxmox/issues/2977 --- ct/vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 53b04287..b5cb6fa5 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="Vaultwarden" var_disk="6" var_cpu="4" -var_ram="4096" +var_ram="5120" var_os="debian" var_version="12" variables From 4d3afc012b9faed809fd0e320b44d7a116ac252b Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 May 2024 20:00:04 -0400 Subject: [PATCH 3089/3335] Update frigate-install.sh Change the RELEASE= command in an attempt to fix the Segmentation fault --- install/frigate-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index b5b53ca7..37484ccb 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -45,8 +45,8 @@ if [[ "$CTTYPE" == "0" ]]; then chmod 660 /dev/dri/* fi msg_ok "Set Up Hardware Acceleration" - -RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | sed -n 's/.*"tag_name": "\(.*\)",/\1/p') +#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) msg_info "Installing Frigate $RELEASE (Perseverance)" cd ~ mkdir -p /opt/frigate/models From 48ae95bdead7e0d8f2fcec1687e4786bbeb25aa3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 13 May 2024 20:17:10 -0400 Subject: [PATCH 3090/3335] Update frigate-install.sh revert --- install/frigate-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 37484ccb..bfb4c380 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -45,8 +45,8 @@ if [[ "$CTTYPE" == "0" ]]; then chmod 660 /dev/dri/* fi msg_ok "Set Up Hardware Acceleration" -RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | sed -n 's/.*"tag_name": "\(.*\)",/\1/p') -#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | sed -n 's/.*"tag_name": "\(.*\)",/\1/p') +RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) msg_info "Installing Frigate $RELEASE (Perseverance)" cd ~ mkdir -p /opt/frigate/models From 6c4e2aa7fea3e7799223341d0cafea165a778159 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 May 2024 01:27:16 -0400 Subject: [PATCH 3091/3335] Update frigate-install.sh Another attempt to fix the Segmentation fault --- install/frigate-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index bfb4c380..defac274 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y {curl,sudo,mc,git,gpg,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev} +$STD apt-get install -y {curl,sudo,mc,git,gpg,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev,jq} msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" @@ -45,8 +45,8 @@ if [[ "$CTTYPE" == "0" ]]; then chmod 660 /dev/dri/* fi msg_ok "Set Up Hardware Acceleration" -#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | sed -n 's/.*"tag_name": "\(.*\)",/\1/p') -RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') +#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) msg_info "Installing Frigate $RELEASE (Perseverance)" cd ~ mkdir -p /opt/frigate/models From 36fd84660150bd0ab83afc53e9262c88a8ac0e4c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 May 2024 02:00:33 -0400 Subject: [PATCH 3092/3335] Update frigate-install.sh stop spinner during "Installing Frigate" --- install/frigate-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index defac274..d67cadba 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -48,6 +48,7 @@ msg_ok "Set Up Hardware Acceleration" RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') #RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) msg_info "Installing Frigate $RELEASE (Perseverance)" +if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi cd ~ mkdir -p /opt/frigate/models wget -q https://github.com/blakeblackshear/frigate/archive/refs/tags/${RELEASE}.tar.gz -O frigate.tar.gz From db157d02e4ee930c3610b3bc58a8c9e73093d150 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 14 May 2024 02:13:07 -0400 Subject: [PATCH 3093/3335] Update frigate-install.sh tweak --- install/frigate-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index d67cadba..50847e70 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -46,7 +46,7 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_ok "Set Up Hardware Acceleration" RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') -#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) +msg_ok "Stop spinner to prevent segmentation fault" msg_info "Installing Frigate $RELEASE (Perseverance)" if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi cd ~ From ca8b655c812ab4d4779b060b3568eb1bbdb2004f Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Thu, 16 May 2024 12:12:32 +0200 Subject: [PATCH 3094/3335] Add LXC: Iventoy (#2988) --- ct/iventoy.sh | 67 ++++++++++++++++++++++++++++++++++++++ install/iventoy-install.sh | 58 +++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 ct/iventoy.sh create mode 100644 install/iventoy-install.sh diff --git a/ct/iventoy.sh b/ct/iventoy.sh new file mode 100644 index 00000000..08e067ab --- /dev/null +++ b/ct/iventoy.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ _ __ __ + (_) | / /__ ____ / /_____ __ __ + / /| | / / _ \/ __ \/ __/ __ \/ / / / + / / | |/ / __/ / / / /_/ /_/ / /_/ / +/_/ |___/\___/_/ /_/\__/\____/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="iVentoy" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="0" + 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() { +if [[ ! -d /opt/iventoy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "There is currently no update path available." +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:26000/ ${CL} \n" \ No newline at end of file diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh new file mode 100644 index 00000000..02601d7e --- /dev/null +++ b/install/iventoy-install.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing iVentoy v${RELEASE}" +mkdir -p /opt/iventoy/ +wget -q https://github.com/ventoy/PXE/releases/download/v${RELEASE}/iventoy-${RELEASE}-linux-free.tar.gz +tar -C /tmp -xzf iventoy*.tar.gz +mv /tmp/iventoy*/* /opt/iventoy/ +rm -rf iventoy*.tar.gz +msg_ok "Installed iVentoy" + +msg_info "Creating Service" +cat </etc/systemd/system/iventoy.service +[Unit] +Description =iVentoy PXE Booter +Documentation =https://www.iventoy.com +Wants =network-online.target +[Service] +Type =forking +Environment =IVENTOY_API_ALL=1 +Environment =IVENTOY_AUTO_RUN=1 +Environment =LIBRARY_PATH=/opt/iventoy/lib/lin64 +Environment =LD_LIBRARY_PATH=/opt/iventoy/lib/lin64 +ExecStart =sh ./iventoy.sh -R start +WorkingDirectory =/opt/iventoy +Restart =on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now iventoy.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From 9dac75a48b936680e2d6d959ce7e8c252d53953c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 16 May 2024 08:05:02 -0400 Subject: [PATCH 3095/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbadff7a..f74f74da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-16 + +### Changed + +- **iVentoy LXC** + - NEW Script + ## 2024-05-13 ### Changed From 26ba9ea323793663a5fdfa442440cba999637a2e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 May 2024 04:20:46 -0400 Subject: [PATCH 3096/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f74f74da..064f42aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-17 + +### Changed + +- **New Website** + - We have officially moved to [Helper-Scripts.com](https://helper-scripts.com) + ## 2024-05-16 ### Changed From 990e299b3520fa2f6d100423157e417a1d6600d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 17 May 2024 09:56:31 -0400 Subject: [PATCH 3097/3335] Update pve8-upgrade.sh fix version check --- misc/pve8-upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index f4a79136..86aaee2f 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -124,10 +124,10 @@ if ! command -v pveversion >/dev/null 2>&1; then exit fi -if ! pveversion | grep -Eq "pve-manager/(7\.4-(13|14|15|16|17))"; then +if ! pveversion | grep -Eq "pve-manager/(7\.4-(16|17|18|19))"; then header_info msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e " PVE Version 7.4-13 or higher is required." + echo -e " PVE Version 7.4-16 or higher is required." echo -e "\nExiting..." sleep 3 exit From 906b6c07d238027ee299f8addc87905ad7f5adc0 Mon Sep 17 00:00:00 2001 From: xairoo Date: Sat, 18 May 2024 16:32:33 +0200 Subject: [PATCH 3098/3335] MongoDB LXC added (#3004) --- ct/mongodb.sh | 69 ++++++++++++++++++++++++++++++++++++++ install/mongodb-install.sh | 38 +++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 ct/mongodb.sh create mode 100644 install/mongodb-install.sh diff --git a/ct/mongodb.sh b/ct/mongodb.sh new file mode 100644 index 00000000..128c0893 --- /dev/null +++ b/ct/mongodb.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ ____ ____ + / |/ /___ ____ ____ _____ / __ \/ __ ) + / /|_/ / __ \/ __ \/ __ `/ __ \/ / / / __ | + / / / / /_/ / / / / /_/ / /_/ / /_/ / /_/ / +/_/ /_/\____/_/ /_/\__, /\____/_____/_____/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="MongoDB" +var_disk="4" +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 +if [[ ! -f /etc/apt/sources.list.d/mongodb-org-7.0.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/install/mongodb-install.sh b/install/mongodb-install.sh new file mode 100644 index 00000000..92cfffea --- /dev/null +++ b/install/mongodb-install.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y gnupg +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing MongoDB" +wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list +$STD apt-get update +$STD apt-get install -y mongodb-org +sed -i 's/bindIp: 127.0.0.1/bindIp 0.0.0.0/' /etc/mongod.conf +systemctl enable -q --now mongod.service +msg_ok "Installed MongoDB" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From b91c8a79c5e7cbcefafc316b7cfa4e8138a4152d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 May 2024 10:42:46 -0400 Subject: [PATCH 3099/3335] Update mongodb.sh tweak --- ct/mongodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/mongodb.sh b/ct/mongodb.sh index 128c0893..5b88ca4b 100644 --- a/ct/mongodb.sh +++ b/ct/mongodb.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="MongoDB" var_disk="4" var_cpu="1" -var_ram="1024" +var_ram="512" var_os="debian" var_version="12" variables From a4fed89490667768069c617785df1914e1933f0c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 May 2024 11:31:56 -0400 Subject: [PATCH 3100/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 064f42aa..bf93a397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-18 + +### Changed + +- **MongoDB LXC** + - NEW Script + ## 2024-05-17 ### Changed From ef87f69fa0a68c7f26c8b71b9ab61b20a68fa2fd Mon Sep 17 00:00:00 2001 From: xairoo Date: Sat, 18 May 2024 18:42:59 +0200 Subject: [PATCH 3101/3335] Debian title style fixed (#3006) There was an extra `_` on the `n` --- ct/debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/debian.sh b/ct/debian.sh index adfd810e..2472b0ac 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -9,7 +9,7 @@ function header_info { clear cat <<"EOF" ____ __ _ - / __ \___ / /_ (_)___ _____ + / __ \___ / /_ (_)___ ____ / / / / _ \/ __ \/ / __ `/ __ \ / /_/ / __/ /_/ / / /_/ / / / / /_____/\___/_.___/_/\__,_/_/ /_/ From 1b842f22cfff1f11eca08d5f8485e0e6f323dc04 Mon Sep 17 00:00:00 2001 From: xairoo Date: Sat, 18 May 2024 19:21:25 +0200 Subject: [PATCH 3102/3335] `sed` for YAML config fixed (#3007) Added missing `:` which is required for the YAML config. --- install/mongodb-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/mongodb-install.sh b/install/mongodb-install.sh index 92cfffea..6839ae51 100644 --- a/install/mongodb-install.sh +++ b/install/mongodb-install.sh @@ -25,7 +25,7 @@ wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/us echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list $STD apt-get update $STD apt-get install -y mongodb-org -sed -i 's/bindIp: 127.0.0.1/bindIp 0.0.0.0/' /etc/mongod.conf +sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf systemctl enable -q --now mongod.service msg_ok "Installed MongoDB" From 0cd751d75c3d6ffe3c2c618a7b6b44b99076b468 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 18 May 2024 13:36:05 -0400 Subject: [PATCH 3103/3335] Update iventoy-install.sh create `data` and `iso` directories. --- install/iventoy-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh index 02601d7e..3c3e3953 100644 --- a/install/iventoy-install.sh +++ b/install/iventoy-install.sh @@ -21,7 +21,7 @@ msg_ok "Installed Dependencies" RELEASE=$(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing iVentoy v${RELEASE}" -mkdir -p /opt/iventoy/ +mkdir -p /opt/iventoy/{data,iso} wget -q https://github.com/ventoy/PXE/releases/download/v${RELEASE}/iventoy-${RELEASE}-linux-free.tar.gz tar -C /tmp -xzf iventoy*.tar.gz mv /tmp/iventoy*/* /opt/iventoy/ @@ -55,4 +55,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From 22780bbf58348554422a853d055fd33b20d76ce0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 07:30:05 -0400 Subject: [PATCH 3104/3335] Update umami-install.sh tweak --- install/umami-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/umami-install.sh b/install/umami-install.sh index 1ac1c1ca..943c0413 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -44,10 +44,10 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" -echo "" >umami.creds -echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>umami.creds -echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>umami.creds -echo -e "umami Database Name: \e[32m$DB_NAME\e[0m" >>umami.creds +echo "" >~/umami.creds +echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>~/umami.creds +echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>~/umami.creds +echo -e "umami Database Name: \e[32m$DB_NAME\e[0m" >>~/umami.creds msg_ok "Set up postgresql" msg_info "Installing Umami (Patience)" From 8b0400bd9492e80fc702e5e4fa8d915cbe67907e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 12:19:12 -0400 Subject: [PATCH 3105/3335] Update redis-install.sh tweak --- install/redis-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/redis-install.sh b/install/redis-install.sh index 053e2088..18354ed9 100644 --- a/install/redis-install.sh +++ b/install/redis-install.sh @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Redis" curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list +echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" >/etc/apt/sources.list.d/redis.list $STD apt-get update $STD apt-get install -y redis sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis/redis.conf From dc01c8bdcd0024b92bd787e6ba4dc47f8f5cbaad Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 12:27:11 -0400 Subject: [PATCH 3106/3335] Update redis-install.sh tweak --- install/redis-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/redis-install.sh b/install/redis-install.sh index 18354ed9..488d787a 100644 --- a/install/redis-install.sh +++ b/install/redis-install.sh @@ -18,12 +18,12 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y apt-transport-https -$STD apt-get install -y gnupg +$STD apt-get install -y gpg $STD apt-get install -y lsb-release msg_ok "Installed Dependencies" msg_info "Installing Redis" -curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg +wget -qO- https://packages.redis.io/gpg | gpg --dearmor >/usr/share/keyrings/redis-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" >/etc/apt/sources.list.d/redis.list $STD apt-get update $STD apt-get install -y redis From 08032f165f77d3a1b2f4517de9f8c1bd9d290916 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 18:06:50 -0400 Subject: [PATCH 3107/3335] Update add-tailscale-lxc.sh Code refactoring --- misc/add-tailscale-lxc.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index e5bcfaec..13307333 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -59,8 +59,14 @@ lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file EOF header_info msg "Installing Tailscale..." -lxc-attach -n $CTID -- bash -c "$(curl -fsSL https://tailscale.com/install.sh)" &>/dev/null || exit -msg "Installed Tailscale" -sleep 2 -msg "\e[1;32m ✔ Completed Successfully!\e[0m" +pct exec "$CTID" -- bash -c ' +ID=$(grep "^ID=" /etc/os-release | cut -d"=" -f2) +VER=$(grep "^VERSION_CODENAME=" /etc/os-release | cut -d"=" -f2) +wget -qO- https://pkgs.tailscale.com/stable/$ID/$VER.noarmor.gpg >/usr/share/keyrings/tailscale-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/$ID $VER main" >/etc/apt/sources.list.d/tailscale.list +apt-get update &>/dev/null +apt-get install -y tailscale &>/dev/null +' || exit +msg "\e[1;32m ✔ Installed Tailscale\e[0m" + msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console\e[0m" From 8c09fafa6e2d206c9373325ba08a12633e88f8b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 18:08:25 -0400 Subject: [PATCH 3108/3335] Create add-netbird-lxc.sh --- misc/add-netbird-lxc.sh | 71 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 misc/add-netbird-lxc.sh diff --git a/misc/add-netbird-lxc.sh b/misc/add-netbird-lxc.sh new file mode 100644 index 00000000..05427106 --- /dev/null +++ b/misc/add-netbird-lxc.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ ____ _ __ + / | / /__ / /_/ __ )(_)________/ / + / |/ / _ \/ __/ __ / / ___/ __ / + / /| / __/ /_/ /_/ / / / / /_/ / +/_/ |_/\___/\__/_____/_/_/ \__,_/ + +EOF +} +header_info +set -e +while true; do + read -p "This will add NetBird to an existing LXC Container ONLY. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done +header_info +echo "Loading..." +function msg() { + local TEXT="$1" + echo -e "$TEXT" +} + +NODE=$(hostname) +MSG_MAX_LENGTH=0 +while read -r line; do + TAG=$(echo "$line" | awk '{print $1}') + ITEM=$(echo "$line" | awk '{print substr($0,36)}') + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + CTID_MENU+=("$TAG" "$ITEM " "OFF") +done < <(pct list | awk 'NR>1') + +while [ -z "${CTID:+x}" ]; do + CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \ + "\nSelect a container to add NetBird to:\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit +done + +CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf +cat <>$CTID_CONFIG_PATH +lxc.cgroup2.devices.allow: c 10:200 rwm +lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file +EOF +header_info +msg "Installing NetBird..." +pct exec "$CTID" -- bash -c ' +apt install -y ca-certificates gpg &>/dev/null +wget -qO- https://pkgs.netbird.io/debian/public.key | gpg --dearmor >/usr/share/keyrings/netbird-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main" >/etc/apt/sources.list.d/netbird.list +apt-get update &>/dev/null +apt-get install -y netbird-ui &>/dev/null +' || exit +msg "\e[1;32m ✔ Installed NetBird.\e[0m" +sleep 2 +msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run netbird up in the LXC console\e[0m" From b503418cdb62c7cbadf9a04235de061f9dfd9abc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 18:21:43 -0400 Subject: [PATCH 3109/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf93a397..9c41a84e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ - 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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-19 + +### Changed + +- **Netbird** + - NEW Script +- **Tailscale** + - Refactor Code + ## 2024-05-18 ### Changed From 2a8a65e7544e8a9cbfacaf5246d4f643e798b8db Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 19 May 2024 20:30:22 -0400 Subject: [PATCH 3110/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c41a84e..37a99022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ ### Changed -- **Netbird** +- **NetBird** - NEW Script - **Tailscale** - Refactor Code From 07585658b0edea4dce99e7b41420164d83e488d4 Mon Sep 17 00:00:00 2001 From: Uzurka <101745008+Uzurka@users.noreply.github.com> Date: Mon, 20 May 2024 10:19:48 +0200 Subject: [PATCH 3111/3335] Added Traefik (#3021) --- ct/traefik.sh | 77 ++++++++++++++++++++++++ install/traefik-install.sh | 117 +++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+) create mode 100644 ct/traefik.sh create mode 100644 install/traefik-install.sh diff --git a/ct/traefik.sh b/ct/traefik.sh new file mode 100644 index 00000000..8b393c1e --- /dev/null +++ b/ct/traefik.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ _____ __ + /_ __/________ ____ / __(_) /__ + / / / ___/ __ `/ _ \/ /_/ / //_/ + / / / / / /_/ / __/ __/ / ,< +/_/ /_/ \__,_/\___/_/ /_/_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="Traefik" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -f /etc/systemd/system/traefik.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz + tar -C /tmp -xzf traefik*.tar.gz + mv /tmp/traefik*/traefik /usr/bin/ + rm -rf traefik*.tar.gz + msg_ok "Updated $APP LXC" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8080${CL} \n" diff --git a/install/traefik-install.sh b/install/traefik-install.sh new file mode 100644 index 00000000..6696be22 --- /dev/null +++ b/install/traefik-install.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y apt-transport-https +msg_ok "Installed Dependencies" + +RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing Traefik v${RELEASE}" +mkdir -p /etc/traefik/{conf.d,ssl} +wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz +tar -C /tmp -xzf traefik*.tar.gz +mv /tmp/traefik /usr/bin/ +rm -rf traefik*.tar.gz +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Traefik v${RELEASE}" + +msg_info "Creating Traefik configuration" +cat </etc/traefik/traefik.yaml +providers: + file: + directory: /etc/traefik/conf.d/ + +entryPoints: + web: + address: ':80' + http: + redirections: + entryPoint: + to: websecure + scheme: https + websecure: + address: ':443' + http: + middlewares: + - crowdsec-bouncer@file + tls: + certResolver: letsencrypt + traefik: + address: ':8080' + +certificatesResolvers: + letsencrypt: + acme: + email: "foo@bar.com" + storage: /etc/traefik/ssl/acme.json + tlsChallenge: {} + +api: + dashboard: true + insecure: true + +log: + filePath: /var/log/traefik/traefik.log + format: json + level: INFO + +accessLog: + filePath: /var/log/traefik/traefik-access.log + format: json + filters: + statusCodes: + - "200" + - "400-599" + retryAttempts: true + minDuration: "10ms" + bufferingSize: 0 + fields: + headers: + defaultMode: drop + names: + User-Agent: keep +EOF +msg_ok "Created Traefik configuration" + +msg_info "Creating Service" +cat </etc/systemd/system/traefik.service +[Unit] +Description=Traefik is an open-source Edge Router that makes publishing your services a fun and easy experience + +[Service] +Type=notify +ExecStart=/usr/bin/traefik --configFile=/etc/traefik/traefik.yaml +Restart=on-failure +ExecReload=/bin/kill -USR1 \$MAINPID + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now traefik.service +msg_ok "Created Service" + + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From e746d7c340c815f5f85edbf1f8d9bbd09f38cafc Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 20 May 2024 04:31:59 -0400 Subject: [PATCH 3112/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37a99022..2640af1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-20 + +### Changed + +- **Traefik LXC** + - NEW Script + ## 2024-05-19 ### Changed From bf08d0a4352d71de2e2aee6d7432878535d69561 Mon Sep 17 00:00:00 2001 From: Uzurka <101745008+Uzurka@users.noreply.github.com> Date: Mon, 20 May 2024 10:37:06 +0200 Subject: [PATCH 3113/3335] Fixed Traefik : forgot to remove Crowdsec middleware in default config (#3022) --- install/traefik-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/traefik-install.sh b/install/traefik-install.sh index 6696be22..b8346196 100644 --- a/install/traefik-install.sh +++ b/install/traefik-install.sh @@ -48,8 +48,6 @@ entryPoints: websecure: address: ':443' http: - middlewares: - - crowdsec-bouncer@file tls: certResolver: letsencrypt traefik: From 3af40c52381715eeab5b0aa0d4ef30df1f977dfe Mon Sep 17 00:00:00 2001 From: Marco Cunha Date: Tue, 21 May 2024 00:38:47 +0100 Subject: [PATCH 3114/3335] Ensure logrotate doesn't use non-existing npm user (#3026) Upstream uses a dedicated user to run NPM. Ensure we do not try to user the missing user to rotate logs [which fails]. --- install/nginxproxymanager-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index ae267817..4a0873a8 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -193,6 +193,7 @@ customize msg_info "Starting Services" sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf +sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg systemctl enable -q --now openresty systemctl enable -q --now npm From d8c14cc5feb68cbe18b935ded9bab57545304b3d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 May 2024 11:16:19 -0400 Subject: [PATCH 3115/3335] Update README.md add Website Terms of Use --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a6ee17d..b38943ab 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

Proxmox VE Helper-Scripts

- Website | + Website Terms of Use | Contribute | Guides | Changelog | From 2f6ed335755a760e8fc4ff11787200bee80bb560 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 21 May 2024 12:33:57 -0400 Subject: [PATCH 3116/3335] Update traefik.sh add missing `RELEASE` variable --- ct/traefik.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/traefik.sh b/ct/traefik.sh index 8b393c1e..84a9d44a 100644 --- a/ct/traefik.sh +++ b/ct/traefik.sh @@ -55,6 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/traefik.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Updating $APP LXC" if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz From 7c5f4335fdd339f811bca4b8c49f5c6052245c53 Mon Sep 17 00:00:00 2001 From: Uzurka <101745008+Uzurka@users.noreply.github.com> Date: Wed, 22 May 2024 00:20:26 +0200 Subject: [PATCH 3117/3335] Discussion #3030 Fix (#3031) --- ct/traefik.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/traefik.sh b/ct/traefik.sh index 84a9d44a..503d51dc 100644 --- a/ct/traefik.sh +++ b/ct/traefik.sh @@ -60,7 +60,7 @@ msg_info "Updating $APP LXC" if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz tar -C /tmp -xzf traefik*.tar.gz - mv /tmp/traefik*/traefik /usr/bin/ + mv /tmp/traefik /usr/bin/ rm -rf traefik*.tar.gz msg_ok "Updated $APP LXC" else From 73291211a885df94a8419d3fa38ecbff05f9ab3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 May 2024 00:15:23 -0400 Subject: [PATCH 3118/3335] Update README.md Tweak --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b38943ab..b9869fc8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@

Proxmox VE Helper-Scripts

- Website Terms of Use | + Terms of Use | + Website | Contribute | Guides | Changelog | From d468fc6c1f0bb379f824b193113e872db72401d2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 May 2024 11:07:28 -0400 Subject: [PATCH 3119/3335] Update build.func temporally set Alpine repositories to "3.19" from "latest-stable" --- misc/build.func | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index ff2410c5..efe81211 100644 --- a/misc/build.func +++ b/misc/build.func @@ -620,8 +620,10 @@ EOF if [ "$var_os" == "alpine" ]; then sleep 3 pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories -http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -http://dl-cdn.alpinelinux.org/alpine/latest-stable/community +#http://dl-cdn.alpinelinux.org/alpine/latest-stable/main +#http://dl-cdn.alpinelinux.org/alpine/latest-stable/community +http://dl-cdn.alpinelinux.org/alpine/v3.19/main +http://dl-cdn.alpinelinux.org/alpine/v3.19/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi From 6b33fdd9f5c93e9eff2157b8895887a74f63fbd6 Mon Sep 17 00:00:00 2001 From: Marco Cunha Date: Thu, 23 May 2024 12:54:34 +0100 Subject: [PATCH 3120/3335] Disable "running as root" warning in Jackett WebUI/Logs (#3043) Upstream checks if running under root and displays alert in both startup logs and WebUI. This environment variable disables that behavior. --- install/jackett-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/jackett-install.sh b/install/jackett-install.sh index 36fcc7c0..6f3645aa 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -39,6 +39,7 @@ Type=simple WorkingDirectory=/opt/Jackett ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh TimeoutStopSec=30 +Environment="DisableRootWarning=true" [Install] WantedBy=multi-user.target EOF From 326f9f500b84db11c45ee63b9626140c514b32b9 Mon Sep 17 00:00:00 2001 From: cvroque <65680394+cvroque@users.noreply.github.com> Date: Thu, 23 May 2024 11:53:56 -0300 Subject: [PATCH 3121/3335] Update zoraxy.sh (#3044) --- ct/zoraxy.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index efcd250a..1efc3331 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -55,7 +55,19 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating $APP" +systemctl stop zoraxy +cd /opt/zoraxy/src +if ! git pull; then + echo "Already up to date." + systemctl start zoraxy + echo "No update required." + exit +fi +go mod tidy +go build +systemctl start zoraxy +msg_ok "Updated $APP" exit } From b6e83bcae28fb3f27a50387c810a78ecb1dc3323 Mon Sep 17 00:00:00 2001 From: Brett England Date: Thu, 23 May 2024 17:05:02 -0400 Subject: [PATCH 3122/3335] Update photoprism-install.sh (#3049) fixes https://github.com/tteck/Proxmox/issues/3048 --- install/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index e16cb6ee..9737f0ec 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -26,6 +26,7 @@ $STD apt-get install -y libtiff-dev $STD apt-get install -y imagemagick $STD apt-get install -y darktable $STD apt-get install -y rawtherapee +$STD apt-get install -y libvips42 echo 'export PATH=/usr/local:$PATH' >>~/.bashrc export PATH=/usr/local:$PATH From 0e24893e52aef3b6988cfe413ea36edf8c2a9aed Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 May 2024 21:38:21 -0400 Subject: [PATCH 3123/3335] Create bunkerweb.sh --- ct/bunkerweb.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 ct/bunkerweb.sh diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh new file mode 100644 index 00000000..a6a53f86 --- /dev/null +++ b/ct/bunkerweb.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ _ __ __ + / __ )__ ______ / /_____ ____| | / /__ / /_ + / __ / / / / __ \/ //_/ _ \/ ___/ | /| / / _ \/ __ \ + / /_/ / /_/ / / / / ,< / __/ / | |/ |/ / __/ /_/ / +/_____/\__,_/_/ /_/_/|_|\___/_/ |__/|__/\___/_.___/ + +EOF +} +header_info +echo -e "Loading..." +APP="BunkerWeb" +var_disk="4" +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 +if [[ ! -d /etc/bunkerweb ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP" +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}/setup${CL} \n" From 14798991b47ff444bcc4e00c45150ccff86cfe1b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 May 2024 21:39:30 -0400 Subject: [PATCH 3124/3335] Create bunkerweb-install.sh --- install/bunkerweb-install.sh | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 install/bunkerweb-install.sh diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh new file mode 100644 index 00000000..ac8595da --- /dev/null +++ b/install/bunkerweb-install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gnupg2 +$STD apt-get install -y ca-certificates +$STD apt-get install -y lsb-release +$STD apt-get install -y debian-archive-keyring +msg_ok "Installed Dependencies" + +msg_info "Installing Nginx v1.20.0" +wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" >/etc/apt/sources.list.d/nginx.list +$STD apt-get update +$STD apt-get install -y nginx=1.24.0-1~$(lsb_release -cs) +msg_ok "Installed Nginx v1.20.0" + +msg_info "Installing BunkerWeb v1.5.7" +export UI_WIZARD=1 +$STD curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash +$STD apt-get install -y bunkerweb=1.5.7 +#$STD apt-mark hold nginx bunkerweb +msg_ok "Installed BunkerWeb v1.5.7" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 31ae6d829c073d1fffb91b88c664af83865629a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 May 2024 21:43:30 -0400 Subject: [PATCH 3125/3335] Update bunkerweb-install.sh tweak --- install/bunkerweb-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index ac8595da..f0a8d4aa 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -32,7 +32,7 @@ msg_ok "Installed Nginx v1.20.0" msg_info "Installing BunkerWeb v1.5.7" export UI_WIZARD=1 -$STD curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash +curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null $STD apt-get install -y bunkerweb=1.5.7 #$STD apt-mark hold nginx bunkerweb msg_ok "Installed BunkerWeb v1.5.7" From e5788637b75ef46975732cd39b463a98ca259fc9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 May 2024 22:02:46 -0400 Subject: [PATCH 3126/3335] Update bunkerweb.sh tweak --- ct/bunkerweb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index a6a53f86..701d6d83 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -20,7 +20,7 @@ header_info echo -e "Loading..." APP="BunkerWeb" var_disk="4" -var_cpu="1" +var_cpu="2" var_ram="1024" var_os="debian" var_version="12" From 5efcac2bc5f86ce118180493d0f8546b41248ac2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 23 May 2024 22:03:42 -0400 Subject: [PATCH 3127/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2640af1d..ee22badf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-23 + +### Changed + +- **BunkerWeb LXC** + - NEW Script + ## 2024-05-20 ### Changed From ea135820e36f70e49920cf6beaad5f6192381019 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 24 May 2024 11:47:34 -0400 Subject: [PATCH 3128/3335] Update photoprism.sh add `libvips42` to update --- ct/photoprism.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 26e0c729..593fe362 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -64,6 +64,7 @@ function update_script() { msg_ok "Stopped PhotoPrism" msg_info "Updating PhotoPrism" + apt-get install -y libvips42 &>/dev/null wget -q -cO - https://dl.photoprism.app/pkg/linux/amd64.tar.gz | tar -xzf - -C /opt/photoprism --strip-components=1 msg_ok "Updated PhotoPrism" From acfb3eee043f733070e5cd46af7ab14b67d6311e Mon Sep 17 00:00:00 2001 From: Simon Albrecht Date: Sat, 25 May 2024 14:11:31 +0200 Subject: [PATCH 3129/3335] Add Threadfin (#3062) --- ct/threadfin.sh | 73 ++++++++++++++++++++++++++++++++++++ install/threadfin-install.sh | 55 +++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 ct/threadfin.sh create mode 100644 install/threadfin-install.sh diff --git a/ct/threadfin.sh b/ct/threadfin.sh new file mode 100644 index 00000000..e870e26c --- /dev/null +++ b/ct/threadfin.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ _______ + /_ __/ /_ ________ ____ _____/ / __(_)___ + / / / __ \/ ___/ _ \/ __ `/ __ / /_/ / __ \ + / / / / / / / / __/ /_/ / /_/ / __/ / / / / +/_/ /_/ /_/_/ \___/\__,_/\__,_/_/ /_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Threadfin" +var_disk="4" +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 +if [[ ! -d /opt/threadfin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop threadfin.service +wget -q -O /opt/threadfin/threadfin 'https://github.com/Threadfin/Threadfin/releases/latest/download/Threadfin_linux_amd64' +chmod +x /opt/threadfin/threadfin +systemctl start threadfin.service +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:34400/web${CL} \n" diff --git a/install/threadfin-install.sh b/install/threadfin-install.sh new file mode 100644 index 00000000..5fb8211d --- /dev/null +++ b/install/threadfin-install.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y curl +$STD apt-get install -y ffmpeg +$STD apt-get install -y vlc +msg_ok "Installed Dependencies" + +msg_info "Installing Threadfin" +mkdir -p /opt/threadfin +wget -q -O /opt/threadfin/threadfin 'https://github.com/Threadfin/Threadfin/releases/latest/download/Threadfin_linux_amd64' +chmod +x /opt/threadfin/threadfin + +msg_ok "Installed Threadfin" + +msg_info "Creating Service" +cat </etc/systemd/system/threadfin.service +[Unit] +Description=Threadfin: M3U Proxy for Plex DVR and Emby/Jellyfin Live TV +After=syslog.target network.target +[Service] +Type=simple +WorkingDirectory=/opt/threadfin +ExecStart=/opt/threadfin/threadfin +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now threadfin.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 0bd8035461454d5a4a7d4d8a33c817ecc86c8832 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 May 2024 08:29:34 -0400 Subject: [PATCH 3130/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee22badf..df5ba212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-25 + +### Changed + +- **Threadfin LXC** + - NEW Script + ## 2024-05-23 ### Changed From 574226d993cf649ac5f529068bfd1dc0cda1161f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 May 2024 09:11:10 -0400 Subject: [PATCH 3131/3335] Update build.func add @asylumexp repo for ARM64 support. --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index efe81211..cd87d2c7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -111,6 +111,7 @@ pve_check() { arch_check() { if [ "$(dpkg --print-architecture)" != "amd64" ]; then echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "\n Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" echo -e "Exiting..." sleep 2 exit From a94bc0234ffe57dc5fee51d64c887d9c480e5643 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 25 May 2024 13:51:52 -0400 Subject: [PATCH 3132/3335] Update linkwarden-install.sh fixes https://github.com/tteck/Proxmox/issues/3065 --- install/linkwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index eaae6bfd..9d5c455d 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -42,7 +42,7 @@ msg_ok "Cloned Linkwarden Repository" msg_info "Setting up PostgreSQL DB" DB_NAME=linkwardendb DB_USER=linkwarden -DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" From d5031be72905f876fbb69d63dbba92cdc51bf7db Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 04:59:56 -0400 Subject: [PATCH 3133/3335] Create notifiarr-install.com --- install/notifiarr-install.com | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 install/notifiarr-install.com diff --git a/install/notifiarr-install.com b/install/notifiarr-install.com new file mode 100644 index 00000000..3968d535 --- /dev/null +++ b/install/notifiarr-install.com @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing Notifiarr" +$STD groupadd notifiarr +$STD useradd -g notifiarr notifiarr +wget -qO- https://packagecloud.io/golift/pkgs/gpgkey | gpg --dearmor >/usr/share/keyrings/golift-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/golift-archive-keyring.gpg] https://packagecloud.io/golift/pkgs/ubuntu focal main" >/etc/apt/sources.list.d/golift.list +$STD apt-get install -y notifiarr +msg_ok "Installed Notifiarr" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 47b6fd5e8aa921f486a63170088ffe800e26be02 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 05:01:01 -0400 Subject: [PATCH 3134/3335] Create notifiarr.sh --- ct/notifiarr.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 ct/notifiarr.sh diff --git a/ct/notifiarr.sh b/ct/notifiarr.sh new file mode 100644 index 00000000..09f3d170 --- /dev/null +++ b/ct/notifiarr.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ _ _____ + / | / /___ / /_(_) __(_)___ ___________ + / |/ / __ \/ __/ / /_/ / __ `/ ___/ ___/ + / /| / /_/ / /_/ / __/ / /_/ / / / / +/_/ |_/\____/\__/_/_/ /_/\__,_/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Notifiarr" +var_disk="2" +var_cpu="1" +var_ram="512" +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 +if [[ ! -f /etc/apt/sources.list.d/golift.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP" +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}:5454${CL} \n" From 80046821af85d7fca7f33ca93c18a74bb8fd54c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 05:03:40 -0400 Subject: [PATCH 3135/3335] Rename notifiarr-install.com to notifiarr-install.sh --- install/{notifiarr-install.com => notifiarr-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename install/{notifiarr-install.com => notifiarr-install.sh} (100%) diff --git a/install/notifiarr-install.com b/install/notifiarr-install.sh similarity index 100% rename from install/notifiarr-install.com rename to install/notifiarr-install.sh From 3dce2fb7ddde9c6aa428a7c99758c42b1fc2e806 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 05:08:19 -0400 Subject: [PATCH 3136/3335] Update notifiarr-install.sh tweak --- install/notifiarr-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/notifiarr-install.sh b/install/notifiarr-install.sh index 3968d535..5ebac2b8 100644 --- a/install/notifiarr-install.sh +++ b/install/notifiarr-install.sh @@ -21,8 +21,8 @@ $STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing Notifiarr" -$STD groupadd notifiarr -$STD useradd -g notifiarr notifiarr +groupadd notifiarr &>/dev/null +useradd -g notifiarr notifiarr &>/dev/null wget -qO- https://packagecloud.io/golift/pkgs/gpgkey | gpg --dearmor >/usr/share/keyrings/golift-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/golift-archive-keyring.gpg] https://packagecloud.io/golift/pkgs/ubuntu focal main" >/etc/apt/sources.list.d/golift.list $STD apt-get install -y notifiarr From 37ac28da06fec64577978e4e239b5caf10784a7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 05:12:08 -0400 Subject: [PATCH 3137/3335] Update notifiarr-install.sh tweak --- install/notifiarr-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/notifiarr-install.sh b/install/notifiarr-install.sh index 5ebac2b8..a90217c0 100644 --- a/install/notifiarr-install.sh +++ b/install/notifiarr-install.sh @@ -21,10 +21,11 @@ $STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing Notifiarr" -groupadd notifiarr &>/dev/null -useradd -g notifiarr notifiarr &>/dev/null +$STD groupadd notifiarr +$STD useradd -g notifiarr notifiarr wget -qO- https://packagecloud.io/golift/pkgs/gpgkey | gpg --dearmor >/usr/share/keyrings/golift-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/golift-archive-keyring.gpg] https://packagecloud.io/golift/pkgs/ubuntu focal main" >/etc/apt/sources.list.d/golift.list +$STD apt-get update $STD apt-get install -y notifiarr msg_ok "Installed Notifiarr" From 7ba1459286dd2115d319ed81c0b6d791e7fcd2c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 05:15:57 -0400 Subject: [PATCH 3138/3335] Update notifiarr.sh tweak --- ct/notifiarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/notifiarr.sh b/ct/notifiarr.sh index 09f3d170..ac63e454 100644 --- a/ct/notifiarr.sh +++ b/ct/notifiarr.sh @@ -67,5 +67,5 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${APP} setup should be reachable by going to the following URL. +echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5454${CL} \n" From 7446dc4c73708a5130a93cb5fdb1c01c8f3d8bd3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 28 May 2024 05:24:16 -0400 Subject: [PATCH 3139/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index df5ba212..12d94730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-28 + +### Changed + +- **Notifiarr LXC** + - NEW Script + ## 2024-05-25 ### Changed From a95657947db0f0c183422a95b09a2f4a919cacca Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 May 2024 15:28:58 -0400 Subject: [PATCH 3140/3335] Update zoraxy.sh fix update --- ct/zoraxy.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 1efc3331..84a40785 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -58,16 +58,15 @@ if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; e msg_info "Updating $APP" systemctl stop zoraxy cd /opt/zoraxy/src -if ! git pull; then - echo "Already up to date." - systemctl start zoraxy - echo "No update required." - exit +systemctl stop zoraxy +if git pull | grep -q 'Already up to date.'; then + msg_ok "Already up to date. No update required." +else + go mod tidy + go build + msg_ok "Updated $APP" fi -go mod tidy -go build systemctl start zoraxy -msg_ok "Updated $APP" exit } From 0fb8716ebebd74f789f0bd05da62254d64bb90e2 Mon Sep 17 00:00:00 2001 From: barremian <61056521+barremian@users.noreply.github.com> Date: Thu, 30 May 2024 09:08:40 +0200 Subject: [PATCH 3141/3335] Add Forgejo LXC (#3088) --- ct/forgejo.sh | 89 ++++++++++++++++++++++++++++++++++++++ install/forgejo-install.sh | 69 +++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 ct/forgejo.sh create mode 100644 install/forgejo-install.sh diff --git a/ct/forgejo.sh b/ct/forgejo.sh new file mode 100644 index 00000000..9df120ba --- /dev/null +++ b/ct/forgejo.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { + clear + cat <<"EOF" + ______ _ + / ____/___ _________ ___ (_)___ + / /_ / __ \/ ___/ __ `/ _ \ / / __ \ + / __/ / /_/ / / / /_/ / __/ / / /_/ / +/_/ \____/_/ \__, /\___/_/ /\____/ + /____/ /___/ + +EOF +} +header_info +echo -e "Loading..." +APP="Forgejo" +var_disk="10" +var_cpu="2" +var_ram="2048" +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 +if [[ ! -d /opt/forgejo ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping ${APP}" +systemctl stop forgejo +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +RELEASE=$(curl -s https://codeberg.org/api/v1/repos/forgejo/forgejo/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') +wget -qO forgejo-$RELEASE-linux-amd64 "https://codeberg.org/forgejo/forgejo/releases/download/v${RELEASE}/forgejo-${RELEASE}-linux-amd64" +rm -rf /opt/forgejo/* +cp -r forgejo-$RELEASE-linux-amd64 /opt/forgejo/forgejo-$RELEASE-linux-amd64 +chmod +x /opt/forgejo/forgejo-$RELEASE-linux-amd64 +ln -sf /opt/forgejo/forgejo-$RELEASE-linux-amd64 /usr/local/bin/forgejo +msg_ok "Updated ${APP}" + +msg_info "Cleaning" +rm -rf forgejo-$RELEASE-linux-amd64 +msg_ok "Cleaned" + +msg_info "Starting ${APP}" +systemctl start forgejo +msg_ok "Started ${APP}" +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/install/forgejo-install.sh b/install/forgejo-install.sh new file mode 100644 index 00000000..b3bec0e5 --- /dev/null +++ b/install/forgejo-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y git +$STD apt-get install -y git-lfs +msg_ok "Installed Dependencies" + +msg_info "Installing Forgejo" +mkdir -p /opt/forgejo +RELEASE=$(curl -s https://codeberg.org/api/v1/repos/forgejo/forgejo/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') +wget -qO /opt/forgejo/forgejo-$RELEASE-linux-amd64 "https://codeberg.org/forgejo/forgejo/releases/download/v${RELEASE}/forgejo-${RELEASE}-linux-amd64" +chmod +x /opt/forgejo/forgejo-$RELEASE-linux-amd64 +ln -sf /opt/forgejo/forgejo-$RELEASE-linux-amd64 /usr/local/bin/forgejo +msg_ok "Installed Forgejo" + +msg_info "Setting up Forgejo" +$STD adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git +mkdir /var/lib/forgejo +chown git:git /var/lib/forgejo +chmod 750 /var/lib/forgejo +mkdir /etc/forgejo +chown root:git /etc/forgejo +chmod 770 /etc/forgejo +msg_ok "Setup Forgejo" + +msg_info "Creating Service" +cat </etc/systemd/system/forgejo.service +[Unit] +Description=Forgejo +After=syslog.target +After=network.target +[Service] +RestartSec=2s +Type=simple +User=git +Group=git +WorkingDirectory=/var/lib/forgejo/ +ExecStart=/usr/local/bin/forgejo web --config /etc/forgejo/app.ini +Restart=always +Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/forgejo +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable -q --now forgejo +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From ad1cbf085e5863129a8d07e784d22a481cf0eeca Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 03:36:43 -0400 Subject: [PATCH 3142/3335] Update forgejo-install.sh tweak --- install/forgejo-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/forgejo-install.sh b/install/forgejo-install.sh index b3bec0e5..a2e28169 100644 --- a/install/forgejo-install.sh +++ b/install/forgejo-install.sh @@ -57,7 +57,7 @@ Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/forgejo [Install] WantedBy=multi-user.target EOF -$STD systemctl enable -q --now forgejo +systemctl enable -q --now forgejo msg_ok "Created Service" motd_ssh From 17f54c5f8b5c04d9e3a5abc9c741906c69965dc1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 03:37:59 -0400 Subject: [PATCH 3143/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d94730..d2b6e065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-30 + +### Changed + +- **Forgejo LXC** + - NEW Script + ## 2024-05-28 ### Changed From e842d2ec3d8f358eed443be2ecbecb2f3b4137d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 13:14:37 -0400 Subject: [PATCH 3144/3335] Update USER_SUBMITTED_GUIDES.md add Techno Tim --- USER_SUBMITTED_GUIDES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/USER_SUBMITTED_GUIDES.md b/USER_SUBMITTED_GUIDES.md index 8ac04a12..e3c8ffdd 100644 --- a/USER_SUBMITTED_GUIDES.md +++ b/USER_SUBMITTED_GUIDES.md @@ -7,6 +7,8 @@ In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. +[Proxmox Automation with Proxmox Helper Scripts!](https://www.youtube.com/watch?v=kcpu4z5eSEU) + [Installing Home Assistant OS using Proxmox 8](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-8/201835) [How To Separate Zigbee2MQTT From Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-separate-zigbee2mqtt-from-home-assistant-in-proxmox/) From 9bbe81fe4279fd83a64597271e1c0769257e6225 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 21:05:15 -0400 Subject: [PATCH 3145/3335] Update dashy-install.sh update node.js to 20.x --- install/dashy-install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index d2bbc833..aa85ef4b 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -19,13 +19,15 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing Node.js (Patience)" -$STD apt-get install -y npm -$STD npm cache clean -f -$STD npm install -g n -$STD n 16.20.1 -$STD npm install -g pnpm -ln -sf /usr/local/bin/node /usr/bin/node +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Yarn" From 22c03c89d310f2dc3417c91e9fd47da85a6b9af5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 21:09:11 -0400 Subject: [PATCH 3146/3335] Update dashy-install.sh add gpg --- install/dashy-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index aa85ef4b..992161ff 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" From faf133ffed2a8d2c7b98e186e0b3f6b7f1fda2aa Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 21:27:36 -0400 Subject: [PATCH 3147/3335] Update dashy-install.sh tweak --- install/dashy-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 992161ff..4ae6bf5d 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -33,7 +33,6 @@ msg_ok "Installed Node.js" msg_info "Installing Yarn" $STD npm install -g yarn -ln -sf /usr/local/bin/yarn /usr/bin/yarn msg_ok "Installed Yarn" RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 44fc9b43cc756cc908a0c289e77b682bfa73f23c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 21:40:23 -0400 Subject: [PATCH 3148/3335] Update dashy-install.sh tweak --- install/dashy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 4ae6bf5d..4436e6aa 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -40,7 +40,7 @@ msg_info "Installing Dashy ${RELEASE} (Patience)" mkdir -p /opt/dashy wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 cd /opt/dashy -sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json +#sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json $STD yarn $STD yarn build echo "${RELEASE}" >/opt/${APPLICATION}_version.txt From 3dd1da2cf14f9829d31916b31810a8941c675f69 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 22:04:10 -0400 Subject: [PATCH 3149/3335] Update dashy-install.sh test --- install/dashy-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 4436e6aa..4db71a27 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -41,8 +41,10 @@ mkdir -p /opt/dashy wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 cd /opt/dashy #sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json -$STD yarn -$STD yarn build +#$STD yarn +#$STD yarn build +$STD npm install +$STD npm run build echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Dashy ${RELEASE}" From 2e268c2f49e7d40399973db07b692c2ef72392c7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 22:12:34 -0400 Subject: [PATCH 3150/3335] Update dashy-install.sh fix install --- install/dashy-install.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 4db71a27..d7c31367 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -31,18 +31,11 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing Yarn" -$STD npm install -g yarn -msg_ok "Installed Yarn" - RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Installing Dashy ${RELEASE} (Patience)" mkdir -p /opt/dashy wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 cd /opt/dashy -#sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json -#$STD yarn -#$STD yarn build $STD npm install $STD npm run build echo "${RELEASE}" >/opt/${APPLICATION}_version.txt From 0812983a6460b5372c793e1205c5748edcc1b896 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 22:22:30 -0400 Subject: [PATCH 3151/3335] Update dashy-install.sh fix service --- install/dashy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dashy-install.sh b/install/dashy-install.sh index d7c31367..a81749ae 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -49,7 +49,7 @@ Description=dashy [Service] Type=simple WorkingDirectory=/opt/dashy -ExecStart=/usr/bin/yarn start +ExecStart=/usr/bin/npm start [Install] WantedBy=multi-user.target EOF From 37f42468ba295b42f4cd636fb31d8eacbd2703ab Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 30 May 2024 22:29:14 -0400 Subject: [PATCH 3152/3335] Update dashy.sh fix update Breaking Change --- ct/dashy.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index 314802db..60ea57db 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -75,10 +75,9 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} rm -rf /opt/dashy mkdir -p /opt/dashy wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1 - sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json cd /opt/dashy - yarn &>/dev/null - yarn build &>/dev/null + npm install &>/dev/null + npm run build &>/dev/null echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" From fc9dff220b4ea426d3a75178ad8accacae4683ca Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 May 2024 16:00:33 -0400 Subject: [PATCH 3153/3335] Update build.func Mask passwords Closes https://github.com/tteck/Proxmox/issues/3103 --- misc/build.func | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index cd87d2c7..7a5bffd5 100644 --- a/misc/build.func +++ b/misc/build.func @@ -232,16 +232,24 @@ advanced_settings() { done while true; do - if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [[ ! -z "$PW1" ]]; then if [[ "$PW1" == *" "* ]]; then whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58 elif [ ${#PW1} -lt 5 ]; then whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58 else - PW="-password $PW1" - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" - break + if PW2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then + if [[ "$PW1" == "$PW2" ]]; then + PW="-password $PW1" + echo -e "${DGN}Using Root Password: ${BGN}********${CL}" + break + else + whiptail --msgbox "Passwords do not match. Please try again." 8 58 + fi + else + exit-script + fi fi else PW1="Automatic Login" From 5e515c1e23156617e16219668d5dea8e839542ce Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 31 May 2024 16:48:07 -0400 Subject: [PATCH 3154/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2b6e065..7fa13f54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-05-31 + +### Changed + +- **Advanced Settings** + - Passwords are now masked + ## 2024-05-30 ### Changed From d5c0d165dac3480acde3ec8d3e39f0bdb6ed140b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 2 Jun 2024 08:00:22 -0400 Subject: [PATCH 3155/3335] tweak --- install/aria2-install.sh | 4 ++-- install/bazarr-install.sh | 4 ++-- install/commafeed-install.sh | 4 ++-- install/deconz-install.sh | 4 ++-- install/emby-install.sh | 4 ++-- install/grocy-install.sh | 4 ++-- install/hivemq-install.sh | 4 ++-- install/lidarr-install.sh | 4 ++-- install/navidrome-install.sh | 4 ++-- install/nginxproxymanager-install.sh | 4 ++-- install/omada-install.sh | 4 ++-- install/paperless-ngx-install.sh | 4 ++-- install/prometheus-install.sh | 4 ++-- install/prowlarr-install.sh | 4 ++-- install/radarr-install.sh | 4 ++-- install/readarr-install.sh | 4 ++-- install/runtipi-install.sh | 4 ++-- install/sftpgo-install.sh | 4 ++-- install/stirling-pdf-install.sh | 4 ++-- install/tdarr-install.sh | 4 ++-- install/trilium-install.sh | 4 ++-- install/whisparr-install.sh | 4 ++-- install/zoraxy-install.sh | 4 ++-- install/zwave-js-ui-install.sh | 4 ++-- 24 files changed, 48 insertions(+), 48 deletions(-) diff --git a/install/aria2-install.sh b/install/aria2-install.sh index e57b9e8a..f246bc9d 100644 --- a/install/aria2-install.sh +++ b/install/aria2-install.sh @@ -93,6 +93,6 @@ customize msg_info "Cleaning up" rm AriaNg-*-AllInOne.zip -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" \ No newline at end of file diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index 812ecefe..5f5e6ac4 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -62,6 +62,6 @@ customize msg_info "Cleaning up" rm -rf bazarr.zip -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" \ No newline at end of file diff --git a/install/commafeed-install.sh b/install/commafeed-install.sh index 3df462f0..8db106e7 100644 --- a/install/commafeed-install.sh +++ b/install/commafeed-install.sh @@ -55,6 +55,6 @@ customize msg_info "Cleaning up" rm -rf zulu-repo_1.0.0-3_all.deb -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 614129e7..203f5191 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -58,6 +58,6 @@ customize msg_info "Cleaning up" rm -rf $libssl -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/emby-install.sh b/install/emby-install.sh index 99f5ebfe..bc6ba9be 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -46,7 +46,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean rm emby-server-deb_${LATEST}_amd64.deb msg_ok "Cleaned" diff --git a/install/grocy-install.sh b/install/grocy-install.sh index f3dc7f57..e47eb8bc 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -65,7 +65,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean rm -rf /root/grocy_${latest}.zip msg_ok "Cleaned" diff --git a/install/hivemq-install.sh b/install/hivemq-install.sh index 8e66f3b2..5234a49b 100644 --- a/install/hivemq-install.sh +++ b/install/hivemq-install.sh @@ -48,6 +48,6 @@ customize msg_info "Cleaning up" rm -rf hivemq-ce-${RELEASE}.zip rm -rf ../hivemq-ce-${RELEASE} -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh index 846b4de0..0970ef18 100644 --- a/install/lidarr-install.sh +++ b/install/lidarr-install.sh @@ -55,6 +55,6 @@ customize msg_info "Cleaning up" rm -rf Lidarr.master.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 50f68d5b..42235dc8 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -76,7 +76,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean rm -rf /root/Navidrome.tar.gz msg_ok "Cleaned" diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 4a0873a8..663c9607 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -202,6 +202,6 @@ msg_ok "Started Services" msg_info "Cleaning up" rm -rf ../nginx-proxy-manager-* systemctl restart openresty -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/omada-install.sh b/install/omada-install.sh index d3768a98..8bd0f1f9 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -50,6 +50,6 @@ customize msg_info "Cleaning up" rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb $libssl -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 44df6824..2a92400c 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -220,6 +220,6 @@ customize msg_info "Cleaning up" rm -rf /opt/paperless/docker -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index a04baa6f..5d2e95cd 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -58,7 +58,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean rm -rf ../prometheus-${RELEASE}.linux-amd64 ../prometheus-${RELEASE}.linux-amd64.tar.gz msg_ok "Cleaned" diff --git a/install/prowlarr-install.sh b/install/prowlarr-install.sh index 7270f471..39a56fac 100644 --- a/install/prowlarr-install.sh +++ b/install/prowlarr-install.sh @@ -53,6 +53,6 @@ customize msg_info "Cleaning up" rm -rf Prowlarr.master.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/radarr-install.sh b/install/radarr-install.sh index 4839b90a..dc074251 100644 --- a/install/radarr-install.sh +++ b/install/radarr-install.sh @@ -53,6 +53,6 @@ customize msg_info "Cleaning up" rm -rf Radarr.master.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/readarr-install.sh b/install/readarr-install.sh index 9ba9bc21..c3afc66d 100644 --- a/install/readarr-install.sh +++ b/install/readarr-install.sh @@ -53,6 +53,6 @@ customize msg_info "Cleaning up" rm -rf Readarr.develop.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/runtipi-install.sh b/install/runtipi-install.sh index 584ea16b..f39bb3af 100644 --- a/install/runtipi-install.sh +++ b/install/runtipi-install.sh @@ -35,6 +35,6 @@ customize msg_info "Cleaning up" rm /opt/install.sh -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh index cba32803..809ac74c 100644 --- a/install/sftpgo-install.sh +++ b/install/sftpgo-install.sh @@ -42,6 +42,6 @@ customize msg_info "Cleaning up" rm -rf $RELEASE -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index cc26eec7..f0c802a2 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -115,6 +115,6 @@ customize msg_info "Cleaning up" rm -rf v$RELEASE.tar.gz /zulu-repo_1.0.0-3_all.deb -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index adf423cb..dccd9428 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -99,6 +99,6 @@ customize msg_info "Cleaning up" rm -rf Tdarr_Updater.zip -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/trilium-install.sh b/install/trilium-install.sh index cf6a37f0..6e7861a6 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -53,7 +53,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz msg_ok "Cleaned" diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh index 66cb5010..16d20893 100644 --- a/install/whisparr-install.sh +++ b/install/whisparr-install.sh @@ -53,6 +53,6 @@ customize msg_info "Cleaning up" rm -rf Whisparr.develop.*.tar.gz -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/zoraxy-install.sh b/install/zoraxy-install.sh index 0938abc2..73787ed1 100644 --- a/install/zoraxy-install.sh +++ b/install/zoraxy-install.sh @@ -58,6 +58,6 @@ customize msg_info "Cleaning up" rm -rf $RELEASE -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index 0b20538c..c1966ed4 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -48,6 +48,6 @@ customize msg_info "Cleaning up" rm zwave-js-ui-${RELEASE}-linux.zip -$STD apt-get autoremove -$STD apt-get autoclean +$STD apt-get -y autoremove +$STD apt-get -y autoclean msg_ok "Cleaned" From 2f5c95d0ec8b14501cf8ec30e903006fb535c131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Tue, 4 Jun 2024 02:28:39 -0400 Subject: [PATCH 3156/3335] Add Flaresolverr script (#3124) --- ct/flaresolverr.sh | 86 +++++++++++++++++++++++++++++++++ install/flaresolverr-install.sh | 65 +++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 ct/flaresolverr.sh create mode 100644 install/flaresolverr-install.sh diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh new file mode 100644 index 00000000..880b2426 --- /dev/null +++ b/ct/flaresolverr.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/remz1337/Proxmox/remz/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ________ _____ __ + / ____/ /___ _________ / ___/____ / / _____ __________ + / /_ / / __ `/ ___/ _ \\__ \/ __ \/ / | / / _ \/ ___/ ___/ + / __/ / / /_/ / / / __/__/ / /_/ / /| |/ / __/ / / / +/_/ /_/\__,_/_/ \___/____/\____/_/ |___/\___/_/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="FlareSolverr" +var_disk="4" +var_cpu="2" +var_ram="2048" +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() { + if [[ ! -f /etc/systemd/system/flaresolverr.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + header_info + msg_info "Updating $APP LXC" + systemctl stop flaresolverr + + # install flaresolverr + RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) + wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz + tar -xzf flaresolverr_linux_x64.tar.gz -C /opt + rm flaresolverr_linux_x64.tar.gz + + systemctl start flaresolverr + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 512 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8191${CL} \n" diff --git a/install/flaresolverr-install.sh b/install/flaresolverr-install.sh new file mode 100644 index 00000000..abc8207a --- /dev/null +++ b/install/flaresolverr-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y apt-transport-https wget gpg xvfb +msg_ok "Installed Dependencies" + +msg_info "Installing Chrome" +wget -qO- https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg +echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list +$STD apt update +$STD apt install -y google-chrome-stable +msg_ok "Installed Chrome" + +msg_info "Installing FlareSolverr" +RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +$STD wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz +$STD tar -xzf flaresolverr_linux_x64.tar.gz -C /opt +$STD rm flaresolverr_linux_x64.tar.gz +msg_ok "Installed FlareSolverr" + +msg_info "Creating Service" +cat </etc/systemd/system/flaresolverr.service +[Unit] +Description=FlareSolverr +After=network.target +[Service] +SyslogIdentifier=flaresolverr +Restart=always +RestartSec=5 +Type=simple +Environment="LOG_LEVEL=info" +Environment="CAPTCHA_SOLVER=none" +WorkingDirectory=/opt/flaresolverr +ExecStart=/opt/flaresolverr/flaresolverr +TimeoutStopSec=30 +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now flaresolverr.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" \ No newline at end of file From df89bf0cfbaea2ad189459d97140cdabf8f032b9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Jun 2024 02:31:08 -0400 Subject: [PATCH 3157/3335] Update flaresolverr-install.sh tweak --- install/flaresolverr-install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install/flaresolverr-install.sh b/install/flaresolverr-install.sh index abc8207a..3195cc51 100644 --- a/install/flaresolverr-install.sh +++ b/install/flaresolverr-install.sh @@ -18,7 +18,9 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y apt-transport-https wget gpg xvfb +$STD apt-get install -y apt-transport-https +$STD apt-get install -y gpg +$STD apt-get install -y xvfb msg_ok "Installed Dependencies" msg_info "Installing Chrome" @@ -60,6 +62,6 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" \ No newline at end of file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From cabfa3ba2fafa1d703ab53b70d2b8749a60322eb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Jun 2024 02:36:46 -0400 Subject: [PATCH 3158/3335] Update flaresolverr-install.sh add version.txt --- install/flaresolverr-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/flaresolverr-install.sh b/install/flaresolverr-install.sh index 3195cc51..93c7fdd4 100644 --- a/install/flaresolverr-install.sh +++ b/install/flaresolverr-install.sh @@ -35,6 +35,7 @@ RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest - $STD wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz $STD tar -xzf flaresolverr_linux_x64.tar.gz -C /opt $STD rm flaresolverr_linux_x64.tar.gz +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed FlareSolverr" msg_info "Creating Service" From 99f50a5bc28e21c40040c5bf36f6d6dd7003c62d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Jun 2024 02:46:33 -0400 Subject: [PATCH 3159/3335] Update flaresolverr.sh refactor update --- ct/flaresolverr.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh index 880b2426..eb5b267f 100644 --- a/ct/flaresolverr.sh +++ b/ct/flaresolverr.sh @@ -54,22 +54,21 @@ function default_settings() { } function update_script() { - if [[ ! -f /etc/systemd/system/flaresolverr.service ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi header_info - msg_info "Updating $APP LXC" - systemctl stop flaresolverr - - # install flaresolverr + if [[ ! -f /etc/systemd/system/flaresolverr.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) - wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz - tar -xzf flaresolverr_linux_x64.tar.gz -C /opt - rm flaresolverr_linux_x64.tar.gz - - systemctl start flaresolverr - msg_ok "Updated $APP LXC" + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating $APP LXC" + systemctl stop flaresolverr + wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz + tar -xzf flaresolverr_linux_x64.tar.gz -C /opt + rm flaresolverr_linux_x64.tar.gz + systemctl start flaresolverr + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP LXC" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit } From fc0fbeea701478d043f1b85f500608e2948d79cb Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Jun 2024 03:00:08 -0400 Subject: [PATCH 3160/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa13f54..0e7d2872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-06-04 + +### Changed + +- **FlareSolverr LXC** + - NEW Script + ## 2024-05-31 ### Changed From d2805145050d28f9f182eac14eda3dd490a644b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 4 Jun 2024 21:04:48 -0400 Subject: [PATCH 3161/3335] Update flaresolverr.sh fix build source!! --- ct/flaresolverr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh index eb5b267f..85cc927a 100644 --- a/ct/flaresolverr.sh +++ b/ct/flaresolverr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/remz1337/Proxmox/remz/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # Co-Author: remz1337 From 3c79305bca9a55d68b8263c72f12c042283234d7 Mon Sep 17 00:00:00 2001 From: navels Date: Wed, 5 Jun 2024 02:44:50 -0700 Subject: [PATCH 3162/3335] Update Jackett app when updating Jackett LXC. (#3137) --- ct/jackett.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ct/jackett.sh b/ct/jackett.sh index 096eef89..2ef1598c 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -59,6 +59,15 @@ msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null msg_ok "Updated ${APP} LXC" +msg_info "Updating ${APP}" +RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz +systemctl stop jackett +rm -rf /opt/Jackett +tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt +rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz +systemctl start jackett +msg_ok "Updated ${APP} to ${RELEASE}" exit } From 5ed048c9fa2a35980bccf0ebd548b1affc045d01 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jun 2024 05:48:26 -0400 Subject: [PATCH 3163/3335] Update jackett-install.sh add version.txt --- install/jackett-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/jackett-install.sh b/install/jackett-install.sh index 6f3645aa..8dd59167 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -24,6 +24,7 @@ RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Jackett" msg_info "Creating Service" From 7babad2098c3e619e1adbfc5e0c7afe826fd6b0b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jun 2024 05:52:10 -0400 Subject: [PATCH 3164/3335] Update jackett.sh refactor update --- ct/jackett.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ct/jackett.sh b/ct/jackett.sh index 2ef1598c..45984240 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -55,19 +55,20 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -msg_info "Updating ${APP}" RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) -wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz -systemctl stop jackett -rm -rf /opt/Jackett -tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt -rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz -systemctl start jackett -msg_ok "Updated ${APP} to ${RELEASE}" +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating ${APP}" + wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz + systemctl stop jackett + rm -rf /opt/Jackett + tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt + rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz + systemctl start jackett + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi exit } From 4a2447bed6157a6aa1c1358b8abd6b4ed12d3a2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jun 2024 06:05:34 -0400 Subject: [PATCH 3165/3335] Update homepage-install.sh tweak --- install/homepage-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 4f6d5d91..3221324f 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -36,6 +36,7 @@ RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/lat msg_info "Installing Homepage v${RELEASE} (Patience)" wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz $STD tar -xzf v${RELEASE}.tar.gz +rm -rf v${RELEASE}.tar.gz mkdir -p /opt/homepage/config mv homepage-${RELEASE}/* /opt/homepage rm -rf homepage-${RELEASE} From 20a1d1ea69af473f7d13db48dcfd7c9ddab92c92 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 5 Jun 2024 06:07:02 -0400 Subject: [PATCH 3166/3335] Update homepage.sh fixes https://github.com/tteck/Proxmox/issues/3138 --- ct/homepage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homepage.sh b/ct/homepage.sh index 54efa660..716da76b 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -69,6 +69,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} systemctl stop homepage wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz tar -xzf v${RELEASE}.tar.gz + rm -rf v${RELEASE}.tar.gz cp -r homepage-${RELEASE}/* /opt/homepage/ rm -rf homepage-${RELEASE} cd /opt/homepage From f396b6153f027725748f19f29bcf5d00406adb1d Mon Sep 17 00:00:00 2001 From: navels Date: Thu, 6 Jun 2024 00:46:09 -0700 Subject: [PATCH 3167/3335] Update jackett.sh (#3140) Prevent error if version file doesn't exist --- ct/jackett.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jackett.sh b/ct/jackett.sh index 45984240..278373d0 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -56,7 +56,7 @@ function update_script() { header_info if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) -if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP}" wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz systemctl stop jackett From cd1d295ae1e87d3c5b0f3bd87143167fe346bb3c Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Jun 2024 09:37:19 -0400 Subject: [PATCH 3168/3335] Update microcode.sh update get current microcode version --- misc/microcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 083e9c89..44ad9b54 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -30,7 +30,7 @@ msg_ok() { echo -e "${BFR} ${CM} ${GN}$1${CL}"; } msg_error() { echo -e "${BFR} ${CROSS} ${RD}$1${CL}"; } header_info -current_microcode=$(journalctl -k | grep -oP "microcode: updated early: [^ ]+ -> \K[^,]+, date = [^ ]+" | head -n 1) +current_microcode=$(journalctl -k | grep -i 'microcode: Current revision:' | grep -oP 'Current revision: \K0x[0-9a-f]+') [ -z "$current_microcode" ] && current_microcode="Not found." intel() { From b40696c41ac49e64503b7aa09711d3fd2b5d436b Mon Sep 17 00:00:00 2001 From: Sayed Ali Alawi <75791634+oldhunterr@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:23:43 +0300 Subject: [PATCH 3169/3335] added Petio (#3142) remove .zip after unzip. make script "silent" --- ct/petio.sh | 73 ++++++++++++++++++++++++++++++++++++++ install/petio-install.sh | 75 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 ct/petio.sh create mode 100644 install/petio-install.sh diff --git a/ct/petio.sh b/ct/petio.sh new file mode 100644 index 00000000..040b0c9b --- /dev/null +++ b/ct/petio.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ _ + / __ \___ / /_(_)___ + / /_/ / _ \/ __/ / __ \ + / ____/ __/ /_/ / /_/ / +/_/ \___/\__/_/\____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Petio" +var_disk="4" +var_cpu="2" +var_ram="1024" +var_os="ubuntu" +var_version="20.04" +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 +if [[ ! -d /opt/Petio ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop petio.service +wget https://petio.tv/releases/latest -O petio-latest.zip +unzip petio-latest.zip -d /opt/Petio +systemctl start petio.service +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:7777${CL} \n" diff --git a/install/petio-install.sh b/install/petio-install.sh new file mode 100644 index 00000000..05499bd5 --- /dev/null +++ b/install/petio-install.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y gnupg +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing MongoDB 4.4" +wget -qO- https://www.mongodb.org/static/pgp/server-4.4.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-4.4.gpg +# Determine OS ID +OS_ID=$(grep '^ID=' /etc/os-release | cut -d'=' -f2) + +if [ "$OS_ID" = "debian" ]; then +echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/4.4 main" > /etc/apt/sources.list.d/mongodb-org-4.4.list +else +echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/ubuntu $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/4.4 multiverse" > /etc/apt/sources.list.d/mongodb-org-4.4.list +fi + +$STD apt-get update +$STD apt-get install -y mongodb-org +sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf +systemctl enable -q --now mongod.service +msg_ok "MongoDB 4.4 Installed" + + +msg_info "Installing Petio" +useradd -M --shell=/bin/false petio +mkdir /opt/Petio +wget -q https://petio.tv/releases/latest -O petio-latest.zip +$STD unzip -q petio-latest.zip -d /opt/Petio +rm -rf petio-latest.zip +chown -R petio:petio /opt/Petio +msg_ok "Installed Petio" + +msg_info "Creating Service" +cat </etc/systemd/system/petio.service +[Unit] +Description=Petio a content request system +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=on-failure +RestartSec=1 +ExecStart=/opt/Petio/bin/petio-linux +User=petio + +EOF +systemctl enable -q --now petio.service +msg_ok "Created Service" + + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 32375279fd59f2a78a7b2e2ad7e5483c709943c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Jun 2024 10:35:34 -0400 Subject: [PATCH 3170/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e7d2872..fa848bf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,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. - 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** +## 2024-06-06 + +### Changed + +- **Petio LXC** + - NEW Script + ## 2024-06-04 ### Changed From 7d224a726f9fb3a653b82d3c5dca1d3caf8db18f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Jun 2024 17:16:23 -0400 Subject: [PATCH 3171/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa848bf2..05711bb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - **Petio LXC** - NEW Script +- **Website** + - Important notices will now be displayed on the landing page. ## 2024-06-04 From c10903942f397c576eaf650c749819036c67fd2b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Jun 2024 17:20:21 -0400 Subject: [PATCH 3172/3335] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05711bb7..e0a9c672 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@

All notable changes to this project will be documented in this file.

- 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. -- 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent Proxmox VE - Support Lifecycle** ## 2024-06-06 From 0a35b1a5bb3bb8c61aa1e8f95e14048667263101 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 6 Jun 2024 22:24:44 -0400 Subject: [PATCH 3173/3335] Update iventoy-install.sh fix spacing in service file --- install/iventoy-install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh index 3c3e3953..ea58b59d 100644 --- a/install/iventoy-install.sh +++ b/install/iventoy-install.sh @@ -31,18 +31,18 @@ msg_ok "Installed iVentoy" msg_info "Creating Service" cat </etc/systemd/system/iventoy.service [Unit] -Description =iVentoy PXE Booter -Documentation =https://www.iventoy.com -Wants =network-online.target +Description=iVentoy PXE Booter +Documentation=https://www.iventoy.com +Wants=network-online.target [Service] -Type =forking -Environment =IVENTOY_API_ALL=1 -Environment =IVENTOY_AUTO_RUN=1 -Environment =LIBRARY_PATH=/opt/iventoy/lib/lin64 -Environment =LD_LIBRARY_PATH=/opt/iventoy/lib/lin64 -ExecStart =sh ./iventoy.sh -R start -WorkingDirectory =/opt/iventoy -Restart =on-failure +Type=forking +Environment=IVENTOY_API_ALL=1 +Environment=IVENTOY_AUTO_RUN=1 +Environment=LIBRARY_PATH=/opt/iventoy/lib/lin64 +Environment=LD_LIBRARY_PATH=/opt/iventoy/lib/lin64 +ExecStart=sh ./iventoy.sh -R start +WorkingDirectory=/opt/iventoy +Restart=on-failure [Install] WantedBy=multi-user.target EOF From 9ba59e0b561c9289aa712e7b9872432ec150b48b Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 9 Jun 2024 03:23:59 -0400 Subject: [PATCH 3174/3335] Correct ceph enterprise urls (#3157) --- misc/post-pve-install.sh | 4 ++-- misc/pve8-upgrade.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index ec8d7d98..f142b850 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -105,9 +105,9 @@ EOF yes) msg_info "Correcting 'ceph package repositories'" cat </etc/apt/sources.list.d/ceph.list -# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise +# deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise # deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription -# deb http://download.proxmox.com/debian/ceph-reef bookworm enterprise +# deb https://enterprise.proxmox.com/debian/ceph-reef bookworm enterprise # deb http://download.proxmox.com/debian/ceph-reef bookworm no-subscription EOF msg_ok "Corrected 'ceph package repositories'" diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index 86aaee2f..360b339b 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -73,7 +73,7 @@ EOF whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58 msg_info "Enabling 'ceph package repositories'" cat </etc/apt/sources.list.d/ceph.list -# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise +# deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription EOF msg_ok "Enabled 'ceph package repositories'" From 21c1240c8cde15dad5d323275f6089db49c3eaa4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 10 Jun 2024 17:17:58 -0400 Subject: [PATCH 3175/3335] Update umami-install.sh tweak --- install/umami-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/umami-install.sh b/install/umami-install.sh index 943c0413..8fd103b2 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -45,6 +45,8 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8' $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" echo "" >~/umami.creds +echo "Umami Database Credentials" >>~/umami.creds +echo "" >>~/umami.creds echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>~/umami.creds echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>~/umami.creds echo -e "umami Database Name: \e[32m$DB_NAME\e[0m" >>~/umami.creds From 9a3a05f75a0542fb5a74dc098546e263ae5eafd9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jun 2024 13:30:12 -0400 Subject: [PATCH 3176/3335] Create zabbix.sh --- ct/zabbix.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 ct/zabbix.sh diff --git a/ct/zabbix.sh b/ct/zabbix.sh new file mode 100644 index 00000000..3eb578d0 --- /dev/null +++ b/ct/zabbix.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ __ __ _ +/__ / ____ _/ /_ / /_ (_) __ + / / / __ `/ __ \/ __ \/ / |/_/ + / /__/ /_/ / /_/ / /_/ / /> < +/____/\__,_/_.___/_.___/_/_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="Zabbix" +var_disk="6" +var_cpu="2" +var_ram="4096" +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 +if [[ ! -f /etc/zabbix/zabbix_server.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}/zabbix${CL} \n" From 5bc0ddda2205acfa9f2afeaac7f089a26bd25b92 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jun 2024 13:31:22 -0400 Subject: [PATCH 3177/3335] Create zabbix-install.sh --- install/zabbix-install.sh | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 install/zabbix-install.sh diff --git a/install/zabbix-install.sh b/install/zabbix-install.sh new file mode 100644 index 00000000..31416f1d --- /dev/null +++ b/install/zabbix-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Zabbix" +wget -q https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-1+debian12_all.deb +$STD dpkg -i zabbix-release_7.0-1+debian12_all.deb +rm zabbix-release_7.0-1+debian12_all.deb +$STD apt-get update +$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent +msg_ok "Installed Zabbix" + +msg_info "Setting up PostgreSQL" +$STD apt-get install -y postgresql +DB_NAME=zabbixdb +DB_USER=zabbix +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +$STD zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME +sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf +sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf +sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf +echo "" >~/zabbix.creds +echo "zabbix Database Credentials" >>~/zabbix.creds +echo "" >>~/zabbix.creds +echo -e "zabbix Database User: \e[32m$DB_USER\e[0m" >>~/zabbix.creds +echo -e "zabbix Database Password: \e[32m$DB_PASS\e[0m" >>~/zabbix.creds +echo -e "zabbix Database Name: \e[32m$DB_NAME\e[0m" >>~/zabbix.creds +msg_ok "Set up PostgreSQL" + +msg_info "Starting Services" +systemctl restart zabbix-server zabbix-agent apache2 +systemctl enable -q zabbix-server zabbix-agent apache2 +msg_ok "Started Services" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From fd114369e9bebc5031af83a90adc97edba3c6693 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jun 2024 13:50:59 -0400 Subject: [PATCH 3178/3335] Update zabbix-install.sh Escape Special Characters --- install/zabbix-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/zabbix-install.sh b/install/zabbix-install.sh index 31416f1d..e70bbed9 100644 --- a/install/zabbix-install.sh +++ b/install/zabbix-install.sh @@ -31,7 +31,8 @@ msg_info "Setting up PostgreSQL" $STD apt-get install -y postgresql DB_NAME=zabbixdb DB_USER=zabbix -DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +RAW_PASS="$(openssl rand -base64 18 | cut -c1-13)" +DB_PASS=$(printf '%s\n' "$RAW_PASS" | sed 's/[&/\]/\\&/g') $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" From 79b138cc6de0f102a9cf6d7998f96ad3c92aec84 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jun 2024 14:19:41 -0400 Subject: [PATCH 3179/3335] Update zabbix-install.sh tweak --- install/zabbix-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/zabbix-install.sh b/install/zabbix-install.sh index e70bbed9..3648f99f 100644 --- a/install/zabbix-install.sh +++ b/install/zabbix-install.sh @@ -31,8 +31,7 @@ msg_info "Setting up PostgreSQL" $STD apt-get install -y postgresql DB_NAME=zabbixdb DB_USER=zabbix -RAW_PASS="$(openssl rand -base64 18 | cut -c1-13)" -DB_PASS=$(printf '%s\n' "$RAW_PASS" | sed 's/[&/\]/\\&/g') +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" From 7ea8bdfb95253c0fba6d7118eb7d18712fa5f472 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jun 2024 15:25:47 -0400 Subject: [PATCH 3180/3335] Update zabbix-install.sh tweak --- install/zabbix-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/zabbix-install.sh b/install/zabbix-install.sh index 3648f99f..c7123dea 100644 --- a/install/zabbix-install.sh +++ b/install/zabbix-install.sh @@ -37,7 +37,7 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" -$STD zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME +zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf From 5e5e2c96a509efccbc52c9a4dbfb71cf71ab4f9d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 11 Jun 2024 15:47:26 -0400 Subject: [PATCH 3181/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0a9c672..99febfbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-06-11 + +### Changed + +- **Zabbix LXC** + - NEW Script + ## 2024-06-06 ### Changed From 60951ff58f1c05a6d31cd6f42837c5297f42cdcb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Jun 2024 07:34:42 -0400 Subject: [PATCH 3182/3335] Update homer.sh fixes https://github.com/tteck/Proxmox/issues/3175 --- ct/homer.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ct/homer.sh b/ct/homer.sh index 7d02e053..bfec3090 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -59,11 +59,11 @@ msg_info "Stopping ${APP}" systemctl stop homer msg_ok "Stopped ${APP}" -msg_info "Backing up config.yml" +msg_info "Backing up assets directory" cd ~ -cp -R /opt/homer/assets/config.yml config.yml -cp -R /opt/homer/assets/tools tools -msg_ok "Backed up config.yml and tools directory" +mkdir -p assets-backup +cp -R /opt/homer/assets/. assets-backup +msg_ok "Backed up assets directory" msg_info "Updating ${APP}" rm -rf /opt/homer/* @@ -71,14 +71,14 @@ cd /opt/homer wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip unzip homer.zip &>/dev/null msg_ok "Updated ${APP}" -msg_info "Restoring conf.yml" + +msg_info "Restoring assets directory" cd ~ -cp -R config.yml /opt/homer/assets -cp -R tools /opt/homer/assets -msg_ok "Restored config.yml and tools directory" +cp -Rf assets-backup/. /opt/homer/assets/ +msg_ok "Restored assets directory" msg_info "Cleaning" -rm -rf config.yml tools /opt/homer/homer.zip +rm -rf assets-backup /opt/homer/homer.zip msg_ok "Cleaned" msg_info "Starting ${APP}" From 1a937b10f297abd8f35ee99f02523f7eb87c3612 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:42:04 +0200 Subject: [PATCH 3183/3335] Add new LXC: Matterbridge (#3178) --- ct/matterbridge.sh | 97 +++++++++++++++++++++++++++++++++ install/matterbridge-install.sh | 85 +++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 ct/matterbridge.sh create mode 100644 install/matterbridge-install.sh diff --git a/ct/matterbridge.sh b/ct/matterbridge.sh new file mode 100644 index 00000000..e0d04f26 --- /dev/null +++ b/ct/matterbridge.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ __ __ __ _ __ + / |/ /___ _/ /_/ /____ _____/ /_ _____(_)___/ /___ ____ + / /|_/ / __ `/ __/ __/ _ \/ ___/ __ \/ ___/ / __ / __ `/ _ \ + / / / / /_/ / /_/ /_/ __/ / / /_/ / / / / /_/ / /_/ / __/ +/_/ /_/\__,_/\__/\__/\___/_/ /_.___/_/ /_/\__,_/\__, /\___/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Matterbridge" +var_disk="4" +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 +if [[ ! -d /opt/matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + +RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP} Service" + systemctl stop matterbridge + msg_ok "Stopped ${APP} Service" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt/matterbridge + wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip" + unzip -q ${RELEASE}.zip + mv matterbridge-${RELEASE} /opt/matterbridge + cd /opt/matterbridge + npm ci >/dev/null 2>&1 + npm run build >/dev/null 2>&1 + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Cleaning up" + rm /opt/${RELEASE}.zip + msg_ok "Cleaned" + + msg_info "Starting ${APP} Service" + systemctl start matterbridge + sleep 1 + msg_ok "Started ${APP} Service" + msg_ok "Updated Successfully!\n" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +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}:8283${CL} \n" diff --git a/install/matterbridge-install.sh b/install/matterbridge-install.sh new file mode 100644 index 00000000..47948471 --- /dev/null +++ b/install/matterbridge-install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/Luligu/matterbridge/ + +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 --no-install-recommends \ + build-essential \ + unzip \ + curl \ + sudo \ + git \ + make \ + gnupg \ + ca-certificates \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Install Matterbridge" +RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv matterbridge-${RELEASE} /opt/matterbridge +rm -R ${RELEASE}.zip +cd /opt/matterbridge +$STD npm ci +$STD npm run build +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Matterbridge" + +msg_info "Creating Service" +cat </etc/systemd/system/matterbridge.service +[Unit] +Description=matterbridge +After=network-online.target + +[Service] +Type=simple +ExecStart=/usr/bin/npm run start:bridge +WorkingDirectory=/opt/matterbridge +StandardOutput=inherit +StandardError=inherit +Restart=always +RestartSec=10s +TimeoutStopSec=30s +User=root +Environment=PATH=/usr/bin:/usr/local/bin:/opt/matterbridge/bin +Environment=NODE_ENV=production + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now matterbridge.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 4020e1b6aed529a04bba95788bab52f423373d3e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:51:47 +0200 Subject: [PATCH 3184/3335] Add new LXC: MeTube (#3179) --- ct/metube.sh | 100 ++++++++++++++++++++++++++++++++++++++ install/metube-install.sh | 92 +++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+) create mode 100644 ct/metube.sh create mode 100644 install/metube-install.sh diff --git a/ct/metube.sh b/ct/metube.sh new file mode 100644 index 00000000..57d8b46b --- /dev/null +++ b/ct/metube.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ ______ __ + / |/ /__/_ __/_ __/ /_ ___ + / /|_/ / _ \/ / / / / / __ \/ _ \ + / / / / __/ / / /_/ / /_/ / __/ +/_/ /_/\___/_/ \__,_/_.___/\___/ + +EOF +} +header_info +echo -e "Loading..." +APP="MeTube" +var_disk="10" +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 +if [[ ! -d /opt/metube ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +msg_info "Stopping ${APP} Service" +systemctl stop metube +msg_ok "Stopped ${APP} Service" + +msg_info "Updating ${APP} to latest Git" +cd /opt +if [ -d metube_bak ]; then + rm -rf metube_bak +fi +mv metube metube_bak +git clone https://github.com/alexta69/metube /opt/metube >/dev/null 2>&1 +cd /opt/metube/ui +npm install >/dev/null 2>&1 +node_modules/.bin/ng build >/dev/null 2>&1 +cd /opt/metube +cp /opt/metube_bak/.env /opt/metube/ +pip3 install pipenv >/dev/null 2>&1 +pipenv install >/dev/null 2>&1 + +if [ -d "/opt/metube_bak" ]; then +rm -rf /opt/metube_bak +fi +msg_ok "Updated ${APP} to latest Git" + +msg_info "Starting ${APP} Service" +systemctl start metube +sleep 1 +msg_ok "Started ${APP} Service" +msg_ok "Updated Successfully!\n" +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}:8081${CL} \n" \ No newline at end of file diff --git a/install/metube-install.sh b/install/metube-install.sh new file mode 100644 index 00000000..0c418e5d --- /dev/null +++ b/install/metube-install.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/alexta69/metube + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + sudo \ + ffmpeg \ + git \ + make \ + gnupg \ + ca-certificates \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip \ + python3-venv +msg_ok "Installed Python3" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing MeTube" +$STD git clone https://github.com/alexta69/metube /opt/metube +cd /opt/metube/ui +$STD npm install +$STD node_modules/.bin/ng build +cd /opt/metube +$STD pip3 install pipenv +$STD pipenv install +mkdir -p /opt/metube_downloads /opt/metube_downloads/.metube /opt/metube_downloads/music /opt/metube_downloads/videos +cat </opt/metube/.env +DOWNLOAD_DIR=/opt/metube_downloads +STATE_DIR=/opt/metube_downloads/.metube +TEMP_DIR=/opt/metube_downloads +EOF +msg_ok "Installed MeTube" + +msg_info "Creating Service" +cat </etc/systemd/system/metube.service +[Unit] +Description=Metube - YouTube Downloader +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/metube +EnvironmentFile=/opt/metube/.env +ExecStart=/usr/local/bin/pipenv run python3 app/main.py +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now metube.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From 421bccfee844d9fcd304f2c7d519bf60af089c30 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Jun 2024 12:58:35 -0400 Subject: [PATCH 3185/3335] Update README.md tweak --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index b9869fc8..9401c778 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@

Proxmox VE Helper-Scripts

- Terms of Use | - Website | + Website | Contribute | Guides | Changelog | From 814a9158194b1dc21af23a653434ccc05b68fc5d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Jun 2024 12:58:43 -0400 Subject: [PATCH 3186/3335] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99febfbd..372c1e21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ - 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. +## 2024-06-12 + +### Changed + +- **Matterbridge LXC** + - NEW Script +- **Website** + - Reopen the gh-pages site (https://tteck.github.io/Proxmox/) + ## 2024-06-11 ### Changed From c2fe08030770c023bb551c7a7b6454240a16d394 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Jun 2024 14:18:07 -0400 Subject: [PATCH 3187/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 372c1e21..c9e02441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ ### Changed +- **MeTube LXC** + - NEW Script - **Matterbridge LXC** - NEW Script - **Website** From 3a455a9e9ee272f5a039950df675af230f739d5d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:46:08 +0200 Subject: [PATCH 3188/3335] Fix YtDL_Options (Filename to long) (#3183) --- install/metube-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install/metube-install.sh b/install/metube-install.sh index 0c418e5d..726f3f77 100644 --- a/install/metube-install.sh +++ b/install/metube-install.sh @@ -19,6 +19,11 @@ msg_info "Installing Dependencies" $STD apt-get install -y --no-install-recommends \ build-essential \ curl \ + aria2 \ + coreutils \ + gcc \ + g++ \ + musl-dev \ sudo \ ffmpeg \ git \ @@ -60,6 +65,7 @@ cat </opt/metube/.env DOWNLOAD_DIR=/opt/metube_downloads STATE_DIR=/opt/metube_downloads/.metube TEMP_DIR=/opt/metube_downloads +YTDL_OPTIONS={"trim_file_name":10} EOF msg_ok "Installed MeTube" @@ -89,4 +95,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From 7dca71d2969adc61c9acd82bede390a641f5a27e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 12 Jun 2024 17:55:37 -0400 Subject: [PATCH 3189/3335] Update calibre-web-install.sh fixes https://github.com/tteck/Proxmox/issues/3184 --- install/calibre-web-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh index 6d2b1445..cdc5653f 100644 --- a/install/calibre-web-install.sh +++ b/install/calibre-web-install.sh @@ -36,6 +36,7 @@ msg_info "Installing Calibre-Web" mkdir -p /opt/calibre-web $STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web $STD pip install calibreweb +$STD pip install jsonschema msg_ok "Installed Calibre-Web" msg_info "Creating Service" From ea1864306907b0948349e6a5e38f176b0c373b00 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:38:29 +0200 Subject: [PATCH 3190/3335] Add new LXC: Spoolman (#3186) --- ct/spoolman.sh | 103 ++++++++++++++++++++++++++++++++++++ install/spoolman-install.sh | 75 ++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 ct/spoolman.sh create mode 100644 install/spoolman-install.sh diff --git a/ct/spoolman.sh b/ct/spoolman.sh new file mode 100644 index 00000000..dadff3bf --- /dev/null +++ b/ct/spoolman.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ __ + / ___/____ ____ ____ / /___ ___ ____ _____ + \__ \/ __ \/ __ \/ __ \/ / __ `__ \/ __ `/ __ \ + ___/ / /_/ / /_/ / /_/ / / / / / / / /_/ / / / / +/____/ .___/\____/\____/_/_/ /_/ /_/\__,_/_/ /_/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="Spoolman" +var_disk="4" +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 +if [[ ! -d /opt/spoolman ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + + msg_info "Stopping ${APP} Service" + systemctl stop spoolman + msg_ok "Stopped ${APP} Service" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt + rm -rf spoolman_bak + mv spoolman spoolman_bak + wget -q https://github.com/Donkie/Spoolman/releases/download/${RELEASE}/spoolman.zip + unzip -q spoolman.zip -d spoolman + cd spoolman + pip3 install -r requirements.txt >/dev/null 2>&1 + cp .env.example .env + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting ${APP} Service" + systemctl start spoolman + msg_ok "Started ${APP} Service" + + msg_info "Cleaning up" + rm -rf /opt/spoolman.zip + msg_ok "Cleaned" + + msg_ok "Updated Successfully!\n" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +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}:7912${CL} \n" diff --git a/install/spoolman-install.sh b/install/spoolman-install.sh new file mode 100644 index 00000000..dc2bc31d --- /dev/null +++ b/install/spoolman-install.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/Donkie/Spoolman + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + build-essential \ + curl \ + sudo \ + make \ + libpq-dev \ + gpg \ + ca-certificates \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Python3" +$STD apt-get install -y \ + python3-dev \ + python3-setuptools \ + python3-wheel \ + python3-pip +msg_ok "Installed Python3" + +msg_info "Installing Spoolman" +cd /opt +RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +cd /opt +wget -q https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip +unzip -q spoolman.zip -d spoolman +rm -rf spoolman.zip +cd spoolman +$STD pip3 install -r requirements.txt +cp .env.example .env +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Spoolman" + +msg_info "Creating Service" +cat </etc/systemd/system/spoolman.service +[Unit] +Description=Spoolman +After=network.target +[Service] +Type=simple +WorkingDirectory=/opt/spoolman +EnvironmentFile=/opt/spoolman/.env +ExecStart=uvicorn spoolman.main:app --host 0.0.0.0 --port 7912 +Restart=always +User=root +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now spoolman.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From b6f8e46eaa0989757993eeb1b371ec1fbb7741c2 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Jun 2024 08:01:37 -0400 Subject: [PATCH 3191/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9e02441..e3b83613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-06-13 + +### Changed + +- **Spoolman LXC** + - NEW Script + ## 2024-06-12 ### Changed From 8caf9598b4bb244b68bfe505dcc24602b9b8b19f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Jun 2024 08:14:03 -0400 Subject: [PATCH 3192/3335] Update paperless-ngx-install.sh tweak --- install/paperless-ngx-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 2a92400c..7edabf2b 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -172,6 +172,7 @@ cat </etc/systemd/system/paperless-task-queue.service [Unit] Description=Paperless Celery Workers Requires=redis.service +After=postgresql.service [Service] WorkingDirectory=/opt/paperless/src From d3ff7c36e10d4984a648966b9b4c113f087b7102 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Jun 2024 17:36:02 -0400 Subject: [PATCH 3193/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3b83613..1c1b5566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ ### Changed +- **Website** + - If the Changelog has changed recently, the link on the website will pulse. - **Spoolman LXC** - NEW Script From 5886f1240eac74257c1fe8fcc06759c129a5b076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Thu, 13 Jun 2024 22:33:41 -0400 Subject: [PATCH 3194/3335] Add Peanut script (#3185) --- ct/peanut.sh | 89 +++++++++++++++++++++++++++++++++++++++ install/peanut-install.sh | 79 ++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 ct/peanut.sh create mode 100644 install/peanut-install.sh diff --git a/ct/peanut.sh b/ct/peanut.sh new file mode 100644 index 00000000..02744844 --- /dev/null +++ b/ct/peanut.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/remz1337/Proxmox/remz/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \___ ____ _____ __ __/ /_ + / /_/ / _ \/ __ `/ __ \/ / / / __/ + / ____/ __/ /_/ / / / / /_/ / /_ +/_/ \___/\__,_/_/ /_/\__,_/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="Peanut" +var_disk="4" +var_cpu="2" +var_ram="2048" +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 + if [[ ! -f /etc/systemd/system/peanut.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating $APP LXC" + systemctl stop peanut + wget -qO peanut.tar.gz https://api.github.com/repos/Brandawg93/PeaNUT/tarball/${RELEASE} + tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1 + rm peanut.tar.gz + cd /opt/peanut + pnpm i &>/dev/null + pnpm run build &>/dev/null + cp -r .next/static .next/standalone/.next/ + systemctl start peanut + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 1024 +pct set $CTID -cores 1 +msg_ok "Set Container to Normal Resources" +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/install/peanut-install.sh b/install/peanut-install.sh new file mode 100644 index 00000000..f32e764f --- /dev/null +++ b/install/peanut-install.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing Node.js" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing NUT" +$STD apt-get install -y nut-client +msg_ok "Installed NUT" + +msg_info "Installing Peanut" +RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +wget -qO peanut.tar.gz https://api.github.com/repos/Brandawg93/PeaNUT/tarball/${RELEASE} +mkdir -p /opt/peanut +tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1 +rm peanut.tar.gz +cd /opt/peanut +$STD npm install -g pnpm +$STD pnpm i +$STD pnpm run build +cp -r .next/static .next/standalone/.next/ +msg_ok "Installed Peanut" + +msg_info "Creating Service" +cat </etc/systemd/system/peanut.service +[Unit] +Description=Peanut +After=network.target +[Service] +SyslogIdentifier=peanut +Restart=always +RestartSec=5 +Type=simple +Environment="NODE_ENV=production" +Environment="NUT_HOST=localhost" +Environment="NUT_PORT=3493" +Environment="WEB_HOST=0.0.0.0" +Environment="WEB_PORT=3000" +WorkingDirectory=/opt/peanut +ExecStart=node /opt/peanut/.next/standalone/server.js +TimeoutStopSec=30 +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now peanut.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From 0e284df495ffa52a7e68648f4078fd217e63c46b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Jun 2024 22:36:43 -0400 Subject: [PATCH 3195/3335] Update peanut.sh tweak --- ct/peanut.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/peanut.sh b/ct/peanut.sh index 02744844..751ad2da 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -9,17 +9,17 @@ source <(curl -s https://raw.githubusercontent.com/remz1337/Proxmox/remz/misc/bu function header_info { clear cat <<"EOF" - ____ __ - / __ \___ ____ _____ __ __/ /_ - / /_/ / _ \/ __ `/ __ \/ / / / __/ - / ____/ __/ /_/ / / / / /_/ / /_ -/_/ \___/\__,_/_/ /_/\__,_/\__/ + ____ _ ____ ________ + / __ \___ ____ _/ | / / / / /_ __/ + / /_/ / _ \/ __ `/ |/ / / / / / / + / ____/ __/ /_/ / /| / /_/ / / / +/_/ \___/\__,_/_/ |_/\____/ /_/ EOF } header_info echo -e "Loading..." -APP="Peanut" +APP="PeaNUT" var_disk="4" var_cpu="2" var_ram="2048" @@ -58,7 +58,7 @@ function update_script() { if [[ ! -f /etc/systemd/system/peanut.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Updating $APP LXC" + msg_info "Updating $APP to ${RELEASE}" systemctl stop peanut wget -qO peanut.tar.gz https://api.github.com/repos/Brandawg93/PeaNUT/tarball/${RELEASE} tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1 From 2131ee2c3b593eec0d31588a1fde4797c6cdbea4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 13 Jun 2024 22:52:22 -0400 Subject: [PATCH 3196/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c1b5566..19ca6e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ ### Changed +- **PeaNUT LXC** + - NEW Script - **Website** - If the Changelog has changed recently, the link on the website will pulse. - **Spoolman LXC** From 3885ca059009d2e41f5c22b174880969b71e857d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Jun 2024 04:32:26 -0400 Subject: [PATCH 3197/3335] Update peanut.sh fix source --- ct/peanut.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/peanut.sh b/ct/peanut.sh index 751ad2da..fb2975d7 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/remz1337/Proxmox/remz/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) # Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # Co-Author: remz1337 From dbbc2ed0a47e94043934f466af0704bbb88e307d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:06:18 +0200 Subject: [PATCH 3198/3335] Add new LXC: MySpeed (#3195) --- ct/myspeed.sh | 103 +++++++++++++++++++++++++++++++++++++ install/myspeed-install.sh | 76 +++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 ct/myspeed.sh create mode 100644 install/myspeed-install.sh diff --git a/ct/myspeed.sh b/ct/myspeed.sh new file mode 100644 index 00000000..23c98878 --- /dev/null +++ b/ct/myspeed.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ _____ __ + / |/ /_ __/ ___/____ ___ ___ ____/ / + / /|_/ / / / /\__ \/ __ \/ _ \/ _ \/ __ / + / / / / /_/ /___/ / /_/ / __/ __/ /_/ / +/_/ /_/\__, //____/ .___/\___/\___/\__,_/ + /____/ /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="MySpeed" +var_disk="4" +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 +if [[ ! -d /opt/myspeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +RELEASE=$(wget -q https://github.com/gnmyt/myspeed/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + + msg_info "Stopping ${APP} Service" + systemctl stop myspeed + msg_ok "Stopped ${APP} Service" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt + rm -rf myspeed_bak + mv myspeed myspeed_bak + wget -q https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip + unzip -q MySpeed-$RELEASE.zip -d myspeed + cd myspeed + npm install >/dev/null 2>&1 + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting ${APP} Service" + systemctl start myspeed + msg_ok "Started ${APP} Service" + + msg_info "Cleaning up" + rm -rf MySpeed-$RELEASE.zip + msg_ok "Cleaned" + + msg_ok "Updated Successfully!\n" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +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}:5216${CL} \n" diff --git a/install/myspeed-install.sh b/install/myspeed-install.sh new file mode 100644 index 00000000..45ef62a6 --- /dev/null +++ b/install/myspeed-install.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/gnmyt/myspeed + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + make \ + gpg \ + ca-certificates \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing MySpeed" +RELEASE=$(wget -q https://github.com/gnmyt/myspeed/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) +cd /opt +wget -q https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip +unzip -q MySpeed-$RELEASE.zip -d myspeed +cd myspeed +$STD npm install +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed MySpeed" + +msg_info "Creating Service" +cat </etc/systemd/system/myspeed.service +[Unit] +Description=MySpeed +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/node server +Restart=always +User=root +Environment=NODE_ENV=production +WorkingDirectory=/opt/myspeed + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now myspeed.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +rm -rf /opt/MySpeed-$RELEASE.zip +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From 54bb719223ea844c81835525bad8ebf7b6c98197 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Jun 2024 06:20:48 -0400 Subject: [PATCH 3199/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19ca6e9c..97339872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-06-14 + +### Changed + +- **MySpeed LXC** + - NEW Script + ## 2024-06-13 ### Changed From 53b24ef7b77f38a77d8ba3ba4b7bd6c458d4f1d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 14 Jun 2024 11:10:47 -0400 Subject: [PATCH 3200/3335] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 7a5bffd5..e8e98f4b 100644 --- a/misc/build.func +++ b/misc/build.func @@ -647,7 +647,7 @@ description() { # ${APP} LXC - +

" if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service From 8a61cad71f0e36a81094bd4ccb527c5ed919f5c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Jun 2024 05:16:23 -0400 Subject: [PATCH 3201/3335] Update umami.sh add update path --- ct/umami.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ct/umami.sh b/ct/umami.sh index 9f94d0b9..065f4516 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -52,6 +52,33 @@ function default_settings() { echo_default } +function update_script() { +header_info +if [[ ! -d /opt/umami ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi + +msg_info "Stopping ${APP}" +systemctl stop umami +msg_ok "Stopped $APP" + +msg_info "Updating ${APP}" +cd /opt/umami +git pull +yarn install +yarn build +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start umami +msg_ok "Started ${APP}" + +msg_ok "Updated Successfully" +exit +} + start build_container description From dafe17ac953fc38cfc855b57a71ade36ae9f3881 Mon Sep 17 00:00:00 2001 From: Matt Alexander Date: Fri, 21 Jun 2024 17:08:46 -0700 Subject: [PATCH 3202/3335] Fix mikrotik-routeros when using nfs (#3247) --- vm/mikrotik-routeros.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 15e702f5..af4fd0c2 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -254,13 +254,12 @@ nfs | dir) btrfs | zfspool) DISK_EXT="" DISK_REF="$VMID/" - DISK_FORMAT="subvol" DISK_IMPORT="-format raw" ;; esac DISK_VAR="vm-${VMID}-disk-0${DISK_EXT:-}" -DISK_REF="${STORAGE}:${DISK_VAR:-}" +DISK_REF="${STORAGE}:${DISK_REF:-}${DISK_VAR:-}" msg_ok "Extracted Mikrotik RouterOS CHR Disk Image" msg_info "Creating Mikrotik RouterOS CHR VM" From 72d70d7842029d6d8d22df1b7d0e02c2d20c4adb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Jun 2024 16:52:35 -0400 Subject: [PATCH 3203/3335] Update actualbudget.sh fixes https://github.com/tteck/Proxmox/issues/3250 --- ct/actualbudget.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index b4ff4d62..1f1e201d 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -58,8 +58,8 @@ if [[ ! -d /opt/actualbudget ]]; then msg_error "No ${APP} Installation Found!"; msg_info "Updating ${APP}" systemctl stop actualbudget.service cd /opt/actualbudget -git pull -yarn install +git pull &>/dev/null +yarn install &>/dev/null systemctl start actualbudget.service msg_ok "Successfully Updated ${APP}" exit From 9c475a02088e436112d4458218d508157011811a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 22 Jun 2024 17:30:53 -0400 Subject: [PATCH 3204/3335] Update petio-install.sh tweak service file --- install/petio-install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install/petio-install.sh b/install/petio-install.sh index 05499bd5..0de03f15 100644 --- a/install/petio-install.sh +++ b/install/petio-install.sh @@ -51,15 +51,18 @@ msg_info "Creating Service" cat </etc/systemd/system/petio.service [Unit] Description=Petio a content request system -After=network.target -StartLimitIntervalSec=0 +After=network.target mongod.service [Service] Type=simple +User=petio Restart=on-failure RestartSec=1 ExecStart=/opt/Petio/bin/petio-linux -User=petio + +[Install] +WantedBy=multi-user.target + EOF systemctl enable -q --now petio.service From 26fd770db5d06eedd4de86a2d6107e506642f194 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jun 2024 20:36:40 -0400 Subject: [PATCH 3205/3335] Update jellyseerr-install.sh from yarn to pnpm --- install/jellyseerr-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 6cc2d14c..76465f27 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -33,15 +33,16 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing Yarn" -$STD npm install -g yarn -msg_ok "Installed Yarn" +msg_info "Installing pnpm" +$STD npm install -g pnpm +msg_ok "Installed pnpm" msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr -$STD yarn install -$STD yarn build +git checkout main +$STD CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile +$STD pnpm build mkdir -p /etc/jellyseerr/ cat </etc/jellyseerr/jellyseerr.conf PORT=5055 From 8228d24027a288fe172a2fd7f04d54d44fdf5f52 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jun 2024 20:39:07 -0400 Subject: [PATCH 3206/3335] Update jellyseerr.sh increase build resources --- ct/jellyseerr.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 14768ed1..36f352d0 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="Jellyseerr" var_disk="8" var_cpu="2" -var_ram="2048" +var_ram="4096" var_os="debian" var_version="12" variables @@ -77,6 +77,10 @@ start build_container description +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +msg_ok "Set Container to Normal Resources" + msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5055${CL} \n" From d81fc402a0d5acfdbd4d1bb792367bd047f44870 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jun 2024 20:53:26 -0400 Subject: [PATCH 3207/3335] Update jellyseerr-install.sh tweak --- install/jellyseerr-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 76465f27..388a8572 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -40,7 +40,6 @@ msg_ok "Installed pnpm" msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr -git checkout main $STD CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile $STD pnpm build mkdir -p /etc/jellyseerr/ From 39313455e646170b0fff732ba8b50843fdd70bc4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jun 2024 20:57:38 -0400 Subject: [PATCH 3208/3335] Update jellyseerr-install.sh tweak --- install/jellyseerr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 388a8572..bac5d94b 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -40,7 +40,7 @@ msg_ok "Installed pnpm" msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr -$STD CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile +CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile &>/dev/null $STD pnpm build mkdir -p /etc/jellyseerr/ cat </etc/jellyseerr/jellyseerr.conf From be8dbcc094e0e43021c2212a951b208f7aa9e5f8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 23 Jun 2024 21:07:40 -0400 Subject: [PATCH 3209/3335] Update jellyseerr-install.sh fix service --- install/jellyseerr-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index bac5d94b..5de57a62 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -53,15 +53,17 @@ msg_ok "Installed Jellyseerr" msg_info "Creating Service" cat </etc/systemd/system/jellyseerr.service [Unit] -Description=jellyseerr Service -After=network.target +Description=Jellyseerr Service +Wants=network-online.target +After=network-online.target [Service] EnvironmentFile=/etc/jellyseerr/jellyseerr.conf Environment=NODE_ENV=production Type=exec +Restart=on-failure WorkingDirectory=/opt/jellyseerr -ExecStart=/usr/bin/yarn start +ExecStart=/usr/bin/node dist/index.js [Install] WantedBy=multi-user.target From 4a135f4ecd48e12babe00de177d236d3d2fb88ee Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 25 Jun 2024 15:45:34 -0400 Subject: [PATCH 3210/3335] Update alpine-docker-install.sh fixes https://github.com/tteck/Proxmox/issues/3261 --- install/alpine-docker-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 61cc27f7..58431201 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apk add newt $STD apk add curl $STD apk add openssh +$STD apk add tzdata $STD apk add nano $STD apk add mc msg_ok "Installed Dependencies" From 3639db4e94a78db2d9f2d8d58671fbe3bcd62d70 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Jun 2024 13:09:56 +0200 Subject: [PATCH 3211/3335] Add new LXC: Scrutiny (#3260) --- ct/scrutiny.sh | 190 ++++++++++++++++++++++++++++++++++++ install/scrutiny-install.sh | 63 ++++++++++++ 2 files changed, 253 insertions(+) create mode 100644 ct/scrutiny.sh create mode 100644 install/scrutiny-install.sh diff --git a/ct/scrutiny.sh b/ct/scrutiny.sh new file mode 100644 index 00000000..9b22fb8b --- /dev/null +++ b/ct/scrutiny.sh @@ -0,0 +1,190 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _____ __ _ + / ___/____________ __/ /_(_)___ __ __ + \__ \/ ___/ ___/ / / / __/ / __ \/ / / / + ___/ / /__/ / / /_/ / /_/ / / / / /_/ / +/____/\___/_/ \__,_/\__/_/_/ /_/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Scrutiny" +var_disk="4" +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() { + if [[ ! -d /opt/scrutiny ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + RELEASE=$(curl -s https://api.github.com/repos/AnalogJ/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Scrutiny Management" --radiolist --cancel-button Exit-Script "Spacebar = Select" 15 70 4 \ + "1" "Update Scrutiny to $RELEASE" ON \ + "2" "Start Scrutiny Webapp" OFF \ + "3" "Create/Start Scrutiny Collector" OFF \ + "4" "Change Scrutiny Settings" OFF \ + 3>&1 1>&2 2>&3) + header_info + + if [ "$UPD" == "1" ]; then + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + + msg_info "Stopping all Scrutiny Services" + WEBAPP_ACTIVE=$(systemctl is-active scrutiny.service) + COLLECTOR_ACTIVE=$(systemctl is-active scrutiny_collector.service) + systemctl stop scrutiny.service scrutiny_collector.service + msg_ok "Stopped all Scrutiny Services" + + msg_info "Updating to ${RELEASE}" + cd /opt + rm -rf scrutiny_bak + mv scrutiny scrutiny_bak + mkdir -p /opt/scrutiny/web /opt/scrutiny/bin + wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64" + wget -q -O /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-collector-metrics-linux-amd64" + wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz" + cd /opt/scrutiny/web && tar xvzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . + chmod +x /opt/scrutiny/bin/scrutiny-web-linux-amd64 + chmod +x /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 + echo "${RELEASE}" > /opt/scrutiny_version.txt + msg_ok "Updated Scrutiny to $RELEASE" + + msg_info "Cleaning up" + rm -f /opt/scrutiny/web/scrutiny-web-frontend.tar.gz + msg_ok "Cleaned" + + if [ "$WEBAPP_ACTIVE" == "active" ]; then + msg_info "Starting Scrutiny Webapp Service" + systemctl start scrutiny.service + msg_ok "Started Scrutiny Webapp Service" + fi + + if [ "$COLLECTOR_ACTIVE" == "active" ]; then + msg_info "Starting Scrutiny Collector Service" + systemctl start scrutiny_collector.service + msg_ok "Started Scrutiny Collector Service" + fi + + msg_ok "Updated Successfully!\n" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit + fi +if [ "$UPD" == "2" ]; then + msg_info "Checking for Scrutiny Webapp Service" + if systemctl list-units --full -all | grep -Fq 'scrutiny.service'; then + msg_info "Stopping Scrutiny Webapp Service" + systemctl stop scrutiny.service + msg_ok "Stopped Scrutiny Webapp Service" + else + msg_info "Scrutiny Webapp Service not found, creating..." + cat </etc/systemd/system/scrutiny.service +[Unit] +Description=Scrutiny - Hard Drive Monitoring and Webapp +After=network.target + +[Service] +Type=simple +ExecStart=/opt/scrutiny/bin/scrutiny-web-linux-amd64 start --config /opt/scrutiny/config/scrutiny.yaml +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF + systemctl enable -q scrutiny.service + msg_ok "Created Scrutiny Webapp Service" + fi + + msg_info "Starting Scrutiny Webapp Service" + systemctl start scrutiny.service + msg_ok "Started Scrutiny Webapp Service" + exit +fi + +if [ "$UPD" == "3" ]; then + msg_info "Checking for Scrutiny Collector Service" + if systemctl list-units --full -all | grep -Fq 'scrutiny_collector.service'; then + msg_info "Stopping Scrutiny Collector Service" + systemctl stop scrutiny_collector.service + msg_ok "Stopped Scrutiny Collector Service" + else + msg_info "Scrutiny Collector Service not found, creating..." + wget -q -O /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-collector-metrics-linux-amd64" + chmod +x /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 + cat </etc/systemd/system/scrutiny_collector.service +[Unit] +Description=Scrutiny Collector +After=network.target + +[Service] +Type=simple +ExecStart=/opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --api-endpoint "http://localhost:8080" +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF + systemctl enable -q scrutiny_collector.service + msg_ok "Created Scrutiny Collector Service" + fi + + msg_info "Starting Scrutiny Collector Service" + systemctl start scrutiny_collector.service + msg_ok "Started Scrutiny Collector Service" + exit +fi +if [ "$UPD" == "4" ]; then + nano /opt/scrutiny/config/scrutiny.yaml + exit +fi +} + +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}:8080${CL} \n" diff --git a/install/scrutiny-install.sh b/install/scrutiny-install.sh new file mode 100644 index 00000000..5e534e87 --- /dev/null +++ b/install/scrutiny-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/AnalogJ/scrutiny + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + sudo \ + curl \ + smartmontools \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Scrutiny WebApp" +mkdir -p /opt/scrutiny/{config,web,bin} +RELEASE=$(curl -s https://api.github.com/repos/analogj/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +echo "${RELEASE}" >/opt/${APP}_version.txt +wget -q -O /opt/scrutiny/config/scrutiny.yaml https://raw.githubusercontent.com/AnalogJ/scrutiny/master/example.scrutiny.yaml +wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64" +wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz" +cd /opt/scrutiny/web +tar xzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . +chmod +x /opt/scrutiny/bin/scrutiny-web-linux-amd64 +msg_ok "Installed Scrutiny WebApp" + +msg_info "Setup Service" +cat </etc/systemd/system/scrutiny.service +[Unit] +Description=Scrutiny - Hard Drive Monitoring and Webapp +After=network.target + +[Service] +Type=simple +ExecStart=/opt/scrutiny/bin/scrutiny-web-linux-amd64 start --config /opt/scrutiny/config/scrutiny.yaml +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now scrutiny.service +msg_ok "Created and enabled Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From a87b6c8a2b9d8da418a96a11b3ba454622b850c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Jun 2024 12:15:18 -0400 Subject: [PATCH 3212/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97339872..f236110d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-06-26 + +### Changed + +- **Scrutiny LXC** + - NEW Script + ## 2024-06-14 ### Changed From a40795a5d46c6257fc8058ce6fcd1e224be674bb Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Jun 2024 12:40:15 -0400 Subject: [PATCH 3213/3335] Update scrutiny-install.sh fixes https://github.com/tteck/Proxmox/issues/3269 --- install/scrutiny-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/scrutiny-install.sh b/install/scrutiny-install.sh index 5e534e87..d155854b 100644 --- a/install/scrutiny-install.sh +++ b/install/scrutiny-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Scrutiny WebApp" mkdir -p /opt/scrutiny/{config,web,bin} RELEASE=$(curl -s https://api.github.com/repos/analogj/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -echo "${RELEASE}" >/opt/${APP}_version.txt +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt wget -q -O /opt/scrutiny/config/scrutiny.yaml https://raw.githubusercontent.com/AnalogJ/scrutiny/master/example.scrutiny.yaml wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64" wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz" From 344d6ac008f06e6d4ad34adbc8febdb31c9f48ff Mon Sep 17 00:00:00 2001 From: Evan Owen Date: Thu, 27 Jun 2024 06:55:51 -0400 Subject: [PATCH 3214/3335] Add new LXC: Kubo for IPFS (#3270) --- ct/kubo.sh | 81 +++++++++++++++++++++++++++++++++++++++++ install/kubo-install.sh | 61 +++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 ct/kubo.sh create mode 100644 install/kubo-install.sh diff --git a/ct/kubo.sh b/ct/kubo.sh new file mode 100644 index 00000000..e792b791 --- /dev/null +++ b/ct/kubo.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: ulmentflam +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ + / //_/_ __/ /_ ____ + / ,< / / / / __ \/ __ \ + / /| / /_/ / /_/ / /_/ / +/_/ |_\__,_/_.___/\____/ +EOF +} +header_info +echo -e "Loading..." +APP="Kubo" +var_disk="4" +var_cpu="2" +var_ram="4096" +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 +if [[ ! -f /usr/local/kubo ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz" + tar -xzf "kubo_${RELEASE}_linux-amd64.tar.gz" -C /usr/local + systemctl restart ipfs.service + echo "${RELEASE}" >/opt/${APP}_version.txt + rm "kubo_${RELEASE}_linux-amd64.tar.gz" + msg_ok "Updated $APP LXC" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5001/webui ${CL} \n" diff --git a/install/kubo-install.sh b/install/kubo-install.sh new file mode 100644 index 00000000..390674c1 --- /dev/null +++ b/install/kubo-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: ulmentflam +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing IPFS" +RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +$STD wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz" +tar -xzf "kubo_${RELEASE}_linux-amd64.tar.gz" -C /usr/local +$STD ln -s /usr/local/kubo/ipfs /usr/local/bin/ipfs +$STD ipfs init +ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001 +ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080 +LXCIP=$(hostname -I | awk '{print $1}') +ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://${LXCIP}:5001\", \"http://localhost:3000\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\", \"http://0.0.0.0:5001\"]" +ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]' +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +$STD rm "kubo_${RELEASE}_linux-amd64.tar.gz" +msg_ok "Installed IPFS" + +msg_info "Creating Service" +cat </etc/systemd/system/ipfs.service +[Unit] +Description=IPFS Daemon +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/ipfs daemon +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q ipfs.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 8a52575039756e0220e8dc0da20942bc49bcf3d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Jun 2024 06:57:54 -0400 Subject: [PATCH 3215/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f236110d..51f481f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,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. +## 2024-06-27 + +### Changed + +- **Kubo LXC** + - NEW Script + ## 2024-06-26 ### Changed From 89aba152757755da7cbef7a89750273c43706591 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Jun 2024 13:27:28 +0200 Subject: [PATCH 3216/3335] Add new LXC: RabbitMQ (#3268) --- ct/rabbitmq.sh | 85 +++++++++++++++++++++++++++++++++++++ install/rabbitmq-install.sh | 81 +++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 ct/rabbitmq.sh create mode 100644 install/rabbitmq-install.sh diff --git a/ct/rabbitmq.sh b/ct/rabbitmq.sh new file mode 100644 index 00000000..ff31111e --- /dev/null +++ b/ct/rabbitmq.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ __ _ __ __ _______ + / __ \____ _/ /_ / /_ (_) /_/ |/ / __ \ + / /_/ / __ `/ __ \/ __ \/ / __/ /|_/ / / / / + / _, _/ /_/ / /_/ / /_/ / / /_/ / / / /_/ / +/_/ |_|\__,_/_.___/_.___/_/\__/_/ /_/\___\_\ + +EOF +} +header_info +echo -e "Loading..." +APP="RabbitMQ" +var_disk="4" +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 +if [[ ! -d /etc/rabbitmq ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +msg_info "Stopping ${APP} Service" +systemctl stop rabbitmq-server +msg_ok "Stopped ${APP} Service" + +msg_info "Updating..." +apt install --only-upgrade rabbitmq-server &>/dev/null +msg_ok "Update Successfully" + +msg_info "Starting ${APP}" +systemctl start rabbitmq-server +msg_ok "Started ${APP}" +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}:15672${CL} \n" diff --git a/install/rabbitmq-install.sh b/install/rabbitmq-install.sh new file mode 100644 index 00000000..5824c0f5 --- /dev/null +++ b/install/rabbitmq-install.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://www.rabbitmq.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + sudo \ + lsb-release \ + curl \ + gnupg \ + apt-transport-https \ + make \ + mc +msg_ok "Installed Dependencies" + +msg_info "Adding RabbitMQ signing key" +wget -qO- "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | gpg --dearmor >/usr/share/keyrings/com.rabbitmq.team.gpg +wget -qO- "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key" | gpg --dearmor >/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg +wget -qO- "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key" | gpg --dearmor >/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg +msg_ok "Signing keys added" + +msg_info "Adding RabbitMQ repository" +cat </etc/apt/sources.list.d/rabbitmq.list +## Provides modern Erlang/OTP releases from a Cloudsmith mirror +deb [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian $(lsb_release -cs) main +deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/debian $(lsb_release -cs) main + +## Provides RabbitMQ from a Cloudsmith mirror +deb [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian $(lsb_release -cs) main +deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian $(lsb_release -cs) main +EOF +msg_ok "RabbitMQ repository added" + +msg_info "Updating package list" +$STD apt-get update -y +msg_ok "Package list updated" + +msg_info "Installing Erlang & RabbitMQ server" +$STD apt-get install -y erlang-base \ + erlang-asn1 erlang-crypto erlang-eldap erlang-ftp erlang-inets \ + erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key \ + erlang-runtime-tools erlang-snmp erlang-ssl \ + erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl \ + rabbitmq-server +msg_ok "RabbitMQ server installed" + +msg_info "Starting RabbitMQ service" +systemctl enable -q --now rabbitmq-server +msg_ok "RabbitMQ service started" + +msg_info "Enabling RabbitMQ management plugin" +$STD rabbitmq-plugins enable rabbitmq_management +$STD rabbitmqctl enable_feature_flag all +msg_ok "RabbitMQ management plugin enabled" + +msg_info "Create User" +$STD rabbitmqctl add_user proxmox proxmox +$STD rabbitmqctl set_user_tags proxmox administrator +$STD rabbitmqctl set_permissions -p / proxmox ".*" ".*" ".*" +msg_ok "Created User" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 5d0e18634fa29240d10f1a76a3393e1f0537c708 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Jun 2024 07:30:40 -0400 Subject: [PATCH 3217/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f481f5..0ac80add 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ - **Kubo LXC** - NEW Script +- **RabbitMQ LXC** + - NEW Script ## 2024-06-26 From 59c78c03acd1d3156f76e9d1a7f361bb92cc165b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Jun 2024 11:05:48 -0400 Subject: [PATCH 3218/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ac80add..1f562642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ - NEW Script - **RabbitMQ LXC** - NEW Script +- **Scruyiny LXC** + - Removed from website, broken. ## 2024-06-26 From 943be5301a65b29eaa68837b9025963a3652148f Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Jun 2024 11:06:12 -0400 Subject: [PATCH 3219/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f562642..ca9f1043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ - NEW Script - **RabbitMQ LXC** - NEW Script -- **Scruyiny LXC** +- **Scrutiny LXC** - Removed from website, broken. ## 2024-06-26 From eb9bff22c3f84138f07823ecee5ca0a2eec0b469 Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:25:08 +1000 Subject: [PATCH 3220/3335] Fix Scrutiny service start failure (#3278) --- install/scrutiny-install.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/install/scrutiny-install.sh b/install/scrutiny-install.sh index d155854b..068ff84f 100644 --- a/install/scrutiny-install.sh +++ b/install/scrutiny-install.sh @@ -21,9 +21,23 @@ $STD apt-get install -y \ curl \ smartmontools \ make \ - mc + mc \ + lsb-base \ + lsb-release \ + gnupg2 msg_ok "Installed Dependencies" +msg_info "Setting up InfluxDB Repository" +wget -qO- https://repos.influxdata.com/influxdata-archive_compat.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg +echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list +msg_ok "Set up InfluxDB Repository" + +msg_info "Installing InfluxDB" +$STD apt-get update +$STD apt-get install -y influxdb2 +systemctl enable -q --now influxdb +msg_ok "Installed InfluxDB" + msg_info "Installing Scrutiny WebApp" mkdir -p /opt/scrutiny/{config,web,bin} RELEASE=$(curl -s https://api.github.com/repos/analogj/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 2ec2831d5f89f856b3535140a49bb351b6c6b718 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Jun 2024 20:32:13 -0400 Subject: [PATCH 3221/3335] Update influxdb-install.sh tweak --- install/influxdb-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index c43ba7fb..a1edf820 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -23,9 +23,8 @@ $STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" -wget -q https://repos.influxdata.com/influxdata-archive_compat.key -cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null -sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' +wget -qO- https://repos.influxdata.com/influxdata-archive_compat.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg +echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list msg_ok "Set up InfluxDB Repository" read -r -p "Which version of InfluxDB to install? (1 or 2) " prompt From 00f7e0b287dcb4622cde49af363d6031e734b1e3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 27 Jun 2024 22:41:46 -0400 Subject: [PATCH 3222/3335] Update tautulli-install.sh tweak --- install/tautulli-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index d431918d..23d7e4aa 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -31,7 +31,7 @@ msg_ok "Updated Python3" msg_info "Installing Tautulli" cd /opt $STD git clone https://github.com/Tautulli/Tautulli.git -python3 -m pip install -q -r /opt/Tautulli/requirements.txt +$STD pip install -q -r /opt/Tautulli/requirements.txt $STD pip install pyopenssl msg_ok "Installed Tautulli" From 9b42be526d4b3f89976fbe6ce95f275525c8f055 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Jun 2024 06:56:20 -0400 Subject: [PATCH 3223/3335] Delete install/scrutiny-install.sh Does not function --- install/scrutiny-install.sh | 77 ------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 install/scrutiny-install.sh diff --git a/install/scrutiny-install.sh b/install/scrutiny-install.sh deleted file mode 100644 index 068ff84f..00000000 --- a/install/scrutiny-install.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2024 tteck -# Author: tteck -# Co-Author: MickLesk (Canbiz) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE -# Source: https://github.com/AnalogJ/scrutiny - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies" -$STD apt-get install -y \ - sudo \ - curl \ - smartmontools \ - make \ - mc \ - lsb-base \ - lsb-release \ - gnupg2 -msg_ok "Installed Dependencies" - -msg_info "Setting up InfluxDB Repository" -wget -qO- https://repos.influxdata.com/influxdata-archive_compat.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg -echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list -msg_ok "Set up InfluxDB Repository" - -msg_info "Installing InfluxDB" -$STD apt-get update -$STD apt-get install -y influxdb2 -systemctl enable -q --now influxdb -msg_ok "Installed InfluxDB" - -msg_info "Installing Scrutiny WebApp" -mkdir -p /opt/scrutiny/{config,web,bin} -RELEASE=$(curl -s https://api.github.com/repos/analogj/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -wget -q -O /opt/scrutiny/config/scrutiny.yaml https://raw.githubusercontent.com/AnalogJ/scrutiny/master/example.scrutiny.yaml -wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64" -wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz" -cd /opt/scrutiny/web -tar xzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . -chmod +x /opt/scrutiny/bin/scrutiny-web-linux-amd64 -msg_ok "Installed Scrutiny WebApp" - -msg_info "Setup Service" -cat </etc/systemd/system/scrutiny.service -[Unit] -Description=Scrutiny - Hard Drive Monitoring and Webapp -After=network.target - -[Service] -Type=simple -ExecStart=/opt/scrutiny/bin/scrutiny-web-linux-amd64 start --config /opt/scrutiny/config/scrutiny.yaml -Restart=always -User=root - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now scrutiny.service -msg_ok "Created and enabled Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 946fad73b9856bff437daff50a7dc27cb5863666 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 28 Jun 2024 06:57:03 -0400 Subject: [PATCH 3224/3335] Delete ct/scrutiny.sh Does not function --- ct/scrutiny.sh | 190 ------------------------------------------------- 1 file changed, 190 deletions(-) delete mode 100644 ct/scrutiny.sh diff --git a/ct/scrutiny.sh b/ct/scrutiny.sh deleted file mode 100644 index 9b22fb8b..00000000 --- a/ct/scrutiny.sh +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2024 tteck -# Author: tteck -# Co-Author: MickLesk (Canbiz) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - _____ __ _ - / ___/____________ __/ /_(_)___ __ __ - \__ \/ ___/ ___/ / / / __/ / __ \/ / / / - ___/ / /__/ / / /_/ / /_/ / / / / /_/ / -/____/\___/_/ \__,_/\__/_/_/ /_/\__, / - /____/ -EOF -} -header_info -echo -e "Loading..." -APP="Scrutiny" -var_disk="4" -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() { - if [[ ! -d /opt/scrutiny ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - RELEASE=$(curl -s https://api.github.com/repos/AnalogJ/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - - UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Scrutiny Management" --radiolist --cancel-button Exit-Script "Spacebar = Select" 15 70 4 \ - "1" "Update Scrutiny to $RELEASE" ON \ - "2" "Start Scrutiny Webapp" OFF \ - "3" "Create/Start Scrutiny Collector" OFF \ - "4" "Change Scrutiny Settings" OFF \ - 3>&1 1>&2 2>&3) - header_info - - if [ "$UPD" == "1" ]; then - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - - msg_info "Stopping all Scrutiny Services" - WEBAPP_ACTIVE=$(systemctl is-active scrutiny.service) - COLLECTOR_ACTIVE=$(systemctl is-active scrutiny_collector.service) - systemctl stop scrutiny.service scrutiny_collector.service - msg_ok "Stopped all Scrutiny Services" - - msg_info "Updating to ${RELEASE}" - cd /opt - rm -rf scrutiny_bak - mv scrutiny scrutiny_bak - mkdir -p /opt/scrutiny/web /opt/scrutiny/bin - wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64" - wget -q -O /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-collector-metrics-linux-amd64" - wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz" - cd /opt/scrutiny/web && tar xvzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . - chmod +x /opt/scrutiny/bin/scrutiny-web-linux-amd64 - chmod +x /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 - echo "${RELEASE}" > /opt/scrutiny_version.txt - msg_ok "Updated Scrutiny to $RELEASE" - - msg_info "Cleaning up" - rm -f /opt/scrutiny/web/scrutiny-web-frontend.tar.gz - msg_ok "Cleaned" - - if [ "$WEBAPP_ACTIVE" == "active" ]; then - msg_info "Starting Scrutiny Webapp Service" - systemctl start scrutiny.service - msg_ok "Started Scrutiny Webapp Service" - fi - - if [ "$COLLECTOR_ACTIVE" == "active" ]; then - msg_info "Starting Scrutiny Collector Service" - systemctl start scrutiny_collector.service - msg_ok "Started Scrutiny Collector Service" - fi - - msg_ok "Updated Successfully!\n" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi - exit - fi -if [ "$UPD" == "2" ]; then - msg_info "Checking for Scrutiny Webapp Service" - if systemctl list-units --full -all | grep -Fq 'scrutiny.service'; then - msg_info "Stopping Scrutiny Webapp Service" - systemctl stop scrutiny.service - msg_ok "Stopped Scrutiny Webapp Service" - else - msg_info "Scrutiny Webapp Service not found, creating..." - cat </etc/systemd/system/scrutiny.service -[Unit] -Description=Scrutiny - Hard Drive Monitoring and Webapp -After=network.target - -[Service] -Type=simple -ExecStart=/opt/scrutiny/bin/scrutiny-web-linux-amd64 start --config /opt/scrutiny/config/scrutiny.yaml -Restart=always -User=root - -[Install] -WantedBy=multi-user.target -EOF - systemctl enable -q scrutiny.service - msg_ok "Created Scrutiny Webapp Service" - fi - - msg_info "Starting Scrutiny Webapp Service" - systemctl start scrutiny.service - msg_ok "Started Scrutiny Webapp Service" - exit -fi - -if [ "$UPD" == "3" ]; then - msg_info "Checking for Scrutiny Collector Service" - if systemctl list-units --full -all | grep -Fq 'scrutiny_collector.service'; then - msg_info "Stopping Scrutiny Collector Service" - systemctl stop scrutiny_collector.service - msg_ok "Stopped Scrutiny Collector Service" - else - msg_info "Scrutiny Collector Service not found, creating..." - wget -q -O /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-collector-metrics-linux-amd64" - chmod +x /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 - cat </etc/systemd/system/scrutiny_collector.service -[Unit] -Description=Scrutiny Collector -After=network.target - -[Service] -Type=simple -ExecStart=/opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --api-endpoint "http://localhost:8080" -Restart=always -User=root - -[Install] -WantedBy=multi-user.target -EOF - systemctl enable -q scrutiny_collector.service - msg_ok "Created Scrutiny Collector Service" - fi - - msg_info "Starting Scrutiny Collector Service" - systemctl start scrutiny_collector.service - msg_ok "Started Scrutiny Collector Service" - exit -fi -if [ "$UPD" == "4" ]; then - nano /opt/scrutiny/config/scrutiny.yaml - exit -fi -} - -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}:8080${CL} \n" From 122271dd34a5dcecd1550f3d5afa9b34f57c430d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Jun 2024 07:29:11 -0400 Subject: [PATCH 3225/3335] Update frigate-install.sh Update TensorFlow Lite URL fixes https://github.com/tteck/Proxmox/issues/3285 --- install/frigate-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 50847e70..52b3cb2d 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -45,6 +45,7 @@ if [[ "$CTTYPE" == "0" ]]; then chmod 660 /dev/dri/* fi msg_ok "Set Up Hardware Acceleration" + RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') msg_ok "Stop spinner to prevent segmentation fault" msg_info "Installing Frigate $RELEASE (Perseverance)" @@ -155,7 +156,10 @@ cd / wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite cp /opt/frigate/labelmap.txt /labelmap.txt -wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite +wget -qO yamnet-tflite-classification-tflite-v1.tar.gz https://www.kaggle.com/api/v1/models/google/yamnet/tfLite/classification-tflite/1/download +tar xzf yamnet-tflite-classification-tflite-v1.tar.gz +rm -rf yamnet-tflite-classification-tflite-v1.tar.gz +mv 1.tflite cpu_audio_model.tflite cp /opt/frigate/audio-labelmap.txt /audio-labelmap.txt mkdir -p /media/frigate wget -qO /media/frigate/person-bicycle-car-detection.mp4 https://github.com/intel-iot-devkit/sample-videos/raw/master/person-bicycle-car-detection.mp4 From a078adfaea00044fc89ea110259a75cb6df935d1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Jun 2024 11:03:54 -0400 Subject: [PATCH 3226/3335] Update install.func tweak --- misc/install.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/install.func b/misc/install.func index 80a5c2e2..c698e258 100644 --- a/misc/install.func +++ b/misc/install.func @@ -165,6 +165,7 @@ EOF fi $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Container OS" } From 482f60f90a7e8e00516c475158658a9c58c23899 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Jun 2024 11:10:12 -0400 Subject: [PATCH 3227/3335] Update sabnzbd-install.sh tweak --- install/sabnzbd-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 63e919c9..efeb7c0f 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -29,10 +29,10 @@ msg_ok "Installed Dependencies" msg_info "Updating Python3" $STD apt-get install -y \ - python3 \ python3-dev \ python3-pip $STD apt-get install -y python3-setuptools +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing SABnzbd" From ecb4294a184812b5b68f5d58fbaf65c7aad0bc4a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Jun 2024 11:18:26 -0400 Subject: [PATCH 3228/3335] fix EXTERNALLY-MANAGED --- install/bazarr-install.sh | 1 + install/changedetection-install.sh | 1 + install/deluge-install.sh | 1 + install/esphome-install.sh | 1 + install/homeassistant-install.sh | 1 + install/motioneye-install.sh | 1 + install/octoprint-install.sh | 1 + install/scrypted-install.sh | 1 + install/tandoor-install.sh | 1 + install/tautulli-install.sh | 1 + install/whoogle-install.sh | 1 + 11 files changed, 11 insertions(+) diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index 5f5e6ac4..a4ee4cbb 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -24,6 +24,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing Bazarr" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 95050bd7..5a10f779 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -52,6 +52,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" diff --git a/install/deluge-install.sh b/install/deluge-install.sh index a08580fc..979b22b6 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -25,6 +25,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing Deluge" diff --git a/install/esphome-install.sh b/install/esphome-install.sh index a5732a84..301d9bbb 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -26,6 +26,7 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing ESPHome" diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index 8d78d316..088fc4d3 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -25,6 +25,7 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing runlike" diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index fe854002..99e24413 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -26,6 +26,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing Motion" diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index 1cbcf0ae..ac9eacfb 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -30,6 +30,7 @@ $STD apt-get install -y \ python3-venv $STD apt-get install -y python3-setuptools +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Creating user octoprint" diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index 2ac2d72e..ad71ba92 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -79,6 +79,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing Python3 Dependencies" diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index abbf06e7..53f88333 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -38,6 +38,7 @@ $STD apt-get install -y \ python3-dev \ python3-setuptools \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Setting up Node.js Repository" diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index 23d7e4aa..23408390 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -26,6 +26,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing Tautulli" diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index fac08400..f3516d32 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -24,6 +24,7 @@ $STD apt-get install -y \ python3 \ python3-dev \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" msg_info "Installing Whoogle" From 7d142d593e7c748b8507db9c681302a7ecdd9f06 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Jun 2024 12:15:00 -0400 Subject: [PATCH 3229/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 3c54ce3f..9167186e 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -67,7 +67,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED" ;; esac } From 59b2d529a2da518672f4ebf9f521714055ff841e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 29 Jun 2024 12:16:30 -0400 Subject: [PATCH 3230/3335] Update update-lxcs-cron.sh tweak --- misc/update-lxcs-cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index ebd6e972..23c44852 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -22,7 +22,7 @@ function update_container() { alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; - ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt-get upgrade --dry-run && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt-get upgrade --dry-run && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED" ;; esac } From 8322aede45d7c230430dcc923e09b92f47f7a848 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 07:49:13 -0400 Subject: [PATCH 3231/3335] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 663c9607..4314e293 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -41,6 +41,7 @@ $STD apt-get install -y \ python3-certbot-dns-cloudflare $STD pip3 install certbot-dns-multi $STD python3 -m venv /opt/certbot/ +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python Dependencies" VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" From 1769a3f40babc0f02358d2e77fc636ed8e4f2109 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 08:29:55 -0400 Subject: [PATCH 3232/3335] Tweak for Debian 12.6 fix EXTERNALLY-MANAGED --- install/calibre-web-install.sh | 1 + install/pialert-install.sh | 1 + install/stirling-pdf-install.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh index cdc5653f..1f42bbaf 100644 --- a/install/calibre-web-install.sh +++ b/install/calibre-web-install.sh @@ -23,6 +23,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Python Dependencies" $STD apt-get -y install python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python Dependencies" msg_info "Installing Kepubify" diff --git a/install/pialert-install.sh b/install/pialert-install.sh index f90ea6b8..d08f16f7 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -50,6 +50,7 @@ msg_info "Installing Python Dependencies" $STD apt-get -y install \ python3-pip \ python3-requests +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD pip3 install mac-vendor-lookup $STD pip3 install fritzconnection $STD pip3 install cryptography diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index f0c802a2..88456a66 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -42,6 +42,7 @@ msg_info "Installing Python Dependencies" $STD apt-get install -y \ python3 \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD pip3 install \ uno \ opencv-python-headless \ From 8fd1727fa8119ee4685dbf740368df8822cdad25 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 09:09:08 -0400 Subject: [PATCH 3233/3335] Update alpine-nextcloud.sh Remove "update" option fixes https://github.com/tteck/Proxmox/issues/3298 --- ct/alpine-nextcloud.sh | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 6def6e53..c683cfe2 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -60,12 +60,10 @@ function update_script() { if ! apk -e info newt >/dev/null 2>&1; then apk add -q newt fi - RELEASE=$(curl -s https://api.github.com/repos/nextcloud/server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') while true; do CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \ - "1" "Update Nextcloud to $RELEASE" OFF \ - "2" "Nextcloud Login Credentials" ON \ - "3" "Renew Self-signed Certificate" OFF \ + "1" "Nextcloud Login Credentials" ON \ + "2" "Renew Self-signed Certificate" OFF \ 3>&1 1>&2 2>&3) exit_status=$? if [ $exit_status == 1 ]; then @@ -75,22 +73,10 @@ function update_script() { header_info case $CHOICE in 1) - apk update && apk upgrade - if ! apk -e info php82-sodium >/dev/null 2>&1; then - apk add -q php82-sodium - fi - if ! apk -e info php82-bz2 >/dev/null 2>&1; then - apk add -q php82-bz2 - fi - su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade' - su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices' - exit - ;; - 2) cat nextcloud.creds exit ;; - 3) + 2) openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" > /dev/null 2>&1 rc-service nginx restart exit From c29768de514897da677e65e72e03439fb6308350 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 09:35:33 -0400 Subject: [PATCH 3234/3335] Update build.func switch Alpine repositories to http://dl-cdn.alpinelinux.org/alpine/latest-stable/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/community from http://dl-cdn.alpinelinux.org/alpine/v3.19/main http://dl-cdn.alpinelinux.org/alpine/v3.19/community --- misc/build.func | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index e8e98f4b..c7c501e7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -629,10 +629,10 @@ EOF if [ "$var_os" == "alpine" ]; then sleep 3 pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories -#http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -#http://dl-cdn.alpinelinux.org/alpine/latest-stable/community -http://dl-cdn.alpinelinux.org/alpine/v3.19/main -http://dl-cdn.alpinelinux.org/alpine/v3.19/community +http://dl-cdn.alpinelinux.org/alpine/latest-stable/main +http://dl-cdn.alpinelinux.org/alpine/latest-stable/community +#http://dl-cdn.alpinelinux.org/alpine/v3.19/main +#http://dl-cdn.alpinelinux.org/alpine/v3.19/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi From d3f71d078d71764e98ac566cf6b7faf70be08471 Mon Sep 17 00:00:00 2001 From: nazgul6 Date: Sun, 30 Jun 2024 15:43:59 +0200 Subject: [PATCH 3235/3335] Updated debian 12 image (#3299) --- vm/debian-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 6a20b717..5061d4ac 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -370,7 +370,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image" -URL=https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-nocloud-amd64-20231228-1609.qcow2 +URL=https://cloud.debian.org/images/cloud/bookworm/20240507-1740/debian-12-nocloud-amd64-20240507-1740.qcow2 sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL From 39ea1d4a20b83c07d084ebafdc811eec3548f289 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 10:18:37 -0400 Subject: [PATCH 3236/3335] Require PVE 8.1 or later --- misc/build.func | 9 +++------ vm/debian-vm.sh | 6 +++--- vm/haos-vm.sh | 6 +++--- vm/mikrotik-routeros.sh | 10 +++++----- vm/nextcloud-vm.sh | 6 +++--- vm/openwrt.sh | 8 ++++---- vm/owncloud-vm.sh | 6 +++--- vm/ubuntu2204-vm.sh | 6 +++--- vm/ubuntu2404-vm.sh | 6 +++--- 9 files changed, 30 insertions(+), 33 deletions(-) diff --git a/misc/build.func b/misc/build.func index c7c501e7..b650a6c0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -95,16 +95,13 @@ root_check() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 - fi - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } # This function checks the system architecture and exits if it's not "amd64". diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 5061d4ac..d6159317 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -92,13 +92,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 4c82712a..bad50312 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -115,13 +115,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index af4fd0c2..f9e05f33 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -62,11 +62,11 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." - echo "Exiting..." - sleep 3 +if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 exit fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Mikrotik RouterOS CHR VM" --yesno "This will create a New Mikrotik RouterOS CHR VM. Proceed?" 10 58); then diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index 23cc5606..1e50c37d 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -91,13 +91,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/openwrt.sh b/vm/openwrt.sh index e3e32e9e..3cdd38f3 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -157,13 +157,13 @@ function msg_error() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 006a4649..871f5eeb 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -91,13 +91,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/ubuntu2204-vm.sh b/vm/ubuntu2204-vm.sh index 5fffcf0d..cb6884d8 100644 --- a/vm/ubuntu2204-vm.sh +++ b/vm/ubuntu2204-vm.sh @@ -92,13 +92,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh index 7869d189..c3dd1750 100644 --- a/vm/ubuntu2404-vm.sh +++ b/vm/ubuntu2404-vm.sh @@ -92,13 +92,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { From 6e6a86aaa9d134d7e94efee9fff62c2cfea0b11c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 11:50:59 -0400 Subject: [PATCH 3237/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9f1043..8d29cea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ - 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. + +## 2024-06-30 + +### Changed + +- **All Scripts** + - Requires Proxmox Virtual Environment version 8.1 or later. + ## 2024-06-27 ### Changed From eab4160c33137b8e999dea7df0821f9e0988a48c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Jul 2024 02:59:33 -0400 Subject: [PATCH 3238/3335] Update frigate-install.sh fixes https://github.com/tteck/Proxmox/issues/3315 --- install/frigate-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 52b3cb2d..f9765286 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -60,6 +60,7 @@ $STD pip3 wheel --wheel-dir=/wheels -r /opt/frigate/docker/main/requirements-whe cp -a /opt/frigate/docker/main/rootfs/. / export TARGETARCH="amd64" echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections +wget -q -O /opt/frigate/docker/main/install_deps.sh https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/main/install_deps.sh $STD /opt/frigate/docker/main/install_deps.sh $STD ln -svf /usr/lib/btbn-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg $STD ln -svf /usr/lib/btbn-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe From 5fcae037c20885d431959313c573057f0a488699 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 2 Jul 2024 20:23:52 -0400 Subject: [PATCH 3239/3335] Update photoprism-install.sh tweak --- install/photoprism-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 9737f0ec..8e0df7ab 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -51,6 +51,7 @@ PHOTOPRISM_STORAGE_PATH='/opt/photoprism/storage' PHOTOPRISM_ORIGINALS_PATH='/opt/photoprism/photos/originals' PHOTOPRISM_IMPORT_PATH='/opt/photoprism/photos/import' EOF +ln -sf /opt/photoprism/bin/photoprism /usr/local/bin/photoprism msg_ok "Installed PhotoPrism" msg_info "Creating Service" From ef27851d31944d10995b3cf75f508c2dfbbf11b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 09:06:30 -0400 Subject: [PATCH 3240/3335] Update bunkerweb.sh tweak `function update_script()` --- ct/bunkerweb.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 701d6d83..3873484f 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -55,10 +55,18 @@ function default_settings() { function update_script() { header_info if [[ ! -d /etc/bunkerweb ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP" +RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + + msg_info "Updating ${APP} to ${RELEASE}" + apt-get install nginx -y + apt-get install -y bunkerweb=${RELEASE} + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi exit } From 85418addac13e6860b0a6f45bd04a7f83b64be1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 09:21:41 -0400 Subject: [PATCH 3241/3335] Update bunkerweb-install.sh always install the newest release --- install/bunkerweb-install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index f0a8d4aa..d25539cd 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -23,19 +23,20 @@ $STD apt-get install -y lsb-release $STD apt-get install -y debian-archive-keyring msg_ok "Installed Dependencies" -msg_info "Installing Nginx v1.20.0" +msg_info "Installing Nginx" wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" >/etc/apt/sources.list.d/nginx.list $STD apt-get update -$STD apt-get install -y nginx=1.24.0-1~$(lsb_release -cs) -msg_ok "Installed Nginx v1.20.0" +$STD apt-get install -y nginx +msg_ok "Installed Nginx" -msg_info "Installing BunkerWeb v1.5.7" +RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +msg_info "Installing BunkerWeb v$(RELEASE}" export UI_WIZARD=1 curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null -$STD apt-get install -y bunkerweb=1.5.7 -#$STD apt-mark hold nginx bunkerweb -msg_ok "Installed BunkerWeb v1.5.7" +$STD apt-get install -y bunkerweb=$(RELEASE} +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed BunkerWeb v$(RELEASE}" motd_ssh customize From 5ef5f0086ee25b476fe3c96b3d9bf2dcd97f8f50 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 09:26:20 -0400 Subject: [PATCH 3242/3335] Update bunkerweb.sh - works for 1.5.8 and newer - if the update fails with 1.5.7 execute `RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') apt-get install -y bunkerweb=${RELEASE}` in the LXC console --- ct/bunkerweb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 3873484f..121aaab9 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -55,6 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /etc/bunkerweb ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then From 15be0761ff4d0577313e5be58396f2817bc948fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 09:38:44 -0400 Subject: [PATCH 3243/3335] Update bunkerweb-install.sh fix curly braces --- install/bunkerweb-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index d25539cd..29ed74bd 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -25,18 +25,18 @@ msg_ok "Installed Dependencies" msg_info "Installing Nginx" wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" >/etc/apt/sources.list.d/nginx.list +echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list $STD apt-get update $STD apt-get install -y nginx msg_ok "Installed Nginx" RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Installing BunkerWeb v$(RELEASE}" +msg_info "Installing BunkerWeb v${RELEASE}" export UI_WIZARD=1 curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null -$STD apt-get install -y bunkerweb=$(RELEASE} +$STD apt-get install -y bunkerweb=${RELEASE} echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Installed BunkerWeb v$(RELEASE}" +msg_ok "Installed BunkerWeb v${RELEASE}" motd_ssh customize From 7daad62fad96ab832dcdaac975b3e6a8a5538822 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 10:01:49 -0400 Subject: [PATCH 3244/3335] Update bunkerweb-install.sh hold bunkerweb version --- install/bunkerweb-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index 29ed74bd..20ccd2b4 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -35,6 +35,7 @@ msg_info "Installing BunkerWeb v${RELEASE}" export UI_WIZARD=1 curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null $STD apt-get install -y bunkerweb=${RELEASE} +$STD apt-mark hold bunkerweb echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed BunkerWeb v${RELEASE}" From e6b86f3d47058af503a008feec0b9423394676fc Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 10:04:23 -0400 Subject: [PATCH 3245/3335] Update bunkerweb.sh tweak --- ct/bunkerweb.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 121aaab9..9e155974 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -60,8 +60,11 @@ RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/late if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to ${RELEASE}" + apt-get update apt-get install nginx -y + apt-mark unhold bunkerweb apt-get install -y bunkerweb=${RELEASE} + apt-mark hold bunkerweb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" From f64e8ef47b6153db164df71a3e162eab3b1e22d8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 10:22:46 -0400 Subject: [PATCH 3246/3335] Update bunkerweb-install.sh change the "hold" method --- install/bunkerweb-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index 20ccd2b4..a26cb424 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -35,7 +35,11 @@ msg_info "Installing BunkerWeb v${RELEASE}" export UI_WIZARD=1 curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null $STD apt-get install -y bunkerweb=${RELEASE} -$STD apt-mark hold bunkerweb +cat </etc/apt/preferences.d/bunkerweb +Package: bunkerweb +Pin: version ${RELEASE} +Pin-Priority: 1001 +EOF echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed BunkerWeb v${RELEASE}" From fc5ea73e450190b915aa5298f423b77a8a8baad3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 10:24:42 -0400 Subject: [PATCH 3247/3335] Update bunkerweb.sh change the "hold" method --- ct/bunkerweb.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 9e155974..14e8a2a6 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -60,11 +60,14 @@ RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/late if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to ${RELEASE}" + cat </etc/apt/preferences.d/bunkerweb +Package: bunkerweb +Pin: version ${RELEASE} +Pin-Priority: 1001 +EOF apt-get update apt-get install nginx -y - apt-mark unhold bunkerweb apt-get install -y bunkerweb=${RELEASE} - apt-mark hold bunkerweb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" From 65968509182c9f25c7445eaeed3f9ca22f441b8d Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 13:12:59 -0400 Subject: [PATCH 3248/3335] Update traefik-install.sh hard-code version --- install/traefik-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/traefik-install.sh b/install/traefik-install.sh index b8346196..7b5c44b3 100644 --- a/install/traefik-install.sh +++ b/install/traefik-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y gpg $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=3.0.4 #$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Traefik v${RELEASE}" mkdir -p /etc/traefik/{conf.d,ssl} wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz From 496b9bf92ce8ba1a8995bfce0f6f9f8cbee0d49a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 3 Jul 2024 13:14:12 -0400 Subject: [PATCH 3249/3335] Update traefik.sh hard-code version --- ct/traefik.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/traefik.sh b/ct/traefik.sh index 503d51dc..0da650d1 100644 --- a/ct/traefik.sh +++ b/ct/traefik.sh @@ -55,7 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/traefik.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=3.0.4 #$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Updating $APP LXC" if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz From dad9da5e678618114e100762589ef41d7284b749 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Jul 2024 10:55:39 -0400 Subject: [PATCH 3250/3335] Update jellyseerr.sh tweak update (main branch) --- ct/jellyseerr.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 36f352d0..5f3548bf 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -21,7 +21,7 @@ echo -e "Loading..." APP="Jellyseerr" var_disk="8" var_cpu="2" -var_ram="4096" +var_ram="2048" var_os="debian" var_version="12" variables @@ -66,7 +66,7 @@ then systemctl start jellyseerr exit fi -yarn install &>/dev/null +CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile --network-timeout 1000000 &>/dev/null yarn build &>/dev/null systemctl start jellyseerr msg_ok "Updated $APP" @@ -77,10 +77,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5055${CL} \n" From 8562dd1b9360933789e25c85a1705e5dfe02f02e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 4 Jul 2024 10:56:52 -0400 Subject: [PATCH 3251/3335] Update jellyseerr-install.sh switch back to the main branch --- install/jellyseerr-install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 5de57a62..38ae8b22 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -33,15 +33,17 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing pnpm" -$STD npm install -g pnpm -msg_ok "Installed pnpm" +msg_info "Installing Yarn" +$STD npm install -g yarn +msg_ok "Installed Yarn" msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr -CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile &>/dev/null -$STD pnpm build +$STD git checkout main +CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile --network-timeout 1000000 &>/dev/null +$STD yarn install +$STD yarn build mkdir -p /etc/jellyseerr/ cat </etc/jellyseerr/jellyseerr.conf PORT=5055 @@ -53,17 +55,15 @@ msg_ok "Installed Jellyseerr" msg_info "Creating Service" cat </etc/systemd/system/jellyseerr.service [Unit] -Description=Jellyseerr Service -Wants=network-online.target -After=network-online.target +Description=jellyseerr Service +After=network.target [Service] EnvironmentFile=/etc/jellyseerr/jellyseerr.conf Environment=NODE_ENV=production Type=exec -Restart=on-failure WorkingDirectory=/opt/jellyseerr -ExecStart=/usr/bin/node dist/index.js +ExecStart=/usr/bin/yarn start [Install] WantedBy=multi-user.target From 186f186e8b6c8d706adc8a110646f93147e35448 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 5 Jul 2024 01:09:30 -0400 Subject: [PATCH 3252/3335] Update pingvin.sh fixes https://github.com/tteck/Proxmox/issues/3331 --- ct/pingvin.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ct/pingvin.sh b/ct/pingvin.sh index ff582d2f..0cce4f60 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -64,8 +64,10 @@ cd /opt/pingvin-share git fetch --tags git checkout $(git describe --tags `git rev-list --tags --max-count=1`) &>/dev/null cd backend +npm install &>/dev/null npm run build &>/dev/null cd ../frontend +npm install &>/dev/null npm run build &>/dev/null msg_ok "Updated Pingvin Share" From 3a65f89cabc38d8b76f536b566a621227dce5454 Mon Sep 17 00:00:00 2001 From: Mathijs Groothuis Date: Sun, 7 Jul 2024 17:50:10 +0200 Subject: [PATCH 3253/3335] Update calibre-web.sh (#3346) --- ct/calibre-web.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index 69752501..5cf87184 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -65,8 +65,6 @@ function update_script() { rm kepubify-linux-64bit curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null chmod +x kepubify-linux-64bit - rm /opt/calibre-web/metadata.db - wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web menu_array=("1" "Enables gdrive as storage backend for your ebooks" OFF \ "2" "Enables sending emails via a googlemail account without enabling insecure apps" OFF \ "3" "Enables displaying of additional author infos on the authors page" OFF \ From 22c7801217482eb9f0ecfc37f2c0ebe6cdf14351 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jul 2024 16:40:15 -0400 Subject: [PATCH 3254/3335] Update mikrotik-routeros.sh chr-7.15.2 --- vm/mikrotik-routeros.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index f9e05f33..29b41892 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -234,7 +234,7 @@ msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for Mikrotik RouterOS CHR Disk Image" -URL=https://download.mikrotik.com/routeros/7.12.1/chr-7.12.1.img.zip +URL=https://download.mikrotik.com/routeros/7.15.2/chr-7.15.2.img.zip sleep 2 msg_ok "${CL}${BL}${URL}${CL}" From 8892fd960f33b0683e12560ebcc458e71a88d4a1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 12 Jul 2024 23:44:56 -0400 Subject: [PATCH 3255/3335] Update CHANGELOG.md --- CHANGELOG.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d29cea1..50c1f491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,12 @@
-

Change Log

+

Changelog

All notable changes to this project will be documented in this file.

+- I keep the website source private to prevent _**copycat**_ sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. + - 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. @@ -14,16 +16,16 @@ ### Changed -- **All Scripts** +- **All Scripts** [(Commit)](https://github.com/tteck/Proxmox/commit/39ea1d4a20b83c07d084ebafdc811eec3548f289) - Requires Proxmox Virtual Environment version 8.1 or later. ## 2024-06-27 ### Changed -- **Kubo LXC** +- **Kubo LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/kubo-install.sh) - NEW Script -- **RabbitMQ LXC** +- **RabbitMQ LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/rabbitmq-install.sh) - NEW Script - **Scrutiny LXC** - Removed from website, broken. @@ -39,27 +41,27 @@ ### Changed -- **MySpeed LXC** +- **MySpeed LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/myspeed-install.sh) - NEW Script ## 2024-06-13 ### Changed -- **PeaNUT LXC** +- **PeaNUT LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/peanut-install.sh) - NEW Script - **Website** - If the Changelog has changed recently, the link on the website will pulse. -- **Spoolman LXC** +- **Spoolman LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/spoolman-install.sh) - NEW Script ## 2024-06-12 ### Changed -- **MeTube LXC** +- **MeTube LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/metube-install.sh) - NEW Script -- **Matterbridge LXC** +- **Matterbridge LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/matterbridge-install.sh) - NEW Script - **Website** - Reopen the gh-pages site (https://tteck.github.io/Proxmox/) @@ -68,14 +70,14 @@ ### Changed -- **Zabbix LXC** +- **Zabbix LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/zabbix-install.sh) - NEW Script ## 2024-06-06 ### Changed -- **Petio LXC** +- **Petio LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/petio-install.sh) - NEW Script - **Website** - Important notices will now be displayed on the landing page. @@ -84,14 +86,14 @@ ### Changed -- **FlareSolverr LXC** +- **FlareSolverr LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/flaresolverr-install.sh) - NEW Script ## 2024-05-31 ### Changed -- **Advanced Settings** +- **Advanced Settings** [(Commit)](https://github.com/tteck/Proxmox/commit/fc9dff220b4ea426d3a75178ad8accacae4683ca) - Passwords are now masked ## 2024-05-30 From 19fef65ac02bfabd16d56b052564183f35bf7419 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Jul 2024 00:26:39 -0400 Subject: [PATCH 3256/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50c1f491..e2728cd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@

All notable changes to this project will be documented in this file.

-- I keep the website source private to prevent _**copycat**_ sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. +- The website source is kept private to prevent _**copycat**_ sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. - 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. From 2446b6599f3182b9a0ce81d8d8acc119613d826d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Jul 2024 13:28:19 -0400 Subject: [PATCH 3257/3335] Update pingvin-install.sh fixes https://github.com/tteck/Proxmox/issues/3373 --- install/pingvin-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index c848cfb3..4430cc21 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -43,6 +43,7 @@ $STD npm install $STD npm run build $STD pm2 start --name="pingvin-share-backend" npm -- run prod cd ../frontend +sed -i '/"admin.config.smtp.allow-unauthorized-certificates":\|admin.config.smtp.allow-unauthorized-certificates.description":/,+1d' ./src/i18n/translations/fr-FR.ts $STD npm install $STD npm run build $STD pm2 start --name="pingvin-share-frontend" npm -- run start From e3da97472e64584846fae33b8b2c572000efa85b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 13 Jul 2024 16:11:36 -0400 Subject: [PATCH 3258/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2728cd0..01d7d169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@

All notable changes to this project will be documented in this file.

-- The website source is kept private to prevent _**copycat**_ sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. +- The website source is private and will not be made open-source to help prevent copycat/coat-tailing sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. - 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. From bf40c30fffee07424aba152aba05aa6403089725 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jul 2024 01:19:16 -0400 Subject: [PATCH 3259/3335] Update haos-vm.sh add local-zfs --- vm/haos-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index bad50312..90bb9751 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -428,7 +428,7 @@ nfs | dir) DISK_IMPORT="-format raw" THIN="" ;; -btrfs) +btrfs | local-zfs) DISK_EXT=".raw" DISK_REF="$VMID/" DISK_IMPORT="-format raw" From 9cbd0f30376787e49d3972fdbc0af6872467c1e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jul 2024 11:27:55 -0400 Subject: [PATCH 3260/3335] Update install.func fixes https://github.com/tteck/Proxmox/issues/3386 --- misc/install.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/install.func b/misc/install.func index c698e258..660ea2c4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -87,7 +87,10 @@ msg_error() { setting_up_container() { msg_info "Setting up Container OS" sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen + locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1) + echo "LANG=${locale_line}" >/etc/default/locale locale-gen >/dev/null + export LANG=${locale_line} echo $tz >/etc/timezone ln -sf /usr/share/zoneinfo/$tz /etc/localtime for ((i = RETRY_NUM; i > 0; i--)); do From 00a8f07170baae216a04a2617d9411d0fc2fd1d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 16 Jul 2024 14:04:50 -0400 Subject: [PATCH 3261/3335] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01d7d169..517cda16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@

All notable changes to this project will be documented in this file.

-- The website source is private and will not be made open-source to help prevent copycat/coat-tailing sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. +- Be cautious of copycat or coat-tailing sites that exploit the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. - 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. From 9deea7a9830bb1457c1f051ca5f1e7c7d6d127e7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jul 2024 13:32:26 -0400 Subject: [PATCH 3262/3335] Update vaultwarden.sh add Admin Token to `/opt/vaultwarden/data/config.json` --- ct/vaultwarden.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index b5cb6fa5..413cd5fa 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -127,7 +127,9 @@ function update_script() { if [[ -z "$NEWTOKEN" ]]; then exit; fi if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) - sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env + for file in /opt/vaultwarden/.env /opt/vaultwarden/data/config.json; do + sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" "$file" + done systemctl restart vaultwarden fi exit From cfa1b2e04d9056fe96981677bd856f7111ad9495 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 17 Jul 2024 13:48:42 -0400 Subject: [PATCH 3263/3335] Update vaultwarden.sh tweak --- ct/vaultwarden.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 413cd5fa..f7901b79 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -127,9 +127,10 @@ function update_script() { if [[ -z "$NEWTOKEN" ]]; then exit; fi if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) - for file in /opt/vaultwarden/.env /opt/vaultwarden/data/config.json; do - sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" "$file" - done + sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env + if [[ -f /opt/vaultwarden/data/config.json ]]; then + sed -i "s|\"admin_token\":.*|\"admin_token\": \"${TOKEN}\"|" /opt/vaultwarden/data/config.json + fi systemctl restart vaultwarden fi exit From 2febf2c39bbdca74507a864b632908f4c14a8265 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jul 2024 06:20:20 -0400 Subject: [PATCH 3264/3335] Update unifi.sh add AVX instruction set check --- ct/unifi.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/unifi.sh b/ct/unifi.sh index 820930c0..cec984c5 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -17,6 +17,10 @@ cat <<"EOF" EOF } header_info +if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then + echo "AVX instruction set is not supported on this CPU." + exit +fi echo -e "Loading..." APP="Unifi" var_disk="8" From 6c155c7463a3c22bc73aed0165ba879f5d70dff4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 20 Jul 2024 12:44:27 -0400 Subject: [PATCH 3265/3335] Update ersatztv.sh Refactor `function update_script ()` fixes https://github.com/tteck/Proxmox/issues/3404 --- ct/ersatztv.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ct/ersatztv.sh b/ct/ersatztv.sh index de21b8ef..81ea5b7b 100644 --- a/ct/ersatztv.sh +++ b/ct/ersatztv.sh @@ -57,22 +57,20 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi + msg_info "Stopping ErsatzTV" systemctl stop ersatzTV msg_ok "Stopped ErsatzTV" msg_info "Updating ErsatzTV" RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1) -if [ -d /opt/ErsatzTV/ErsatzTV_bak ]; then - rm -rf /opt/ErsatzTV/ErsatzTV_bak -fi -mv /opt/ErsatzTV/ErsatzTV /opt/ErsatzTV/ErsatzTV_bak +cp -R /opt/ErsatzTV/ ErsatzTV-backup +rm ErsatzTV-backup/ErsatzTV +rm -rf /opt/ErsatzTV wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV +cp -R ErsatzTV-backup/* /opt/ErsatzTV/ +rm -rf ErsatzTV-backup msg_ok "Updated ErsatzTV" msg_info "Starting ErsatzTV" From 80fb3ee841717c94088d9cb77bbaaf8c43186a88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 21 Jul 2024 07:11:36 -0400 Subject: [PATCH 3266/3335] Update update-lxcs-cron.sh fixes https://github.com/tteck/Proxmox/issues/3408 --- misc/update-lxcs-cron.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index 23c44852..04827734 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -35,7 +35,6 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do fi done if [ "$excluded" == true ]; then - header_info echo -e "[Info] Skipping $container" sleep 1 else From d18e37166dd52fa8074281add9f96979b9b1cf59 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 22 Jul 2024 06:39:34 -0400 Subject: [PATCH 3267/3335] Update bunkerweb-install.sh Refactor to eliminate script execution within another script, making the code easier to review. --- install/bunkerweb-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index a26cb424..4f15709c 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -17,10 +17,9 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg2 -$STD apt-get install -y ca-certificates +$STD apt-get install -y gpg +$STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release -$STD apt-get install -y debian-archive-keyring msg_ok "Installed Dependencies" msg_info "Installing Nginx" @@ -31,9 +30,11 @@ $STD apt-get install -y nginx msg_ok "Installed Nginx" RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Installing BunkerWeb v${RELEASE}" +msg_info "Installing BunkerWeb v${RELEASE} (Patience)" +curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list +$STD apt-get update export UI_WIZARD=1 -curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null $STD apt-get install -y bunkerweb=${RELEASE} cat </etc/apt/preferences.d/bunkerweb Package: bunkerweb From 8db7e57819ccbee1f8dd8bd8cf1c1010d71f7035 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Jul 2024 12:13:35 -0400 Subject: [PATCH 3268/3335] Update keycloak.sh fix URL --- ct/keycloak.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 5e461722..63827313 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -69,4 +69,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8080${CL} \n" + ${BL}http://${IP}:8080/admin${CL} \n" From b73557c14fba7ee9a6350f8531685b1c90c17c79 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 25 Jul 2024 13:50:00 -0400 Subject: [PATCH 3269/3335] Update ersatztv-install.sh fixes https://github.com/tteck/Proxmox/issues/3422 --- install/ersatztv-install.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/install/ersatztv-install.sh b/install/ersatztv-install.sh index e4068612..939880f3 100644 --- a/install/ersatztv-install.sh +++ b/install/ersatztv-install.sh @@ -15,21 +15,21 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y --no-install-recommends \ - ffmpeg \ - build-essential \ - unzip \ - pkg-config \ - curl \ - sudo \ - git \ - make \ - mc +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" +msg_info "Installing FFmpeg (Patience)" +echo "deb http://deb.debian.org/debian/ sid main" >/etc/apt/sources.list.d/sid.list +$STD apt update +DEBIAN_FRONTEND=noninteractive $STD apt install -t sid ffmpeg -y +rm /etc/apt/sources.list.d/sid.list +$STD apt update +msg_ok "Installed FFmpeg" -msg_info "Installing ErsatzTV " +msg_info "Installing ErsatzTV" RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1) wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV From ae49faec9309a3570345c8e0fed9464a73a5d413 Mon Sep 17 00:00:00 2001 From: Miguel Muniz Date: Fri, 26 Jul 2024 02:07:38 -0700 Subject: [PATCH 3270/3335] Add new LXC: Gitea (#3419) --- ct/gitea.sh | 76 +++++++++++++++++++++++++++++++++++++++ install/gitea-install.sh | 77 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 ct/gitea.sh create mode 100644 install/gitea-install.sh diff --git a/ct/gitea.sh b/ct/gitea.sh new file mode 100644 index 00000000..155d7fe0 --- /dev/null +++ b/ct/gitea.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ _ __ + / ____/(_)/ /____ ____ _ + / / __// // __/ _ \/ __ / +/ /_/ // // /_/ __/ /_/ / +\____//_/ \__/\___/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Gitea" +var_disk="8" +var_cpu="1" +var_ram="512" +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 +if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') +msg_info "Updating $APP to ${RELEASE}" +wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64 +systemctl stop gitea +rm -rf /usr/local/bin/gitea +mv gitea* /usr/local/bin/gitea +systemctl start gitea +msg_ok "Updated $APP Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" diff --git a/install/gitea-install.sh b/install/gitea-install.sh new file mode 100644 index 00000000..169136a2 --- /dev/null +++ b/install/gitea-install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-author: Rogue-King +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y git +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Gitea" +RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') +wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64 +mv gitea* /usr/local/bin/gitea +chmod +x /usr/local/bin/gitea +adduser --system --group --disabled-password --home /etc/gitea gitea > /dev/null +mkdir -p /var/lib/gitea/{custom,data,log} +chown -R gitea:gitea /var/lib/gitea/ +chmod -R 750 /var/lib/gitea/ +chown root:gitea /etc/gitea +chmod 770 /etc/gitea +msg_ok "Installed Gitea" + +msg_info "Creating Service" +cat </etc/systemd/system/gitea.service +[Unit] +Description=Gitea (Git with a cup of tea) +After=syslog.target +After=network.target + +[Service] +# Uncomment notify and watchdog if you want to use them +# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that +# LimitNOFILE=524288:524288 +RestartSec=2s +Type=simple +#Type=notify +User=gitea +Group=gitea +#The mount point we added to the container +WorkingDirectory=/var/lib/gitea +#Create directory in /run +RuntimeDirectory=gitea +ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini +Restart=always +Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea +#WatchdogSec=30s +#Capabilities to bind to low-numbered ports +#CapabilityBoundingSet=CAP_NET_BIND_SERVICE +#AmbientCapabilities=CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now gitea +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 136f6671265b3fdc826023322000caecb4c866f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Jul 2024 05:22:40 -0400 Subject: [PATCH 3271/3335] Update gitea-install.sh add SQLite3 --- install/gitea-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/gitea-install.sh b/install/gitea-install.sh index 169136a2..2ed5e751 100644 --- a/install/gitea-install.sh +++ b/install/gitea-install.sh @@ -19,6 +19,7 @@ $STD apt-get install -y git $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" msg_info "Installing Gitea" From 2c58bc987c15911d9efa6ae2e690ddbc43cb2358 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Jul 2024 05:37:09 -0400 Subject: [PATCH 3272/3335] Update gitea.sh increase ram to 1024 --- ct/gitea.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/gitea.sh b/ct/gitea.sh index 155d7fe0..f1fc716b 100644 --- a/ct/gitea.sh +++ b/ct/gitea.sh @@ -22,7 +22,7 @@ echo -e "Loading..." APP="Gitea" var_disk="8" var_cpu="1" -var_ram="512" +var_ram="1024" var_os="debian" var_version="12" variables From 32ae8c1f4fbb5ca59a0abbfbd3901cb5bcdeef27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 26 Jul 2024 06:03:56 -0400 Subject: [PATCH 3273/3335] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 517cda16..f8f1fb14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ - 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. +## 2024-07-26 + +### Changed + +- **Gitea LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/gitea-install.sh) + - NEW Script ## 2024-06-30 From f59c1227be20d1d71cd751baa74571093be73317 Mon Sep 17 00:00:00 2001 From: vrozaksen <87482223+vrozaksen@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:04:40 +0000 Subject: [PATCH 3274/3335] Update gitea.sh (#3426) Fix permissions https://docs.gitea.com/installation/install-from-binary --- ct/gitea.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/gitea.sh b/ct/gitea.sh index f1fc716b..6ab81615 100644 --- a/ct/gitea.sh +++ b/ct/gitea.sh @@ -62,6 +62,7 @@ wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$REL systemctl stop gitea rm -rf /usr/local/bin/gitea mv gitea* /usr/local/bin/gitea +chmod +x /usr/local/bin/gitea systemctl start gitea msg_ok "Updated $APP Successfully" exit From a35e23916edf998dac5565fbaf67c6348dff7b2b Mon Sep 17 00:00:00 2001 From: Peter Stalman Date: Sat, 27 Jul 2024 03:54:20 -0700 Subject: [PATCH 3275/3335] Update traefik-install.sh (#3431) --- install/traefik-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/traefik-install.sh b/install/traefik-install.sh index 7b5c44b3..f418b68b 100644 --- a/install/traefik-install.sh +++ b/install/traefik-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y gpg $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" -RELEASE=3.0.4 #$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases | grep -oP '"tag_name":\s*"v\K[\d.]+?(?=")' | sort -V | tail -n 1) msg_info "Installing Traefik v${RELEASE}" mkdir -p /etc/traefik/{conf.d,ssl} wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz From 5e561a1b789ccb0e708b4bf8a31de84a395d2c23 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jul 2024 06:55:30 -0400 Subject: [PATCH 3276/3335] Update traefik.sh tweak --- ct/traefik.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/traefik.sh b/ct/traefik.sh index 0da650d1..d86ac143 100644 --- a/ct/traefik.sh +++ b/ct/traefik.sh @@ -55,7 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/traefik.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -RELEASE=3.0.4 #$(curl -s https://api.github.com/repos/traefik/traefik/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases | grep -oP '"tag_name":\s*"v\K[\d.]+?(?=")' | sort -V | tail -n 1) msg_info "Updating $APP LXC" if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then wget -q https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_amd64.tar.gz From fabbe5925bd3ab05c00a76f41f2919f3a98ae25f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jul 2024 07:07:09 -0400 Subject: [PATCH 3277/3335] Update README.md tweak --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9401c778..9a82aa96 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

Proxmox VE Helper-Scripts

- Website | + Website | Contribute | Guides | Changelog | @@ -15,6 +15,8 @@ --- +Be cautious of copycat or coat-tailing sites that exploit the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. + These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. Options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine. From b108b6e373f059ba8925aa55f5b0f9caf23b2f7f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jul 2024 12:48:42 -0400 Subject: [PATCH 3278/3335] Update update-lxcs.sh tweak --- misc/update-lxcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 9167186e..1ad3b5cd 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -101,7 +101,7 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do done wait header_info -echo -e "${GN}The process is complete, and the selected containers have been updated.${CL}\n" +echo -e "${GN}The process is complete, and the containers have been successfully updated.${CL}\n" if [ "${#containers_needing_reboot[@]}" -gt 0 ]; then echo -e "${RD}The following containers require a reboot:${CL}" for container_name in "${containers_needing_reboot[@]}"; do From 026b0f4105c709a0139b3aa285263203b7d1e923 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Jul 2024 12:51:12 -0400 Subject: [PATCH 3279/3335] Update radarr.sh tweak --- ct/radarr.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/radarr.sh b/ct/radarr.sh index 69a75d62..8903135a 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -55,10 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /var/lib/radarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_error "There is currently no update path available." exit } From 880a0f52ec8c3a779f719dfca0104f909d4d4eee Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Jul 2024 08:58:38 -0400 Subject: [PATCH 3280/3335] Update CHANGELOG.md --- CHANGELOG.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8f1fb14..82bb0868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@

All notable changes to this project will be documented in this file.

-- Be cautious of copycat or coat-tailing sites that exploit the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. +> [!WARNING] +Be cautious of copycat or coat-tailing sites that exploit the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. - 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. @@ -15,7 +16,7 @@ ### Changed -- **Gitea LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/gitea-install.sh) +- **Gitea LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/gitea-install.sh) - NEW Script ## 2024-06-30 @@ -29,9 +30,9 @@ ### Changed -- **Kubo LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/kubo-install.sh) +- **Kubo LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/kubo-install.sh) - NEW Script -- **RabbitMQ LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/rabbitmq-install.sh) +- **RabbitMQ LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/rabbitmq-install.sh) - NEW Script - **Scrutiny LXC** - Removed from website, broken. @@ -47,27 +48,27 @@ ### Changed -- **MySpeed LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/myspeed-install.sh) +- **MySpeed LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/myspeed-install.sh) - NEW Script ## 2024-06-13 ### Changed -- **PeaNUT LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/peanut-install.sh) +- **PeaNUT LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/peanut-install.sh) - NEW Script - **Website** - If the Changelog has changed recently, the link on the website will pulse. -- **Spoolman LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/spoolman-install.sh) +- **Spoolman LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/spoolman-install.sh) - NEW Script ## 2024-06-12 ### Changed -- **MeTube LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/metube-install.sh) +- **MeTube LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/metube-install.sh) - NEW Script -- **Matterbridge LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/matterbridge-install.sh) +- **Matterbridge LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/matterbridge-install.sh) - NEW Script - **Website** - Reopen the gh-pages site (https://tteck.github.io/Proxmox/) @@ -76,14 +77,14 @@ ### Changed -- **Zabbix LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/zabbix-install.sh) +- **Zabbix LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/zabbix-install.sh) - NEW Script ## 2024-06-06 ### Changed -- **Petio LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/petio-install.sh) +- **Petio LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/petio-install.sh) - NEW Script - **Website** - Important notices will now be displayed on the landing page. @@ -92,7 +93,7 @@ ### Changed -- **FlareSolverr LXC** [(View Source)](https://raw.githubusercontent.com/tteck/Proxmox/main/install/flaresolverr-install.sh) +- **FlareSolverr LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/flaresolverr-install.sh) - NEW Script ## 2024-05-31 From bfce73c0ed1d4dad7ffe0d81484e748a2e91894e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 28 Jul 2024 09:01:04 -0400 Subject: [PATCH 3281/3335] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9a82aa96..27957012 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ --- +> [!WARNING] Be cautious of copycat or coat-tailing sites that exploit the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/. These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. From b567bd848bd561da57fdc7a86e489b2e6d59c998 Mon Sep 17 00:00:00 2001 From: Kieran Hannigan Date: Tue, 30 Jul 2024 18:58:21 +0800 Subject: [PATCH 3282/3335] Allow octoprint user to perform system functions (#3444) --- install/octoprint-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index ac9eacfb..878762fa 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -37,6 +37,7 @@ msg_info "Creating user octoprint" useradd -m -s /bin/bash -p $(openssl passwd -1 octoprint) octoprint usermod -aG sudo,tty,dialout octoprint chown -R octoprint:octoprint /opt +echo "octoprint ALL=NOPASSWD: $(command -v systemctl) restart octoprint, $(command -v reboot), $(command -v poweroff)" > /etc/sudoers.d/octoprint msg_ok "Created user octoprint" msg_info "Installing OctoPrint" From d07353534663f87186eceaf8c4a76ce9e886e0df Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 30 Jul 2024 07:48:03 -0400 Subject: [PATCH 3283/3335] Update bunkerweb-install.sh switch repo back to packagecloud --- install/bunkerweb-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index 4f15709c..e5737a09 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -31,8 +31,10 @@ msg_ok "Installed Nginx" RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing BunkerWeb v${RELEASE} (Patience)" -curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg -echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list +#curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg +#echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list +curl -fsSL "https://packagecloud.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://packagecloud.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list $STD apt-get update export UI_WIZARD=1 $STD apt-get install -y bunkerweb=${RELEASE} From 341e873ebac079c8c3a36ed93bbab1f3f6406fb6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Aug 2024 17:06:19 -0400 Subject: [PATCH 3284/3335] Update wastebin.sh Refactor --- ct/wastebin.sh | 62 ++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/ct/wastebin.sh b/ct/wastebin.sh index be4b5aef..c76c428e 100644 --- a/ct/wastebin.sh +++ b/ct/wastebin.sh @@ -23,8 +23,8 @@ header_info echo -e "Loading..." APP="Wastebin" var_disk="4" -var_cpu="4" -var_ram="2048" +var_cpu="1" +var_ram="1024" var_os="debian" var_version="12" variables @@ -58,39 +58,31 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/wastebin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi -msg_info "Stopping Wastebin" -systemctl stop wastebin -msg_ok "Wastebin Stopped" - -msg_info "Updating Wastebin" RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /opt -if [ -d wastebin_bak ]; then - rm -rf wastebin_bak +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Wastebin" + systemctl stop wastebin + msg_ok "Wastebin Stopped" + + msg_info "Updating Wastebin" + wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst + tar -xf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst + cp -f wastebin /opt/wastebin/ + chmod +x /opt/wastebin/wastebin + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated Wastebin" + + msg_info "Starting Wastebin" + systemctl start wastebin + msg_ok "Started Wastebin" + + msg_info "Cleaning Up" + rm -rf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst + msg_ok "Cleaned" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" fi -mv wastebin wastebin_bak -wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" -unzip -q ${RELEASE}.zip -mv wastebin-${RELEASE} /opt/wastebin -cd /opt/wastebin -cargo update -q -cargo build -q --release -msg_ok "Updated Wastebin" - -msg_info "Starting Wastebin" -systemctl start wastebin -msg_ok "Started Wastebin" - -msg_info "Cleaning Up" -cd /opt -rm -R ${RELEASE}.zip -rm -R wastebin_bak -msg_ok "Cleaned" -msg_ok "Updated Successfully" exit } @@ -98,10 +90,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP}:8088${CL} \n" From d21760cc65f6b0f0fa227c042d98c49610500eeb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Aug 2024 17:07:52 -0400 Subject: [PATCH 3285/3335] Update wastebin-install.sh Refactor Fixes https://github.com/tteck/Proxmox/issues/3465 --- install/wastebin-install.sh | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh index 227b1095..cb7dca71 100644 --- a/install/wastebin-install.sh +++ b/install/wastebin-install.sh @@ -15,30 +15,20 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y --no-install-recommends \ - build-essential \ - unzip \ - curl \ - sudo \ - git \ - make \ - mc +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing Rust (Patience)" -$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y -source ~/.cargo/env -msg_ok "Installed Rust" - msg_info "Installing Wastebin (Patience)" RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" -unzip -q ${RELEASE}.zip -mv wastebin-${RELEASE} /opt/wastebin -rm -R ${RELEASE}.zip -cd /opt/wastebin -cargo build -q --release +wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst +tar -xf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst +rm -rf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst +mkdir -p /opt/wastebin +mv wastebin /opt/wastebin/ +chmod +x /opt/wastebin/wastebin msg_ok "Installed Wastebin" msg_info "Creating Service" @@ -48,9 +38,8 @@ Description=Start Wastebin Service After=network.target [Service] -User=root WorkingDirectory=/opt/wastebin -ExecStart=/root/.cargo/bin/cargo run --release --quiet +ExecStart=/opt/wastebin/wastebin [Install] WantedBy=multi-user.target From 232919d6be2da160306b7c6da53095126cadb870 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Aug 2024 17:10:38 -0400 Subject: [PATCH 3286/3335] Update wastebin-install.sh tweak --- install/wastebin-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh index cb7dca71..b9faec80 100644 --- a/install/wastebin-install.sh +++ b/install/wastebin-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -msg_info "Installing Wastebin (Patience)" +msg_info "Installing Wastebin" RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst tar -xf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst From a5fece4292495a459cbc73138867975419d1aaea Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 4 Aug 2024 23:21:49 -0400 Subject: [PATCH 3287/3335] Update n8n.sh fixes https://github.com/tteck/Proxmox/issues/3470 --- ct/n8n.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/n8n.sh b/ct/n8n.sh index 3abc7328..b78f3ec6 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -65,6 +65,7 @@ if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Install fi msg_info "Updating ${APP} LXC" npm update -g n8n &>/dev/null +systemctl restart n8n msg_ok "Updated Successfully" exit } From c4b6ea33aa1eb2b346358f4abce335753f5375da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Mon, 5 Aug 2024 04:58:22 -0400 Subject: [PATCH 3288/3335] Add script for Lldap (#3455) --- ct/lldap.sh | 76 ++++++++++++++++++++++++++++++++++++++++ install/lldap-install.sh | 47 +++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 ct/lldap.sh create mode 100644 install/lldap-install.sh diff --git a/ct/lldap.sh b/ct/lldap.sh new file mode 100644 index 00000000..e797a15f --- /dev/null +++ b/ct/lldap.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / / /___/ /___ _____ + / / / __ / __ `/ __ \ + / / / /_/ / /_/ / /_/ / +/_/_/\__,_/\__,_/ .___/ + /_/ + +EOF +} +header_info +echo -e "Loading..." +APP="lldap" +var_disk="4" +var_cpu="1" +var_ram="512" +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 +if [[ ! -f /etc/systemd/system/lldap.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +apt update +apt upgrade -y lldap +msg_ok "Updated $APP" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:17170${CL} \n" +echo -e "$Default login: + username:${BL}admin${CL} + password:${BL}password${CL} \n" diff --git a/install/lldap-install.sh b/install/lldap-install.sh new file mode 100644 index 00000000..71bf7f9b --- /dev/null +++ b/install/lldap-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: remz1337 +# License: MIT +# https://github.com/tteck/Proxmox/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" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing lldap" +DISTRO="Debian" +os=$(less /etc/os-release | grep "^ID=") +os="${os:3}" +if [ "$os" == "ubuntu" ]; then + DISTRO="Ubuntu" +fi +DISTRO_VER=$(less /etc/os-release | grep "^VERSION_ID=") +DISTRO_VER="${DISTRO_VER:12}" +DISTRO_VER="${DISTRO_VER%%\"}" +echo "deb http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${DISTRO_VER}/ /" > /etc/apt/sources.list.d/home:Masgalor:LLDAP.list +curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${DISTRO_VER}/Release.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/home_Masgalor_LLDAP.gpg +$STD apt update +$STD apt install -y lldap +systemctl enable -q --now lldap +msg_ok "Installed lldap" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 20fb0ce808deb0e26fe3553bedeacf4b0bf71cd3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Aug 2024 05:03:19 -0400 Subject: [PATCH 3289/3335] Update lldap.sh tweak --- ct/lldap.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ct/lldap.sh b/ct/lldap.sh index e797a15f..050b471d 100644 --- a/ct/lldap.sh +++ b/ct/lldap.sh @@ -71,6 +71,3 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:17170${CL} \n" -echo -e "$Default login: - username:${BL}admin${CL} - password:${BL}password${CL} \n" From ddb655156546e7927c19303c172ac6c1e12df2c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Aug 2024 06:03:44 -0400 Subject: [PATCH 3290/3335] Update lldap-install.sh Refactor --- install/lldap-install.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/install/lldap-install.sh b/install/lldap-install.sh index 71bf7f9b..0bdebe94 100644 --- a/install/lldap-install.sh +++ b/install/lldap-install.sh @@ -22,17 +22,15 @@ $STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing lldap" -DISTRO="Debian" -os=$(less /etc/os-release | grep "^ID=") -os="${os:3}" +source /etc/os-release +os=$ID if [ "$os" == "ubuntu" ]; then - DISTRO="Ubuntu" + DISTRO="xUbuntu" +else + DISTRO="${os^}" fi -DISTRO_VER=$(less /etc/os-release | grep "^VERSION_ID=") -DISTRO_VER="${DISTRO_VER:12}" -DISTRO_VER="${DISTRO_VER%%\"}" -echo "deb http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${DISTRO_VER}/ /" > /etc/apt/sources.list.d/home:Masgalor:LLDAP.list -curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${DISTRO_VER}/Release.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/home_Masgalor_LLDAP.gpg +echo "deb http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${VERSION_ID}/ /" >/etc/apt/sources.list.d/home:Masgalor:LLDAP.list +curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${VERSION_ID}/Release.key | gpg --dearmor >/etc/apt/trusted.gpg.d/home_Masgalor_LLDAP.gpg $STD apt update $STD apt install -y lldap systemctl enable -q --now lldap From 4a1e02a9abef75cd2cd672620c5e792bb8f11332 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Aug 2024 17:06:48 -0400 Subject: [PATCH 3291/3335] Update linkwarden-install.sh add `yarn playwright install` --- install/linkwarden-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 9d5c455d..378343d5 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -74,6 +74,7 @@ RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/la echo "${RELEASE}" >/opt/${APPLICATION}_version.txt $STD yarn $STD npx playwright install-deps +$STD yarn playwright install IP=$(hostname -I | awk '{print $1}') SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" env_path="/opt/linkwarden/.env" From b66590f976ad2824a4d4474b332ac6bc7a66cec8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Aug 2024 17:09:26 -0400 Subject: [PATCH 3292/3335] Update linkwarden.sh add `yarn playwright install` --- ct/linkwarden.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index e5c0494a..2054aa9b 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -67,6 +67,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} git pull yarn npx playwright install-deps + yarn playwright install yarn prisma generate yarn build yarn prisma migrate deploy From d26e474ccbf4bfcfc761ec82103321a3b44bb7c0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Aug 2024 13:25:55 -0400 Subject: [PATCH 3293/3335] Update install.func add a one second delay before checking internet connectivity --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 660ea2c4..4bdc932c 100644 --- a/misc/install.func +++ b/misc/install.func @@ -117,7 +117,7 @@ network_check() { trap - ERR ipv4_connected=false ipv6_connected=false - + sleep 1 # Check IPv4 connectivity if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then msg_ok "IPv4 Internet Connected"; From 92452db3e5c21d5be4e9a074929e3a8ba7c69e88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 6 Aug 2024 15:32:57 -0400 Subject: [PATCH 3294/3335] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82bb0868..8a7bb37a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ Be cautious of copycat or coat-tailing sites that exploit the project's populari - 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. +## 2024-08-06 + +### Changed + +- **lldap LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/lldap-install.sh) + - NEW Script + ## 2024-07-26 ### Changed From 6d1cc92b59482b4d8dca0f9840f13eed41dbe57e Mon Sep 17 00:00:00 2001 From: Florian Pitance <54334437+fl0ppy-d1sk@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:27:19 +0200 Subject: [PATCH 3295/3335] BunkerWeb Use repo.bunkerweb.io instead of packagecloud.io (#3484) We have fixed the issues with our repository at repo.bunkerweb.io, you can now use the new address. --- install/bunkerweb-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index e5737a09..4f15709c 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -31,10 +31,8 @@ msg_ok "Installed Nginx" RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing BunkerWeb v${RELEASE} (Patience)" -#curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg -#echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list -curl -fsSL "https://packagecloud.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg -echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://packagecloud.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list +curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list $STD apt-get update export UI_WIZARD=1 $STD apt-get install -y bunkerweb=${RELEASE} From daa896894dc796f3a8b5fa98469af3d369f2bb4c Mon Sep 17 00:00:00 2001 From: indiscreettuna Date: Thu, 8 Aug 2024 18:36:34 +1000 Subject: [PATCH 3296/3335] Allow git clone over SSH (#3490) --- install/gitea-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/gitea-install.sh b/install/gitea-install.sh index 2ed5e751..02c8310e 100644 --- a/install/gitea-install.sh +++ b/install/gitea-install.sh @@ -27,12 +27,13 @@ RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64 mv gitea* /usr/local/bin/gitea chmod +x /usr/local/bin/gitea -adduser --system --group --disabled-password --home /etc/gitea gitea > /dev/null +adduser --system --group --disabled-password --shell /bin/bash --home /etc/gitea gitea > /dev/null mkdir -p /var/lib/gitea/{custom,data,log} chown -R gitea:gitea /var/lib/gitea/ chmod -R 750 /var/lib/gitea/ chown root:gitea /etc/gitea chmod 770 /etc/gitea +sudo -u gitea ln -s /var/lib/gitea/data/.ssh/ /etc/gitea/.ssh msg_ok "Installed Gitea" msg_info "Creating Service" From e428bb8604b08d7cef403e6dc07a6662ba2598cf Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Aug 2024 12:21:17 -0400 Subject: [PATCH 3297/3335] Update trilium-install.sh switch to TriliumNext --- install/trilium-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install/trilium-install.sh b/install/trilium-install.sh index 6e7861a6..d2e7ae3f 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -19,15 +19,13 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Installing Trilium" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +msg_info "Installing TriliumNext" +wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz $STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz mv trilium-linux-x64-server /opt/trilium -msg_ok "Installed Trilium" +msg_ok "Installed TriliumNext" msg_info "Creating Service" service_path="/etc/systemd/system/trilium.service" From 9c88dcdbd64a4f302acb38f14aaff8efe8467bd0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Aug 2024 12:23:46 -0400 Subject: [PATCH 3298/3335] Update trilium.sh Switch to TriliumNext --- ct/trilium.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ct/trilium.sh b/ct/trilium.sh index d4ade959..ac162c50 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -55,9 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Stopping ${APP}" systemctl stop trilium.service @@ -65,7 +63,7 @@ sleep 1 msg_ok "Stopped ${APP}" msg_info "Updating to v${RELEASE}" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz +wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null cp -r trilium-linux-x64-server/* /opt/trilium/ msg_ok "Updated to v${RELEASE}" From 2782502e0614fe7fc0c37c0a3871178086d710a5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 8 Aug 2024 13:41:56 -0400 Subject: [PATCH 3299/3335] Update frigate-install.sh pin version to 13.2 --- install/frigate-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index f9765286..7d84f370 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -46,7 +46,8 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_ok "Set Up Hardware Acceleration" -RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') +#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') +RELEASE=v0.13.2 msg_ok "Stop spinner to prevent segmentation fault" msg_info "Installing Frigate $RELEASE (Perseverance)" if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi From 23ebc32489a9598594a3938f5f8068c2bdbf729e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Fri, 9 Aug 2024 01:06:02 -0400 Subject: [PATCH 3300/3335] Support frigate latest release (#3495) --- install/frigate-install.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 7d84f370..61a10d9e 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Copyright (c) 2021-2024 tteck -# Authors: tteck (tteckster) +# Author: tteck (tteckster) +# Co-Author: remz1337 # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE @@ -14,11 +15,12 @@ network_check update_os msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y {curl,sudo,mc,git,gpg,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev,jq} +$STD apt-get install -y {curl,sudo,mc,git,gpg,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev,jq,moreutils} msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" $STD apt-get install -y {python3,python3-dev,python3-setuptools,python3-distutils,python3-pip} +$STD pip install --upgrade pip msg_ok "Installed Python3 Dependencies" msg_info "Installing Node.js" @@ -46,8 +48,7 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_ok "Set Up Hardware Acceleration" -#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') -RELEASE=v0.13.2 +RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') msg_ok "Stop spinner to prevent segmentation fault" msg_info "Installing Frigate $RELEASE (Perseverance)" if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi @@ -63,6 +64,7 @@ export TARGETARCH="amd64" echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections wget -q -O /opt/frigate/docker/main/install_deps.sh https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/main/install_deps.sh $STD /opt/frigate/docker/main/install_deps.sh +$STD apt update $STD ln -svf /usr/lib/btbn-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg $STD ln -svf /usr/lib/btbn-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe $STD pip3 install -U /wheels/*.whl @@ -119,7 +121,7 @@ if grep -q -o -m1 'avx[^ ]*' /proc/cpuinfo; then detectors: ov: type: openvino - device: AUTO + device: CPU model: path: /openvino-model/FP16/ssdlite_mobilenet_v2.xml model: @@ -169,11 +171,19 @@ msg_ok "Installed Coral Object Detection Model" msg_info "Building Nginx with Custom Modules" $STD /opt/frigate/docker/main/build_nginx.sh -sed -i 's/exec nginx/exec \/usr\/local\/nginx\/sbin\/nginx/g' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +#sed -i 's/exec nginx/exec \/usr\/local\/nginx\/sbin\/nginx/g' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +sed -e '/s6-notifyoncheck/ s/^#*/#/' -i /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run sed -i 's/error_log \/dev\/stdout warn\;/error_log \/dev\/shm\/logs\/nginx\/current warn\;/' /usr/local/nginx/conf/nginx.conf sed -i 's/access_log \/dev\/stdout main\;/access_log \/dev\/shm\/logs\/nginx\/current main\;/' /usr/local/nginx/conf/nginx.conf +ln -svf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx msg_ok "Built Nginx" +msg_info "Installing Tempio" +sed -i 's|/rootfs/usr/local|/usr/local|g' /opt/frigate/docker/main/install_tempio.sh +$STD /opt/frigate/docker/main/install_tempio.sh +ln -svf /usr/local/tempio/bin/tempio /usr/local/bin/tempio +msg_ok "Installed Tempio" + msg_info "Creating Services" cat </etc/systemd/system/create_directories.service [Unit] @@ -201,7 +211,8 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/go2rtc/current -ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run +#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run +ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/go2rtc/current StandardError=file:/dev/shm/logs/go2rtc/current @@ -223,7 +234,8 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/frigate/current -ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/frigate/current StandardError=file:/dev/shm/logs/frigate/current @@ -245,7 +257,8 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/nginx/current -ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/nginx/current StandardError=file:/dev/shm/logs/nginx/current @@ -261,4 +274,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" +msg_ok "Cleaned" \ No newline at end of file From 88de3536ab39610eee8eada9ebb99e3da9f9f0e6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 10 Aug 2024 12:55:05 -0400 Subject: [PATCH 3301/3335] Update frigate-install.sh test --- install/frigate-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 61a10d9e..a8d9ee3b 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -211,8 +211,8 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/go2rtc/current -#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run -ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" +ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run +#ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/go2rtc/current StandardError=file:/dev/shm/logs/go2rtc/current @@ -234,8 +234,8 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/frigate/current -#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run -ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" +ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +#ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/frigate/current StandardError=file:/dev/shm/logs/frigate/current @@ -274,4 +274,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From 3c4149907405a03acc869776e86ca4844312f89e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Aug 2024 05:51:33 -0400 Subject: [PATCH 3302/3335] Update frigate-install.sh clean up code --- install/frigate-install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index a8d9ee3b..09a14e65 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -171,7 +171,6 @@ msg_ok "Installed Coral Object Detection Model" msg_info "Building Nginx with Custom Modules" $STD /opt/frigate/docker/main/build_nginx.sh -#sed -i 's/exec nginx/exec \/usr\/local\/nginx\/sbin\/nginx/g' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run sed -e '/s6-notifyoncheck/ s/^#*/#/' -i /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run sed -i 's/error_log \/dev\/stdout warn\;/error_log \/dev\/shm\/logs\/nginx\/current warn\;/' /usr/local/nginx/conf/nginx.conf sed -i 's/access_log \/dev\/stdout main\;/access_log \/dev\/shm\/logs\/nginx\/current main\;/' /usr/local/nginx/conf/nginx.conf @@ -212,7 +211,6 @@ RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/go2rtc/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run -#ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/go2rtc/current StandardError=file:/dev/shm/logs/go2rtc/current @@ -235,7 +233,6 @@ RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/frigate/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run -#ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/frigate/current StandardError=file:/dev/shm/logs/frigate/current @@ -257,8 +254,7 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/nginx/current -#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run -ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" +ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run StandardOutput=file:/dev/shm/logs/nginx/current StandardError=file:/dev/shm/logs/nginx/current From a28eb2fd46d2798d4e8b16287a61d49795059839 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Aug 2024 08:34:02 -0400 Subject: [PATCH 3303/3335] Update matterbridge-install.sh refactor fixes https://github.com/tteck/Proxmox/issues/3499 --- install/matterbridge-install.sh | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/install/matterbridge-install.sh b/install/matterbridge-install.sh index 47948471..bac8578f 100644 --- a/install/matterbridge-install.sh +++ b/install/matterbridge-install.sh @@ -15,17 +15,11 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y --no-install-recommends \ - build-essential \ - unzip \ - curl \ - sudo \ - git \ - make \ - gnupg \ - ca-certificates \ - mc +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -40,15 +34,7 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Install Matterbridge" -RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip" -unzip -q ${RELEASE}.zip -mv matterbridge-${RELEASE} /opt/matterbridge -rm -R ${RELEASE}.zip -cd /opt/matterbridge -$STD npm ci -$STD npm run build -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +$STD npm install -g matterbridge msg_ok "Installed Matterbridge" msg_info "Creating Service" @@ -59,16 +45,13 @@ After=network-online.target [Service] Type=simple -ExecStart=/usr/bin/npm run start:bridge -WorkingDirectory=/opt/matterbridge +ExecStart=matterbridge -bridge -service +WorkingDirectory=/root/Matterbridge StandardOutput=inherit StandardError=inherit Restart=always RestartSec=10s TimeoutStopSec=30s -User=root -Environment=PATH=/usr/bin:/usr/local/bin:/opt/matterbridge/bin -Environment=NODE_ENV=production [Install] WantedBy=multi-user.target From 08debd9442a599214651a5abd331493ebed270d1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Aug 2024 08:42:40 -0400 Subject: [PATCH 3304/3335] Update matterbridge-install.sh create directory --- install/matterbridge-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/matterbridge-install.sh b/install/matterbridge-install.sh index bac8578f..2d895e25 100644 --- a/install/matterbridge-install.sh +++ b/install/matterbridge-install.sh @@ -34,6 +34,7 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Install Matterbridge" +mkdir -p /root/Matterbridge $STD npm install -g matterbridge msg_ok "Installed Matterbridge" From 41b63495dbf14fae13a2bb27c1bb8d2164c33a5b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Aug 2024 08:49:29 -0400 Subject: [PATCH 3305/3335] Update matterbridge.sh refactor update --- ct/matterbridge.sh | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/ct/matterbridge.sh b/ct/matterbridge.sh index e0d04f26..097d025a 100644 --- a/ct/matterbridge.sh +++ b/ct/matterbridge.sh @@ -55,36 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - -RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') -if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Stopping ${APP} Service" - systemctl stop matterbridge - msg_ok "Stopped ${APP} Service" - - msg_info "Updating ${APP} to ${RELEASE}" - cd /opt/matterbridge - wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip" - unzip -q ${RELEASE}.zip - mv matterbridge-${RELEASE} /opt/matterbridge - cd /opt/matterbridge - npm ci >/dev/null 2>&1 - npm run build >/dev/null 2>&1 - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated ${APP} to ${RELEASE}" - - msg_info "Cleaning up" - rm /opt/${RELEASE}.zip - msg_ok "Cleaned" - - msg_info "Starting ${APP} Service" - systemctl start matterbridge - sleep 1 - msg_ok "Started ${APP} Service" - msg_ok "Updated Successfully!\n" -else - msg_ok "No update required. ${APP} is already at ${RELEASE}" -fi +msg_error "Update via the Matterbridge UI" exit } From 448cf931630fb895426a22fd9e0212f75b6a5e81 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 11 Aug 2024 08:50:55 -0400 Subject: [PATCH 3306/3335] Update matterbridge.sh tweak --- ct/matterbridge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/matterbridge.sh b/ct/matterbridge.sh index 097d025a..48245bd5 100644 --- a/ct/matterbridge.sh +++ b/ct/matterbridge.sh @@ -54,7 +54,7 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /opt/matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ ! -d /root/Matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "Update via the Matterbridge UI" exit } From e4ad002ce52caea2024ef416d8e36b0835b58850 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Aug 2024 07:24:04 -0400 Subject: [PATCH 3307/3335] Update frigate-install.sh make `ln` command silent --- install/frigate-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 09a14e65..bdb57a7c 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -174,13 +174,13 @@ $STD /opt/frigate/docker/main/build_nginx.sh sed -e '/s6-notifyoncheck/ s/^#*/#/' -i /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run sed -i 's/error_log \/dev\/stdout warn\;/error_log \/dev\/shm\/logs\/nginx\/current warn\;/' /usr/local/nginx/conf/nginx.conf sed -i 's/access_log \/dev\/stdout main\;/access_log \/dev\/shm\/logs\/nginx\/current main\;/' /usr/local/nginx/conf/nginx.conf -ln -svf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx +ln -sf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx msg_ok "Built Nginx" msg_info "Installing Tempio" sed -i 's|/rootfs/usr/local|/usr/local|g' /opt/frigate/docker/main/install_tempio.sh $STD /opt/frigate/docker/main/install_tempio.sh -ln -svf /usr/local/tempio/bin/tempio /usr/local/bin/tempio +ln -sf /usr/local/tempio/bin/tempio /usr/local/bin/tempio msg_ok "Installed Tempio" msg_info "Creating Services" From aca97a3da3d1677cfec7e9324306b26881c887c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 12 Aug 2024 10:19:08 -0400 Subject: [PATCH 3308/3335] Update frigate-install.sh revert service files --- install/frigate-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index bdb57a7c..b04dd94f 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -210,7 +210,7 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/go2rtc/current -ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run +ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/go2rtc/current StandardError=file:/dev/shm/logs/go2rtc/current @@ -232,7 +232,7 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/frigate/current -ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/frigate/current StandardError=file:/dev/shm/logs/frigate/current @@ -254,7 +254,7 @@ Restart=always RestartSec=1 User=root ExecStartPre=+rm /dev/shm/logs/nginx/current -ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '" StandardOutput=file:/dev/shm/logs/nginx/current StandardError=file:/dev/shm/logs/nginx/current From 72dfc20090ada0e197e3f681e95b4c839c69814e Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 13 Aug 2024 08:43:41 -0400 Subject: [PATCH 3309/3335] Update changedetection-install.sh use browserless v2 https://github.com/dgtlmoon/changedetection.io/discussions/1953 --- install/changedetection-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 5a10f779..d42c5bb3 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -74,7 +74,7 @@ msg_ok "Installed Change Detection" msg_info "Installing Browserless & Playwright" mkdir /opt/browserless $STD python3 -m pip install playwright -$STD git clone -b v1 https://github.com/browserless/chrome /opt/browserless +$STD git clone https://github.com/browserless/chrome /opt/browserless $STD npm install --prefix /opt/browserless $STD npm run build --prefix /opt/browserless $STD npm prune production --prefix /opt/browserless @@ -123,8 +123,8 @@ Wants=browserless.service [Service] Type=simple WorkingDirectory=/opt/changedetection -Environment="WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub" -Environment="PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?stealth=1&--disable-web-security=true" +Environment=WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub +Environment=PLAYWRIGHT_DRIVER_URL=ws://browserless-chrome:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true ExecStart=changedetection.io -d /opt/changedetection -p 5000 [Install] WantedBy=multi-user.target From 604b7ee6287c7e3afed143e85ef3951fac960048 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Aug 2024 06:44:53 -0400 Subject: [PATCH 3310/3335] Update bunkerweb-install.sh Install nginx=1.26.1* --- install/bunkerweb-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index 4f15709c..aeb4e587 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -26,7 +26,7 @@ msg_info "Installing Nginx" wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list $STD apt-get update -$STD apt-get install -y nginx +$STD apt-get install -y nginx=1.26.1* msg_ok "Installed Nginx" RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') From 631ef46466dfc8feffe1bd358ee5289850f89b1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 17 Aug 2024 06:47:34 -0400 Subject: [PATCH 3311/3335] Update bunkerweb.sh nginx=1.26.1* --- ct/bunkerweb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 14e8a2a6..42f0e50f 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -66,7 +66,7 @@ Pin: version ${RELEASE} Pin-Priority: 1001 EOF apt-get update - apt-get install nginx -y + apt-get install -y nginx=1.26.1* apt-get install -y bunkerweb=${RELEASE} echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" From 28085bb2e78b63503b23922dd07f06276dd699d4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 18 Aug 2024 22:30:57 -0400 Subject: [PATCH 3312/3335] Update alpine-vaultwarden.sh restart vaultwarden --- ct/alpine-vaultwarden.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 23bb5f26..9b06d51d 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -71,7 +71,7 @@ function update_script() { header_info case $CHOICE in 1) - apk update && apk upgrade + apk update && apk upgrade && rc-service vaultwarden restart -q exit ;; 2) From 0a33d1739ec3a49011411929bd46a260e92e99f9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Aug 2024 07:35:44 -0400 Subject: [PATCH 3313/3335] Update commafeed-install.sh refactor closes https://github.com/tteck/Proxmox/issues/3551 --- install/commafeed-install.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/install/commafeed-install.sh b/install/commafeed-install.sh index 8db106e7..c9ee0af7 100644 --- a/install/commafeed-install.sh +++ b/install/commafeed-install.sh @@ -27,11 +27,14 @@ $STD apt-get update $STD apt-get -y install zulu17-jdk msg_ok "Installed Azul Zulu" -msg_info "Installing CommaFeed" -mkdir /opt/commafeed && cd /opt/commafeed -wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar -wget -q https://github.com/Athou/commafeed/releases/latest/download/config.yml.example -O config.yml -msg_ok "Installed CommaFeed" +RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +msg_info "Installing CommaFeed ${RELEASE}" +mkdir /opt/commafeed +wget -q https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip +unzip -q commafeed-${RELEASE}-h2-jvm.zip +mv commafeed-${RELEASE}-h2/* /opt/commafeed/ +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed CommaFeed ${RELEASE}" msg_info "Creating Service" cat </etc/systemd/system/commafeed.service @@ -40,7 +43,7 @@ Description=CommaFeed Service After=network.target [Service] -ExecStart=/usr/bin/java -Djava.net.preferIPv4Stack=true -jar /opt/commafeed/commafeed.jar server /opt/commafeed/config.yml +ExecStart=java -jar quarkus-run.jar WorkingDirectory=/opt/commafeed/ Restart=always @@ -54,7 +57,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf zulu-repo_1.0.0-3_all.deb +rm -rf commafeed-${RELEASE}-h2 commafeed-${RELEASE}-h2-jvm.zip zulu-repo_1.0.0-3_all.deb $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 52bfc1725f3efa9c056dd0d23c7e950ba9a5e7e5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Aug 2024 07:56:39 -0400 Subject: [PATCH 3314/3335] Update commafeed.sh refactor --- ct/commafeed.sh | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/ct/commafeed.sh b/ct/commafeed.sh index c5eeecad..eb62d0a0 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -55,19 +55,27 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/commafeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping CommaFeed" -systemctl stop commafeed -msg_ok "Stopped CommaFeed" +RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4) +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP}" + systemctl stop commafeed + msg_ok "Stopped ${APP}" -msg_info "Updating CommaFeed" -cd /opt/commafeed -rm commafeed.jar -wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar -msg_ok "Updated CommaFeed" + msg_info "Updating ${APP} to ${RELEASE}" + wget https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip + unzip -q commafeed-${RELEASE}-h2-jvm.zip + rsync -a --exclude 'data/' commafeed-${RELEASE}-h2/ /opt/commafeed/ + rm -rf commafeed-${RELEASE}-h2-jvm.zip + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" -msg_info "Starting CommaFeed" -systemctl start commafeed -msg_ok "Update Completed Successfully" + msg_info "Starting ${APP}" + systemctl start commafeed + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi exit } From bfa2b0c0ee7139c57efe9cae215325b6e1b4f037 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Aug 2024 07:58:58 -0400 Subject: [PATCH 3315/3335] Update commafeed.sh tweak --- ct/commafeed.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/commafeed.sh b/ct/commafeed.sh index eb62d0a0..34c50868 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -62,7 +62,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v msg_ok "Stopped ${APP}" msg_info "Updating ${APP} to ${RELEASE}" - wget https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip + wget -q https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip unzip -q commafeed-${RELEASE}-h2-jvm.zip rsync -a --exclude 'data/' commafeed-${RELEASE}-h2/ /opt/commafeed/ rm -rf commafeed-${RELEASE}-h2-jvm.zip From 9db6aa8fbb461a901439f2f8d5ef1ab7b48435c6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Aug 2024 08:01:36 -0400 Subject: [PATCH 3316/3335] Update commafeed-install.sh add rsync as a dependency --- install/commafeed-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/commafeed-install.sh b/install/commafeed-install.sh index c9ee0af7..4806e863 100644 --- a/install/commafeed-install.sh +++ b/install/commafeed-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y rsync msg_ok "Installed Dependencies" msg_info "Installing Azul Zulu" From aec826bbb3e1cf235e7513fbb0c33aff665c26b5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Aug 2024 08:03:54 -0400 Subject: [PATCH 3317/3335] Update commafeed.sh tweak --- ct/commafeed.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/commafeed.sh b/ct/commafeed.sh index 34c50868..7b8b16b6 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -65,7 +65,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v wget -q https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip unzip -q commafeed-${RELEASE}-h2-jvm.zip rsync -a --exclude 'data/' commafeed-${RELEASE}-h2/ /opt/commafeed/ - rm -rf commafeed-${RELEASE}-h2-jvm.zip + rm -rf commafeed-${RELEASE}-h2 commafeed-${RELEASE}-h2-jvm.zip echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" From de1a4b0914c63849912cb5187117191b8eeba1b0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 19 Aug 2024 08:09:44 -0400 Subject: [PATCH 3318/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a7bb37a..33f12ea0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,14 @@ Be cautious of copycat or coat-tailing sites that exploit the project's populari - 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. +## 2024-08-19 + +### Changed + +- **CommaFeed LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/0a33d1739ec3a49011411929bd46a260e92e99f9) + - Refactor Code + - Breaking Change + ## 2024-08-06 ### Changed From 9d579083bf9df05f1a425a865f85da1fbcd6d73f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Aug 2024 16:10:49 -0400 Subject: [PATCH 3319/3335] Update wireguard.sh - refactor code - breaking change --- ct/wireguard.sh | 71 +++++-------------------------------------------- 1 file changed, 6 insertions(+), 65 deletions(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 5feee4ac..a183c6bb 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -19,11 +19,11 @@ EOF header_info echo -e "Loading..." APP="Wireguard" -var_disk="2" +var_disk="4" var_cpu="1" var_ram="512" var_os="debian" -var_version="11" +var_version="12" variables color catch_errors @@ -53,70 +53,9 @@ function default_settings() { } function update_script() { -if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP} LXC" ON \ - "2" "Install WGDashboard" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" +if [[ ! -d /etc/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_error "Update WireGuard via apt" exit -fi -if [ "$UPD" == "2" ]; then - if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then - cd /etc/wgdashboard/src - chmod u+x wgd.sh - ./wgd.sh update - msg_ok "Updated Successfully" - exit - fi -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing Python3-pip" -apt-get install -y python3-pip &>/dev/null -pip install flask &>/dev/null -pip install ifcfg &>/dev/null -pip install flask_qrcode &>/dev/null -pip install icmplib &>/dev/null -msg_ok "Installed Python3-pip" - -msg_info "Installing WGDashboard" -WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') - -git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null -cd /etc/wgdashboard/src -chmod u+x wgd.sh -./wgd.sh install &>/dev/null -chmod -R 755 /etc/wireguard -msg_ok "Installed WGDashboard" - -msg_info "Creating Service" -service_path="/etc/systemd/system/wg-dashboard.service" -echo "[Unit] -After=systemd-networkd.service - -[Service] -WorkingDirectory=/etc/wgdashboard/src -ExecStart=/usr/bin/python3 /etc/wgdashboard/src/dashboard.py -Restart=always - - -[Install] -WantedBy=default.target" >$service_path -chmod 664 /etc/systemd/system/wg-dashboard.service -systemctl daemon-reload -systemctl enable wg-dashboard.service &>/dev/null -systemctl start wg-dashboard.service &>/dev/null -msg_ok "Created Service" -echo -e "WGDashboard should be reachable by going to the following URL. - ${BL}http://${IP}:10086${CL} admin|admin \n" -exit -fi } start @@ -124,3 +63,5 @@ build_container description msg_ok "Completed Successfully!\n" +echo -e "WGDashboard should be reachable by going to the following URL. + ${BL}http://${IP}:10086${CL} admin|admin \n" From 723365a79df7cc0fd29b1af8f7ef200a7e0921b1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Aug 2024 16:12:01 -0400 Subject: [PATCH 3320/3335] Update wireguard-install.sh - refactor code - breaking change --- install/wireguard-install.sh | 55 +++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 7cd00403..e1b470fc 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -17,29 +17,46 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gunicorn +$STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Installing WireGuard (using pivpn.io)" -OPTIONS_PATH='/options.conf' -cat >$OPTIONS_PATH <>/etc/sysctl.conf +$STD sysctl -p /etc/sysctl.conf +msg_ok "Installed WGDashboard" + +msg_info "Creating Service" +cat </etc/systemd/system/wg-dashboard.service +[Unit] +After=syslog.target network-online.target +Wants=wg-quick.target +ConditionPathIsDirectory=/etc/wireguard + +[Service] +Type=forking +PIDFile=/etc/wgdashboard/src/gunicorn.pid +WorkingDirectory=/etc/wgdashboard/src +ExecStart=/etc/wgdashboard/src/wgd.sh start +ExecStop=/etc/wgdashboard/src/wgd.sh stop +ExecReload=/etc/wgdashboard/src/wgd.sh restart +TimeoutSec=120 +PrivateTmp=yes +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now wg-dashboard.service +msg_ok "Created Service" + motd_ssh customize From 561419f1a2465c4def1c175a9eec21038b6d1215 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Aug 2024 16:14:24 -0400 Subject: [PATCH 3321/3335] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f12ea0..fd304c7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,14 @@ Be cautious of copycat or coat-tailing sites that exploit the project's populari - 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. +## 2024-08-21 + +### Changed + +- **WireGuard LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/723365a79df7cc0fd29b1af8f7ef200a7e0921b1) + - Refactor Code + - Breaking Change + ## 2024-08-19 ### Changed From bb0a39e3c4c7189426d41b6c332b751791df65b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 23 Aug 2024 11:39:31 -0400 Subject: [PATCH 3322/3335] Update calibre-web.sh fixes https://github.com/tteck/Proxmox/issues/3576 --- ct/calibre-web.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index 5cf87184..d7b53adc 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -81,7 +81,7 @@ function update_script() { line=0 elif [ $i == "gmail" ]; then line=1 - elif [ $i == "goodreads" ]; then + elif [ $i == "goodreads" ]; then line=2 elif [ $i == "ldap" ]; then line=3 @@ -102,8 +102,8 @@ function update_script() { CHOICES=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CALIBRE-WEB OPTIONS" --separate-output --checklist "Choose Additional Options" 15 125 8 "${menu_array[@]}" 3>&1 1>&2 2>&3) spinner & SPINNER_PID=$! + options=() if [ ! -z "$CHOICES" ]; then - declare -a options for CHOICE in $CHOICES; do case "$CHOICE" in "1") From 7d77be87d517a48d3a8cfda68acc71c90263cd7f Mon Sep 17 00:00:00 2001 From: kabroxiko Date: Sat, 24 Aug 2024 08:24:06 -0400 Subject: [PATCH 3323/3335] Update plex-install.sh (#3580) - install gpg to avoid plexupdate warning --- install/plex-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/plex-install.sh b/install/plex-install.sh index 1ca8b0d9..d456be02 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -17,6 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Setting Up Hardware Acceleration" From 21abd0905255fa3992dfef156c816faf9f583049 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 09:15:31 -0400 Subject: [PATCH 3324/3335] Update wireguard-install.sh configure Network Address Translation --- install/wireguard-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index e1b470fc..4b775545 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -21,7 +21,10 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing WireGuard" -$STD apt-get install -y wireguard wireguard-tools net-tools iptables +$STD apt-get install -y wireguard wireguard-tools net-tools iptables iptables-persistent +iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE +$STD netfilter-persistent save +$STD netfilter-persistent reload msg_ok "Installed WireGuard" msg_info "Installing WGDashboard" From 2281a20b756ad8a1c4d7dc7f7fcfc5add2633766 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 09:47:37 -0400 Subject: [PATCH 3325/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 4b775545..b737c868 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing WireGuard" -$STD apt-get install -y wireguard wireguard-tools net-tools iptables iptables-persistent +$STD apt-get install -y wireguard wireguard-tools net-tools iptables iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE $STD netfilter-persistent save $STD netfilter-persistent reload From d5e66a25ff537e3d664146b8e0c75c73bbd77b04 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 09:52:59 -0400 Subject: [PATCH 3326/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index b737c868..de6c53f2 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing WireGuard" -$STD apt-get install -y wireguard wireguard-tools net-tools iptables +$STD apt-get install -y wireguard wireguard-tools net-tools iptables netfilter-persistent iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE $STD netfilter-persistent save $STD netfilter-persistent reload From 4844a003161bed7b5e63d3273e0c4c11f26d6b5b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 10:08:27 -0400 Subject: [PATCH 3327/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index de6c53f2..f0e98eab 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -21,10 +21,7 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing WireGuard" -$STD apt-get install -y wireguard wireguard-tools net-tools iptables netfilter-persistent -iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE -$STD netfilter-persistent save -$STD netfilter-persistent reload +$STD DEBIAN_FRONTEND=noninteractive apt-get install -y wireguard wireguard-tools net-tools iptables iptables-persistent msg_ok "Installed WireGuard" msg_info "Installing WGDashboard" From fef858ed7b9767be907466fd2b63d0be7e24854e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 10:12:57 -0400 Subject: [PATCH 3328/3335] Update wireguard-install.sh revert changes --- install/wireguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index f0e98eab..e1b470fc 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -21,7 +21,7 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing WireGuard" -$STD DEBIAN_FRONTEND=noninteractive apt-get install -y wireguard wireguard-tools net-tools iptables iptables-persistent +$STD apt-get install -y wireguard wireguard-tools net-tools iptables msg_ok "Installed WireGuard" msg_info "Installing WGDashboard" From 9d76662d76cc0772b2c99ae8c2e0f15db8d4475c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 10:26:56 -0400 Subject: [PATCH 3329/3335] Update wireguard-install.sh try again to configure Network Address Translation --- install/wireguard-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index e1b470fc..b647cc49 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -22,6 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard" $STD apt-get install -y wireguard wireguard-tools net-tools iptables +$STD DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent msg_ok "Installed WireGuard" msg_info "Installing WGDashboard" From 9ad778ca52455573d70409dca966cfd22eb9ecc6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 10:38:08 -0400 Subject: [PATCH 3330/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index b647cc49..b34a8979 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard" $STD apt-get install -y wireguard wireguard-tools net-tools iptables -$STD DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent +DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent &>/dev/null msg_ok "Installed WireGuard" msg_info "Installing WGDashboard" From 3fc4aa4a6e71b79c8c60a6b15463941c53bad057 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 10:48:37 -0400 Subject: [PATCH 3331/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index b34a8979..c80d4fe1 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -23,6 +23,7 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard" $STD apt-get install -y wireguard wireguard-tools net-tools iptables DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent &>/dev/null +$STD netfilter-persistent reload msg_ok "Installed WireGuard" msg_info "Installing WGDashboard" From 253da053feff9c39142a58391eac08ccb6aa88f5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 24 Aug 2024 11:02:04 -0400 Subject: [PATCH 3332/3335] Update wireguard-install.sh tweak --- install/wireguard-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index c80d4fe1..1b12dfbf 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -22,6 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard" $STD apt-get install -y wireguard wireguard-tools net-tools iptables +iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent &>/dev/null $STD netfilter-persistent reload msg_ok "Installed WireGuard" From 158c309d71cb99e075eb23eb08855596cb8990b7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Aug 2024 11:28:46 -0400 Subject: [PATCH 3333/3335] Update jellyfin-install.sh https://github.com/tteck/Proxmox/issues/3592 --- install/jellyfin-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 0b91e060..473c6b12 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -16,7 +16,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo -$STD apt-get install -y gnupg +$STD apt-get install -y gpg $STD apt-get install -y mc msg_ok "Installed Dependencies" @@ -51,6 +51,7 @@ EOF # Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5) $STD apt-get update $STD apt-get install -y jellyfin +chown -R jellyfin:adm /etc/jellyfin if [[ "$CTTYPE" == "0" ]]; then sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group else From df3047e295cb7ef18f1362ef41a6b77534c4e40a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Aug 2024 11:35:08 -0400 Subject: [PATCH 3334/3335] Update jellyfin-install.sh tweak --- install/jellyfin-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 473c6b12..e9d15dba 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -52,6 +52,7 @@ EOF $STD apt-get update $STD apt-get install -y jellyfin chown -R jellyfin:adm /etc/jellyfin +systemctl restart jellyfin if [[ "$CTTYPE" == "0" ]]; then sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group else From 4696040e93a57ef79f86d0198dcdc60ae2ad4ae3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 28 Aug 2024 11:42:30 -0400 Subject: [PATCH 3335/3335] Update jellyfin-install.sh tweak --- install/jellyfin-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index e9d15dba..590b9cd2 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -52,6 +52,7 @@ EOF $STD apt-get update $STD apt-get install -y jellyfin chown -R jellyfin:adm /etc/jellyfin +sleep 10 systemctl restart jellyfin if [[ "$CTTYPE" == "0" ]]; then sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e 's/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group

From 4b976b31dcaf7b992a266aa0eb143e193c244272 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 26 Nov 2023 18:30:31 -0500 Subject: [PATCH 2342/3335] Delete misc/images/tths.png --- misc/images/tths.png | Bin 25593 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 misc/images/tths.png diff --git a/misc/images/tths.png b/misc/images/tths.png deleted file mode 100644 index d70a0cd0d4383540c5559346be8865d9385f9d1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25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FrBa)XOv8x`K^}EgiAT*XI3ADgW7pnJ0UoF_<#c zl~v)QNbuL*2KThL3ubCJ3P)$sZMqm`tQLJ8e{!qD^9GgGWYJzk6m=TxjyZkIrZb#Q z^O1!f<+lmzm)N?3V+pM?F0lpAvK0tVSpId=`FU-;@%CYVts}!3_WKe~BHF5Jj49jn pQ|;RO;pG!PRx_$anT{5M{I1%@8;cl1_%08GilXL! Date: Mon, 27 Nov 2023 08:42:54 -0500 Subject: [PATCH 2343/3335] Add files via upload --- misc/images/logo-81x112.png | Bin 0 -> 5483 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 misc/images/logo-81x112.png diff --git a/misc/images/logo-81x112.png b/misc/images/logo-81x112.png new file mode 100644 index 0000000000000000000000000000000000000000..04bcb8d11c300e0ce0857a7060d6d2bcc5b0e17c GIT binary patch literal 5483 zcmV-x6_o0UP)Px~B}qg1P=Npmp@e2I2#AP^7dxQx*-*rS zfuIQXtGB3Ed}=_XB!o1YV5M80*DH3oLI~-EkUBG`?Dy?683-Yn*=I6I#_whS1>dZ_ z_FBKQ*4k^YT|&^&T8sc`F^6_!uyS91+*2ca|40a_Y)3Khrv>qqgC(OL&-r1Gwqkq; zA*8AUM1u&d{;_KOytHpW0nDJw;yOSyh#yiu`y(OclVhJr<^U*~%0LVzgj5^l<4yWM zl{>$%zaa7H9l!6;BneO{K!gqujab8Td-AVK{_;c)WCfrCKr{ei2Z+2NzILc!#-eRU zG8k;k`p&fuOXR|E>8_(QpWSyd9fAm`3`E)iA{TP?M2~I%?S@zPpV$mB5TJH|un^ub zjO&)zF*`R0>dL+OcRao8_YXi!E^zMvu~~2)$v!;y^{-1;i;_Q7s&s&8#C;jOa=O)vqP)+mi}5fC&DbouB`|L?0f3pO2m^3B6_ zt04FTV0OszKu${(O`y*V?@S0eV>I@9lb%yrZw`5m*MiLNmPnOlkF4I5eX$x53%PSI z5WxbC*5`ww3~21%3|Il6%t`?w`GYDp+z}b@YU<5H7PXFa{9M}&#QU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d8e79c505b82b3dd9940f1d2db Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 27 Nov 2023 09:01:41 -0500 Subject: [PATCH 2344/3335] Update build.func tweak --- misc/build.func | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index 78f3c74d..243fa3c5 100644 --- a/misc/build.func +++ b/misc/build.func @@ -573,9 +573,12 @@ EOF # This function sets the description of the container. description() { IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - pct set "$CTID" -description "# ${APP} LXC - ### https://tteck.github.io/Proxmox/ - " + pct set "$CTID" -description "

n@m8YXQEz2*`HIz>xy#$H$Ih7aN1ZFO$sH&g` zSmffm3R@tC@sB5|2D;LtUJEPU@wpT;44V1bSBKxG;PxI_c^6>0`Ljp-0m~8=o$=L5 z0^9Uc(?`OZ)DmtnA>&e^tkeqmNylyRyOpFmuXd*9t^TYMEj8xMY~*KKDVzJeWuKHqbqEpppkNmB6|qk z`1j$A9U|+5?ZYewZ7AI=a(q4Us4=C#Gmol)N_*C-LYSgSW#qS;ql!a=_dAADJt@8R z-H0=+guaNkh-7o4X5+;C_%J9?eYtGLBQ5`q79NaY2yA81=&w_y{qNTd9ppIpjiVc! z&~=+k>5C?$$1@P_aC4^Op{wC8&~Lw+rLAP%f zC}FDpU-+waYC)WX3RIWQ1AzJNzjJT?d4f`gZ}4Bngiy%o7d}U5zfJQnJsk4&gBR71 zLSfgx;vwH>2Jj{+&sAVKyh1uBhMcgcT&=59=K&Mv9hN_hr!!ipVzM)xlIN`q@kz*npZblBD zH{a}QUY^Vxj2eiD1fWzy`zBn~R3!FFKTmw|Mjt=j*6n?P*+DzTR$ zWm$P89lf*X39W$|i9C$LN7L&PPAw8X2ma}=SV= zbrKp^eP67hy@(u8>Se*6!r*VlgQL!Gb<7qw1;}7?a*vVWyK^KS^&3-J3|}!#%(d@x zsK4$C*;-dJ8nE4fr?>u0s^g%N;c0rd)Ps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